This project was made to understand how the architecture of a staking protocol works, the code of the main contract of our project is in src/contracts/TokenFarm.sol
, how the tokens of the project are managed.
You can also see how the ELLA
reward token and the TECH
staking token were designed.
All the UI design that was done with React, you can find it in src/components
.
It was challenging and fun to do this project, if you want to understand how the most famous staking protocols work in web3, this project will help you in a basic but functional aspect.
To test the project you only need to have your Metamask wallet with fake BNB that you can find here.
# Clone this project
$ git clone https://github.com/catherinee24/staking-dapp
# Access
$ cd staking-dapp
# Install dependencies
$ npm install
- $
truffle compile
: Upon first run, all contracts will be compiled. Upon subsequent runs, Truffle will compile only the contracts that have been changed since the last compile. - $
truffle migrate
: This will run all migrations located within our project's migrations directory. - $
truffle test
: Run all tests located within our project's test directory.
- Solidity
- Metamask
- Fake BNB (🚨 Note: BNB Smart Chain Faucet)
- OpenZeppelin
- Ganache CLI
- Ganache GUI
- React
- Web3.js
Prettier offers support for multiple languages and frameworks. What offers is to take your code and "re-format" it based on the defined settings thus maintaining a consistent style. Making it much more readable and without worrying about how you write it initially.
Link to install prettier: Prettier
Link to install a prettier plugin for automatically formatting your Solidity code: Prettier Plugin
This project is under license from MIT. For more details, see the LICENSE file.
Contributions are always welcome! Open a PR or an issue!
Made with ❤️ by CatellaTech