exerciseΒ·30 minΒ·Chapter 2 of 3
Your First Smart Contract
π»Coding Exercise
Let's write a simple storage contract. Every Solidity file starts with a pragma statement declaring the compiler version. Then you define a contract (similar to a class). State variables persist on the blockchain. Functions let you read and modify state.
solidity
// Your code here
// Complete the exercise below
pragma solidity ^0.8.0;
contract HelloWorld {
// TODO: Add your implementation
}