Skip to content

Commit

Permalink
implemented totalstaked
Browse files Browse the repository at this point in the history
  • Loading branch information
ibnzUK committed May 23, 2021
1 parent 398be9c commit 17d013d
Show file tree
Hide file tree
Showing 6 changed files with 1,358 additions and 939 deletions.
32 changes: 19 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@
* Stake, Unstake is now working
* Redistribute rewards for (Admin only) is now working

* Implemented totalstaked





Expand All @@ -47,23 +50,26 @@
testing output
``` Contract: TokenStaking
TestToken deployment
✓ token deployed and has a name (143ms)
✓ token deployed and has a name (276ms)
TokenStaking deployment
✓ staking contract deployed and has a name (85ms)
✓ staking contract has 500k TestTokens tokens inside (143ms)
✓ staking contract deployed and has a name (129ms)
✓ staking contract has 500k TestTokens tokens inside (127ms)
TokenStaking stakeTokens function
✓ investors able to deposit (141ms)
✓ aproving tokens, staking tokens, checking balance (1069ms)
✓ checking contract balance after staking (141ms)
✓ checking user balance inside contract (119ms)
✓ testing if user is staking at the moment (88ms)
✓ testing if user has staked (141ms)
✓ users able to deposit (121ms)
✓ checking total staked before any stakes (125ms)
✓ aproving tokens, staking tokens, checking balance (1000ms)
✓ checking contract balance after staking (110ms)
✓ checking user balance inside contract (191ms)
✓ checking total staked (189ms)
✓ testing if user is staking at the moment (149ms)
✓ testing if user has staked (144ms)
TokenStaking redistributeRewards function
✓ checking who can do redistribution (646ms)
✓ checking TokenStaking balance (190ms)
✓ checking user balance (110ms)
✓ checking who can do redistribution (536ms)
✓ checking TokenStaking balance (157ms)
✓ checking user balance (115ms)
TokenStaking unstakeTokens function
✓ checking users balance (445ms)
✓ checking users balance (485ms)
✓ 5.2 checking total staked (155ms)
```


Expand Down
6 changes: 3 additions & 3 deletions src/abis/Migrations.json
Original file line number Diff line number Diff line change
Expand Up @@ -1381,12 +1381,12 @@
"5777": {
"events": {},
"links": {},
"address": "0xAB32212db64044C242Cf5E2C5d147432b90A2113",
"transactionHash": "0x98d1cf07f17cfdcdb84611f86400b9d377c68d9c08def9f284800f339bc49a2e"
"address": "0xbD6606F11DDA067C394B9F7b833697456aC5F9d0",
"transactionHash": "0x1d326cad73491aeaf0965459b4d884fd79b0cedf11689d6db5962f98aacc11c6"
}
},
"schemaVersion": "3.2.3",
"updatedAt": "2021-05-22T14:11:06.392Z",
"updatedAt": "2021-05-23T08:59:27.505Z",
"networkType": "ethereum",
"devdoc": {
"methods": {}
Expand Down
6 changes: 3 additions & 3 deletions src/abis/TestToken.json
Original file line number Diff line number Diff line change
Expand Up @@ -4962,12 +4962,12 @@
}
},
"links": {},
"address": "0x18739686Dd5801638c15520aba80C07163Db2C52",
"transactionHash": "0xa5bccbee62ec92db1a377c36c40ed0cfbe3e31dbc963c347a60879204ddcc350"
"address": "0x17DbfCfd39193277316078A1c1213CCD8cC04add",
"transactionHash": "0x1dcc33cb7fbbf62967341fef5613bd0bdc427bbc36c91276446edf1665a2f7bd"
}
},
"schemaVersion": "3.2.3",
"updatedAt": "2021-05-22T14:11:06.373Z",
"updatedAt": "2021-05-23T08:59:27.484Z",
"networkType": "ethereum",
"devdoc": {
"methods": {}
Expand Down
Loading

0 comments on commit 17d013d

Please sign in to comment.