Ethereum
Bereit, das in der Produktion aufzurufen?
Das Free-Tier deckt persönliche Projekte ab. Pay-as-you-go skaliert ohne Karte.
Ethereum
Das Free-Tier deckt persönliche Projekte ab. Pay-as-you-go skaliert ohne Karte.
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.| # | Name | Typ | Erforderlich | Beschreibung |
|---|---|---|---|---|
| 1 | transactionHash | string (hex) | Ja | The hash of the transaction to retrieve. |
| Typ | Beschreibung |
|---|---|
| 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.
| Code | Meldung | Ursache |
|---|---|---|
-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.Parameter
0x-prefixed 32-byte transaction hash