Your first mainnet deployment is a small moment with an unusually long tail. A web app can be rolled back in a minute. A smart contract, once deployed, is usually permanent, and it holds real value from the first second. That makes the process around deployment matter more than the code you're so tired of looking at.
This is the checklist I'd follow, built on Hardhat 3. It's organized as a sequence: prepare, rehearse on a testnet, deploy, verify, hand over control and watch. Wherever I haven't tested a step myself, I say so.
Phase 1: Before you touch a network
- Freeze the code. Tag a commit. Deploy what you tested, not what you edited an hour ago.
- Run the whole test suite and read the coverage. In my own examples, all tests passed while line coverage was still only 83%, because I hadn't tested some paths. See the audit preparation checklist for how to use coverage as a map of gaps.
- Decide whether you need an audit. If the contract will hold other people's funds, the answer is nearly always yes. The Solidity documentation recommends asking for peer review and limiting the amount of Ether at risk.
- Limit the blast radius. Caps, withdrawal limits and a pause function (with its holder clearly documented) can turn a catastrophe into an incident. The Solidity docs explicitly suggest including a fail-safe mode.
- Write down the deployment parameters: constructor arguments, owner address, token addresses, chain. A correct contract with a wrong parameter is still broken, and some mistakes, such as a wrong owner, can't be fixed.
- Choose the owner properly. Don't leave admin rights on the deployer wallet. Transfer them to a multisig, or to hardware-backed keys; the threat-model post explains why.
Phase 2: Set up keys and configuration safely
- Use a deployment-only key. Fund it with just enough for gas. The Hardhat deployment guide says to use a testnet-only private key for Sepolia and not keep valuable assets on it.
- Keep secrets in the keystore. Hardhat 3's
configVariablereads from environment variables or its encrypted keystore (npx hardhat keystore set NAME). Never commit a private key, RPC key or API key, and checkgit statusbefore every push. - Separate testnet and mainnet keys. A key that has touched a testnet faucet, or has been pasted into test scripts, shouldn't later control real funds.
- Check your config fails safely. When I ran a Hardhat command with unset variables, it stopped with HHE7 and did nothing else. Make sure a typo can't make a mainnet deployment run with a testnet config, or the reverse. Name networks clearly.
Phase 3: Rehearse on a testnet
ethereum.org describes Sepolia as the recommended default testnet for application development, with Hoodi aimed at validators and protocol upgrades. Testnet ETH comes from faucets. Check the documentation for the current list before you start, since testnets are retired over time.
- Deploy with Hardhat Ignition, which the Hardhat docs strongly recommend as the official deployment solution. An Ignition module describes the deployment declaratively, and Ignition tracks state, so interrupted deployments can resume. I ran a module on the simulated network and it deployed the token successfully:
npx hardhat ignition deploy ignition/modules/TeamToken.ts --network sepolia - Use the production build profile. Hardhat Ignition deployments use it automatically, and it is what
verifyexpects by default. Test the same compiled code you intend to ship. - Verify the source on the testnet explorer with the verification guide. Wait a minute after deploying if it can't find the contract.
- Run the real user flows by hand with a wallet, as a user would: mint, transfer, withdraw, and the failure cases too.
- Test admin actions such as pausing, ownership transfer and upgrades. If you can't pause on the testnet, you won't be able to in an emergency.
- Check events and the explorer's decoded view so that monitoring and support can read transactions; the transaction-reading post shows what to look for.
- Invite one reviewer to try to break it, with the instruction to behave like an attacker.
Phase 4: The mainnet deployment itself
- Re-read the parameters out loud against your written list. Chain ID, owner, constructor arguments.
- Check gas conditions and pick a quiet moment. A rushed deployment at peak fees is more expensive and more error-prone.
- Deploy from the dedicated key and wait for the confirmations.
- Save the outputs immediately: contract address, transaction hash, block number, commit hash, compiler settings, constructor arguments. Put them in the repository's release notes.
- Verify the source on the mainnet explorer straight away. An unverified contract invites distrust.
- Transfer ownership to the multisig, and confirm it by reading
owner()afterwards. Don't assume. - Make a small first transaction yourself. A tiny real mint or deposit confirms the live behaviour before you announce anything.
Phase 5: After deployment
- Announce the address in official channels only, and tell users how to verify it. Scammers copy addresses and names quickly.
- Set up monitoring. At minimum, alert on admin function calls, large transfers and failed-transaction spikes. Decide who is responsible and what they can do at 3 a.m.
- Write an incident plan. Who can pause? Who decides? How do you communicate? Rehearse it once.
- Keep the deployer key out of daily use. Better, retire it once ownership has moved.
- Consider a bug bounty once there is something worth finding, and publish a way to contact you.
Common first-timer mistakes
- Deploying with the optimizer or compiler settings different from what was tested.
- Leaving ownership on a hot deployer wallet.
- Hard-coding a testnet address into a mainnet deployment (or the reverse).
- Skipping verification, then having to rebuild the exact settings from memory later.
- Announcing before a final live check.
- Forgetting that the contract is public: anyone can call every public function, with any input, from any contract.
The one-page checklist
- Frozen commit, tests green, coverage read, audit decision made.
- Blast radius limited, owner is a multisig, parameters written down.
- Keys in the keystore, a deployment-only key, testnet and mainnet separated.
- Full rehearsal on a testnet, including admin and failure paths.
- Mainnet deploy, immediate verification, ownership transfer and a small live test.
- Monitoring, an incident plan and official announcements only.
Deploying your first contract?
I can set up the deployment pipeline, rehearsal and verification with you, so launch day is boring. Get in touch if you'd like a hand.
See services Get in touchWhat I ran this against
- Hardhat 3.22.0 (Mocha + ethers template), @openzeppelin/contracts 5.6.1, ethers 6.17.0, solc 0.8.34, Node.js 24.22.1, run on 17 November 2026 on Hardhat's in-process simulated network. Hardhat Ignition was run against the simulated network (the TeamToken module deployed successfully), and I ran the verify task's help and its missing-variable failure, as described in the verification post. I did not deploy to a public testnet or mainnet for this post.
- Everything about public testnets, faucets and explorers comes from the documentation cited below, read on 17 November 2026. Testnet names and availability change, so check the current list.
- Nothing was deployed to a testnet or mainnet, and the contracts are teaching examples that have not been audited.
Sources checked
- Hardhat 3 documentation, deployment overview and the verification guide (Hardhat Ignition is the recommended deployment tool; secrets go in the encrypted keystore; use testnet-only keys; verifying right after deployment may need a minute; the
productionbuild profile is used by default): hardhat.org/docs/guides/deployment, verification guide. - ethereum.org, Networks (Sepolia is described as the recommended default testnet for application development; Hoodi is for validators and protocol testing; testnet ETH comes from faucets): ethereum.org/developers/docs/networks.
- Solidity documentation, Security Considerations (restrict the amount of Ether at risk, include a fail-safe mode, ask for peer review): docs.soliditylang.org.