Skip to content

Commit d2e7232

Browse files
authored
Merge pull request #537 from lidofinance/fix/wq-timestamp
Feat: use timestamp instead of blockNumber for WithdrawalRequest
2 parents 23306b4 + 9bb2c77 commit d2e7232

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

contracts/0.8.9/WithdrawalQueueBase.sol

+5-5
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ abstract contract WithdrawalQueueBase {
2727
uint128 cumulativeShares;
2828
/// @notice payable address of the recipient eth will be transferred to
2929
address payable recipient;
30-
/// @notice block.number when the request was created
31-
uint64 blockNumber;
30+
/// @notice block.timestamp when the request was created
31+
uint64 timestamp;
3232
/// @notice flag if the request was claimed
3333
bool claimed;
3434
}
@@ -128,7 +128,7 @@ abstract contract WithdrawalQueueBase {
128128
uint256 amountOfStETH,
129129
uint256 amountOfShares,
130130
address recipient,
131-
uint256 blockNumber,
131+
uint256 timestamp,
132132
bool isFinalized,
133133
bool isClaimed
134134
)
@@ -140,7 +140,7 @@ abstract contract WithdrawalQueueBase {
140140
WithdrawalRequest memory previousRequest = queue[_requestId - 1];
141141

142142
recipient = request.recipient;
143-
blockNumber = request.blockNumber;
143+
timestamp = request.timestamp;
144144

145145
amountOfShares = request.cumulativeShares - previousRequest.cumulativeShares;
146146
amountOfStETH = request.cumulativeStETH - previousRequest.cumulativeStETH;
@@ -254,7 +254,7 @@ abstract contract WithdrawalQueueBase {
254254

255255
if (request.recipient != msg.sender) revert RecipientExpected(request.recipient, msg.sender);
256256
if (request.claimed) revert RequestAlreadyClaimed();
257-
257+
258258

259259
request.recipient = payable(_newRecipient);
260260

0 commit comments

Comments
 (0)