Base
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.
Base
O plano gratuito cobre projetos pessoais. O pay-as-you-go escala sem cartão de crédito.
eth_getTransactionByHash returns the full transaction object for a given transaction hash on Base — sender, recipient, value in wei, gas fields, input data, nonce, and, once mined, its block hash, number, and index. Base is Coinbase's OP Stack optimistic rollup that settles to Ethereum L1 and pays gas in ETH, and with the sequencer producing blocks every ~2 seconds a freshly submitted transaction usually resolves here within a couple of seconds. Call it at https://base.therpc.io/YOUR_API_KEY (chain ID 8453, hex 0x2105) with a 32-byte hash; you get the transaction object, or null if it is unknown or still pending in the mempool.
blockNumber is non-null — given ~2s blocks, that flip happens quickly.input field's 4-byte selector and arguments to identify which contract function was called, for example a swap on Aerodrome or Uniswap.from address and value to verify an incoming ETH payment before crediting it.| # | Nome | Tipo | Obrigatório | Descrição |
|---|---|---|---|---|
| 1 | transactionHash | string (hex) | Sim | The hash of the transaction to retrieve. |
| Tipo | Descrição |
|---|---|
| object | null | Transaction object containing: hash, nonce, blockHash, blockNumber, transactionIndex, from, to (null for contract creation), value (hex wei), gas, gasPrice / maxFeePerGas / maxPriorityFeePerGas, input, type, accessList (type-1/2), chainId, v, r, s. Returns null if not found or still pending (blockHa |
Try it live in the Base playground.
| Código | Mensagem | Causa |
|---|---|---|
-32602 | Invalid params | Transaction hash is malformed or not 32 bytes. |
eth_getTransactionReceipt and read its status field (0x1 success, 0x0 revert) for the execution outcome.blockHash, blockNumber, and transactionIndex all null; treat those nulls as "not yet mined".null outright, so null-check the response before reading any field.Parâmetros
0x-prefixed 32-byte transaction hash