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.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"abi": "<abi>",
"functionName": "<functionName>"
},
"name": "encode_calldata"
}
}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. |