Skip to content

Commit

Permalink
Merge pull request #273 from Layr-Labs/quickfix
Browse files Browse the repository at this point in the history
added underflow handling
  • Loading branch information
Sidu28 authored Oct 23, 2023
2 parents 3a0f7d9 + ef81e88 commit e82d102
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/contracts/pods/EigenPod.sol
Original file line number Diff line number Diff line change
Expand Up @@ -422,6 +422,7 @@ contract EigenPod is IEigenPod, Initializable, ReentrancyGuardUpgradeable, Eigen
function withdrawRestakedBeaconChainETH(address recipient, uint256 amountWei) external onlyEigenPodManager {
require(amountWei % GWEI_TO_WEI == 0, "EigenPod.withdrawRestakedBeaconChainETH: amountWei must be a whole Gwei amount");
uint64 amountGwei = uint64(amountWei / GWEI_TO_WEI);
require(amountGwei <= withdrawableRestakedExecutionLayerGwei, "EigenPod.withdrawRestakedBeaconChainETH: amountGwei exceeds withdrawableRestakedExecutionLayerGwei");
withdrawableRestakedExecutionLayerGwei -= amountGwei;
emit RestakedBeaconChainETHWithdrawn(recipient, amountWei);
// transfer ETH from pod to `recipient` directly
Expand Down

0 comments on commit e82d102

Please sign in to comment.