-
Notifications
You must be signed in to change notification settings - Fork 80
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
mainnet native staking fork tests (#2037)
* manuallyFixAccounting now uses delta values and only callable by the strategist manuallyFixAccounting calls doAccounting to check the fuse is still not blown Removed accountingGovernor * Added pauseOnFail param to internal _doAccounting Increased the allowed delta values of manuallyFixAccounting * ran prettier * Added Defender Relayer for validator registrator Added ssv utils to get cluster data Added native staking fork tests * Removed now redundant IWETH9 import * moved more logic into native staking fixture * Removed unused imports * fix native staking unit tests * Fail accounting if activeDepositedValidators < fullyWithdrawnValidators Changed Harvester to transfer WETH to dripper Added more mainnet fork tests for native staking * Updated the OETH value flows * Added governable Hardhat tasks Created a resolveContract util * deconstruct params for Hardhat tasks * WIP Hardhat tasks for validator registration * Added depositSSV HH task * Updated OETH contract dependency diagram * Update to diagrams * mini fixes * fix bug and minor test improvement * update yarn fulie * unify the holesky and the mainnet fork tests * prettier * re-deploy holesky native staking strategy (#2046) * test updates * also re-deploy the harvester * upgrade harvester as well * fix test * fix upgrade script and correct the bug in deploy actions * Deployed new Native Staking strategy including the proxy * Added Hardhat tasks for generic strategy functions * remove nativeStakingSSVStrategyProxy from js addresses file --------- Co-authored-by: Domen Grabec <grabec@gmail.com>
- Loading branch information
1 parent
967fe49
commit 1af324d
Showing
52 changed files
with
3,826 additions
and
837 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
const { | ||
upgradeNativeStakingSSVStrategy, | ||
upgradeOETHHarvester, | ||
} = require("../deployActions"); | ||
const { withConfirmation } = require("../../utils/deploy"); | ||
|
||
const mainExport = async () => { | ||
console.log("Running 004 deployment on Holesky..."); | ||
|
||
console.log("Upgrading native staking strategy"); | ||
await upgradeNativeStakingSSVStrategy(); | ||
|
||
console.log("deploying harvester"); | ||
const cOETHDripperProxy = await ethers.getContract("OETHDripperProxy"); | ||
const cOETHHarvester = await upgradeOETHHarvester(cOETHDripperProxy.address); | ||
|
||
const strategyProxy = await ethers.getContract( | ||
"NativeStakingSSVStrategyProxy" | ||
); | ||
const cStrategy = await ethers.getContractAt( | ||
"NativeStakingSSVStrategy", | ||
strategyProxy.address | ||
); | ||
|
||
console.log("configuring harvester and the strategy"); | ||
await withConfirmation( | ||
cOETHHarvester.setSupportedStrategy(strategyProxy.address, true) | ||
); | ||
|
||
await withConfirmation(cStrategy.setHarvesterAddress(cOETHHarvester.address)); | ||
|
||
console.log("Running 004 deployment done"); | ||
return true; | ||
}; | ||
|
||
mainExport.id = "004_upgrade_strategy"; | ||
mainExport.tags = []; | ||
mainExport.dependencies = []; | ||
mainExport.skip = () => false; | ||
|
||
module.exports = mainExport; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
const { parseEther } = require("ethers/lib/utils"); | ||
|
||
const { deployNativeStakingSSVStrategy } = require("../deployActions"); | ||
const { withConfirmation } = require("../../utils/deploy"); | ||
const { resolveContract } = require("../../utils/resolvers"); | ||
|
||
const mainExport = async () => { | ||
console.log("Running 005 deployment on Holesky..."); | ||
|
||
console.log("Deploying a new Native Staking strategy and proxy"); | ||
|
||
console.log("Deploying Native Staking"); | ||
const nativeStakingSSVStrategy = await deployNativeStakingSSVStrategy(); | ||
|
||
const { governorAddr } = await getNamedAccounts(); | ||
const sGovernor = await ethers.provider.getSigner(governorAddr); | ||
|
||
const cOETHHarvester = await resolveContract( | ||
"OETHHarvesterProxy", | ||
"OETHHarvester" | ||
); | ||
const cVault = await resolveContract("OETHVaultProxy", "VaultAdmin"); | ||
|
||
await withConfirmation( | ||
nativeStakingSSVStrategy | ||
.connect(sGovernor) | ||
.setHarvesterAddress(cOETHHarvester.address) | ||
); | ||
|
||
console.log("configuring harvester and the strategy"); | ||
await withConfirmation( | ||
cOETHHarvester | ||
.connect(sGovernor) | ||
.setSupportedStrategy(nativeStakingSSVStrategy.address, true) | ||
); | ||
|
||
await withConfirmation( | ||
cVault.connect(sGovernor).approveStrategy(nativeStakingSSVStrategy.address) | ||
); | ||
|
||
await withConfirmation( | ||
nativeStakingSSVStrategy.connect(sGovernor).setRegistrator(governorAddr) | ||
); | ||
|
||
const fuseStartBn = parseEther("21.6"); | ||
const fuseEndBn = parseEther("25.6"); | ||
|
||
await nativeStakingSSVStrategy | ||
.connect(sGovernor) | ||
.setFuseInterval(fuseStartBn, fuseEndBn); | ||
|
||
console.log("Running 005 deployment done"); | ||
return true; | ||
}; | ||
|
||
mainExport.id = "005_deploy_new_harvester"; | ||
mainExport.tags = []; | ||
mainExport.dependencies = []; | ||
mainExport.skip = () => false; | ||
|
||
module.exports = mainExport; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
{ | ||
"001_core": 1714168010, | ||
"002_upgrade_strategy": 1714233842, | ||
"003_deposit_to_native_strategy": 1714307581 | ||
"003_deposit_to_native_strategy": 1714307581, | ||
"004_upgrade_strategy": 1714944723, | ||
"005_deploy_new_harvester": 1714998707 | ||
} |
Oops, something went wrong.