eth_getTransactionReceipt - Arbitrum
Example code for the eth_getTransactionReceipt JSON RPC method. Сomplete guide on how to use eth_getTransactionReceipt JSON RPC in GetBlock Web3 documentation.
Parameters
Parameter
Type
Required
Description
Request
curl --location 'https://go.getblock.us/<ACCESS_TOKEN>' \
--header 'Content-Type: application/json' \
--data '{
"jsonrpc": "2.0",
"method": "eth_getTransactionReceipt",
"params": [
"0x21be7a93a4531a76b1e15d14059582e6b6f9e36cbdc7a85c23667808f4c78b2c"
],
"id": "getblock.io"
}'import axios from 'axios'
let data = JSON.stringify({
"jsonrpc": "2.0",
"method": "eth_getTransactionReceipt",
"params": [
"0x21be7a93a4531a76b1e15d14059582e6b6f9e36cbdc7a85c23667808f4c78b2c"
],
"id": "getblock.io"
};
let config = {
method: "post",
maxBodyLength: Infinity,
url: "https://go.getblock.us/<ACCESS_TOKEN>",
headers: {
"Content-Type": "application/json",
},
data: data,
};
axios
.request(config)
.then((response) => {
console.log(JSON.stringify(response.data));
})
.catch((error) => {
console.log(error);
});
Response
{
"jsonrpc": "2.0",
"id": "getblock.io",
"result": {
"blockHash": "0x2caf14773f5c8854de725d9077918a0ec14bd123163d5f9e479b06f201452320",
"blockNumber": "0x5259c43",
"contractAddress": null,
"cumulativeGasUsed": "0xc69229",
"effectiveGasPrice": "0x5f5e100",
"from": "0xb8b2522480f850eb198ada5c3f31ac528538d2f5",
"gasUsed": "0x1993d7",
"gasUsedForL1": "0x113076",
"l1BlockNumber": "0x105fbf6",
"logs": [
{
"address": "0x09e18590e8f76b6cf471b3cd75fe1a1a9d2b2c2b",
"topics": [
"0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
"0x00000000000000000000000009e18590e8f76b6cf471b3cd75fe1a1a9d2b2c2b",
"0x000000000000000000000000c873fecbd354f5a56e00e710b90ef4201db2448d"
],
"data": "0x0000000000000000000000000000000000000000000000000000ad0c364098a8",
"blockNumber": "0x5259c43",
"transactionHash": "0x21be7a93a4531a76b1e15d14059582e6b6f9e36cbdc7a85c23667808f4c78b2c",
"transactionIndex": "0x7",
"blockHash": "0x2caf14773f5c8854de725d9077918a0ec14bd123163d5f9e479b06f201452320",
"logIndex": "0x16",
"removed": false
}
],
"logsBloom": "0x002000020000100000480000800100000000004000000",
"status": "0x1",
"to": "0x5845696f6031bfd57b32e6ce2ddea19a486fa5e5",
"transactionHash": "0x21be7a93a4531a76b1e15d14059582e6b6f9e36cbdc7a85c23667808f4c78b2c",
"transactionIndex": "0x7",
"type": "0x0"
}
}Reponse Parameter Definition
Field Name
Data Type
Format
Description
Use case
Error handling
Status Code
Error Message
Cause
Integration with Web3
Last updated
Was this helpful?