-
Notifications
You must be signed in to change notification settings - Fork 198
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into feat/vaults
# Conflicts: # .github/workflows/tests-integration-mainnet.yml # test/integration/accounting.integration.ts # test/integration/protocol-happy-path.integration.ts
- Loading branch information
Showing
16 changed files
with
195 additions
and
172 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,3 @@ | ||
# CODEOWNERS: https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners | ||
|
||
# Any PR to `master` branch with changes to production contracts notifies the protocol team | ||
/contracts/ @lidofinance/lido-eth-protocol | ||
|
||
# Any PR to `master` branch with changes to GitHub workflows notifies the workflow review team | ||
/.github/workflows/ @lidofinance/review-gh-workflows | ||
* @lidofinance/lido-eth-protocol | ||
.github @lidofinance/review-gh-workflows |
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,30 +1,37 @@ | ||
name: Integration Tests | ||
#on: [push] | ||
# | ||
#jobs: | ||
# test_hardhat_integration_fork: | ||
# name: Hardhat / Mainnet | ||
# runs-on: ubuntu-latest | ||
# timeout-minutes: 120 | ||
# | ||
# services: | ||
# hardhat-node: | ||
# image: ghcr.io/lidofinance/hardhat-node:2.22.18 | ||
# ports: | ||
# - 8545:8545 | ||
# env: | ||
# ETH_RPC_URL: "${{ secrets.ETH_RPC_URL }}" | ||
# | ||
# steps: | ||
# - uses: actions/checkout@v4 | ||
# | ||
# - name: Common setup | ||
# uses: ./.github/workflows/setup | ||
# | ||
# - name: Set env | ||
# run: cp .env.example .env | ||
# | ||
# - name: Run integration tests | ||
# run: yarn test:integration:fork:mainnet | ||
# env: | ||
# LOG_LEVEL: debug | ||
|
||
on: workflow_dispatch | ||
|
||
# TODO: uncomment | ||
#on: | ||
# push: | ||
# schedule: | ||
# - cron: "0 10 */2 * *" | ||
|
||
jobs: | ||
test_hardhat_integration_fork: | ||
name: Hardhat / Mainnet | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 120 | ||
|
||
services: | ||
hardhat-node: | ||
image: ghcr.io/lidofinance/hardhat-node:2.22.18 | ||
ports: | ||
- 8545:8545 | ||
env: | ||
ETH_RPC_URL: "${{ secrets.ETH_RPC_URL }}" | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Common setup | ||
uses: ./.github/workflows/setup | ||
|
||
- name: Set env | ||
run: cp .env.example .env | ||
|
||
- name: Run integration tests | ||
run: yarn test:integration:fork:mainnet | ||
env: | ||
LOG_LEVEL: debug |
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 |
---|---|---|
@@ -1,28 +1,41 @@ | ||
import { log } from "lib"; | ||
|
||
import { | ||
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 finalizeWithdrawalQueue(ctx); | ||
|
||
await ensureStakeLimit(ctx); | ||
|
||
alreadyProvisioned = true; | ||
}; |
Oops, something went wrong.