Avalanche
Avalanche
Avalanche
免费套餐涵盖个人项目。按量付费,无需绑卡即可扩展。
eth_getTransactionReceipt returns the execution receipt for a transaction that has already been mined on the Avalanche C-Chain (chain ID 43114), the EVM chain whose gas is paid in AVAX. The receipt is the authoritative record of what happened when the transaction ran: its success-or-revert status, the gas it consumed, and every log event it emitted. Send the request to https://avalanche.therpc.io/YOUR_API_KEY. Because the C-Chain reaches finality under Snowman consensus in roughly one to two seconds, a receipt usually becomes available very soon after submission — but only once the transaction is actually included in a block.
status field (0x1 vs 0x0).logs — for example Trader Joe swaps or Aave deposit events — to update application state from on-chain activity.contractAddress field, which is non-null only for deployment transactions.gasUsed by effectiveGasPrice.| # | 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|---|
| 1 | transactionHash | string (hex) | 是 | The hash of the mined transaction. |
| 类型 | 描述 |
|---|---|
| object | null | Receipt object containing: transactionHash, transactionIndex, blockHash, blockNumber, from, to, contractAddress (non-null only for contract deployments), gasUsed, cumulativeGasUsed, effectiveGasPrice, status ("0x1" success / "0x0" revert), logs (array of log objects), logsBloom, type. Returns null f |
Try it live in the Avalanche playground.
| 错误码 | 错误信息 | 原因 |
|---|---|---|
-32602 | Invalid params | Transaction hash is malformed. |
null. Poll until you get a non-null result rather than assuming it is ready; on the C-Chain finality is fast (about 1–2 seconds), so the wait is usually short.status of 0x0 means the transaction was included in a block but reverted — the AVAX gas was still spent, even though the state change did not take effect.eth_getBlockReceipts is far more efficient than calling this method once per transaction hash.参数
0x-prefixed 32-byte transaction hash