Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix transaction return error atomical_id #163

Merged
merged 1 commit into from
Apr 11, 2024

Conversation

shadowv0vshadow
Copy link
Collaborator

@shadowv0vshadow shadowv0vshadow commented Apr 11, 2024

In some case:
Transaction_detail will return error atomical_id, Because one location UTXO include multiple atomicals. We must got the last one atomical_id of the location when we do a mint operation.

Example:

curl -X POST http://example.com/proxy/blockchain.atomicals.transaction -d '{"params":["367314ee57a2b68c79a3c16e32e6036901db3a59f76652aefd21a0990d01e47b"]}'
{
  "success": true,
  "response": {
    "op": "mint-nft-subrealm",
    "txid": "367314ee57a2b68c79a3c16e32e6036901db3a59f76652aefd21a0990d01e47b",
    "height": 2579801,
    "tx_num": 72420140,
    "info": {
      "atomical_id": "8888f4bd2773505211874d437c92f003224316a782386a0f38ccedf1ad1c9d39i0",   // this atomical must be f6325c93960c39f1bdbda35a66f0cd0688ebc8319b5bed71d2403fc40ef6bacai0
      "location_id": "367314ee57a2b68c79a3c16e32e6036901db3a59f76652aefd21a0990d01e47bi0",
      "payload": {
        "args": {
          "claim_type": "direct",
          "parent_realm": "8888f4bd2773505211874d437c92f003224316a782386a0f38ccedf1ad1c9d39i0",
          "request_subrealm": "123"
        }
      },
      "outputs": {
        "0": [
          {
            "address": "tb1pdvsnatds7zaqs5a3cwfjpmlwtjttg8fh9dlf4h4yuxmn96ka8t3qtsk3l8",
            "atomical_id": "8888f4bd2773505211874d437c92f003224316a782386a0f38ccedf1ad1c9d39i0",  // also. f6325c93960c39f1bdbda35a66f0cd0688ebc8319b5bed71d2403fc40ef6bacai0
            "type": "NFT",
            "index": 0,
            "value": 1000
          }
        ]
      }
    },
    "transfers": {
      "inputs": {
        "1": [
          {
            "txid": "3cc7efd779b9b2cb892f9ab0e10afa22972a598643dc206f1360c8f04c8329b1",
            "address": "tb1pdvsnatds7zaqs5a3cwfjpmlwtjttg8fh9dlf4h4yuxmn96ka8t3qtsk3l8",
            "atomical_id": "8888f4bd2773505211874d437c92f003224316a782386a0f38ccedf1ad1c9d39i0",
            "type": "NFT",
            "status": "verified",
            "index": 1,
            "value": 1000,
            "payload": {
              "args": {
                "time": 1706271945,
                "nonce": 4804,
                "bitworkc": "8888",
                "request_realm": "afk"
              }
            }
          },
          {
            "txid": "3cc7efd779b9b2cb892f9ab0e10afa22972a598643dc206f1360c8f04c8329b1",
            "address": "tb1pdvsnatds7zaqs5a3cwfjpmlwtjttg8fh9dlf4h4yuxmn96ka8t3qtsk3l8",
            "atomical_id": "206701b377d511e5c3bae949bf524d8ce2eaeeff259c2bd515d2f856fe11713ei0",
            "type": "NFT",
            "status": "verified",
            "index": 1,
            "value": 1000,
            "payload": {
              "args": {
                "claim_type": "direct",
                "parent_realm": "8888f4bd2773505211874d437c92f003224316a782386a0f38ccedf1ad1c9d39i0",
                "request_subrealm": "120"
              }
            }
          },
          {
            "txid": "3cc7efd779b9b2cb892f9ab0e10afa22972a598643dc206f1360c8f04c8329b1",
            "address": "tb1pdvsnatds7zaqs5a3cwfjpmlwtjttg8fh9dlf4h4yuxmn96ka8t3qtsk3l8",
            "atomical_id": "a8dc4adb5356b1b56242f8e65a63e20828e3539ad41ad60ab88adc2671a58b69i0",
            "type": "NFT",
            "status": "verified",
            "index": 1,
            "value": 1000,
            "payload": {
              "args": {
                "claim_type": "direct",
                "parent_realm": "8888f4bd2773505211874d437c92f003224316a782386a0f38ccedf1ad1c9d39i0",
                "request_subrealm": "1210"
              }
            }
          },
          {
            "txid": "3cc7efd779b9b2cb892f9ab0e10afa22972a598643dc206f1360c8f04c8329b1",
            "address": "tb1pdvsnatds7zaqs5a3cwfjpmlwtjttg8fh9dlf4h4yuxmn96ka8t3qtsk3l8",
            "atomical_id": "f5982a4cd02009da722b8e83eaa3ed57deb2cecde882655d1a449c215394c388i0",
            "type": "NFT",
            "status": "verified",
            "index": 1,
            "value": 1000,
            "payload": {
              "args": {
                "claim_type": "direct",
                "parent_realm": "8888f4bd2773505211874d437c92f003224316a782386a0f38ccedf1ad1c9d39i0",
                "request_subrealm": "110"
              }
            }
          },
          {
            "txid": "3cc7efd779b9b2cb892f9ab0e10afa22972a598643dc206f1360c8f04c8329b1",
            "address": "tb1pdvsnatds7zaqs5a3cwfjpmlwtjttg8fh9dlf4h4yuxmn96ka8t3qtsk3l8",
            "atomical_id": "b5d5f45c176d6d9a9e799c90214986ca7290170dd79a80383e7c9c08e15805cai0",
            "type": "NFT",
            "status": "verified",
            "index": 1,
            "value": 1000,
            "payload": {
              "args": {
                "claim_type": "direct",
                "parent_realm": "8888f4bd2773505211874d437c92f003224316a782386a0f38ccedf1ad1c9d39i0",
                "request_subrealm": "121"
              }
            }
          }
        ]
      },
      "outputs": {
        "0": [
          {
            "txid": "367314ee57a2b68c79a3c16e32e6036901db3a59f76652aefd21a0990d01e47b",
            "address": "tb1pdvsnatds7zaqs5a3cwfjpmlwtjttg8fh9dlf4h4yuxmn96ka8t3qtsk3l8",
            "atomical_id": "8888f4bd2773505211874d437c92f003224316a782386a0f38ccedf1ad1c9d39i0",
            "type": "NFT",
            "status": "verified",
            "index": 0,
            "value": 1000,
            "payload": {
              "args": {
                "time": 1706271945,
                "nonce": 4804,
                "bitworkc": "8888",
                "request_realm": "afk"
              }
            }
          },
          {
            "txid": "367314ee57a2b68c79a3c16e32e6036901db3a59f76652aefd21a0990d01e47b",
            "address": "tb1pdvsnatds7zaqs5a3cwfjpmlwtjttg8fh9dlf4h4yuxmn96ka8t3qtsk3l8",
            "atomical_id": "206701b377d511e5c3bae949bf524d8ce2eaeeff259c2bd515d2f856fe11713ei0",
            "type": "NFT",
            "status": "verified",
            "index": 0,
            "value": 1000,
            "payload": {
              "args": {
                "claim_type": "direct",
                "parent_realm": "8888f4bd2773505211874d437c92f003224316a782386a0f38ccedf1ad1c9d39i0",
                "request_subrealm": "120"
              }
            }
          },
          {
            "txid": "367314ee57a2b68c79a3c16e32e6036901db3a59f76652aefd21a0990d01e47b",
            "address": "tb1pdvsnatds7zaqs5a3cwfjpmlwtjttg8fh9dlf4h4yuxmn96ka8t3qtsk3l8",
            "atomical_id": "a8dc4adb5356b1b56242f8e65a63e20828e3539ad41ad60ab88adc2671a58b69i0",
            "type": "NFT",
            "status": "verified",
            "index": 0,
            "value": 1000,
            "payload": {
              "args": {
                "claim_type": "direct",
                "parent_realm": "8888f4bd2773505211874d437c92f003224316a782386a0f38ccedf1ad1c9d39i0",
                "request_subrealm": "1210"
              }
            }
          },
          {
            "txid": "367314ee57a2b68c79a3c16e32e6036901db3a59f76652aefd21a0990d01e47b",
            "address": "tb1pdvsnatds7zaqs5a3cwfjpmlwtjttg8fh9dlf4h4yuxmn96ka8t3qtsk3l8",
            "atomical_id": "f5982a4cd02009da722b8e83eaa3ed57deb2cecde882655d1a449c215394c388i0",
            "type": "NFT",
            "status": "verified",
            "index": 0,
            "value": 1000,
            "payload": {
              "args": {
                "claim_type": "direct",
                "parent_realm": "8888f4bd2773505211874d437c92f003224316a782386a0f38ccedf1ad1c9d39i0",
                "request_subrealm": "110"
              }
            }
          },
          {
            "txid": "367314ee57a2b68c79a3c16e32e6036901db3a59f76652aefd21a0990d01e47b",
            "address": "tb1pdvsnatds7zaqs5a3cwfjpmlwtjttg8fh9dlf4h4yuxmn96ka8t3qtsk3l8",
            "atomical_id": "b5d5f45c176d6d9a9e799c90214986ca7290170dd79a80383e7c9c08e15805cai0",
            "type": "NFT",
            "status": "verified",
            "index": 0,
            "value": 1000,
            "payload": {
              "args": {
                "claim_type": "direct",
                "parent_realm": "8888f4bd2773505211874d437c92f003224316a782386a0f38ccedf1ad1c9d39i0",
                "request_subrealm": "121"
              }
            }
          }
        ]
      },
      "is_burned": false,
      "burned_fts": {},
    }
  }
}

@shadowv0vshadow shadowv0vshadow marked this pull request as ready for review April 11, 2024 18:45
@shadowv0vshadow
Copy link
Collaborator Author

And also remove some useless function in http-session.py

@atomicals atomicals merged commit c7ccea3 into atomicals:develop Apr 11, 2024
@shadowv0vshadow shadowv0vshadow deleted the fix-error-atomical-id branch April 17, 2024 12:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants