Decode EVM Calldata
evm_decode_calldataDecode Ethereum transaction calldata into a function signature and typed arguments. Uses Foundry cast or online signature database for unknown selectors.
Instructions
Decode hex calldata into a function signature and typed argument values using Foundry cast.
If you know the function signature, pass it for a fully offline, deterministic decode (cast calldata-decode). Without a signature, the 4-byte selector is resolved via the openchain.xyz signature database (cast 4byte-decode) — requires network access.
Args:
calldata (string): Hex-encoded calldata (0x-prefixed, at least the 4-byte selector)
signature (string, optional): Known function signature, e.g. "transfer(address,uint256)"
Returns: JSON object: { "success": boolean, "signature": string, // Resolved or provided function signature "values": string[] // Decoded argument values, one per parameter }
Examples:
"What does this pending tx do?" → calldata = "0xa9059cbb000...", no signature
"Decode this transfer call" → calldata + signature = "transfer(address,uint256)"
Error Handling:
Returns isError=true if cast is not installed, the calldata is malformed, or the selector is unknown
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| calldata | Yes | Hex-encoded calldata (0x-prefixed) | |
| signature | No | Known function signature for offline decoding, e.g. 'transfer(address,uint256)' |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| values | No | ||
| success | Yes | ||
| signature | No |