Sovryn-smart-contracts
Sovryn-smart-contracts copied to clipboard
Refactor Staking contract (met dragons - eip170)
- 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
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