diff --git a/src/test/EigenPod.t.sol b/src/test/EigenPod.t.sol index 29f98ed82..4fd4a38eb 100644 --- a/src/test/EigenPod.t.sol +++ b/src/test/EigenPod.t.sol @@ -778,7 +778,7 @@ contract EigenPodTests is ProofParsing, EigenPodPausingConstants { _deployInternalFunctionTester(); setJSON("./src/test/test-data/balanceUpdateProof_notOverCommitted_302913.json"); - bytes32[] memory validatorFields = getValidatorFields(); + validatorFields = getValidatorFields(); uint40[] memory validatorIndices = new uint40[](1); validatorIndices[0] = uint40(getValidatorIndex()); @@ -1045,7 +1045,7 @@ contract EigenPodTests is ProofParsing, EigenPodPausingConstants { } //post M2, all new pods deployed will have "hasRestaked = true". THis tests that - function testDeployedPodIsRestaked(address podOwner) public fuzzedAddress(podOwner) { + function testDeployedPodIsRestaked() public fuzzedAddress(podOwner) { cheats.startPrank(podOwner); eigenPodManager.createPod(); cheats.stopPrank(); @@ -1223,7 +1223,7 @@ contract EigenPodTests is ProofParsing, EigenPodPausingConstants { newPod.verifyBalanceUpdates(oracleTimestamp, validatorIndices, stateRootProofStruct, proofs, validatorFieldsArray); } - function testWithdrawlBeforeRestakingFromNonPodOwnerAddress(uint256 amount, address nonPodOwner) external { + function testWithdrawlBeforeRestakingFromNonPodOwnerAddress(address nonPodOwner) external { cheats.assume(nonPodOwner != podOwner); cheats.startPrank(podOwner); IEigenPod newPod = eigenPodManager.getPod(podOwner); @@ -1232,8 +1232,6 @@ contract EigenPodTests is ProofParsing, EigenPodPausingConstants { eigenPodManager.stake{value: stakeAmount}(pubkey, signature, depositDataRoot); cheats.stopPrank(); - uint256 amount = 32 ether; - cheats.store(address(newPod), bytes32(uint256(52)), bytes32(0)); cheats.startPrank(nonPodOwner); @@ -1242,7 +1240,7 @@ contract EigenPodTests is ProofParsing, EigenPodPausingConstants { cheats.stopPrank(); } - function testDelayedWithdrawalIsCreatedByWithdrawBeforeRestaking(uint256 amount) external { + function testDelayedWithdrawalIsCreatedByWithdrawBeforeRestaking() external { cheats.startPrank(podOwner); IEigenPod newPod = eigenPodManager.getPod(podOwner); cheats.expectEmit(true, true, true, true, address(newPod)); diff --git a/src/test/mocks/EigenPodManagerMock.sol b/src/test/mocks/EigenPodManagerMock.sol index a9d5f93f1..b6e99b59d 100644 --- a/src/test/mocks/EigenPodManagerMock.sol +++ b/src/test/mocks/EigenPodManagerMock.sol @@ -65,7 +65,7 @@ contract EigenPodManagerMock is IEigenPodManager, Test { function podOwnerShares(address podOwner) external view returns (int256) {} - function addShares(address /*podOwner*/, uint256 shares) external returns (uint256) { + function addShares(address /*podOwner*/, uint256 shares) external pure returns (uint256) { // this is the "increase in delegateable tokens" return (shares); } diff --git a/src/test/mocks/StakeRegistryMock.sol b/src/test/mocks/StakeRegistryMock.sol index 6b754e9d2..bf9c371df 100644 --- a/src/test/mocks/StakeRegistryMock.sol +++ b/src/test/mocks/StakeRegistryMock.sol @@ -145,7 +145,7 @@ contract StakeRegistryMock is IStakeRegistry { } } - function getMockOperatorId(address operator) external returns(bytes32) { + function getMockOperatorId(address operator) external pure returns(bytes32) { return bytes32(uint256(keccak256(abi.encodePacked(operator, "operatorId")))); } } \ No newline at end of file diff --git a/src/test/unit/DelegationUnit.t.sol b/src/test/unit/DelegationUnit.t.sol index b369b0a18..3f2446632 100644 --- a/src/test/unit/DelegationUnit.t.sol +++ b/src/test/unit/DelegationUnit.t.sol @@ -1925,11 +1925,7 @@ contract DelegationUnitTests is EigenLayerTestHelper { IStrategy strategy = strategyMock; IERC20 token = strategy.underlyingToken(); - ( - IDelegationManager.Withdrawal memory withdrawal, - IERC20[] memory tokensArray, - bytes32 withdrawalRoot - ) = _setUpWithdrawalStructSingleStrat( + (IDelegationManager.Withdrawal memory withdrawal, IERC20[] memory tokensArray, ) = _setUpWithdrawalStructSingleStrat( /*staker*/ address(this), /*withdrawer*/ address(this), token, @@ -2197,11 +2193,7 @@ contract DelegationUnitTests is EigenLayerTestHelper { _depositIntoStrategySuccessfully(strategyMock, staker, depositAmount); - ( - IDelegationManager.Withdrawal memory withdrawal, - IERC20[] memory tokensArray, - bytes32 withdrawalRoot - ) = _setUpWithdrawalStructSingleStrat( + (IDelegationManager.Withdrawal memory withdrawal, , ) = _setUpWithdrawalStructSingleStrat( /*staker*/ address(this), /*withdrawer*/ address(this), mockToken, @@ -2233,11 +2225,7 @@ contract DelegationUnitTests is EigenLayerTestHelper { _depositIntoStrategySuccessfully(strategyMock, staker, depositAmount); - ( - IDelegationManager.Withdrawal memory withdrawal, - IERC20[] memory tokensArray, - bytes32 withdrawalRoot - ) = _setUpWithdrawalStructSingleStrat( + (IDelegationManager.Withdrawal memory withdrawal, , ) = _setUpWithdrawalStructSingleStrat( /*staker*/ address(this), /*withdrawer*/ address(this), mockToken, @@ -2285,17 +2273,14 @@ contract DelegationUnitTests is EigenLayerTestHelper { _depositIntoStrategySuccessfully(strategies[1], staker, depositAmounts[1]); _depositIntoStrategySuccessfully(strategies[2], staker, depositAmounts[2]); - ( - IDelegationManager.Withdrawal memory queuedWithdrawal, - bytes32 withdrawalRoot - ) = _setUpWithdrawalStruct_MultipleStrategies( + ( ,bytes32 withdrawalRoot) = _setUpWithdrawalStruct_MultipleStrategies( /* staker */ staker, /* withdrawer */ staker, strategies, amounts ); require(!delegationManager.pendingWithdrawals(withdrawalRoot), "withdrawalRootPendingBefore is true!"); - uint256 nonceBefore = delegationManager.cumulativeWithdrawalsQueued(staker); + delegationManager.cumulativeWithdrawalsQueued(staker); uint256[] memory sharesBefore = new uint256[](3); sharesBefore[0] = strategyManager.stakerStrategyShares(staker, strategies[0]); sharesBefore[1] = strategyManager.stakerStrategyShares(staker, strategies[1]); @@ -2368,10 +2353,7 @@ contract DelegationUnitTests is EigenLayerTestHelper { amounts[1] = 2e18; amounts[2] = 3e18; - ( - IDelegationManager.Withdrawal memory withdrawal, - bytes32 withdrawalRoot - ) = _setUpWithdrawalStruct_MultipleStrategies({ + (IDelegationManager.Withdrawal memory withdrawal, ) = _setUpWithdrawalStruct_MultipleStrategies({ staker: staker, withdrawer: withdrawer, strategyArray: strategies, diff --git a/src/test/utils/EigenPodHarness.sol b/src/test/utils/EigenPodHarness.sol index 55dfdc187..507757c90 100644 --- a/src/test/utils/EigenPodHarness.sol +++ b/src/test/utils/EigenPodHarness.sol @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: BUSL-1.1 +pragma solidity =0.8.12; + import "../../contracts/pods/EigenPod.sol"; contract EPInternalFunctions is EigenPod {