Web3API
HomeAPI EndpointsContactTwitter
  • ​🚀 Welcome to Web3API
  • Introduction
    • ✨Getting Started
    • 📡 Choosing A Network
  • Developers
    • 🔌API Endpoints
      • eth_hashrate
      • eth_gasPrice
      • eth_blockNumber
      • eth_getBalance
      • eth_getStorageAt
      • eth_getTransactionCount
      • eth_getBlockTransactionCountByHash
      • eth_getBlockTransactionCountByNumber
      • eth_getCode
      • eth_sendRawTransaction
      • eth_call
      • eth_getBlockByHash
      • eth_getBlockByNumber
      • eth_getTransactionByHash
      • eth_getTransactionByBlockHashAndIndex
      • eth_getTransactionByBlockNumberAndIndex
      • eth_getTransactionReceipt
      • eth_getUncleByBlockHashAndIndex
      • eth_getUncleByBlockNumberAndIndex
      • eth_getUncleCountByBlockHash
      • eth_getUncleCountByBlockNumber
      • eth_estimateGas
      • eth_syncing
    • 😟API Errors and Troubleshooting
  • Tutorials
    • ⚡Adding a Custom RPC to Metamask
  • Dashboard
    • 🔑Forgot Password
  • Resources
    • ❓ FAQ
    • 🤝 Support
Powered by GitBook
On this page

Was this helpful?

  1. Developers
  2. API Endpoints

eth_getTransactionReceipt

Returns the receipt of a transaction by transaction hash.

NOTE: Transaction receipts are not available for pending transactions.

Example

curl https://bsc-<network>.web3api.com/v1/YOUR-API-KEY 
-X POST 
-H "Content-Type: application/json"  
-d "{\"jsonrpc\":\"2.0\",\"method\":\"eth_getTransactionReceipt\",\"params\": [\"0x5508f1e4304cdc7d1f601e8e0322629ddcfb4ad1b1858d09e6c0b78bc097e863\"],\"id\":1}"
curl -X POST 'https://bsc-<network>.web3api.com/v1/YOUR-API-KEY' \
-H 'Content-Type: application/json' \
--data-raw '{"jsonrpc":"2.0","method":"eth_getTransactionReceipt","params": ["0x5508f1e4304cdc7d1f601e8e0322629ddcfb4ad1b1858d09e6c0b78bc097e863"],"id":1}' 
  1. TRANSACTION HASH - a string representing the hash (32 bytes) of a transaction.

Result Fields

TRANSACTION RECEIPT - A transaction receipt object, or null when no receipt was found.

Within the transaction receipt object, the following information are available.

  1. blockHash: 32 Bytes - hash of the block where this transaction was in.

  2. blockNumber: block number where this transaction was in.

  3. contractAddress: 20 Bytes - the contract address created, if the transaction was a contract creation.

  4. cumulativeGasUsed: the total amount of gas used when this transaction was executed in the block.

  5. from: 20 Bytes - address of the sender.

  6. gasUsed: the amount of gas used by this specific transaction alone.

  7. logs: Array - Array of log objects, which this transaction generated.

  8. logsBloom: 256 Bytes - Bloom filter for light clients to quickly retrieve related logs.

  9. status: a hex representation of an int transaction status. 1 denotes a succesful transaction and 0 denotes a failed transaction.

  10. to: 20 Bytes - address of the receiver. Null when the transaction is a contract creation transaction.

  11. transactionHash: 32 Bytes - hash of the transaction.

  12. transactionIndex: integer of the transactions index position in the block.

Body

{
   "jsonrpc":"2.0",
   "id":1,
   "result":{
      "blockHash":"0xde6533bd819945cbee552728721a8bef25279ead24de58fe17f34e7c063abed3",
      "blockNumber":"0x6ef8d5",
      "contractAddress":null,
      "cumulativeGasUsed":"0x3697da5",
      "from":"0xa525121b54c473e3071ce15dba622d5e23970ed3",
      "gasUsed":"0x5208",
      "logs":[
         
      ],
      "logsBloom":"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
      "status":"0x1",
      "to":"0x71c7656ec7ab88b098defb751b7401b5f6d8976f",
      "transactionHash":"0x5508f1e4304cdc7d1f601e8e0322629ddcfb4ad1b1858d09e6c0b78bc097e863",
      "transactionIndex":"0x1b7"
   }
}
Previouseth_getTransactionByBlockNumberAndIndexNexteth_getUncleByBlockHashAndIndex

Last updated 4 years ago

Was this helpful?

🔌