Transaction by hash
getTransactionGet a transaction by its hash on one blockchain, with tier-2 decoding requested. Check tier_degraded before reading function or args.
By default the receipt is fetched too (status, gas used, decoded logs). Set include to "transaction" to skip it and halve the cost.
Tier-2 field names: tx, block, block_hash, from, to, value, gas_limit, gas_price, gas_used, status ("success"|"failed"), function, args (named object), logs[] ({ contract, event, args } when decoded, else { address, topics, data, _event_unknown }). All numeric values are decimal strings and all addresses are EIP-55 checksummed.
Sui: pass the digest; include is ignored.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| chain | Yes | Chain slug as in rpc.ankr.com/<chain> — any chain Ankr serves (see listChains) | |
| txHash | Yes | Transaction hash (0x + 64 hex) or Sui digest | |
| include | No | Which parts to fetch. "all" (default) returns both the transaction and the receipt; "transaction" returns only eth_getTransactionByHash; "receipt" returns only eth_getTransactionReceipt. |