cast_interface
Generate a Solidity interface from a contract address or ABI JSON file, using an RPC URL or Etherscan API key to fetch ABIs when needed.
Instructions
Generate a Solidity interface from a contract address or ABI file (cast interface).
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": {
"addressOrPath": "<addressOrPath>"
},
"name": "cast_interface"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | Name for the generated interface | |
| rpcUrl | No | RPC URL (required when using an address) | |
| addressOrPath | Yes | Contract address or path to ABI JSON file | |
| etherscanApiKey | No | Etherscan API key (for fetching ABI from explorer) |