midnight_deploy_contract
Deploy compiled Compact smart contracts to the Midnight Network, handling private state initialization, proof generation, and transaction submission.
Instructions
Deploy a compiled Compact smart contract to the Midnight Network.
Prerequisites:
Contract must be compiled first using
midnight_compile_contractWallet with sufficient tDUST balance for deployment
Network connectivity to target environment
Deployment Process:
Load compiled contract artifacts
Initialize contract private state (if any)
Create deployment transaction
Generate ZK proof for deployment
Submit transaction to the network
Wait for confirmation
Returns:
Contract address
Transaction hash
Block height
Deployment cost
Security: Use MIDNIGHT_WALLET_SEED environment variable for wallet credentials.
Testnet Faucet: Get free tDUST at https://faucet.testnet.midnight.network
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| contract_name | No | Name of the contract to deploy | |
| compiled_path | No | ||
| initial_state | No | ||
| network | No | Target network for deployment | |
| wallet_seed | No | ||
| gas_limit | No | ||
| dry_run | No | Simulate deployment without submitting transaction |