contract_deploy
Deploy a smart contract from a KMS wallet and receive the contract address synchronously before transaction confirmation.
Instructions
Deploy a smart contract from a KMS wallet (signs a contract-creation tx with to: null + data: bytecode). The bytecode is full creation calldata — creation bytecode + ABI-encoded constructor args, concatenated client-side (run402 does NOT compile Solidity). Returns the deterministic CREATE address synchronously in contract_address — known before confirmation, no polling needed to know where the contract lives. Same pricing as contract_call: chain gas at-cost + $0.000005 KMS sign fee.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| project_id | Yes | The project ID | |
| wallet_id | Yes | The KMS contract wallet ID (cwlt_...) that will sign + own the new contract | |
| chain | Yes | EVM chain (must match the wallet's chain) | |
| bytecode | Yes | Full creation calldata as 0x-prefixed hex (creation bytecode + ABI-encoded constructor args, concatenated client-side). Non-empty, even-length, ≤ 128 KB. run402 does NOT compile Solidity. | |
| value | No | Optional native-token value in wei to attach to the deploy (decimal string) | |
| idempotency_key | No | Optional idempotency key — same key + same bytecode returns same call_id without re-broadcasting |