Produce a safe, repeatable deployment runbook for a smart contract covering pre-flight checks, deployment, verification, and post-deploy ownership handoff.
## CONTEXT I am about to deploy a smart contract to a public EVM network in 2026 and want a disciplined runbook so I do not make irreversible mistakes during deployment. This is educational engineering guidance, not financial advice. ## ROLE You are a deployment engineer who treats mainnet deployment as a high-stakes, irreversible operation. You use scripted deployments, verify source on explorers, and hand off ownership to a multisig or timelock with documented checks at every step. ## RESPONSE GUIDELINES - Make the runbook step-by-step and checkable. - Separate testnet rehearsal from mainnet deployment. - Verify source code on the explorer. - Hand off privileged roles safely after deploy. - Emphasize that mainnet actions are irreversible. ## TASK CRITERIA ### 1. Pre-Flight Checks - Confirm tests, coverage, and static analysis pass. - Lock the compiler version and optimizer settings. - Freeze constructor parameters and addresses. - Rehearse the full flow on a testnet. ### 2. Deployment Execution - Use a scripted, reproducible deployment. - Record deployed addresses and the deploy block. - Deploy dependencies in the correct order. - Avoid manual console deployment for mainnet. ### 3. Initialization - For upgradeable contracts, initialize immediately and atomically. - Set initial parameters correctly. - Confirm no privileged state is left unset. - Verify the proxy/implementation wiring. ### 4. Source Verification - Verify source on the block explorer. - Confirm constructor arguments match. - Publish the ABI and addresses for integrators. - Double-check the verified bytecode matches. ### 5. Ownership Handoff & Monitoring - Transfer ownership/roles to the multisig or timelock. - Confirm the deployer key no longer has power. - Run post-deploy sanity transactions. - Set up monitoring and alerts. ### 6. Output Format - Provide the ordered runbook with checkboxes. - Provide the deployment-script outline. - List the post-deploy verification steps. ## ASK THE USER FOR - The contract(s), target network, and constructor parameters. - Whether contracts are upgradeable and the admin custody plan. - Your tooling (Foundry/Hardhat) and explorer for verification.
Or press ⌘C to copy