honestbonsai / webinar-episode-01

Code to go along with our webinars

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Explore the full lifecycle of developing a Dapp

This document is the accompanying notes for Episode 1 of our webinar series.

Img 1

Resources

Code challenge

Implement the following new behavior in the contract following TDD:

  • The contract should have the concept of an owner. Note that truffle uses the first account to sign deployments.
  • Add the ability to keep track of each time an address calls setStoredData. This will need:
    • a mapping mapping[address => uint] and update it every time someone calls setStoredData
    • a function getCount(address _address) that returns the count associated with _address
    • a modifier to guard that only the owner can call getCount which should revert when invoked with the wrong caller.
    • This Truffle Assertion plugin which helps test for revert.

Contributors

A heartfelt thanks to Angela and Francis for their reviews, feedback and testing. 🙇

About

Code to go along with our webinars


Languages

Language:JavaScript 88.5%Language:Solidity 11.5%