Polygon
Polygon
Polygon
الخطة المجانية تغطي المشاريع الشخصية. الدفع حسب الاستخدام يتوسع دون بطاقة.
eth_getTransactionByHash returns the full transaction object for a given hash on Polygon PoS (chain ID 137) — sender, recipient, value in MATIC wei, gas fields, the input calldata, and, once mined, its block number and position. It is the workhorse for tracking any transaction you have submitted or observed on Polygon, from a QuickSwap swap to a USDC transfer. Send the hash to https://polygon.therpc.io/YOUR_API_KEY and you get the transaction object back, or null while it is still pending and unknown to the node, or if it was never seen.
blockNumber is non-null (Bor blocks land in about 2 seconds, so this flips quickly).input calldata to identify which contract function was invoked — for instance distinguishing an ERC-20 transfer from an approve on a Polygon token.from address and value to verify an incoming MATIC payment before crediting it.| # | الاسم | النوع | مطلوب | الوصف |
|---|---|---|---|---|
| 1 | transactionHash | string (hex) | نعم | The hash of the transaction to retrieve. |
| النوع | الوصف |
|---|---|
| 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 Polygon playground.
| الكود | الرسالة | السبب |
|---|---|---|
-32602 | Invalid params | Transaction hash is malformed or not 32 bytes. |
status field of eth_getTransactionReceipt for the actual outcome.blockHash, blockNumber, and transactionIndex all null; do not mistake that for confirmation.null outright, so always null-check the response before reading any field.المعاملات
0x-prefixed 32-byte transaction hash