eth_getTransactionByHash (BSC)
Returns the information about a transaction requested by transaction hash. In the response object, `blockHash`, `blockNumber`, and `transactionIndex` are `null` when the transaction is pending.
Parameters
DATA
, 32 Bytes - hash of a transaction
params: [
"0xfaa094639848ffa5c0adb4e3a23f02e8b18a505e4c94a02f913c17bcae4814e8"
]
Returns
Object
- A transaction object, or null when no transaction was found:
blockHash
:DATA
, 32 Bytes - hash of the block where this transaction was in. null when its pending.blockNumber
:QUANTITY
- block number where this transaction was in. null when it's pending.from
:DATA
, 20 Bytes - address of the sender.gas
:QUANTITY
- gas provided by the sender.gasPrice
:QUANTITY
- gas price provided by the sender in Wei.hash
:DATA
, 32 Bytes - hash of the transaction.input
:DATA
- the data send along with the transaction.nonce
:QUANTITY
- the number of transactions made by the sender prior to this one.to
:DATA
, 20 Bytes - address of the receiver. null when it's a contract creation transaction.transactionIndex
:QUANTITY
- integer of the transactions index position in the block. null when its pending.value
:QUANTITY
- value transferred in Wei.v
:QUANTITY
- ECDSA recovery idr
:DATA
, 32 Bytes - ECDSA signature rs
:DATA
, 32 Bytes - ECDSA signature s
Request example
curl https://bsc.api.watchdata.io/node/jsonrpc?api_key=your_api_key
-X POST \
-H "Content-Type: application/json" \
-d'{"jsonrpc":"2.0","method":"eth_getTransactionByHash","params":["0xfaa094639848ffa5c0adb4e3a23f02e8b18a505e4c94a02f913c17bcae4814e8"],"id":0}'
Result
{
"jsonrpc": "2.0",
"id": 0,
"result": {
"hash": "0xfaa094639848ffa5c0adb4e3a23f02e8b18a505e4c94a02f913c17bcae4814e8",
"nonce": "0xe110a",
"transactionIndex": "0x62",
"from": "0xea0a6e3c511bbd10f4519ece37dc24887e11b55d",
"to": "0x0000000000000000000000000000000000001000",
"value": "0x12c438e2772cae5",
"gasPrice": "0x0",
"gas": "0x7fffffffffffffff",
"input": "0xf340fa01000000000000000000000000ea0a6e3c511bbd10f4519ece37dc24887e11b55d",
"v": "0x94",
"r": "0xf23e3c81c405683ad83a01648470eb042981a76682a8465f01423bf0b00e9f91",
"s": "0x30b752f7cbc98fb5e9a45ca75771084783dae99bf2ddc2b56f914bb167dad66a",
"chainId": "0x38",
"blockHash": "0x18b8e20d83a9c9636c6e9828157b1d684934e3e4c540531831460f9c8be60b9f",
"blockNumber": "0x119b752"
}
}
Last updated