Step 1
Blockchain Teaching Resources
Smart Contract Rule Lab
Three quick challenges. Turn Solidity into EVM code, make a voting contract enforce its rules, then unlock a time-locked vault.
Challenge 1
Solidity to EVM
About this lesson
Smart Contract Rule Lab is a free, self-paced interactive lesson that introduces Solidity and smart contracts through three short challenges, with a running score shown as the learner progresses.
The first challenge follows Solidity code as it is compiled to bytecode, deployed as a contract account and executed by the Ethereum Virtual Machine. The second challenge asks the learner to make a voting contract enforce its rules, by reading the caller and the stored state, validating with require, and then updating state and emitting an event as evidence. The third challenge uses blockchain time, where a contract compares block.timestamp with a stored deadline before it allows an action, to unlock a time-locked vault.
After the lesson, a learner should be able to describe the path from Solidity to execution on the EVM, and to write the kind of rule checks that protect a contract's state.
The lesson is one of a set of companion teaching resources by Dr Mahmoud Elkhodr. It is licensed under CC BY 4.0, so educators may reuse and adapt it with attribution.
Carry these ideas into the Week 6 primer
Solidity is compiled to bytecode, deployed as a contract account, then executed by the EVM.
Read the caller and stored state, validate with require, then update state and emit evidence.
A contract can compare block.timestamp with a stored deadline before allowing an action.