Ethereum
هل أنت مستعد لاستدعاء هذا في الإنتاج؟
الخطة المجانية تغطي المشاريع الشخصية. الدفع حسب الاستخدام يتوسع دون بطاقة.
Ethereum
الخطة المجانية تغطي المشاريع الشخصية. الدفع حسب الاستخدام يتوسع دون بطاقة.
eth_getTransactionByHash looks up a transaction on Ethereum mainnet (chain ID 1, the network whose gas and transfers are denominated in ETH) by its 32-byte hash and returns the full transaction object: from, to, value in wei, nonce, input calldata, the type, and the EIP-1559 fee fields maxFeePerGas / maxPriorityFeePerGas for type-2 transactions. It describes what was submitted, not how it executed — the receipt holds the outcome. A pending transaction comes back with null for blockHash, blockNumber, and transactionIndex until a validator includes it in a slot. Point the call at https://ethereum.therpc.io/YOUR_API_KEY.
blockNumber flips from null to a height, it's been included in a slot.input field to see which contract function ran — the first four bytes are the function selector, the rest the ABI-encoded arguments.from and value to verify an incoming ETH payment, then pair it with eth_getTransactionReceipt to confirm the transfer actually succeeded.| # | الاسم | النوع | مطلوب | الوصف |
|---|---|---|---|---|
| 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 Ethereum playground.
| الكود | الرسالة | السبب |
|---|---|---|
-32602 | Invalid params | Transaction hash is malformed or not 32 bytes. |
status on eth_getTransactionReceipt (0x1 success, 0x0 revert) for the real outcome.blockHash, blockNumber, and transactionIndex all null. Treat those nulls as "not yet mined," not as an error.null. Null-check the whole response before reaching for .from or .value, or you'll throw on a tx that the mempool quietly evicted.المعاملات
0x-prefixed 32-byte transaction hash