Eth Read Contract
eth_read_contractRead-only (eth_call) against any Ethereum contract, executed by our ETH RPC (external RPC). ERC-20 helpers balanceOf / allowance / decimals / symbol / name / totalSupply are built in; any other function can be called by passing its 4-byte selector plus ABI-encoded parameter. Nothing is signed or written. When to use: an agent needs an on-chain value without trusting a third-party API - a USDT/USDC balance, token decimals, an allowance, or any view function. Do not use: to send a transaction (this never writes), or for a historical balance. Returns: ok, contract, function, selector, output_type, value, value_human for known-decimals tokens.
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": {
"contract": "<contract>",
"function": "<function>"
},
"name": "eth_read_contract"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| argument | No | Ethereum address argument (balanceOf / allowance) | |
| contract | Yes | 0x + 40 hex contract address | |
| function | Yes | balanceOf | allowance | decimals | symbol | name | totalSupply, or a label for a raw selector | |
| selector | No | Explicit 4-byte selector hex for non-ERC-20 calls | |
| argument2 | No | Second address argument (allowance) | |
| parameter | No | ABI-encoded parameter hex (with an explicit selector) | |
| output_type | No |