staking/test
Ricardo Guilherme Schmidt 4a261e8b48 refactor(StakeManager): optimize epoch finalization and execution of accounts and epochs
This commit refactors the StakeManager contract to optimize the finalization and execution of epochs. It updates the function finalizeEpoch() to new function finalizeEpoch(uint256 _limitEpoch) that releases rewards for the current epoch and increases the epoch up to the specified limit. This allows for more efficient processing of epochs.

The changes also include updates to the executeEpoch() and executeAccount() functions to utilize the new finalizeEpoch() function. Additionally, a new function newEpoch() is introduced to calculate the last epoch that can be processed based on the current time. Now the executeAccount(account,limit) will also process epochs up to the specified limit.

Added a overload of the executeAccount to process the account up to the newEpoch()

Added a overload of the executeEpoch to allow the process of epochs up to a certain limit.

All methods now that finalizeEpoch will process the epochs up to the newEpoch().

These changes improve the overall performance, user expirience and reliability of the StakeManager contract.

chore(StakeManagerStartMigration.spec): add new function executeEpoch(uint256) to blockedWhenMigrating

fix(StakeManager.sol): Replace the check for pending migration in migrationInitialize with noPendingMigration modifier to avoid code duplication
2024-09-26 15:41:35 -03:00
..
mocks chore: fix warnings on BrokenERC20 mock 2024-03-15 13:21:59 +01:00
script fix(StakeVault): make unstaking actually work 2024-01-19 09:57:34 +01:00
StakeManager.t.sol refactor(StakeManager): optimize epoch finalization and execution of accounts and epochs 2024-09-26 15:41:35 -03:00
StakeVault.t.sol fix(StakeVault): make unstaking actually work 2024-01-19 09:57:34 +01:00
VaultFactory.t.sol cleanup(VaultFactoryTest): remove unused import 2024-01-23 15:11:10 +01:00