eth_getTransactionByHash method
Returns information about a transaction for a given hash

Parameters

  1. 1.
    DATA, 32 Bytes - hash of a transaction

Returns

Object - A transaction object, or null when no transaction was found

Example

// Request
curl -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","method":"eth_getTransactionByHash","params":["0x1a04014895ea49b844a588da090b1325df4888e0c97cef2e1930ecf3f3b46b76"],"id":1}' https://bsc-api.bwarelabs.com/<your-endpoint-id>
// Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"blockHash": "0x5aacaeadbfb91fc7e178f8bc57028fb5a65dca9af9985e7a0363a4417d765222",
"blockNumber": "0x112f67",
"from": "0xf368735a1c7d95adadb12c0323b778ca75dc5667",
"gas": "0x12ba4",
"gasPrice": "0xc92a69c00",
"hash": "0x20c0530feca5ea9b4a55dab94d6b58cb34d99caff6c266d533201347f75d23da",
"input": "0xa9059cbb00000000000000000000000046256256100f9d80dfba2966472ef4d5d0e7d4c000000000000000000000000000000000000000000000002c9263d30351869412",
"nonce": "0x8",
"to": "0xe9e7cea3dedca5984780bafc599bd69add087d56",
"transactionIndex": "0x0",
"value": "0x0",
"v": "0x94",
"r": "0xdccf9919f2e4d40f1a7ad8c395d863cc9e242f364aa1b45b90ea23cf2e8c96aa",
"s": "0x487c054671c2a9dceabf8c0163e48c17fd4b87e86b9bc7de59eea14fa564754a"
}
}
Copy link