Chapter 13

Mainnet Deployment

Mainnet deployment is irreversible in practice — bugs cost real money and reputation. Treat testnet deploys as dress rehearsals: same scripts, same constructor args, same verification steps, just cheaper gas and fake tokens.

Use forge script with --broadcast and --verify flags, or hardware wallet interfaces for high-value deploys. Record the deployment transaction hash, contract address, and block number in your runbook before announcing publicly.

After launch, set up alerting on critical events — large withdrawals, ownership transfers, pause activations. Operational security continues long after the deploy transaction confirms; compromised admin keys can destroy a protocol overnight.