BNB Smart Chain
Pronto para usar isso em produção?
O plano gratuito cobre projetos pessoais. O pay-as-you-go escala sem cartão de crédito.
BNB Smart Chain
O plano gratuito cobre projetos pessoais. O pay-as-you-go escala sem cartão de crédito.
BNB Smart Chain (chain ID 56, native token BNB) settles transactions in roughly three seconds under its PoSA consensus, and eth_getTransactionReceipt is how you read the outcome once a transaction has been mined. Point it at the TheRPC endpoint https://bsc.therpc.io/YOUR_API_KEY with a transaction hash and it returns the full execution receipt for that mined transaction: the success-or-revert status flag, the exact amount of gas consumed, the effective gas price actually charged, and every BEP-20 event log the call emitted. Until the transaction lands in a block the receipt does not exist, so a null answer simply means it is still in flight.
status flag (0x1 success, 0x0 revert).logs to update application state — for example PancakeSwap Swap events or Venus Mint events.contractAddress to discover where a freshly deployed BEP-20 contract now lives on chain.gasUsed by effectiveGasPrice to compute the precise BNB fee the sender actually paid.| # | Nome | Tipo | Obrigatório | Descrição |
|---|---|---|---|---|
| 1 | transactionHash | string (hex) | Sim | The hash of the mined transaction. |
| Tipo | Descrição |
|---|---|
| object | null | Receipt object containing: transactionHash, transactionIndex, blockHash, blockNumber, from, to, contractAddress (non-null only for contract deployments), gasUsed, cumulativeGasUsed, effectiveGasPrice, status ("0x1" success / "0x0" revert), logs (array of log objects), logsBloom, type. Returns null f |
Try it live in the BNB Smart Chain playground.
| Código | Mensagem | Causa |
|---|---|---|
-32602 | Invalid params | Transaction hash is malformed. |
null; poll on the ~3-second block cadence until it turns non-null instead of assuming instant availability.status of 0x0 means the transaction was mined but reverted — the BNB spent on gas is gone even though no state change stuck.eth_getBlockReceipts once per block rather than firing one receipt request per transaction hash; it is far cheaper at scale.Parâmetros
0x-prefixed 32-byte transaction hash