This document is the accompanying notes for Episode 1 of our webinar series.
- Transcript of the live code session.
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 callssetStoredData - a function
getCount(address _address)that returns the count associated with_address - a modifier to guard that only the owner can call
getCountwhich should revert when invoked with the wrong caller. - This Truffle Assertion plugin which helps test for revert.
- a
mapping
A heartfelt thanks to Angela and Francis for their reviews, feedback and testing. 🙇
