Solidity pre-deploy checklist

Run through this before every deploy that isn't to a local node. Chain Preflight's /chain-preflight:predeploy walks an agent through the same list.

Code

  • Compiler pinned to the version you tested (pragma solidity 0.8.x;), 0.8 or newer. (rule)
  • Every privileged function checks its caller; no tx.origin. (access control, tx.origin)
  • State updated before external calls; reentrancy guards on functions that call out. (rule)
  • Every low-level call checked; tokens moved with SafeERC20. (calls, ERC-20)
  • No delegatecall to caller-chosen addresses; no selfdestruct. (rule)
  • Prices from a TWAP or oracle with staleness checks, not AMM reserves; randomness from a VRF. (prices, randomness)
  • Signatures: EIP-712 with nonce, deadline and chain id; zero-address check. (rule)
  • Upgradeable: initializer on initialize, _disableInitializers() in the implementation's constructor, protected _authorizeUpgrade. (rule)

Process

  • Tests pass, including fuzz and invariant tests (forge test).
  • Scan clean or every finding explained: chain-preflight scan . --report with Slither installed.
  • Dry run: forge script without --broadcast, or against a fork or testnet.
  • Keys: hardware wallet or encrypted keystore; no key in the repo or .env committed. (rule)
  • Constructor and initializer arguments double-checked.
  • Owner, roles and proxy admin go to a multisig (or are renounced on purpose), with a timelock where appropriate.
  • Plan to verify the source (forge verify-contract), record addresses and the commit hash, and monitor.
  • Anything that will hold value has had a professional audit.