Smart Contracts with Solidity: CRUD On-Chain
The intermediate tier of the Web3 track, continuing Web3 Fundamentals. A smart contract is a program whose state lives on the chain and whose functions anyone can call, for a fee. You build the mental model of the EVM as a state machine, then write a real CRUD contract in Solidity: a notes registry with create, read, update and delete, owner-scoped access, custom errors, and payable functions with a safe withdraw pattern. You test it with Foundry, fuzz it, deploy it to a testnet, and finish by implementing ERC-20 and ERC-721 by hand so the token standards stop being magic. Every lesson pairs the real Solidity with a runnable JavaScript model of the same behaviour, including reverts that roll state back.
5 lessons · ~2.5 hours
1. State on the Chain
The EVM mental model
Ethereum is one shared computer. Accounts hold balance, code and storage; a transaction is a function call that moves the world from one state to the next and charges gas for the trip.
Your first contract: a CRUD notes registry
Structs, mappings and events are the whole toolkit. Build create, read, update and delete for notes that only their author can touch.
Access control, errors & money
Modifiers factor out permission checks, custom errors replace strings, and payable functions let a contract hold ETH. Revert rolls it all back, and the withdraw pattern keeps the money safe.
Testing & deploying with Foundry
Foundry tests are Solidity too. Write unit tests, let the fuzzer hunt for inputs that break your invariants, run a local chain, then deploy to a testnet and verify the source.
Tokens by hand: ERC-20 & ERC-721
A token standard is just an interface everyone agreed on. Implement ERC-20 with allowances and see how ERC-721 changes one mapping to make every unit unique.