Skip to content

Commit

Permalink
fix: migration fix 3 ( enought to merge to main later) (#1771)
Browse files Browse the repository at this point in the history
## What ❔

<!-- What are the changes this PR brings about? -->
<!-- Example: This PR adds a PR template to the repo. -->
<!-- (For bigger PRs adding more context is appreciated) -->

## Why ❔

<!-- Why are these changes done? What goal do they contribute to? What
are the principles behind them? -->
<!-- Example: PR templates ensure PR reviewers, observers, and future
iterators are in context about the evolution of repos. -->

## Checklist

<!-- Check your PR fulfills the following items. -->
<!-- For draft PRs check the boxes as you complete them. -->

- [ ] PR title corresponds to the body of PR (we generate changelog
entries from PRs).
- [ ] Tests for the changes have been added / updated.
- [ ] Documentation comments have been added / updated.
- [ ] Code has been formatted via `zk fmt` and `zk lint`.
- [ ] Spellcheck has been run via `zk spellcheck`.
- [ ] Linkcheck has been run via `zk linkcheck`.

---------

Signed-off-by: Danil <[email protected]>
Co-authored-by: Bence Haromi <[email protected]>
Co-authored-by: Jmunoz <[email protected]>
Co-authored-by: Lyova Potyomkin <[email protected]>
Co-authored-by: Stanislav Breadless <[email protected]>
Co-authored-by: Bence Haromi <[email protected]>
Co-authored-by: Javier Chatruc <[email protected]>
Co-authored-by: Francisco Krause Arnim <[email protected]>
Co-authored-by: Javier Rodríguez Chatruc <[email protected]>
Co-authored-by: Francisco Krause Arnim <[email protected]>
Co-authored-by: Santiago Pittella <[email protected]>
Co-authored-by: Danil <[email protected]>
Co-authored-by: Leandro Ferrigno <[email protected]>
Co-authored-by: Raid Ateir <[email protected]>
Co-authored-by: fborello-lambda <[email protected]>
Co-authored-by: mm <[email protected]>
Co-authored-by: Marcin M <[email protected]>
Co-authored-by: perekopskiy <[email protected]>
Co-authored-by: Alex Ostrovski <[email protected]>
Co-authored-by: Raid5594 <[email protected]>
  • Loading branch information
20 people authored Apr 24, 2024
1 parent 30701fe commit 8848820
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
13 changes: 12 additions & 1 deletion infrastructure/protocol-upgrade/src/hyperchain-upgrade.ts
Original file line number Diff line number Diff line change
Expand Up @@ -134,11 +134,22 @@ async function hyperchainFullUpgrade() {
'cp etc/env/.init.env etc/env/l1-inits/.init.env && rm ./etc/env/l2-inits/zksync_local.init.env && rm ./etc/env/target/zksync_local.env'
);
await spawn('zk env zksync_local');
env.reload('zksync_local');
env.modify(
'CONTRACTS_ERA_DIAMOND_PROXY_ADDR',
process.env.CONTRACTS_DIAMOND_PROXY_ADDR,
`etc/env/l1-inits/${process.env.L1_ENV_NAME ? process.env.L1_ENV_NAME : '.init'}.env`
);
env.modify(
'CONTRACTS_L2_SHARED_BRIDGE_ADDR',
process.env.CONTRACTS_L2_ERC20_BRIDGE_ADDR,
`etc/env/l2-inits/${process.env.ZKSYNC_ENV}.init.env`
);
env.modify(
'CONTRACTS_BASE_TOKEN_ADDR',
'0x0000000000000000000000000000000000000001',
`etc/env/l2-inits/${process.env.ZKSYNC_ENV}.init.env`
);

await deploySharedBridgeL2Implementation();

Expand Down Expand Up @@ -170,7 +181,7 @@ async function hyperchainFullUpgrade() {
async function postPropose() {
// we need to set up the prover dal
await setupForDal(DalPath.ProverDal, process.env.DATABASE_PROVER_URL);
await 'zk db migrate';
await spawn('zk db migrate');
}

export const command = new Command('hyperchain-upgrade').description('create and publish custom l2 upgrade');
Expand Down

0 comments on commit 8848820

Please sign in to comment.