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_getTransactionCount returns the number of transactions an address has sent, which is the account's nonce — the value you must set on the next transaction you submit. On Base, Coinbase's OP Stack optimistic rollup that settles to Ethereum L1 and pays gas in ETH, the ~2s block cadence means the confirmed nonce advances fast, so wallets and relayers lean on this call to stay in sync. Send it to https://base.therpc.io/YOUR_API_KEY (chain ID 8453, hex 0x2105) with an address and a block tag. The result is the hex-encoded count of confirmed transactions from that address at the chosen block.
pending tag so queued sends are counted.latest nonce with the pending nonce: a gap means something is sitting unconfirmed in the mempool.| # | Nombre | Tipo | Requerido | Descripción |
|---|---|---|---|---|
| 1 | address | string (hex) | Sí | The account whose nonce to query. |
| 2 | blockTag | string | No | Use "pending" to include mempool transactions when chaining multiple sends.Predeterminado: latest |
| Tipo | Descripción |
|---|---|
| string (hex) | Hex-encoded nonce (number of confirmed transactions sent from the address at that block). |
Try it live in the Base playground.
| Código | Mensaje | Causa |
|---|---|---|
-32602 | Invalid params | Address is malformed or block tag is unrecognised. |
-32000 | Missing trie node | Historical block pruned on a non-archive node. |
pending; latest only counts mined transactions and will hand the same nonce to each send, causing collisions.N+1 before N confirms) leaves the later transaction queued indefinitely on Base — the sequencer will not process it until the gap is filled.CREATE, not ordinary calls, so it advances only when the contract deploys another contract.Parámetros
0x-prefixed 20-byte address
hex block number or "latest"/"earliest"/"pending"/"safe"/"finalized"