Skip to content

Commit

Permalink
fix all remaining warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
danoctavian committed Oct 14, 2024
1 parent 61958d2 commit da9eda0
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 14 deletions.
1 change: 0 additions & 1 deletion test/integration/M3/Base.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,6 @@ contract Base is Test, Utils {
console.log("EigenPod shares for each StakingNode:");
for (uint256 i = 0; i < stakingNodesManager.nodesLength(); i++) {
IStakingNode stakingNode = stakingNodesManager.nodes(i);
address eigenPodAddress = address(stakingNode.eigenPod());
uint256 podShares = uint256(IEigenPodManager(chainAddresses.eigenlayer.EIGENPOD_MANAGER_ADDRESS).podOwnerShares(address(stakingNode)));
console.log("Node", i, "Shares:", podShares);
}
Expand Down
6 changes: 3 additions & 3 deletions test/integration/M3/WithdrawalsWithRewards-Scenario.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -122,19 +122,19 @@ contract M3WithdrawalsWithRewardsTest is Base {

}

function startAndVerifyCheckpoint(uint256 nodeId, TestState memory state) private {
function startAndVerifyCheckpoint(uint256 _nodeId, TestState memory state) private {
// start checkpoint
{
vm.startPrank(actors.ops.STAKING_NODES_OPERATOR);
stakingNodesManager.nodes(nodeId).startCheckpoint(true);
stakingNodesManager.nodes(_nodeId).startCheckpoint(true);
vm.stopPrank();
}

runSystemStateInvariants(state.totalAssetsBefore, state.totalSupplyBefore, state.stakingNodeBalancesBefore);

// verify checkpoints
{
IStakingNode _node = stakingNodesManager.nodes(nodeId);
IStakingNode _node = stakingNodesManager.nodes(_nodeId);
CheckpointProofs memory _cpProofs = beaconChain.getCheckpointProofs(validatorIndices, _node.eigenPod().currentCheckpointTimestamp());
IPod(address(_node.eigenPod())).verifyCheckpointProofs({
balanceContainerProof: _cpProofs.balanceContainerProof,
Expand Down
5 changes: 0 additions & 5 deletions test/integration/StakingNode.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,6 @@ contract StakingNodeEigenPod is StakingNodeTestBase {
(bool success,) = eigenPodAddress.call{value: rewardsSweeped}("");
require(success, "Failed to send rewards to EigenPod");

// Get final pod owner shares
int256 finalPodOwnerShares = eigenPodManager.podOwnerShares(address(stakingNodeInstance));

// Assert that pod owner shares remain the same
assertEq(initialPodOwnerShares, 0, "Pod owner shares should not change");
}
Expand Down Expand Up @@ -241,8 +238,6 @@ contract StakingNodeDelegation is StakingNodeTestBase {
contract StakingNodeVerifyWithdrawalCredentials is StakingNodeTestBase {
address user = vm.addr(156737);


uint256 nodeId;
uint40[] validatorIndices;
uint256 AMOUNT = 32 ether;

Expand Down
3 changes: 3 additions & 0 deletions test/integration/StakingNodeTestBase.sol
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// SPDX-License-Identifier: BSD 3-Clause License
pragma solidity ^0.8.24;

import {IntegrationBaseTest} from "test/integration/IntegrationBaseTest.sol";
import {IStakingNode} from "src/interfaces/IStakingNode.sol";
import {IDelegationManager} from "lib/eigenlayer-contracts/src/contracts/interfaces/IDelegationManager.sol";
Expand Down
9 changes: 4 additions & 5 deletions test/unit/ynETHWithdrawalQueueManager_unit.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,6 @@ contract ynETHWithdrawalQueueManagerTest is Test {
uint256 _amount
) public {
vm.assume(_amount > 0 && _amount < 10_000 ether);
uint256 _amount = 1 ether;

vm.deal(address(redemptionAssetsVault), _amount);

Expand Down Expand Up @@ -513,7 +512,7 @@ contract ynETHWithdrawalQueueManagerTest is Test {

uint256 _redemptionRateAtRequestTime = redemptionAssetsVault.redemptionRate();

uint256 finalizationId = finalizeRequest(tokenId);
finalizeRequest(tokenId);


uint256 extraWithdrawalsAfter = 2;
Expand Down Expand Up @@ -766,7 +765,7 @@ contract ynETHWithdrawalQueueManagerTest is Test {
for (uint256 i = 0; i < requestIndex; i++) {
vm.startPrank(user);
redeemableAsset.approve(address(manager), requestedAmounts[i]);
uint256 tokenId = manager.requestWithdrawal(requestedAmounts[i]);
manager.requestWithdrawal(requestedAmounts[i]);
vm.stopPrank();

vm.deal(address(redemptionAssetsVault), requestedAmounts[i]);
Expand Down Expand Up @@ -814,7 +813,7 @@ contract ynETHWithdrawalQueueManagerTest is Test {
uint256 amount = 1 ether;
vm.startPrank(user);
redeemableAsset.approve(address(manager), amount);
uint256 tokenId = manager.requestWithdrawal(amount);
manager.requestWithdrawal(amount);
vm.stopPrank();

// Ensure the request was made successfully
Expand Down Expand Up @@ -1054,7 +1053,7 @@ contract ynETHWithdrawalQueueManagerTest is Test {

vm.startPrank(anotherUser);
redeemableAsset.approve(address(manager), requestAmounts[3]);
uint256 request4 = manager.requestWithdrawal(requestAmounts[3]);
manager.requestWithdrawal(requestAmounts[3]);
vm.stopPrank();

// Test: Retrieve withdrawal requests for the main user
Expand Down

0 comments on commit da9eda0

Please sign in to comment.