- [30m] 💻 Activity: Write Contract in Solidity
- [30m] 👀 Watch: Rewrite 4 Solidity Smart Contracts in Vyper
- [20m] 💻 Activity: Write Contract in Vyper
- [15m] 🌴 BREAK {docsify-ignore}
- In the
tokenproject created on Day 7, rename the providedToken.solfile toERC20.sol. - Create a new
Token.solfile, and complete the challenges below:
- Add a variable named
total. Everyone should be able to access it. - Add an event named
AddToTotalEvent. - Add and implement a function named
addToTotalwith a single argument namednumber.- Adds
numbertototal. - Triggers
AddToTotalEvent.
- Adds
- Make sure it compiles!
- Turn it in on Gradescope
<iframe title="YouTube: Rewrite 4 Solidity Smart Contracts in Vyper" width="692" height="389" src="https://www.youtube.com/embed/NwSIaNhRHFQ" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
- Repeat the instructions above, but implement the contract using Vyper instead of Solidity.
- Turn it in on Gradescope