-
Notifications
You must be signed in to change notification settings - Fork 196
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: move common tests setup to provision part
- Loading branch information
1 parent
e309222
commit d4bcbf3
Showing
8 changed files
with
85 additions
and
77 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 |
---|---|---|
@@ -1,28 +1,42 @@ | ||
import { log } from "lib"; | ||
|
||
import { | ||
depositAndReportValidators, | ||
ensureHashConsensusInitialEpoch, | ||
ensureOracleCommitteeMembers, | ||
ensureStakeLimit, | ||
finalizeWithdrawalQueue, | ||
norEnsureOperators, | ||
sdvtEnsureOperators, | ||
unpauseStaking, | ||
unpauseWithdrawalQueue, | ||
} from "./helpers"; | ||
import { ProtocolContext } from "./types"; | ||
|
||
let alreadyProvisioned = false; | ||
|
||
/** | ||
* In order to make the protocol fully operational from scratch deploy, the additional steps are required: | ||
*/ | ||
export const provision = async (ctx: ProtocolContext) => { | ||
if (alreadyProvisioned) { | ||
log.success("Already provisioned"); | ||
return; | ||
} | ||
|
||
await ensureHashConsensusInitialEpoch(ctx); | ||
|
||
await ensureOracleCommitteeMembers(ctx, 5n); | ||
|
||
await unpauseStaking(ctx); | ||
|
||
await unpauseWithdrawalQueue(ctx); | ||
|
||
await norEnsureOperators(ctx, 3n, 5n); | ||
await sdvtEnsureOperators(ctx, 3n, 5n); | ||
await depositAndReportValidators(ctx); | ||
await finalizeWithdrawalQueue(ctx); | ||
|
||
await ensureStakeLimit(ctx); | ||
|
||
alreadyProvisioned = true; | ||
}; |
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