-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathWithdrawQueueStorage.sol
51 lines (38 loc) · 1.6 KB
/
WithdrawQueueStorage.sol
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
// SPDX-License-Identifier: BUSL-1.1
pragma solidity 0.8.19;
import "../Permissions/IRoleManager.sol";
import "../Oracle/IRenzoOracle.sol";
import "../IRestakeManager.sol";
import "../token/IEzEthToken.sol";
abstract contract WithdrawQueueStorageV1 {
address public constant IS_NATIVE = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE;
struct TokenWithdrawBuffer {
address asset;
uint256 bufferAmount;
}
struct WithdrawRequest {
address collateralToken;
uint256 withdrawRequestID;
uint256 amountToRedeem;
uint256 ezETHLocked;
uint256 createdAt;
}
/// @dev reference to the RenzoOracle contract
IRenzoOracle public renzoOracle;
/// @dev reference to the ezETH token contract
IEzEthToken public ezETH;
/// @dev reference to the RoleManager contract
IRoleManager public roleManager;
/// @dev reference to the RestakeManager contract
IRestakeManager public restakeManager;
/// @dev cooldown period for user to claim their withdrawal
uint256 public coolDownPeriod;
/// @dev nonce for tracking withdraw requests, This only increments (doesn't decrement)
uint256 public withdrawRequestNonce;
/// @dev mapping of withdrawalBufferTarget, indexed by token address
mapping(address => uint256) public withdrawalBufferTarget;
/// @dev mapping of claimReserve (already withdraw requested), indexed by token address
mapping(address => uint256) public claimReserve;
/// @dev mapiing of withdraw requests array, indexed by user address
mapping(address => WithdrawRequest[]) public withdrawRequests;
}