Pre-check › Checklist
Checklist before deploying a Solidity contract
23 points to go through by hand before code that holds funds goes live. Each point has a one-line reason. Print it or copy it into your pull request template.
Marked auto: our pattern check flags these automatically, fully or in part (open source on GitHub). Everything else needs a human look. The list is not complete and does not replace an audit. It was written by an AI system.
1. Compiler and build
- Exact compiler version pinned (
pragma solidity 0.8.28;instead of^0.8.0), the same one you tested with. A newer compiler can change code generation. auto - No compiler warnings left, or each one understood and documented. Warnings about unused return values often point to real bugs. auto
- Optimizer settings identical in tests and deployment. Otherwise you deploy bytecode you never tested.
2. Access control
- Every state-changing
public/externalfunction: who may call it, and where is that checked? A setter without a check is a common high-severity finding. auto, partly msg.sender, nevertx.origin, for authorisation. Withtx.originany contract the owner interacts with can act in their name. auto- Owner and admin changes emit an event, and ownership moves in two steps (propose, accept). A typo in the new address is then not final.
- No unprotected initializer in upgradeable contracts. Whoever calls
initializefirst owns the contract.
3. Value transfers
- Checks-effects-interactions: state is updated before any external call. The sample report shows the classic reentrancy case. auto, partly
- Reentrancy guard where several functions share state. The order rule alone does not protect against cross-function reentrancy.
- Return values of
callandsendchecked. A failed transfer otherwise looks like success. auto - Pull instead of push for payouts to many recipients. One reverting recipient cannot block the others.
- No loop over an unbounded list that sends funds. At some length it runs out of gas and the funds are stuck.
4. External code
- No
delegatecallto addresses a user can influence. The called code runs with your storage and your balance. auto, every use - Token return values handled. Some ERC-20 tokens return nothing or
falseinstead of reverting; use a safe wrapper. - Oracles: stale or manipulated prices considered. No spot price from a single pool.
- No
selfdestructin new code. Its behaviour changed with the Cancun upgrade and it is deprecated. auto
5. Time and randomness
block.timestamponly where a few seconds of drift do not matter (deadlines in days, not lotteries). auto, every use- No randomness from block data. Block producers and other contracts can read or influence it.
6. Tests and process
- Tests for every revert path, not only the happy path.
- Fuzz or invariant tests for arithmetic and balances (for example: the sum of all balances equals the contract balance).
- Run a mature analyzer such as Slither or Aderyn and review every hit. Both are free.
- Deployment script reviewed: constructor arguments, owner address, network. Many losses start with a wrong address, not a bug.
- For contracts that hold real money: an audit by people who are accountable for it.
What a checklist cannot do
A list catches known patterns. It does not catch errors in your business logic, economic attacks such as flash loans or price manipulation, or risks in contracts you call. That needs tests designed for your case and, for real money, an audit.
Free script, or a pre-check by us
If you want the automated points checked and every hit explained, look at the sample report. During the test phase we only take inquiries, for businesses only, without price or payment.