atomicals / atomicals-electrumx

Electrumx Atomicals Indexer Server
MIT License
187 stars 55 forks source link

Fix burn and Fix transaction_by_scripthash function #156

Closed shadowv0vshadow closed 7 months ago

shadowv0vshadow commented 7 months ago
shadowv0vshadow commented 7 months ago

Fully test transaction_by_atomical_id transaction_by_height transaction_by_scripthash transaction API

Testnet:

transaction_by_atomical_id

curl -X POST http://0.0.0.0:5001/proxy/blockchain.atomicals.transaction_by_atomical_id -d '{"params":["9527efa43262636d8f5917fc763fbdd09333e4b387afd6d4ed7a905a127b27b4i0", 1, 0, "mint-dft", true]}
{
  "success": true,
  "response": {
    "result": [
      {
        "op": "mint-dft",
        "txid": "904ec3ffb9d55986a611b90616f010a36cd6bde064d01c55815667fb371ffc32",
        "height": 2583634,
        "tx_num": 74833955,
        "info": {
          "atomical_id": "9527efa43262636d8f5917fc763fbdd09333e4b387afd6d4ed7a905a127b27b4i0",
          "location_id": "904ec3ffb9d55986a611b90616f010a36cd6bde064d01c55815667fb371ffc32i0",
          "payload": {
            "args": {
              "time": 1711448970,
              "nonce": 1711448969,
              "bitworkc": "0000",
              "mint_ticker": "atom"
            }
          },
          "outputs": {
            "0": [
              {
                "address": "tb1pzxmvax02krvgw0tc06v7dz34zdvz9zynehcsfxky32h9zwg4nz4s9hk76h",
                "atomical_id": "9527efa43262636d8f5917fc763fbdd09333e4b387afd6d4ed7a905a127b27b4i0",
                "type": "FT",
                "index": 0,
                "value": 1000
              }
            ]
          }
        },
        "transfers": {
          "inputs": {},
          "outputs": {},
          "is_burned": false,
          "burned_fts": {},
          "is_cleanly_assigned": true
        }
      }
    ],
    "total": 812,
    "limit": 1,
    "offset": 0
  }
}

transaction_by_scripthash

curl -X POST http://0.0.0.0:5001/proxy/blockchain.atomicals.transaction_by_scripthash -d '{"params":["bda4604bbe5cf1d92320af484a47fd6d922d05263aa565ff643aba473e7ad50d",1, 0, ""]}'
{
  "success": true,
  "response": {
    "result": [
      {
        "op": "mint-dft",
        "txid": "2222ad8078e06d8fed0e99bb5b41759c7c428ee7be5abd0d1f4db71bfa75f468",
        "height": 2582007,
        "tx_num": 74014770,
        "info": {
          "atomical_id": "8217a3826fcfb284f3c764abbbfbf20a3503e8617f2149f9b0908ae6e4d8acf0i0",
          "location_id": "2222ad8078e06d8fed0e99bb5b41759c7c428ee7be5abd0d1f4db71bfa75f468i0",
          "payload": {
            "args": {
              "bitworkc": "2222.4",
              "mint_ticker": "rollover6",
              "nonce": 4318882,
              "time": 1710467792
            }
          },
          "outputs": {
            "0": [
              {
                "address": "tb1pp3gfvtv94fyn0xu4lwlh5yywld5s9spskut8mzjyyr80qvq70waqy5epvu",
                "atomical_id": "8217a3826fcfb284f3c764abbbfbf20a3503e8617f2149f9b0908ae6e4d8acf0i0",
                "type": "FT",
                "index": 0,
                "value": 547
              }
            ]
          }
        },
        "transfers": {
          "inputs": {},
          "outputs": {},
          "is_burned": false,
          "burned_fts": {},
          "is_cleanly_assigned": true
        }
      }
    ],
    "total": 85,
    "limit": 1,
    "offset": 0
  }
}