Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/sparrowDom/nativeStaking' into n…
Browse files Browse the repository at this point in the history
…icka/fix-accounting
  • Loading branch information
naddison36 committed Apr 29, 2024
2 parents 389a260 + 00ec878 commit c12f770
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 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 from allowed contracts"
);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ abstract contract ValidatorRegistrator is Governable, Pausable {
bytes11(0),
address(this)
);
IDepositContract(BEACON_CHAIN_DEPOSIT_CONTRACT).deposit(
IDepositContract(BEACON_CHAIN_DEPOSIT_CONTRACT).deposit{ value: 32 ether }(
validators[i].pubkey,
withdrawal_credentials,
validators[i].signature,
Expand Down
2 changes: 1 addition & 1 deletion contracts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"prettier:check": "prettier -c \"*.js\" \"deploy/**/*.js\" \"scripts/**/*.js\" \"smoke/**/*.js\" \"scripts/**/*.js\" \"tasks/**/*.js\" \"test/**/*.js\" \"utils/**/*.js\"",
"prettier:js": "prettier --write \"*.js\" \"deploy/**/*.js\" \"scripts/**/*.js\" \"smoke/**/*.js\" \"scripts/**/*.js\" \"tasks/**/*.js\" \"test/**/*.js\" \"utils/**/*.js\"",
"prettier:sol": "prettier --write \"contracts/**/*.sol\"",
"test": "IS_TEST=true npx hardhat test",
"test": "rm -rf deployments/hardhat && IS_TEST=true npx hardhat test",
"test:fork": "./fork-test.sh",
"test:arb-fork": "FORK_NETWORK_NAME=arbitrumOne ./fork-test.sh",
"test:fork:w_trace": "TRACE=true ./fork-test.sh",
Expand Down

0 comments on commit c12f770

Please sign in to comment.