cardano-foundation / cardano-graphql

GraphQL API for Cardano
Apache License 2.0
262 stars 104 forks source link

The latest transaction output for some transactions is empty #902

Open YuXiaoCoder opened 2 days ago

YuXiaoCoder commented 2 days ago

Ask a question

Ask a question

In fact these transactions have outpus, explorer link: https://cardanoscan.io/transaction/39e387bb310c5f13d7dc5e2fb47edee45834e9348f1db0ebc7534a5ac142c5db?tab=summary

Node data has been synchronized:

curl -X POST -H "Content-Type: application/json" -d '{"query": "{ cardano { tip { number slotNo epoch { number } } } }"}' http://127.0.0.1:3100/graphql
{"data":{"cardano":{"tip":{"number":11136963,"slotNo":"140932712","epoch":{"number":523}}}}}
curl -X POST -H "Content-Type: application/json" -d '{"query": "{ cardanoDbMeta { initialized syncPercentage }}"}' http://127.0.0.1:3100/graphql
{"data":{"cardanoDbMeta":{"initialized":true,"syncPercentage":100}}}

docker image:

postgres:16.3-alpine
cardanosolutions/ogmios:v6.9.0
ghcr.io/intersectmbo/cardano-node:10.1.2
ghcr.io/intersectmbo/cardano-db-sync:13.6.0.1
cardanofoundation/cardano-graphql-background:8.3.0-mainnet
cardanofoundation/cardano-graphql-hasura:8.3.0
cardanofoundation/cardano-graphql-server:8.3.0-mainnet
cardanofoundation/cf-token-metadata-registry-api:1.0.2

curl query:

curl -s -X POST -H "Content-Type: application/json" -d '{"query": "query txByHash($value: Hash32Hex!) {transactions(where: { hash: { _eq: $value } }) {hash fee blockIndex inputs {sourceTxHash sourceTxIndex address tokens {asset {assetId assetName} quantity} value} outputs {index tokens {asset {assetId assetName} quantity} value address} block {forgedAt number hash}}}", "variables": { "value": "39e387bb310c5f13d7dc5e2fb47edee45834e9348f1db0ebc7534a5ac142c5db"}}' http://127.0.0.1:3100/graphql | jq

The return result is as follows:

{
  "data": {
    "transactions": [
      {
        "hash": "39e387bb310c5f13d7dc5e2fb47edee45834e9348f1db0ebc7534a5ac142c5db",
        "fee": "876277",
        "blockIndex": 25,
        "inputs": [
          {
            "sourceTxHash": "038d6b935a10b518e5e497612d85ccc6e5d4b7ae2d38fdf9cfc624009ed8ec61",
            "sourceTxIndex": 0,
            "address": "DdzFFzCqrht2kVy6mPzXRFf7cLGvJ9n9T6GhsboLTrTHykPYqKhAjeLR2TqsPBKCY3rtpVKVEk8295a83cTykTDeHpSmWkaEto3UkY3Y",
            "tokens": [],
            "value": "3266000000"
          },
          {
            "sourceTxHash": "0bf2a952db0e331a65b62223c9ab8a0cb59807f890ce864c392fe35d1cb43e8f",
            "sourceTxIndex": 0,
            "address": "DdzFFzCqrhtC9Pya8KAf8TxAoptt6B4dCJkXz8ZU6SzV2RGWHi9BthwyqCKoPViJZYwDKT8X5Ks7DxDG1thArzNqC65CGJXMjPLLrLdb",
            "tokens": [],
            "value": "7500000000"
          }
        ],
        "outputs": [
          {
            "index": 0,
            "tokens": [],
            "value": "10765123723",
            "address": "addr1q9h4f2vhh5vnqgnsejan3psw6mj3a504fxlqm2eh3262qufesdvfs83ulr22vprsv9mwnt0vgkfwxlflxkns32twqzdqjpq2na"
          }
        ],
        "block": {
          "forgedAt": "2024-11-25T01:36:22Z",
          "number": 11136949,
          "hash": "722810784681bab4337bc4b85a4d1e1d7aaf2e10384b6b5136461bf8fa767105"
        }
      }
    ]
  }
}