From 2242c0765cc23925570d9a70900ebb1b0fd131a5 Mon Sep 17 00:00:00 2001 From: nelson-pereira8 <94120714+nican0r@users.noreply.github.com> Date: Tue, 18 Jun 2024 12:17:30 -0300 Subject: [PATCH] refactor: change slashNative to work with vm.prank --- src/test/recon/EigenLayerSystem.sol | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/test/recon/EigenLayerSystem.sol b/src/test/recon/EigenLayerSystem.sol index 1602a037..a52e4ed0 100644 --- a/src/test/recon/EigenLayerSystem.sol +++ b/src/test/recon/EigenLayerSystem.sol @@ -8,11 +8,11 @@ contract EigenLayerSystem is EigenLayerSetupV2 { /// @dev when calling this through a target function, need to prank as the pod's address to allow modifying balances in EigenPodManager /// @param podOwner the owner of the pod being slashed function slashNative(address podOwner) public { - // reduces the balance of the deposit contract by the max slashing penalty (1 ETH) - ethPOSDepositMock.slash(1 ether); - // update the OperatorDelegator's share balance in EL by calling EigenPodManager as the pod eigenPodManager.recordBeaconChainETHBalanceUpdate(podOwner, -1 ether); + + // reduces the balance of the deposit contract by the max slashing penalty (1 ETH) + ethPOSDepositMock.slash(1 ether); } /// @notice returns the address of an EigenPod for an Owner, if one exists