返回到文章

采纳

编辑于

eth_getTransactionByBlockNumberAndIndex

ethereumj
命令

eth_getTransactionByBlockNumberAndIndex,通过区块号和交易index位置,获取交易信息。

  • QUANTITY|TAG - 区块号,或"earliest", "latest", "pending"
  • QUANTITY - 交易的index位置。
    params: [
     '0x29c', // 668
     '0x0' // 0
    ]
    

返回

  • eth_getBlockByHash一样。

例子

// Request
curl -X POST --data '{"jsonrpc":"2.0","method":"eth_getTransactionByBlockNumberAndIndex","params":["0x29c", "0x0"],"id":1}'

跟`eth_getTransactionByHash`返回结果一样。