Skip to content

Commit

Permalink
refactor: change slashNative to work with vm.prank
Browse files Browse the repository at this point in the history
  • Loading branch information
nican0r committed Jun 18, 2024
1 parent 6d5c9e4 commit 2242c07
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/test/recon/EigenLayerSystem.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 2242c07

Please sign in to comment.