decode_calldata
Decode EVM calldata to extract the function selector and arguments, revealing the function name and parameters for supply-chain relevant actions like approve, transfer, and permit.
Instructions
Decode a single piece of EVM calldata (the 4-byte selector + arguments) into its function and parameters. For full risk context (is the spender an EOA? is to a proxy?), use preview_transaction instead. Returns the function name and decoded args for the known supply-chain-relevant selectors (approve, permit, setApprovalForAll, transfer, transferFrom, increaseAllowance, transferOwnership, multicall).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| chain | No | Chain used to resolve token metadata (default ethereum). | |
| to | Yes | The target contract address (0x...). | |
| data | Yes | The calldata to decode (0x...). |