Skip to content

Latest commit

 

History

History
85 lines (59 loc) · 4.37 KB

File metadata and controls

85 lines (59 loc) · 4.37 KB

⛓ More Ways to Write Contracts

⏱ Agenda {docsify-ignore}

[30m] 💻 Activity: Write Contract in Solidity

Do This First

  1. In the token project created on Day 7, rename the provided Token.sol file to ERC20.sol.
  2. Create a new Token.sol file, and complete the challenges below:

Challenges

  1. Add a variable named total. Everyone should be able to access it.
  2. Add an event named AddToTotalEvent.
  3. Add and implement a function named addToTotal with a single argument named number.
    1. Adds number to total.
    2. Triggers AddToTotalEvent.
  4. Make sure it compiles!
  5. Turn it in on Gradescope

[25m] 👀 Watch: Rewrite 4 Solidity Smart Contracts in Vyper

<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>

[20m] 💻 Activity: Write Contract in Vyper

Repeat Challenges

  1. Repeat the instructions above, but implement the contract using Vyper instead of Solidity.
  2. Turn it in on Gradescope

📚 Resources & Credits