Skip to content
RED SAGSkills
mediumBlockchain Developer interview question

Walk me through how you deploy a set of contracts to mainnet safely.

What the interviewer wants to hear

  • Scripted, repeatable deployments (Foundry scripts) tested on a fork and testnet
  • Pinned compiler version, settings and EVM version per chain
  • Secure keys: hardware wallet or multisig, not a plain env file
  • Verify source on explorers and check deployed config with a script
  • Hand ownership to multisig, record addresses, set up monitoring

Model answer

I write the deployment as a Foundry script so it is repeatable and reviewed like normal code. I first run it against a mainnet fork, then on a testnet, and check the results with post-deployment tests that read every important setting. The compiler version, optimizer runs and EVM version are pinned, and checked per target chain. For the real deployment I sign with a hardware wallet or a dedicated deployer key, never a key sitting in a plain env file, and I use CREATE2 if I want the same addresses across chains. Right after deploying I verify the source on Etherscan or the chain's explorer, run a script that checks owners, roles and parameters, and transfer ownership to the multisig or timelock. Finally I publish the addresses, store the deployment artifacts in the repo, and turn on monitoring and alerts.

Can you answer it under time pressure?

Take a timed medium round and get scored on every answer.

Start mock interview

More medium Blockchain Developer questions