Testing blockchain applications and smart contracts
A smart contract is a small program on a shared public record, and it is hard to change once published. So testers check it very carefully, on a practice network, first.
L1–L4 are part of the Pro pass
L0 Explain simply
Analogy: a rule written in permanent ink. A club writes its rules on a big board in the town square. Everyone can read the board. The club writes the rules in permanent ink. If a rule has a typing slip, it cannot be rubbed out. The club can only put up a new board and ask people to use it.
Daily List is a to-do list app. Nina, the product owner, has an idea for a fun extra. A user gets a public badge when she finishes a task seven days in a row. The badge rule will be kept on a shared public record, where many computers hold the same copy and nobody can quietly change an entry.
The rule is a small program called a . It is kept on a shared public record and runs by itself when someone calls it. Tom, the tester, knows the ink is permanent. So he tests the rule long before it is published.
The picture has limits. A board cannot run by itself, but a smart contract does. A board can be repainted by the club, but some contracts are built so that nobody can change them at all.
(SYNTHETIC / TRAINING ONLY: Daily List and every person named in this lesson are invented.)
A contract's deployed code and its changeable data are different. Some applications use proxy/administrative upgrade mechanisms, adding governance risks. A frontend change cannot by itself patch an immutable deployed contract; conversely, immutable code does not mean every application datum is fixed forever.
PLAIN WORDS · 3 in this section
- repainted
- given a new coat of paint
- changeable
- likely to change
- immutable
- cannot be changed once it is made
PICTURE IT
The picture is the one the lesson above opens with. The table below shows how each part of it matches the software.
THE REAL JOB Testing a small public program very carefully before it is published, because it is hard to fix afterwards.
- Rule in plain words
- Local copy
- Practice network
- Independent review
- Publish
HOW THE PICTURE MAPS
| In the picture | In the software |
|---|---|
| Writing in permanent ink | Publishing a contract that is usually fixed |
| A pencil draft on scrap paper | Testing on a local copy |
| A practice board in the club hall | The test network |
| A neighbour who proofreads the rules | An independent review |
| A new board for a typo | A new contract that users move to |
WHERE THIS PICTURE STOPS
- A board does not run by itself. A contract does.
- A club can repaint its board. Some contracts cannot be changed at all.
- A practice board is the same size as the real one. A test network differs in costs and speed.
- Deployed bytecode need not have verified readable source; reverts can cost gas and test networks still have operational and key risks.
HOOK
Pencil first, ink last.
REMEMBER IT THIS WAY
A sequence: the real steps, in order.
Three steps before the ink: test on a local copy, rehearse on the , then ask for an independent review.
| In the trick | What it stands for |
|---|---|
| Local copy | Testing on a local copy |
| Test network | The test network |
| Review | An independent review |
Deployed bytecode need not have verified readable source; reverts can cost gas and test networks still have operational and key risks.
TELL A FRIEND
Drafting the club rules in pencil, having a neighbour read them, and only then writing them in ink.
OFTEN MIXED UP WITH Property-based testing. Property-based testing is a way to try many random inputs against a rule. This lesson uses it for a program that is hard to change after publishing.
Sources & standards — 6 sources
- Market practice
Blockchain Technology Overview (NIST IR 8202) ↗ — NIST · Actual October 2018 front matter, §§3.7, 4.7 and 6, and Figure 3/4/5 source pages reviewed. Simplified chain, conflict and oracle concepts, not current Ethereum PoS fork choice. NIST technical-series reprint policy and courtesy attribution apply subject to third-party credits; no separate figure credit appears on the selected pages.
Actual primary page/document sections opened and compared in the Industry Contexts audit on 6 November 2026; scope and section-reading limits are documented in docs/research/v43-testing-industry-contexts-progress-20261106.md. Paraphrase teaching facts; a public page is not itself permission to republish proprietary source figures.
- Market practice
Expressions and Control Structures — Solidity 0.8.30 ↗ — Solidity project · Actual pinned v0.8.30 checked-arithmetic and error-handling sections reviewed. Reverts undo current-call/subcall state; try/catch and low-level false returns affect propagation. Solidity 0.8 defaults have unchecked/conversion exceptions. Not a current latest-version claim.
Actual primary page/document sections opened and compared in the Industry Contexts audit on 6 November 2026; scope and section-reading limits are documented in docs/research/v43-testing-industry-contexts-progress-20261106.md. Paraphrase teaching facts; a public page is not itself permission to republish proprietary source figures.
- Market practice
Contracts — Solidity 0.8.30 visibility ↗ — Solidity project · Actual pinned v0.8.30 creation/visibility sections reviewed: deployed code versus state/getters and public/external/internal/private access. Private/internal is not public-chain confidentiality; verified source publication differs from bytecode observation.
Actual primary page/document sections opened and compared in the Industry Contexts audit on 6 November 2026; scope and section-reading limits are documented in docs/research/v43-testing-industry-contexts-progress-20261106.md. Paraphrase teaching facts; a public page is not itself permission to republish proprietary source figures.
- Market practice
Ethereum gas and fees: technical overview ↗ — ethereum.org · Actual Ethereum gas, fee and failure sections: gas units, price, fee and failed-transaction costs. The source example is not a fixed live gas-price recommendation.
Seen as a search excerpt on the access date. The page was not opened.
- Market practice
Networks ↗ — ethereum.org · Actual public-testnet, private and development sections dated 23 September 2026: Sepolia for applications, Hoodi for protocol/validator testing, deprecated networks, test-token scarcity and local/public differences.
Found through a web search; the page was not opened (search excerpt, page not opened). Licence terms were not read, so put it in your own words and do not quote it. Open the page and confirm what it says before relying on any detail.
- Market practice
OWASP Smart Contract Top 10: 2026 ↗ — OWASP · Actual 2026 list, introduction, methodology and licensing reviewed: forward-looking awareness ranking based on 2025 signals, not exhaustive assurance. Specific Top 10 licensing links CC BY-NC-SA 4.0 despite a generic CC BY 4 footer. Poster/cover link-only for this commercial academy.
Actual primary page/document sections opened and compared in the Industry Contexts audit on 6 November 2026; scope and section-reading limits are documented in docs/research/v43-testing-industry-contexts-progress-20261106.md. Paraphrase teaching facts; a public page is not itself permission to republish proprietary source figures.
PRACTISE AND KEEP
Sources for this topic — 6 sources
- Market practice
Blockchain Technology Overview (NIST IR 8202) ↗ — NIST · Actual October 2018 front matter, §§3.7, 4.7 and 6, and Figure 3/4/5 source pages reviewed. Simplified chain, conflict and oracle concepts, not current Ethereum PoS fork choice. NIST technical-series reprint policy and courtesy attribution apply subject to third-party credits; no separate figure credit appears on the selected pages.
Actual primary page/document sections opened and compared in the Industry Contexts audit on 6 November 2026; scope and section-reading limits are documented in docs/research/v43-testing-industry-contexts-progress-20261106.md. Paraphrase teaching facts; a public page is not itself permission to republish proprietary source figures.
- Market practice
Expressions and Control Structures — Solidity 0.8.30 ↗ — Solidity project · Actual pinned v0.8.30 checked-arithmetic and error-handling sections reviewed. Reverts undo current-call/subcall state; try/catch and low-level false returns affect propagation. Solidity 0.8 defaults have unchecked/conversion exceptions. Not a current latest-version claim.
Actual primary page/document sections opened and compared in the Industry Contexts audit on 6 November 2026; scope and section-reading limits are documented in docs/research/v43-testing-industry-contexts-progress-20261106.md. Paraphrase teaching facts; a public page is not itself permission to republish proprietary source figures.
- Market practice
Contracts — Solidity 0.8.30 visibility ↗ — Solidity project · Actual pinned v0.8.30 creation/visibility sections reviewed: deployed code versus state/getters and public/external/internal/private access. Private/internal is not public-chain confidentiality; verified source publication differs from bytecode observation.
Actual primary page/document sections opened and compared in the Industry Contexts audit on 6 November 2026; scope and section-reading limits are documented in docs/research/v43-testing-industry-contexts-progress-20261106.md. Paraphrase teaching facts; a public page is not itself permission to republish proprietary source figures.
- Market practice
Ethereum gas and fees: technical overview ↗ — ethereum.org · Actual Ethereum gas, fee and failure sections: gas units, price, fee and failed-transaction costs. The source example is not a fixed live gas-price recommendation.
Seen as a search excerpt on the access date. The page was not opened.
- Market practice
Networks ↗ — ethereum.org · Actual public-testnet, private and development sections dated 23 September 2026: Sepolia for applications, Hoodi for protocol/validator testing, deprecated networks, test-token scarcity and local/public differences.
Found through a web search; the page was not opened (search excerpt, page not opened). Licence terms were not read, so put it in your own words and do not quote it. Open the page and confirm what it says before relying on any detail.
- Market practice
OWASP Smart Contract Top 10: 2026 ↗ — OWASP · Actual 2026 list, introduction, methodology and licensing reviewed: forward-looking awareness ranking based on 2025 signals, not exhaustive assurance. Specific Top 10 licensing links CC BY-NC-SA 4.0 despite a generic CC BY 4 footer. Poster/cover link-only for this commercial academy.
Actual primary page/document sections opened and compared in the Industry Contexts audit on 6 November 2026; scope and section-reading limits are documented in docs/research/v43-testing-industry-contexts-progress-20261106.md. Paraphrase teaching facts; a public page is not itself permission to republish proprietary source figures.
Deepest material on this page: L4 — Standards & sources. Where a topic stops short of implementation depth, that is a deliberate coverage decision, not an oversight — see coverage.