Skip to content
This repository was archived by the owner on Mar 1, 2024. It is now read-only.

Commit 43d77c9

Browse files
author
Denis Ermolin
committed
fix: storage layout
1 parent 4c2abae commit 43d77c9

File tree

2 files changed

+11
-17
lines changed

2 files changed

+11
-17
lines changed

contracts/staking/validatorShare/ValidatorShare.sol

+11-2
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,13 @@ import {OwnableLockable} from "../../common/mixin/OwnableLockable.sol";
99
import {IStakeManager} from "../stakeManager/IStakeManager.sol";
1010
import {IValidatorShare} from "./IValidatorShare.sol";
1111
import {Initializable} from "../../common/mixin/Initializable.sol";
12-
import {ValidatorShareStorageExtension} from "./ValidatorShareStorageExtension.sol";
1312

14-
contract ValidatorShare is IValidatorShare, ERC20NonTradable, OwnableLockable, Initializable, ValidatorShareStorageExtension {
13+
contract ValidatorShare is IValidatorShare, ERC20NonTradable, OwnableLockable, Initializable {
14+
struct DelegatorUnbond {
15+
uint256 shares;
16+
uint256 withdrawEpoch;
17+
}
18+
1519
uint256 constant EXCHANGE_RATE_PRECISION = 100;
1620
// maximum matic possible, even if rate will be 1 and all matic will be staken in one go, it will result in 10 ^ 58 shares
1721
uint256 constant EXCHANGE_RATE_HIGH_PRECISION = 10**29;
@@ -38,6 +42,11 @@ contract ValidatorShare is IValidatorShare, ERC20NonTradable, OwnableLockable, I
3842
mapping(address => DelegatorUnbond) public unbonds;
3943
mapping(address => uint256) public initalRewardPerShare;
4044

45+
mapping(address => uint256) public unbondNonces;
46+
mapping(address => mapping(uint256 => DelegatorUnbond)) public unbonds_new;
47+
48+
EventsHub public eventsHub;
49+
4150
// onlyOwner will prevent this contract from initializing, since it's owner is going to be 0x0 address
4251
function initialize(
4352
uint256 _validatorId,

contracts/staking/validatorShare/ValidatorShareStorageExtension.sol

-15
This file was deleted.

0 commit comments

Comments
 (0)