Sovryn-smart-contracts icon indicating copy to clipboard operation
Sovryn-smart-contracts copied to clipboard

Refactor Staking contract (met dragons - eip170)

Open tjcloa opened this issue 3 years ago • 1 comments

  • Optimized modular system introduced
  • Staking contract refactored - split into modules
  • Tests updated to the new modular structure
  • Refactored stakeBySchedule
  • Restored function Staking.stakeWithApproval Note: original Staking contract and all the inherited ones are left for review/comparison at the moment and will be removed except for IStaking which is adapted to the new structure
  • Restored require/revert messages to their full text
  • Fixed governance Team Vesting cancelling out of gas issue [MERGE FORM ANOTHER BRANCH PENDING]
  • Fixed issue with CI caused by one of packages

tjcloa avatar Jul 23 '22 03:07 tjcloa

Looks good! The modules make sense, documentation is clear. There are only a few things I noticed.

* The stakeBySchedule function was not refactored as expected (details in comment). I recommend refactoring this in a separate PR.

* The error messages were shortened to error codes in the past due to the contract size issue. i would prefer for them to be restored to their full length, because it makes debugging a lot easier.

All done

tjcloa avatar Sep 01 '22 20:09 tjcloa