Skip to content

Commit

Permalink
allow for WETH to send ETH to the contract
Browse files Browse the repository at this point in the history
  • Loading branch information
sparrowDom committed Apr 26, 2024
1 parent 8419fc7 commit 87c5254
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -251,14 +251,15 @@ contract NativeStakingSSVStrategy is
}

/**
* @notice Only accept ETH from the FeeAccumulator
* @notice Only accept ETH from the FeeAccumulator and the WETH contract - required when
* unwrapping WETH just before staking it to the validator
* @dev don't want to receive donations from anyone else as this will
* mess with the accounting of the consensus rewards and validator full withdrawals
*/
receive() external payable {
require(
msg.sender == FEE_ACCUMULATOR_ADDRESS,
"eth not sent from Fee Accumulator"
msg.sender == FEE_ACCUMULATOR_ADDRESS || msg.sender == WETH_TOKEN_ADDRESS,
"eth not sent from Fee Accumulator or WETH contract"
);
}
}

0 comments on commit 87c5254

Please sign in to comment.