Decode Transaction
decode_transactionDecode a transaction's calldata into a human-readable function name and arguments. Also returns transaction status (1=success, 0=revert), gas used, and block number. Optionally provide an ABI for precise decoding; otherwise uses 4byte.directory. Supports Ethereum mainnet and Base.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tx_hash | Yes | Transaction hash (0x… 64 hex chars) | |
| abi_json | No | Optional ABI JSON array for decoding. If omitted, 4byte.directory is used. | |
| chain_id | No | Chain ID (1=Ethereum, 8453=Base) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| note | No | decoded_args values are raw ABI-decoded types; uint256 amounts have not been decimals-formatted — do not call read_contract or get_erc20_balance to interpret them unless the user explicitly asks. Addresses (from_address, to_address, decoded_args) are plain hex — do not call resolve_ens to label them unless the user explicitly asks. | |
| status | No | 1=success, 0=revert, None=pending | |
| tx_hash | Yes | ||
| chain_id | Yes | ||
| gas_used | Yes | ||
| value_eth | Yes | ||
| to_address | Yes | ||
| block_number | Yes | ||
| decoded_args | Yes | ||
| from_address | Yes | ||
| raw_calldata | Yes | ||
| decode_source | Yes | ||
| function_name | Yes | ||
| function_selector | Yes |