Base
¿Listo para usar esto en producción?
El plan gratuito cubre proyectos personales. El pago por uso escala sin necesidad de tarjeta.
Base
El plan gratuito cubre proyectos personales. El pago por uso escala sin necesidad de tarjeta.
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.| # | Nombre | Tipo | Requerido | Descripción |
|---|---|---|---|---|
| 1 | transactionHash | string (hex) | Sí | The hash of the mined transaction. |
| Tipo | Descripción |
|---|---|
| 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.
| Código | Mensaje | Causa |
|---|---|---|
-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.Parámetros
0x-prefixed 32-byte transaction hash