コントラクトの読み取り関数を呼ぶ
call_contractExecute view/pure functions on any Ethereum contract using eth_call. Returns ABI-decoded values without modifying state or consuming gas.
Instructions
任意のコントラクトの view / pure 関数を eth_call で呼ぶ。関数署名から keccak256 でセレクタを計算し、引数を ABI エンコードして送り、戻り値をデコードして返す。状態は変わらず、ガスもかからない。
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": {
"address": "<address>",
"signature": "<signature>"
},
"name": "call_contract"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| args | No | 引数の配列。署名の型と同じ順・同じ個数 | |
| block | No | この時点の状態で呼ぶ。既定は latest | |
| address | Yes | コントラクトアドレス | |
| network | No | 対象ネットワーク。mainnet / sepolia / holesky / local か http(s) の URL。既定は mainnet | |
| outputs | No | 戻り値の型。例: ["uint256"] / ["string"]。省略すると生の 16 進のまま返す | |
| signature | Yes | 関数署名。例: "balanceOf(address)" / "totalSupply()" |