FreeosDAO / freeoscontracts

Freeos Smart Contract Code
0 stars 1 forks source link

Staking unsuccessful #18

Closed judytan21 closed 3 years ago

judytan21 commented 3 years ago

Account ellaevery type 'e' account. Not reqistered yet. Expecting staking will automatically register user. When staking with 30XPR which was the staking requirement, was unable to stake with error: proton push action eosio.token transfer '[""ellaevery"", ""freeos333333"", ""30.0000 XPR"", ""freeos stake""]' -p ellaevery@active 'assertion failure with message: the stake amount is not what is required'

Counters table: """usercount"": 19, ""claimevents"": 22, ""unvestpercent"": 0, ""unvestpercentiteration"": 11, ""iteration"": 18, ""failsafecounter"": 1" Stakes table: "threshold": 10, "requirement_a": "0.0000 XPR", "requirement_b": "0.0000 XPR", "requirement_c": "0.0000 XPR", "requirement_d": "20.0000 XPR", "requirement_e": "30.0000 XPR", "requirement_u": "0.0000 XPR", "requirement_v": "0.0000 XPR", "requirement_w": "0.0000 XPR", "requirement_x": "0.0000 XPR", "requirement_y": "0.0000 XPR"

tommccann777 commented 3 years ago

Hi Jude, as discussed in the standup meeting, I have changed the way we use tables in order to solve what looks like a table corruption problem. The counters table was re-created as statistics. The stakes table has been removed. Stake lookup is now based on the freeosconfig::stakereqs table.

In the course of debugging and fixing this issue I managed to succeed staking ellaevery with 30 XPR

Please retest with another account - or perhaps unstake ella and re-stake. Note that the stake requirement is legitimately 50 XPR at the time of writing this.

tommccann777 commented 3 years ago

Hi Jude,

I have responded to this. Please re-test and hopefully close the issue. Thanks,

Tom

On Wed, Mar 17, 2021 at 4:13 PM judytan21 @.***> wrote:

Assigned #18 https://github.com/FreeosDAO/freeoscontracts/issues/18 to @tommccann777 https://github.com/tommccann777.

— You are receiving this because you were assigned. Reply to this email directly, view it on GitHub https://github.com/FreeosDAO/freeoscontracts/issues/18#event-4467869343, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEKES33OIA4PEXQI2EP4HXDTEAM5TANCNFSM4ZJX6KJQ .

judytan21 commented 3 years ago

14/5/21 Fixed. Closing issue.