encode_calldata
Encode EVM function calls into hex calldata and function selector using ABI fragments, function name, and arguments. Use with call_contract to execute smart contract interactions.
Instructions
Encode EVM function call into calldata hex. Provide ABI fragment array, function name, and arguments. Returns hex calldata and function selector for use with call_contract.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| abi | Yes | ABI fragment array for the function (JSON array of objects) | |
| functionName | Yes | Function name to encode (e.g., "transfer", "approve") | |
| args | No | Function arguments array (e.g., ["0xAddress", "1000000"]). Omit for zero-arg functions. | |
| wallet_id | No | Target wallet ID. Required for multi-wallet sessions; auto-resolved when session has a single wallet. |