eth_getTransactionByHash
Returns the information about a transaction requested by transaction hash.
This method will use 40
Compute Units.
Reference: Here
Parameters
DATA
, 32 Bytes - hash of a transaction
params: ["0x88df016429689c079f3b2f6ad39fa052532c56795b733da78a91ebe6a713944b"]
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 its 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 its 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
:QUANTITY
- ECDSA signature rs
:QUANTITY
- ECDSA signature s
// Result
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"blockHash": "0xdf15d721c064ad201f44fa868d19462b264b3ca7ad111b5dafe696c344af15b8",
"blockNumber": "0x8693195",
"from": "0x408ecfba0254d87150956a0fad3c4efb002f3b67",
"to": "0x5e1a6c0d03e52cff49e887468111471b0f134a7a",
"gas": "0x15e32",
"gasPrice": "0x165a0bc00",
"hash": "0x1afd338e7ce7c734895602dfd2ce1ee62225ff86594a8864153d8f7fcf467b2c",
"input": "0xfd221031",
"nonce": "0xe9",
"transactionIndex": "0x0",
"value": "0x0",
"type": "0x0",
"chainId": "0xc488",
"v": "0x18933",
"r": "0xe0ceb39b86701942e67365a241289d6e7de2fb2c0618bc814f638ffe9067ac2e",
"s": "0x61125b504737c9096182f781392a10031738c4c5cffcbd3c20f3163eef81bb4a"
}
}
curl https://testnet.somnia.validationcloud.io/v1/<YOUR_API_KEY_HERE> \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"eth_getTransactionByHash","params":["0xc540c72ca4bab03c79e4dc7273941073e49fc102e395774ba39597fa9b3aef9d"],"id":1}'
Last updated
Was this helpful?