Blockchain app using Etherium
Smart Contracts, Solidity
, and ERC721
.
Takk
is an ERC721 token that represents a moment of gratitude shared between two people.
A user(Q) who does a good deed receives 1 Takk as gratitude for the deed from another user(T). The user who did the good deed(Q) now has 1 Takk in their wallet and can use their Takk
to pay other users as gratitude when the situation arises.
(i.e. T paid Q 1 Takk for doing something good)
- Second token feature :
Hafna
can be sent to users who do bad deeds -
Hafna
will automatically remove 20% of user'sTakk
, then continues to remain in the user's account for 3 days - During the 3 days, if more
Takk
is recieved whileHafna
is present, 50% of theTakk
will automatically be sent to the user who originally sent theHafna
(i.e. Q received aHafna
from T, now Q pays T 50% ofTakk
recieved in the following 3 days) - Users can exchange x
Takk
to buy 1Hafna
to send to another
- npm
- NodeJS
- Ganache
- MetaMask
- Install OpenZeppelin with
$ npm install @openzeppelin/contracts
- Update Truffle using
$ npm update -g truffle
Follow this tutorial to see how to properly connect Ganache to your Metamask. Click Here for the written tutorial.
- Run
$ npm install
- Run
$ truffle migrate --reset
- Run
$ npm run dev
Example of a User's webpage with gratitude tokens in their wallet. Sending/transfering a gratitude token ID 3 in my wallet. Sending/transfering a gratitude token ID 5 in my wallet. My list of gratitude tokens after sending/transfering desired tokens. View of the receiver's webpage. Error message received upon attempting to create a token on your own account. (You are not allowed to create a token on your account, only on other users' account)
-
Clone this repo
$ cd <location where you would like repo stored> $ git clone https://github.com/ellojess/Takk-Token.git
-
Make sure it is setup correctly
$ cd Takk-Token $ git remote -v
You should see:
origin https://github.com/ellojess/Takk-Token.git (fetch) origin https://github.com/ellojess/Takk-Token.git (push)
-
Run the following command
$ npm install
-
Create your own branch to make edits on
$ git checkout -b <your name/feature>
-
Set upstream
$ git push --set-upstream origin <branch name you setup in step 3 above>
You should now be able to push as you normally would through terminal
After you push from terminal, go to this repo and submit a pull request when you're ready.