Skip to content

Commit 0e49f91

Browse files
committed
fix: type conversion for deposit amount in CompoundingValidatorManager
1 parent 932b894 commit 0e49f91

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

contracts/contracts/strategies/NativeStaking/CompoundingValidatorManager.sol

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ abstract contract CompoundingValidatorManager is Governable, Pausable {
263263
ValidatorStakeData calldata validator,
264264
uint64 depositAmountGwei
265265
) external onlyRegistrator whenNotPaused nonReentrant {
266-
uint256 depositAmountWei = depositAmountGwei * 1 gwei;
266+
uint256 depositAmountWei = uint256(depositAmountGwei) * 1 gwei;
267267
// Check there is enough WETH from the deposits sitting in this strategy contract
268268
// There could be ETH from withdrawals but we'll ignore that. If it's really needed
269269
// the ETH can be withdrawn and then deposited back to the strategy.
@@ -317,7 +317,7 @@ abstract contract CompoundingValidatorManager is Governable, Pausable {
317317
// Store the deposit data for verifyDeposit and verifyBalances
318318
deposits[validator.depositDataRoot] = DepositData({
319319
pubKeyHash: pubKeyHash,
320-
amountGwei: depositAmountGwei,
320+
amountGwei: uint64(depositAmountGwei),
321321
blockNumber: SafeCast.toUint64(block.number),
322322
depositIndex: SafeCast.toUint32(depositsRoots.length),
323323
status: DepositStatus.PENDING

0 commit comments

Comments
 (0)