Reward token and website interface for the Badger Blockchain Club at UW-Madison.
View the BadgerToken on Goerli TestNet etherscan.
- Read Development Guide, then follow the quick start guide below.
- The repo we are using is found here
Follow the links to install if you don't have the project requirements installed on your machine.
- Visual Studio Code IDE
- solidity extension from vscode marketplace
- git
- node and npm node v16.16.0, npm v8.11.0
- On windows you need to add Node to env vars stack overflow answer may help
-
Clone the Project
Go to the token repository and clone on your local machine with:
git clone https://github.com/badgerblockchain/attendance-token.git
cd attendance-token
- Install local instance of Hardhat
npm install
- Install the dependencies outlined in package.json using npm.
- To start the app use:
cd frontend
npm install
npm start
The local instance of the website should launch after the npm start cmd is executed.
- only need to use npm install on the first run
- Switch to the Goerli test network by opening MetaMask. If you do not see Goerli, then click on Show/hide test networks and toggle the option to "on". Goerli should populate in the list of testnets.
- Import Token to Metamask by clicking on Import Token on the Goerli testnet. Use the following address
0x7700D96fEa6337a6CA1B1704E3CdF066e965b73b
.
- Copy and Paste the token address into the first box. The rest of the boxes should autofill. Then Add custom token.
- Click on Connect Wallet, and make sure the wallet is connected to Goerli and the tokens have been imported
- Click on Attendance Reward. Tokens should be transfered to your account!
This is a work in progress readme, TODO ADD PICTURES, better descriptions, ensure all dependencies are accounted for
RANDOM NOTES to be used in development
Deploys a new token to the goerli testnet:
npx hardhat run scripts/deploy_token.js --network goerli
https://vittominacori.github.io/watch-token/create/ (TODO figure out how to add image to token)
VIDEO I HAVE BEEN WATCHING: https://www.youtube.com/watch?v=c8Pkz1NqWNw
- only use one contract called BadgerTest(update the name)
- After the contract is deployed look it up on etherscan and set up the "contract" (make sure to user compiler 0.8.3)
- check behavior by starting site and clicking button
- put private keys in env vars
- prettify front-end
- change name to BadgerToken (or another name?)
- add photo so that MetaMask recognizes it
- determine better tokeneconomics (set amount, not unlimited number)