EVM MCP Server
by mcpdotdirect
Verified
write_contract
Write data to a smart contract by calling a state-changing function. This modifies blockchain state and requires gas payment and transaction signing.
Input Schema
Name | Required | Description | Default |
---|---|---|---|
abi | Yes | The ABI (Application Binary Interface) of the smart contract function, as a JSON array | |
args | Yes | The arguments to pass to the function, as an array (e.g., ['0x1234...', '1000000000000000000']) | |
contractAddress | Yes | The address of the smart contract to interact with | |
functionName | Yes | The name of the function to call on the contract (e.g., 'transfer') | |
network | No | Network name (e.g., 'ethereum', 'optimism', 'arbitrum', 'base', 'polygon') or chain ID. Defaults to Ethereum mainnet. | |
privateKey | Yes | Private key of the sending account in hex format (with or without 0x prefix). SECURITY: This is used only for transaction signing and is not stored. |
Input Schema (JSON Schema)
You must be authenticated.
Other Tools
- get_chain_info
- resolve_ens
- get_supported_networks
- get_block_by_number
- get_latest_block
- get_balance
- get_erc20_balance
- get_token_balance
- get_transaction
- get_transaction_receipt
- estimate_gas
- transfer_eth
- transfer_erc20
- approve_token_spending
- transfer_nft
- transfer_erc1155
- transfer_token
- read_contract
- write_contract
- is_contract
- get_token_info
- get_token_balance_erc20
- get_nft_info
- check_nft_ownership
- get_erc1155_token_uri
- get_nft_balance
- get_erc1155_balance
- get_address_from_private_key