Avalanche
هل أنت مستعد لاستدعاء هذا في الإنتاج؟
الخطة المجانية تغطي المشاريع الشخصية. الدفع حسب الاستخدام يتوسع دون بطاقة.
Avalanche
الخطة المجانية تغطي المشاريع الشخصية. الدفع حسب الاستخدام يتوسع دون بطاقة.
eth_getTransactionCount returns how many transactions an address has sent on the Avalanche C-Chain at a given block — in other words, the account's nonce. That value is exactly what you need to set on the next transaction you sign and broadcast (paying gas in AVAX), since the C-Chain rejects out-of-order nonces. Picking latest versus pending controls whether queued mempool transactions are counted. Send the request to https://avalanche.therpc.io/YOUR_API_KEY (chain ID 43114, 0xa86a) with the address and a block tag, and the node returns the hex-encoded nonce.
latest nonce against the pending nonce — a gap means something is queued but not yet mined.pending count.| # | الاسم | النوع | مطلوب | الوصف |
|---|---|---|---|---|
| 1 | address | string (hex) | نعم | The account whose nonce to query. |
| 2 | blockTag | string | لا | Use "pending" to include mempool transactions when chaining multiple sends.الافتراضي: latest |
| النوع | الوصف |
|---|---|
| string (hex) | Hex-encoded nonce (number of confirmed transactions sent from the address at that block). |
Try it live in the Avalanche playground.
| الكود | الرسالة | السبب |
|---|---|---|
-32602 | Invalid params | Address is malformed or block tag is unrecognised. |
-32000 | Missing trie node | Historical block pruned on a non-archive node. |
pending tag when firing multiple transactions in quick succession; latest returns the same nonce for all of them until one is mined, so they would collide.CREATE (deploying a sub-contract), not on ordinary calls, so it does not track inbound activity.المعاملات
0x-prefixed 20-byte address
hex block number or "latest"/"earliest"/"pending"/"safe"/"finalized"