This is an excerpt from my final exam of the Ethereum Developer Course by B9lab that led to my Ethereum Developer certification.
..without revealing too much (by B9lab):
Our project describes a road system that will be represented by 2 overarching smart contracts:
Regulator
TollBoothOperator
These other elements of the system are represented by externally owned accounts:
- owner of
Regulator
- owner of
TollBoothOperator
- individual vehicles
- individual toll booths
There were many more requirements e.g. how route prices
are calculated, how external accounts
(vehicles, toll booths, operator) are handled and how specific scenarios
need to play out. All interfaces were defined by B9lab beforehand.
I had to fill the contracts with code and bring the dApp to life which also needed to be tested thoroughly with a full test routine (see example in /test). A simple GUI should also be created which you can see below.
- truffle
- ganache
- web3.js
- react
- chakra-ui
- ..served out of a vagrant box
- see also package.json
- can register new vehicles and
- can allow new operators
- has an simple overview of its contract and TVL information
- can add new booths as a toll road operator and
- can set/modify route prices
- can create a secret locally
- can enter the toll road with an entry fee
- can inspect its history
- can report a vehicles exit
- can inspect pending and normal exits
- TollRoad icon designed by Smashicons from Flaticon
- Wouldn't have made it without the brilliant docs from https://github.com/chakra-ui/chakra-ui (@chakra-ui/react)