Base
准备好在生产环境中调用了吗?
免费套餐涵盖个人项目。按量付费,无需绑卡即可扩展。
Base
免费套餐涵盖个人项目。按量付费,无需绑卡即可扩展。
eth_getTransactionReceipt returns the execution receipt for a transaction that has already been mined into a block on Base, Coinbase's OP Stack rollup where ETH is the gas token. Given a transaction hash, the node replies with the post-execution record: the status flag telling you success or revert, gasUsed and effectiveGasPrice, every log the transaction emitted, and the contractAddress when the transaction deployed a contract. Point the request at https://base.therpc.io/YOUR_API_KEY (Base mainnet, chain ID 8453 / 0x2105). Because Base produces blocks roughly every 2 seconds through its sequencer, a freshly broadcast transaction usually has a receipt available within a few seconds.
status field (0x1 success, 0x0 revert).logs to update application state — for example reacting to an Aerodrome Swap or an ERC-20 Transfer event the transaction produced.contractAddress, which is non-null only for deployment transactions.gasUsed by effectiveGasPrice.| # | 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|---|
| 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 Base playground.
| 错误码 | 错误信息 | 原因 |
|---|---|---|
-32602 | Invalid params | Transaction hash is malformed. |
null while a transaction is still pending in the mempool. Poll until you get a non-null receipt rather than assuming it is ready; on Base's ~2s block cadence that wait is usually short but never zero.status: "0x0" means the transaction was included in a block but reverted — the sender's ETH was still spent on gas, so do not treat a present receipt as proof of success.eth_getBlockReceipts once instead of issuing one eth_getTransactionReceipt per hash — it is far more efficient for indexers backfilling Base history.参数
0x-prefixed 32-byte transaction hash