Azxa
← Polygon PoS overview

Polygon PoS · eth

eth_getTransactionReceipt

Returns the receipt of a transaction by transaction hash.

Parameters

  • Transaction hash required
    Schema
    {
      "type": "string",
      "title": "32 byte hex value",
      "pattern": "^0x[0-9a-f]{64}$"
    }

Result

Receipt information

Schema
{
  "oneOf": [
    {
      "type": "null",
      "title": "Not Found (null)"
    },
    {
      "type": "object",
      "title": "Receipt information",
      "properties": {
        "blobGasPrice": {
          "type": "string",
          "title": "blob gas price",
          "description": "The actual value per gas deducted from the sender's account for blob gas. Only specified for blob transactions as defined by EIP-4844.",
          "pattern": "^0x(0|[1-9a-f][0-9a-f]*)$"
        },
        "blobGasUsed": {
          "type": "string",
          "title": "blob gas used",
          "description": "The amount of blob gas used for this specific transaction. Only specified for blob transactions as defined by EIP-4844.",
          "pattern": "^0x(0|[1-9a-f][0-9a-f]*)$"
        },
        "blockHash": {
          "type": "string",
          "title": "block hash",
          "pattern": "^0x[0-9a-f]{64}$"
        },
        "blockNumber": {
          "type": "string",
          "title": "block number",
          "pattern": "^0x(0|[1-9a-f][0-9a-f]*)$"
        },
        "contractAddress": {
          "title": "contract address",
          "description": "The contract address created, if the transaction was a contract creation, otherwise null.",
          "oneOf": [
            {
              "type": "string",
              "title": "hex encoded address",
              "pattern": "^0x[0-9a-fA-F]{40}$"
            },
            {
              "type": "null",
              "title": "Null"
            }
          ]
        },
        "cumulativeGasUsed": {
          "type": "string",
          "title": "cumulative gas used",
          "description": "The sum of gas used by this transaction and all preceding transactions in the same block.",
          "pattern": "^0x(0|[1-9a-f][0-9a-f]*)$"
        },
        "effectiveGasPrice": {
          "type": "string",
          "title": "effective gas price",
          "description": "The actual value per gas deducted from the sender's account. Before EIP-1559, this is equal to the transaction's gas price. After, it is equal to baseFeePerGas + min(maxFeePerGas - baseFeePerGas, maxPriorityFeePerGas).",
          "pattern": "^0x(0|[1-9a-f][0-9a-f]*)$"
        },
        "from": {
          "type": "string",
          "title": "from",
          "pattern": "^0x[0-9a-fA-F]{40}$"
        },
        "gasUsed": {
          "type": "string",
          "title": "gas used",
          "description": "The amount of gas used for this specific transaction alone.",
          "pattern": "^0x(0|[1-9a-f][0-9a-f]*)$"
        },
        "logs": {
          "type": "array",
          "title": "logs",
          "items": {
            "type": "object",
            "title": "log",
            "properties": {
              "address": {
                "type": "string",
                "title": "address",
                "pattern": "^0x[0-9a-fA-F]{40}$"
              },
              "blockHash": {
                "type": "string",
                "title": "block hash",
                "pattern": "^0x[0-9a-f]{64}$"
              },
              "blockNumber": {
                "type": "string",
                "title": "block number",
                "pattern": "^0x(0|[1-9a-f][0-9a-f]*)$"
              },
              "blockTimestamp": {
                "type": "string",
                "title": "block timestamp",
                "pattern": "^0x(0|[1-9a-f][0-9a-f]*)$"
              },
              "data": {
                "type": "string",
                "title": "data",
                "pattern": "^0x[0-9a-f]*$"
              },
              "logIndex": {
                "type": "string",
                "title": "log index",
                "pattern": "^0x(0|[1-9a-f][0-9a-f]*)$"
              },
              "removed": {
                "type": "boolean",
                "title": "removed"
              },
              "topics": {
                "type": "array",
                "title": "topics",
                "items": {
                  "type": "string",
                  "title": "32 hex encoded bytes",
                  "pattern": "^0x[0-9a-f]{64}$"
                }
              },
              "transactionHash": {
                "type": "string",
                "title": "transaction hash",
                "pattern": "^0x[0-9a-f]{64}$"
              },
              "transactionIndex": {
                "type": "string",
                "title": "transaction index",
                "pattern": "^0x(0|[1-9a-f][0-9a-f]*)$"
              }
            },
            "required": [
              "transactionHash"
            ]
          }
        },
        "logsBloom": {
          "type": "string",
          "title": "logs bloom",
          "pattern": "^0x[0-9a-f]{512}$"
        },
        "root": {
          "type": "string",
          "title": "state root",
          "description": "The post-transaction state root. Only specified for transactions included before the Byzantium upgrade.",
          "pattern": "^0x[0-9a-f]{64}$"
        },
        "status": {
          "type": "string",
          "title": "status",
          "description": "Either 1 (success) or 0 (failure). Only specified for transactions included after the Byzantium upgrade.",
          "pattern": "^0x(0|[1-9a-f][0-9a-f]*)$"
        },
        "to": {
          "title": "to",
          "description": "Address of the receiver or null in a contract creation transaction.",
          "oneOf": [
            {
              "type": "null",
              "title": "Contract Creation (null)"
            },
            {
              "type": "string",
              "title": "Recipient Address",
              "pattern": "^0x[0-9a-fA-F]{40}$"
            }
          ]
        },
        "transactionHash": {
          "type": "string",
          "title": "transaction hash",
          "pattern": "^0x[0-9a-f]{64}$"
        },
        "transactionIndex": {
          "type": "string",
          "title": "transaction index",
          "pattern": "^0x(0|[1-9a-f][0-9a-f]*)$"
        },
        "type": {
          "type": "string",
          "title": "type",
          "pattern": "^0x[0-9a-f]{1,2}$"
        }
      },
      "required": [
        "blockHash",
        "blockNumber",
        "from",
        "cumulativeGasUsed",
        "gasUsed",
        "logs",
        "logsBloom",
        "transactionHash",
        "transactionIndex",
        "effectiveGasPrice"
      ]
    }
  ]
}

Example request

Endpoint: https://your-pol-node.azxa.io

JSON-RPC
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionReceipt",
  "params": [
    "0x504ce587a65bdbdb6414a0c6c16d86a04dd79bfcc4f2950eec9634b30ce5370f"
  ]
}
Example response
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "blobGasPrice": "0x3",
    "blobGasUsed": "0x20000",
    "blockHash": "0xe7212a92cfb9b06addc80dec2a0dfae9ea94fd344efeb157c41e12994fcad60a",
    "blockNumber": "0x50",
    "contractAddress": null,
    "cumulativeGasUsed": "0x5208",
    "effectiveGasPrice": "0x1",
    "from": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
    "gasUsed": "0x5208",
    "logs": [],
    "logsBloom": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000…00000000000000000000",
    "status": "0x1",
    "to": "0xf17f52151ebef6c7334fad080c5704d77216b732",
    "transactionHash": "0xc00e97af59c6f88de163306935f7682af1a34c67245e414537d02e422815efc3",
    "transactionIndex": "0x0"
  }
}

Test fixture

Fixture: get-access-list

Request
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionReceipt",
  "params": [
    "0x695ad02907c9e13ab7c69963f723fa46ac13cd5e2314f61eab2cb2f07b946faa"
  ]
}
Response
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "blockHash": "0xd4c1a87837460a5d00d7225a1406ccafcfe765d40f277eaae65f17adff7dc50a",
    "blockNumber": "0x18",
    "contractAddress": null,
    "cumulativeGasUsed": "0xca9c",
    "effectiveGasPrice": "0x1",
    "from": "0x7435ed30a8b4aeb0877cef0c6e8cffe834eb865f",
    "gasUsed": "0xca9c",
    "logs": [
      {
        "address": "0x7dcd17433742f4c0ca53122ab541d0ba67fc27df",
        "topics": [
          "…",
          "…"
        ],
        "data": "0x000000000000000000000000000000000000000000000000000000000000000f",
        "blockNumber": "0x18",
        "transactionHash": "0x695ad02907c9e13ab7c69963f723fa46ac13cd5e2314f61eab2cb2f07b946faa",
        "transactionIndex": "0x0",
        "blockHash": "0xd4c1a87837460a5d00d7225a1406ccafcfe765d40f277eaae65f17adff7dc50a",
        "blockTimestamp": "0xf0",
        "logIndex": "0x0",
        "removed": false
      }
    ],
    "logsBloom": "0x000000000000000000000000000000000000000000000000008000008000000000000000000000…00000000000000000000",
    "status": "0x1",
    "to": "0x7dcd17433742f4c0ca53122ab541d0ba67fc27df",
    "transactionHash": "0x695ad02907c9e13ab7c69963f723fa46ac13cd5e2314f61eab2cb2f07b946faa",
    "transactionIndex": "0x0",
    "type": "0x1"
  }
}

cURL

curl -X POST https://your-pol-node.azxa.io \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":1,"method":"eth_getTransactionReceipt","params":["0x504ce587a65bdbdb6414a0c6c16d86a04dd79bfcc4f2950eec9634b30ce5370f"]}'
1

Select Chain

2

Desired Period

3

Contact Information

cross

Select Preferred Chain

BNB Smart Chain
Polygon
Tron
Arbitrum
Optimism
IoTeX
Gnosis
Fantom
Moonbeam
Polkadot
Avalanche
Bitcoin
Ethereum
Aptos
Other
cube

Other Chain

Continue
logo
cross
background