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_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.| # | Nome | Tipo | Obrigatório | Descrição |
|---|---|---|---|---|
| 1 | address | string (hex) | Sim | The account whose nonce to query. |
| 2 | blockTag | string | Não | Use "pending" to include mempool transactions when chaining multiple sends.Padrão: latest |
| Tipo | Descrição |
|---|---|
| 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 | Mensagem | 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"