Lesson 4: Final notes & Final project + repo

For this lesson, I felt it appropriate to simply develop what I already had from lesson 3. I wanted to add to the smart contract all the functionality asked in the excercises. Also I went on a little tangent, doing some testing around gas costs, which in the end was a very worthwhile excercise.

On the front end i really wanted a user balance to be a live, self updating feature, rather than it be achieved by the user having to press a button. This took me on a small journey into the useState and useEffect hooks in react.

In the end the I acheived the following:

Smart Contract

  1. Added events and event handling to the deposit and withdraw functions

  2. optimised the functions for cheaper gas calculation.

Front-end

  1. Updated the style

  2. Removed getUserBalance button

  3. Replaced with a live bar that shows the user balance, utilizing useEffect and UseState.

Deployments and Repositories

The final project is available here - https://ethwalletapp.on.fleek.co/

Front-end repo - https://github.com/SimSimButDifferent/L3-L4-EthWalletFrontEnd

Back-end repo - https://github.com/SimSimButDifferent/L3-L4-EthWallet

Last updated