Skip to content

Commit

Permalink
fix: adjust type uint120 to uint128
Browse files Browse the repository at this point in the history
  • Loading branch information
clement-ux committed Oct 15, 2024
1 parent 23d45e6 commit e61ff25
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions test/invariants/BaseInvariants.sol
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ abstract contract Invariant_Base_Test_ is Invariant_Shared_Test_ {
uint256 sum;
uint256 nextWithdrawalIndex = lidoARM.nextWithdrawalIndex();
for (uint256 i; i < nextWithdrawalIndex; i++) {
(,,, uint120 assets,) = lidoARM.withdrawalRequests(i);
(,,, uint128 assets,) = lidoARM.withdrawalRequests(i);
sum += assets;
}

Expand All @@ -151,7 +151,7 @@ abstract contract Invariant_Base_Test_ is Invariant_Shared_Test_ {
function assert_lp_invariant_K() public view {
uint256 nextWithdrawalIndex = lidoARM.nextWithdrawalIndex();
for (uint256 i; i < nextWithdrawalIndex; i++) {
(,,, uint120 assets, uint120 queued) = lidoARM.withdrawalRequests(i);
(,,, uint128 assets, uint128 queued) = lidoARM.withdrawalRequests(i);
assertGe(queued, assets, "lpHandler.invariant_L");
}
}
Expand Down
2 changes: 1 addition & 1 deletion test/invariants/handlers/LpHandler.sol
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ contract LpHandler is BaseHandler {
uint256 requestIndex_ = (___seed + j) % requestLen;

// Get data about the request (in ARM contract)
(,,, uint120 amount_, uint120 queued) = arm.withdrawalRequests(requests[user_][requestIndex_]);
(,,, uint128 amount_, uint128 queued) = arm.withdrawalRequests(requests[user_][requestIndex_]);

// 3. Check if the request can be claimed
if (queued < withdrawsClaimed + weth.balanceOf(address(arm))) {
Expand Down

0 comments on commit e61ff25

Please sign in to comment.