BNB Smart Chain
准备好在生产环境中调用了吗?
免费套餐涵盖个人项目。按量付费,无需绑卡即可扩展。
BNB Smart Chain
免费套餐涵盖个人项目。按量付费,无需绑卡即可扩展。
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.| # | 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|---|
| 1 | transactionHash | string (hex) | 是 | The hash of the mined transaction. |
| 类型 | 描述 |
|---|---|
| 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.
| 错误码 | 错误信息 | 原因 |
|---|---|---|
-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.参数
0x-prefixed 32-byte transaction hash