WatchData Documentation
  • πŸ“–Welcome to WatchData Docs
    • 🧩Features
      • ⛓️Blockchain API
      • ⚑Powered API
      • πŸͺ™Price API
    • πŸ’ΌWhat products are suitable for our solutions
  • πŸ‘‹Introduction
    • πŸ› οΈQuick start guide to WatchData!
    • πŸ€”Why Use WatchData?
    • πŸ’‘Supported chains
    • πŸ›‘Error Reference
    • πŸ—οΈChange Log (update)
  • πŸ’ŽPowered API
    • πŸ”€Transfers
      • watch_getTransfers
      • watch_getTransfersByAddress
    • πŸ’ Parity
      • parity_getBlockReceipts
    • πŸŒ€Trace
      • trace_transaction
      • trace_block
    • ⏹️Blocks
      • watch_getBlockNumberByTimestamp
    • *️⃣Token API
      • watch_getTokenBalances
      • πŸ†•watch_getTokenMetadata
    • πŸ†’Stats
      • watch_getStatsByDay
  • πŸ•ΈοΈBlockchain API's
    • Ethereum API
      • eth_getBlockByHash
      • eth_getBlockByNumber
      • eth_getTransactionCount
      • eth_getTransactionByHash
      • eth_getTransactionReceipt
      • eth_getBlockTransactionCountByHash
      • eth_getBlockTransactionCountByNumber
      • eth_getTransactionByBlockHashAndIndex
      • eth_getTransactionByBlockNumberAndIndex
      • eth_getUncleCountByBlockHash
      • eth_getUncleCountByBlockNumber
      • eth_getLogs
      • eth_call
      • eth_chainId
      • eth_estimateGas
      • eth_gasPrice
      • eth_getBalance
      • eth_getCode
      • net_version
      • eth_getStorageAt
      • eth_sendRawTransaction
      • eth_blockNumber
    • ♨️Polygon API
      • eth_blockNumber - Polygon
      • eth_getBlockByHash - Polygon
      • eth_getBlockByNumber - Polygon
      • eth_getTransactionByHash - Polygon
      • eth_getTransactionCount - Polygon
      • eth_getTransactionReceipt -Polygon
      • eth_getBlockTransactionCountByHash - Polygon
      • eth_getBlockTransactionCountByNumber - Polygon
      • eth_getTransactionByBlockHashAndIndex - Polygon
      • eth_getTransactionByBlockNumberAndIndex - Polygon
      • eth_getUncleCountByBlockHash - Polygon
      • eth_getUncleCountByBlockNumber - Polygon
      • eth_getLogs - Polygon
      • eth_call - Polygon
      • eth_chainId - Polygon
      • eth_estimateGas - Polygon
      • eth_gasPrice - Polygon
      • eth_getBalance - Polygon
      • eth_getCode - Polygon
      • net_version - Polygon
      • eth_getStorageAt - Polygon
      • eth_sendRawTransaction - Polygon
    • Binance Smart Chain API
      • eth_blockNumber (BSC)
      • eth_getBlockByHash (BSC)
      • eth_getBlockByNumber (BSC)
      • eth_getTransactionCount (BSC)
      • eth_getTransactionByHash (BSC)
      • eth_getTransactionReceipt (BSC)
      • eth_getBlockTransactionCountByHash (BSC)
      • eth_getBlockTransactionCountByNumber (BSC)
      • eth_getTransactionByBlockHashAndIndex (BSC)
      • eth_getTransactionByBlockNumberAndIndex (BSC)
      • eth_getUncleCountByBlockHash (BSC)
      • eth_getUncleCountByBlockNumber (BSC)
      • eth_getLogs (BSC)
      • eth_call (BSC)
      • eth_chainId (BSC)
      • eth_estimateGas (BSC)
      • eth_gasPrice (BSC)
      • eth_getBalance (BSC)
      • eth_getCode (BSC)
      • net_version (BSC)
      • eth_getStorageAt (BSC)
      • eth_sendRawTransaction (BSC)
    • Tron API
      • Full Node API Overview
      • Address Utilities
        • CreateAddress
        • GenerateAddress
        • ValidateAddress
      • Transactions
        • CreateTransaction
        • EasyTransferByPrivate
        • EasyTransfer
        • BroadcastHex
        • BroadcastTransaction
      • Accounts
        • AccountPermissionUpdate
        • UpdateAccount
        • GetAccount
        • CreateAccount
      • Account Resources
        • GetAccountNet
        • GetAccountResource
        • UnfreezeBalance
        • FreezeBalance
        • GetDelegatedResource
        • GetDelegatedResourceAccountIndex
      • Query The Network
        • GetBlockByNum
        • GetBlockById
        • GetBlockByLatestNum
        • GetBlockByLimitNext
        • GetNowBlock
        • GetTransactionById
        • GetTransactionInfoById
        • GetTransactionInfoByBlockNum
        • GetNodeInfo
        • GetChainParameters
      • TRC 10 Token
        • GetAssetIssueByAccount
        • GetAssetIssueById
        • GetAssetIssueList
        • GetPaginatedAssetIssueList
        • TransferAsset
        • CreateAssetIssue
        • ParticipateAssetIssue
        • UnfreezeAsset
        • UpdateAsset
        • EasyTransferAsset
        • EasyTransferAssetByPrivate
      • Smart Contracts
        • GetContract
        • TriggerSmartContract
        • TriggerConstantContract
        • DeployContract
        • UpdateSetting
        • UpdateEnergyLimit
        • ClearAbi
      • TRONZ Shielded Smart Contract
        • GetSpendingKey
        • GetExpandedSpendingKey
        • GetAkFromAsk
        • GetNkFromNsk
        • GetIncomingViewingKey
        • GetDiversifier
        • GetZenPaymentAddress
        • GetNewShieldedAddress
        • CreateShieldedContractParameters
        • CreateSpendAuthSig
        • GetTriggerInputForShieldedTrc20Contract
        • ScanShieldedTrc20NotesByIvk
        • ScanShieldedTrc20NotesByOvk
        • IsShieldedTrc20ContractNoteSpent
      • Voting & SRs
        • ListWitnesses
        • CreateWitness
        • UpdateWitness
        • GetBrokerage
        • UpdateBrokerage
        • VoteWitnessAccount
        • GetReward
        • WithdrawBalance
        • GetNextMaintenanceTime
      • Proposals
        • ListProposals
        • GetProposalById
        • ProposalCreate
        • ProposalApprove
        • ProposalDelete
      • DEX Exchange
        • ListExchanges
        • GetExchangeById
        • ExchangeCreate
        • ExchangeInject
        • ExchangeWithdraw
        • ExchangeTransaction
      • Pending Pool
        • GetTransactionListFromPending
        • GetTransactionFromPending
        • GetPendingSize
    • Bitcoin API
      • Blockchain RPCs
        • getbestblockhash
        • getblock
        • getblockchaininfo
        • getblockcount
        • getblockhash
        • getblockheader
        • getblockstats
        • getchaintips
        • getchaintxstats
        • getdifficulty
        • getmempoolancestors
        • getmempooldescendants
        • getmempoolentry
        • getmempoolinfo
        • getrawmempool
        • gettxout
        • gettxoutproof
      • Rawtransactions RPCs
        • analyzepsbt
        • combinepsbt
        • combinerawtransaction
        • converttopsbt
        • createpsbt
        • createrawtransaction
        • decodepsbt
        • decoderawtransaction
        • decodescript
        • finalizepsbt
        • fundrawtransaction
        • getrawtransaction
        • joinpsbts
        • sendrawtransaction
        • testmempoolaccept
        • utxoupdatepsbt
  • πŸͺ™Price API
    • Price API
      • All tickers
      • Current price
  • ⛓️Web3
    • Web3 SDK
      • Web3.js
      • Web3.py
      • Ethers.js
      • Ethereum.rb
  • πŸ—ΊοΈTutorials and Guides
    • How to guides
      • How Getting Ethereum Account Balance and Transactions
      • How do I add WatchData to MetaMask?
      • How can i Get stats by Day
      • How to get the balance of an ERC-20 token
      • How can i get transfers using watch_getTransfersByAddress?
    • WatchData PriceΒ API and how it works?
    • How eth_getLogs works?
  • πŸ—ƒοΈResources
    • Pricing and Limits
      • Watch Units
    • FAQ
      • General
      • Pricing
      • Privacy
    • Support
    • Community
Powered by GitBook
On this page
  1. Blockchain API's
  2. Polygon API

eth_getTransactionReceipt -Polygon

Returns the receipt of a transaction by transaction hash.

Previouseth_getTransactionCount - PolygonNexteth_getBlockTransactionCountByHash - Polygon

Last updated 2 years ago

This can also be used to track the status of a transaction, since result will be null until the transaction is mined. However, unlike , which returns null for unknown transactions, and a non-null response with 3 null fields for a pending transaction, eth_getTransactionReceipt returns null for both pending and unknown transactions.

This call is also commonly used to get the contract address for a contract creation tx.

Note: the receipt is not available for pending transactions.

Parameters

DATA, 32 Bytes - hash of a transaction

params: [ 
    '0x1bdff6b39cd8a3de4c4b61435da83014696d788f6e52672333471aa4d329bb19' 
]

Returns

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

  • transactionHash: DATA, 32 Bytes - hash of the transaction.

  • transactionIndex: QUANTITY - integer of the transactions index position in the block.

  • blockHash: DATA, 32 Bytes - hash of the block where this transaction was in.

  • blockNumber: QUANTITY - block number where this transaction was in.

  • from: DATA, 20 Bytes - address of the sender.

  • to: DATA, 20 Bytes - address of the receiver. null when its a contract creation transaction.

  • cumulativeGasUsed: QUANTITY - The total amount of gas used when this transaction was executed in the block.

  • gasUsed: QUANTITY - The amount of gas used by this specific transaction alone.

  • contractAddress: DATA, 20 Bytes - The contract address created, if the transaction was a contract creation, otherwise null.

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

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

It also returns either:

  • status: QUANTITY either 1 (success) or 0 (failure)

Request example

curl https://polygon.api.watchdata.io/node/jsonrpc?api_key=your_api_key
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"eth_getTransactionReceipt","params":["0x1bdff6b39cd8a3de4c4b61435da83014696d788f6e52672333471aa4d329bb19"],"id":0}
URL: https://polygon.api.watchdata.io/node/jsonrpc?api_key=your_api_key
RequestType: POST
Body: 
{
    "jsonrpc":"2.0",
    "method":"eth_getTransactionReceipt",
    "params":["0x1bdff6b39cd8a3de4c4b61435da83014696d788f6e52672333471aa4d329bb19"],
    "id":0
}

Result

{
    "jsonrpc": "2.0",
    "id": 0,
    "result": [
        {
            "blockHash": "0xacc1dbcf67e80f1898c55a7093cf12f6425c29d9bf6481044587443166e6b923",
            "blockNumber": "0x1d765ac",
            "contractAddress": null,
            "cumulativeGasUsed": "0x1249a5e",
            "from": "0xaa26d58df560fad003738596a3a2bf9c910bfb2b",
            "gasUsed": "0x24f0c",
            "status": "0x1",
            "logsBloom": "0x00000000000000000000000000000000000000000000000004000000000000000020000800000000000008000000000000008000000000000000000000000000000000000000000000000008000000800000000000000000000100000000000000000000020000000000000000000800000000000000000080000010000000000000000000000000000040002000000000000000000000000000000000000000200000000000800000000000000000000000000000000000000000000000004000000002000000000001800000000000000000200000000000100000000020000000002000000000000000000000000010000000000000000000000000100002",
            "to": "0x4e8966f70fb15f2dfd636610aaa8414dc573a61a",
            "transactionHash": "0x1bdff6b39cd8a3de4c4b61435da83014696d788f6e52672333471aa4d329bb19",
            "transactionIndex": "0x78",
            "logs": [
                {
                    "address": "0x4e8966f70fb15f2dfd636610aaa8414dc573a61a",
                    "blockHash": "0xacc1dbcf67e80f1898c55a7093cf12f6425c29d9bf6481044587443166e6b923",
                    "blockNumber": "0x1d765ac",
                    "data": "0x",
                    "logIndex": "0x220",
                    "topics": [
                        "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
                        "0x0000000000000000000000000000000000000000000000000000000000000000",
                        "0x000000000000000000000000aa26d58df560fad003738596a3a2bf9c910bfb2b",
                        "0x000000000000000000000000000000000000000000000000000000000000c7be"
                    ],
                    "transactionHash": "0x1bdff6b39cd8a3de4c4b61435da83014696d788f6e52672333471aa4d329bb19",
                    "transactionIndex": "0x78"
                },
                {
                    "address": "0x0000000000000000000000000000000000001010",
                    "blockHash": "0xacc1dbcf67e80f1898c55a7093cf12f6425c29d9bf6481044587443166e6b923",
                    "blockNumber": "0x1d765ac",
                    "data": "0x00000000000000000000000000000000000000000000000000125a7343361fcc000000000000000000000000000000000000000000000018f1e4319fed5e03ec000000000000000000000000000000000000000000000fdf081cae93df867638000000000000000000000000000000000000000000000018f1d1d72caa27e420000000000000000000000000000000000000000000000fdf082f090722bc9604",
                    "logIndex": "0x221",
                    "topics": [
                        "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63",
                        "0x0000000000000000000000000000000000000000000000000000000000001010",
                        "0x000000000000000000000000aa26d58df560fad003738596a3a2bf9c910bfb2b",
                        "0x00000000000000000000000046a3a41bd932244dd08186e4c19f1a7e48cbcdf4"
                    ],
                    "transactionHash": "0x1bdff6b39cd8a3de4c4b61435da83014696d788f6e52672333471aa4d329bb19",
                    "transactionIndex": "0x78"
                }
            ]
        }
    ]
}
πŸ•ΈοΈ
♨️
eth_getTransactionByHash