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
delegatecallto caller-chosen addresses; noselfdestruct. (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:
initializeroninitialize,_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 . --reportwith Slither installed. - Dry run:
forge scriptwithout--broadcast, or against a fork or testnet. - Keys: hardware wallet or encrypted keystore; no key in the repo or
.envcommitted. (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.