-
Notifications
You must be signed in to change notification settings - Fork 365
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: separate upgrade test functionality from main integration tests (…
…#1031) * refactor(test): clean up random config and upgrade tests * test: move test to upgrade tests
- Loading branch information
Showing
17 changed files
with
369 additions
and
428 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
// SPDX-License-Identifier: BUSL-1.1 | ||
pragma solidity ^0.8.27; | ||
|
||
import "src/test/integration/IntegrationDeployer.t.sol"; | ||
import "src/test/integration/IntegrationChecks.t.sol"; | ||
|
||
abstract contract UpgradeTest is IntegrationCheckUtils { | ||
|
||
/// Only run upgrade tests on mainnet forks | ||
function setUp() public virtual override { | ||
if (!isForktest()) { | ||
cheats.skip(true); | ||
} else { | ||
isUpgraded = false; | ||
super.setUp(); | ||
} | ||
} | ||
|
||
/// Deploy current implementation contracts and upgrade existing proxies | ||
function _upgradeEigenLayerContracts() public virtual { | ||
require(forkType == MAINNET, "_upgradeEigenLayerContracts: somehow running upgrade test locally"); | ||
require(!isUpgraded, "_upgradeEigenLayerContracts: already performed upgrade"); | ||
|
||
emit log("_upgradeEigenLayerContracts: upgrading mainnet to slashing"); | ||
|
||
_upgradeMainnetContracts(); | ||
|
||
// Bump block.timestamp forward to allow verifyWC proofs for migrated pods | ||
emit log("advancing block time to start of next epoch:"); | ||
|
||
beaconChain.advanceEpoch_NoRewards(); | ||
|
||
emit log("======"); | ||
|
||
isUpgraded = true; | ||
emit log("_upgradeEigenLayerContracts: slashing upgrade complete"); | ||
} | ||
} |
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
Oops, something went wrong.