eth_getRawTransactionByHash
Returns the raw RLP-encoded transaction data for a transaction by its hash. This method uses 80 credits from your daily balance.
Parameters
transaction hash: [Required] The hash of the transaction to retrieve.
Returns
The raw RLP-encoded transaction data as a hexadecimal string, or null if the transaction is not found.
Example
Replace <YOUR-API-KEY> with an API key from your MetaMask Developer dashboard.
Request
- curl
- WSS
curl https://megaeth-mainnet.infura.io/v3/<YOUR-API-KEY> \
-X POST \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "eth_getRawTransactionByHash",
"params": [
"0x691455c4cec43d76d15af9734556efec72b4c44b557254db1bbbfeea86d103fd"
],
"id": 1
}'
wscat -c wss://megaeth-mainnet.infura.io/ws/v3/<YOUR-API-KEY> -x '{"jsonrpc":"2.0","method":"eth_getRawTransactionByHash","params":["0x691455c4cec43d76d15af9734556efec72b4c44b557254db1bbbfeea86d103fd"],"id":1}'
Response
- JSON
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x02f86c0180843b9aca008502540be4008252089400000000000000000000000000000000000000008080c001a0b7c3a2f1a9f0e2b1c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f9a0b1c2d3e4f5a06c2b1a0f9e8d7c6b5a4f3e2d1c0b9a8f7e6d5c4b3a2f1e0d9c8b7a6f5e4d"
}