getTransactionReceipt

返回根据交易哈希查询的交易回执信息

参数

  • groupID: unsigned int - 群组ID
  • transactionHash: string - 交易哈希

返回值

  • object: - 交易信息,其字段如下:
    • blockHash: string - 包含该交易的区块哈希
    • blockNumber: string - 包含该交易的区块高度
    • contractAddress: string - 合约地址,如果创建合约交易,则为合约部署地址,如果是调用合约,则为”0x0000000000000000000000000000000000000000”
    • from: string - 发送者的地址
    • gasUsed: string - 交易消耗的gas
    • input: string - 交易的输入
    • logs: array - 交易产生的log
    • logsBloom: string - log的布隆过滤器值
    • output: string - 交易的输出
    • root: string - 状态根(state root)
    • status: string - 交易的状态值,参考:交易回执状态
    • to: string - 接收者的地址,创建合约交易的该值为null
    • transactionHash: string - 交易哈希
    • transactionIndex: string - 交易序号
  • 示例
  1. // Request
  2. curl -X POST --data '{"jsonrpc":"2.0","method":"getTransactionReceipt","params":[1,"0x708b5781b62166bd86e543217be6cd954fd815fd192b9a124ee9327580df8f3f"],"id":1}' http://127.0.0.1:8545 |jq
  3. // Result
  4. {
  5. "id": 1,
  6. "jsonrpc": "2.0",
  7. "result": {
  8. "blockHash": "0x977efec48c248ea4be87016446b40d7785d7b71b7d4e3aa0b103b9cf0f5fe19e",
  9. "blockNumber": "0xa",
  10. "contractAddress": "0x0000000000000000000000000000000000000000",
  11. "from": "0xcdcce60801c0a2e6bb534322c32ae528b9dec8d2",
  12. "gasUsed": "0x1fb8d",
  13. "input": "0xb602109a000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000014000000000000000000000000000000000000000000000000000000000000000203078313030303030303030303030303030303030303030303030303030303030000000000000000000000000000000000000000000000000000000000000000832303139303733300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002616100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000026262000000000000000000000000000000000000000000000000000000000000",
  14. "logs": [ ],
  15. "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
  16. "output": "0x0000000000000000000000000000000000000000000000000000000000000000",
  17. "root":"0x38723a2e5e8a17aa7950dc008209944e898f69a7bd10a23c839d341e935fd5ca",
  18. "status": "0x0",
  19. "to": "0x15538acd403ac1b2ff09083c70d04856b8c0bdfd",
  20. "transactionHash": "0x708b5781b62166bd86e543217be6cd954fd815fd192b9a124ee9327580df8f3f",
  21. "transactionIndex": "0x0"
  22. }
  23. }