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