cast_send
Send a state-changing transaction to a deployed smart contract with configurable signing, gas, value, and function arguments.
Instructions
Send a state-changing transaction to a deployed contract (cast send).
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": {
"to": "<to>",
"rpcUrl": "<rpcUrl>"
},
"name": "cast_send"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | Yes | Address of the contract to send the transaction to | |
| aws | No | Sign with AWS KMS (requires AWS_KMS_KEY_ID env var) | |
| gcp | No | Sign with Google Cloud KMS (requires GCP_PROJECT_ID, GCP_LOCATION, GCP_KEY_RING, GCP_KEY_NAME, GCP_KEY_VERSION env vars) | |
| args | No | Function arguments in order | |
| from | No | Sender address, used with --unlocked or hardware wallets. Maps to --from for cast/deploy, --sender for forge script. | |
| value | No | ETH value to send (in wei, or use 'cast to-wei' first) | |
| ledger | No | Sign with a Ledger hardware wallet | |
| rpcUrl | Yes | RPC URL of the network | |
| trezor | No | Sign with a Trezor hardware wallet | |
| account | No | Named keystore account from ~/.foundry/keystores (recommended for production). Create one with: cast wallet import <name> --interactive | |
| gasLimit | No | Gas limit override | |
| keystore | No | Path to an encrypted keystore JSON file | |
| unlocked | No | Use eth_sendTransaction with --from address (no local signing). For nodes that manage keys natively. | |
| signature | No | Function signature, e.g. "transfer(address,uint256)" | |
| privateKey | No | Raw private key for signing. Only use for local development with well-known test keys (e.g. anvil accounts). For production, use 'account' (named keystore) or hardware wallets instead. | |
| passwordFile | No | Path to a file containing the keystore password | |
| keystorePassword | No | Keystore password (prefer passwordFile to keep it out of process args) |