curl --request POST \
--url https://optimism-mainnet.core.chainstack.com/efb0a5eccd2caa5135eb54eba6f7f300 \
--header 'Content-Type: application/json' \
--data '{
"jsonrpc": "2.0",
"method": "eth_getTransactionByHash",
"id": 1,
"params": [
"0xd0a7bd7d80ba09a5a627b00fe6d05cde7d45939de9b16cb96d9029da1757b59b"
]
}'
{
"jsonrpc": "<string>",
"id": 123,
"result": {
"blockHash": "<string>",
"blockNumber": "<string>",
"from": "<string>",
"gas": "<string>",
"gasPrice": "<string>",
"hash": "<string>",
"input": "<string>",
"nonce": "<string>",
"to": "<string>",
"transactionIndex": "<string>",
"value": "<string>",
"v": "<string>",
"r": "<string>",
"s": "<string>"
}
}
curl --request POST \
--url https://optimism-mainnet.core.chainstack.com/efb0a5eccd2caa5135eb54eba6f7f300 \
--header 'Content-Type: application/json' \
--data '{
"jsonrpc": "2.0",
"method": "eth_getTransactionByHash",
"id": 1,
"params": [
"0xd0a7bd7d80ba09a5a627b00fe6d05cde7d45939de9b16cb96d9029da1757b59b"
]
}'
{
"jsonrpc": "<string>",
"id": 123,
"result": {
"blockHash": "<string>",
"blockNumber": "<string>",
"from": "<string>",
"gas": "<string>",
"gasPrice": "<string>",
"hash": "<string>",
"input": "<string>",
"nonce": "<string>",
"to": "<string>",
"transactionIndex": "<string>",
"value": "<string>",
"v": "<string>",
"r": "<string>",
"s": "<string>"
}
}
eth_getTransactionByHash
retrieves information about a transaction given its hash. This method is crucial for tracking transaction details and status.
transactionHash
— the hash of the transaction to retrieve.result
— an object containing details about the transaction, including the block hash, block number, from address, gas used, gas price, hash, input data, nonce, to address, transaction index, value transferred, and the signature components (v, r, s).eth_getTransactionByHash
method is essential for:
Transaction information for the given hash
The response is of type object
.
Was this page helpful?