eth_encode_calldata
Encode a function call into ABI-encoded calldata hex. Accepts either a human-readable function signature (e.g. 'transfer(address to, uint256 amount)') or a full ABI JSON array plus function name. Pass uint/int values as decimal strings to avoid JS number precision loss. Pure computation — no RPC call needed.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "eth_encode_calldata"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| abi | No | Full ABI as a JSON array (or JSON-encoded string). Use with function_name. | |
| args | No | Arguments array. Pass uint/int values as decimal or hex strings for precision. | |
| signature | No | Human-readable function signature, e.g. 'transfer(address to, uint256 amount)'. Use instead of abi+function_name. | |
| function_name | No | Function name — required when using abi instead of signature |