refactor(RewardsStreamerMP): move totalMpStaked to avoid collision

This field was added in between existing fields, causing a storage
collision and corruption of existing data.
This commit is contained in:
r4bbit
2025-02-20 09:26:54 +01:00
parent e3d50bf695
commit 7acc35ff71

View File

@@ -44,7 +44,6 @@ contract RewardsStreamerMP is
uint256 public constant SCALE_FACTOR = 1e18;
uint256 public totalStaked;
uint256 public totalMPStaked;
uint256 public totalMPAccrued;
uint256 public totalMaxMP;
uint256 public rewardIndex;
@@ -72,6 +71,8 @@ contract RewardsStreamerMP is
mapping(address owner => address[] vault) public vaults;
mapping(address vault => address owner) public vaultOwners;
uint256 public totalMPStaked;
modifier onlyRegisteredVault() {
if (vaultOwners[msg.sender] == address(0)) {
revert StakingManager__VaultNotRegistered();