MCP Ethers Wallet

contractCallWithEstimate

Call a method on a smart contract with automatic gas estimation

Input Schema

NameRequiredDescriptionDefault
abiYesThe ABI of the contract as a JSON string
contractAddressYesThe address of the smart contract
methodYesThe method name to invoke
methodArgsNoAn array of arguments to pass to the method
providerNoOptional. Either a network name or custom RPC URL. Use getSupportedNetworks to get a list of supported networks.
valueNoOptional. The amount of ETH to send with the call

Input Schema (JSON Schema)

{ "properties": { "abi": { "description": "The ABI of the contract as a JSON string", "type": "string" }, "contractAddress": { "description": "The address of the smart contract", "type": "string" }, "method": { "description": "The method name to invoke", "type": "string" }, "methodArgs": { "description": "An array of arguments to pass to the method", "items": { "type": [ "string", "number", "boolean", "object" ] }, "type": "array" }, "provider": { "description": "Optional. Either a network name or custom RPC URL. Use getSupportedNetworks to get a list of supported networks.", "type": "string" }, "value": { "description": "Optional. The amount of ETH to send with the call", "type": "string" } }, "required": [ "contractAddress", "abi", "method" ], "type": "object" }