【问题标题】:get normal transaction by transaction hash in etherscan api通过 etherscan api 中的交易哈希获取正常交易
【发布时间】:2023-01-14 06:33:02
【问题描述】:

它在 etherscan 网站上提供了有关 txhash 的详细信息,但没有在 api named("Get 'Internal Transactions' by Transaction Hash") 中提供输出

给出这个结果:

{"status":"0","message":"No transactions found","result":[]}

【问题讨论】:

    标签: api etherscan


    【解决方案1】:

    你可以这样做:

    https://api.etherscan.io/api?module=proxy&action=eth_getTransactionByHash&txhash=<tx_hash>&apikey=<YourApiKeyToken>

    这将输出:

    {
       "jsonrpc":"2.0",
       "id":1,
       "result":{
          "blockHash":"0xf850331061196b8f2b67e1f43aaa9e69504c059d3d3fb9547b04f9ed4d141ab7",
          "blockNumber":"0xcf2420",
          "from":"0x00192fb10df37c9fb26829eb2cc623cd1bf599e8",
          "gas":"0x5208",
          "gasPrice":"0x19f017ef49",
          "maxFeePerGas":"0x1f6ea08600",
          "maxPriorityFeePerGas":"0x3b9aca00",
          "hash":"0xbc78ab8a9e9a0bca7d0321a27b2c03addeae08ba81ea98b03cd3dd237eabed44",
          "input":"0x",
          "nonce":"0x33b79d",
          "to":"0xc67f4e626ee4d3f272c2fb31bad60761ab55ed9f",
          "transactionIndex":"0x5b",
          "value":"0x19755d4ce12c00",
          "type":"0x2",
          "accessList":[
             
          ],
          "chainId":"0x1",
          "v":"0x0",
          "r":"0xa681faea68ff81d191169010888bbbe90ec3eb903e31b0572cd34f13dae281b9",
          "s":"0x3f59b0fa5ce6cf38aff2cfeb68e7a503ceda2a72b4442c7e2844d63544383e3"
       }
    }
    

    记录在 etherscan 中:https://docs.etherscan.io/api-endpoints/geth-parity-proxy

    【讨论】:

      猜你喜欢
      • 2022-10-25
      • 2021-10-08
      • 2017-04-08
      • 2021-07-15
      • 1970-01-01
      • 2021-06-25
      • 2021-08-10
      • 2014-08-21
      • 2019-08-02
      相关资源
      最近更新 更多