Polygon
هل أنت مستعد لاستدعاء هذا في الإنتاج؟
الخطة المجانية تغطي المشاريع الشخصية. الدفع حسب الاستخدام يتوسع دون بطاقة.
Polygon
الخطة المجانية تغطي المشاريع الشخصية. الدفع حسب الاستخدام يتوسع دون بطاقة.
eth_getTransactionCount returns how many transactions an address has sent on Polygon PoS (chain ID 137) — its nonce — at a chosen block. Because Polygon uses the same Ethereum account model with MATIC as the gas token, the nonce is what you must set on every outgoing transaction so it lands in order, which matters when Polygon's ~2-second blocks let you fire many sends in quick succession. Query https://polygon.therpc.io/YOUR_API_KEY with an address and a block tag and you get the hex-encoded count of confirmed transactions from that account as of that block.
latest nonce with the pending nonce — a gap means sends are queued but not yet mined.pending value and incrementing locally.| # | الاسم | النوع | مطلوب | الوصف |
|---|---|---|---|---|
| 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 Polygon 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 several Polygon transactions in a row; latest would hand back the same nonce for all of them and they would collide.CREATE/CREATE2, not on ordinary calls to the contract.المعاملات
0x-prefixed 20-byte address
hex block number or "latest"/"earliest"/"pending"/"safe"/"finalized"