Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Deploy ConsensusRegistry through L1 to L2 transaction (BFT-504) #735

Merged
merged 2 commits into from
Sep 2, 2024

Conversation

aakoshh
Copy link
Contributor

@aakoshh aakoshh commented Aug 22, 2024

What ❔

Add methods to deploy ConsensusRegistry.sol to DeployL2Contracts.sol, both as separate runDeployConsensusRegistry() and run().

Added a new consensus_registry_owner to the configuration template set to the internal "governor" account on testnet: 0xD64e136566a9E04eb05B30184fF577F52682D182, which is an EOA. On mainnet this should be set to the developer multisig account, which happens in the zk_inception tool.

I didn't add a configuration option not to deploy the contract, even though running the consensus at the moment is optional. We could add something and then run() could skip it.

TODO:

  • Create a corresponding PR in zksync-era
  • Test that the contract can be deployed via zk init - On closer inspection it doesn't look like this deploys the registry; all the other L2 contracts are deployed via their TypeScript counterparts like this, but the registry isn't one of them.
  • Test that the contracts can be deployed via zk_inception - This happens during zk_inception chain init, which is called by the zk_toolbox CI workflow; here is a successful run.

Why ❔

We want to deploy ConsensusRegistry.sol to L2 using the zk_toolbox commands such as this one. All the deployments done by the tool go through L1 for 1) external visibility and 2) so that the transaction can be sent even while the chain is initialising itself, to be picked up later.

Checklist

  • 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.

Deniallugo
Deniallugo previously approved these changes Aug 23, 2024
@vladbochok vladbochok merged commit d368769 into main Sep 2, 2024
21 checks passed
@vladbochok vladbochok deleted the bft-504-deploy-cons-reg branch September 2, 2024 13:54
github-merge-queue bot pushed a commit to matter-labs/zksync-era that referenced this pull request Sep 4, 2024
## What ❔

Adds a `zk_inception chain deploy-consensus-registry` command.

TODO: 
- [x] Change `contracts` submodule back to `main` once
matter-labs/era-contracts#735 is merged

### Contract Owner

The agreement was that on testnet the `ConsensusRegistry` contract
should be owned by the governor account, which is
0xD64e136566a9E04eb05B30184fF577F52682D182, while on mainnet it should
be owned by the [developer multisig
account](https://app.safe.global/transactions/queue?safe=eth:0x9e543149DdfEEE18e95A4655D07096398Dd2Bf52).

The owner is set in
[DeployL2ContractsInput::consensus_registry_owner](https://github.com/matter-labs/zksync-era/blob/f4b7c12431d4bb063c735947f74e30c749119b5f/zk_toolbox/crates/config/src/forge_interface/deploy_l2_contracts/input.rs#L19)
which has access to contract and wallet configuration and these are
written to a config file just before deployment.

~~I added an optional `developer_multisig` wallet to `WalletConfig`, so
the address can be added at the same place as the `governor` address is;
if `developer_multisig` is missing then `governor` is used. I suppose it
could be made part of the `ContractsConfig` instead, but since this is a
wallet with funds that developers can access, I thought it wouldn't be
out of place in `wallets.yaml` even if one doesn't have any of the
corresponding private keys. Let me know if I should be using something
else.~~

### Testing

Since the `zk_toolbox` is replacing the `zk` commands, and `zk init`
doesn't deploy the consensus registry, we have to use the following
commands to see that the contract is built, deployed and its address is
written to the config file:

```shell
./bin/zkt
zk_inception ecosystem create
zk_inception containers
zk_inception ecosystem init --dev
```

After this we can check if we see the address in the generated config
file:

```console
❯ cat ./chains/era/configs/contracts.yaml | yq .l2.consensus_registry
0x72ada8c211f45e768c9a7781793da84daf1d0d1b
```

Finally clean up:

```shell
zk_supervisor clean all
```

## Why ❔

So that we can deploy the L2 consensus registry contract using the
`zk_toolbox`.

## Checklist

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

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

---------

Co-authored-by: Grzegorz Prusak <pompon.pompon@gmail.com>
github-merge-queue bot pushed a commit to matter-labs/zksync-era that referenced this pull request Sep 4, 2024
## What ❔

Adds a `zk_inception chain deploy-consensus-registry` command.

TODO: 
- [x] Change `contracts` submodule back to `main` once
matter-labs/era-contracts#735 is merged

### Contract Owner

The agreement was that on testnet the `ConsensusRegistry` contract
should be owned by the governor account, which is
0xD64e136566a9E04eb05B30184fF577F52682D182, while on mainnet it should
be owned by the [developer multisig
account](https://app.safe.global/transactions/queue?safe=eth:0x9e543149DdfEEE18e95A4655D07096398Dd2Bf52).

The owner is set in
[DeployL2ContractsInput::consensus_registry_owner](https://github.com/matter-labs/zksync-era/blob/f4b7c12431d4bb063c735947f74e30c749119b5f/zk_toolbox/crates/config/src/forge_interface/deploy_l2_contracts/input.rs#L19)
which has access to contract and wallet configuration and these are
written to a config file just before deployment.

~~I added an optional `developer_multisig` wallet to `WalletConfig`, so
the address can be added at the same place as the `governor` address is;
if `developer_multisig` is missing then `governor` is used. I suppose it
could be made part of the `ContractsConfig` instead, but since this is a
wallet with funds that developers can access, I thought it wouldn't be
out of place in `wallets.yaml` even if one doesn't have any of the
corresponding private keys. Let me know if I should be using something
else.~~

### Testing

Since the `zk_toolbox` is replacing the `zk` commands, and `zk init`
doesn't deploy the consensus registry, we have to use the following
commands to see that the contract is built, deployed and its address is
written to the config file:

```shell
./bin/zkt
zk_inception ecosystem create
zk_inception containers
zk_inception ecosystem init --dev
```

After this we can check if we see the address in the generated config
file:

```console
❯ cat ./chains/era/configs/contracts.yaml | yq .l2.consensus_registry
0x72ada8c211f45e768c9a7781793da84daf1d0d1b
```

Finally clean up:

```shell
zk_supervisor clean all
```

## Why ❔

So that we can deploy the L2 consensus registry contract using the
`zk_toolbox`.

## Checklist

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

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

---------

Co-authored-by: Grzegorz Prusak <pompon.pompon@gmail.com>
github-merge-queue bot pushed a commit to matter-labs/zksync-era that referenced this pull request Sep 4, 2024
## What ❔

Adds a `zk_inception chain deploy-consensus-registry` command.

TODO: 
- [x] Change `contracts` submodule back to `main` once
matter-labs/era-contracts#735 is merged

### Contract Owner

The agreement was that on testnet the `ConsensusRegistry` contract
should be owned by the governor account, which is
0xD64e136566a9E04eb05B30184fF577F52682D182, while on mainnet it should
be owned by the [developer multisig
account](https://app.safe.global/transactions/queue?safe=eth:0x9e543149DdfEEE18e95A4655D07096398Dd2Bf52).

The owner is set in
[DeployL2ContractsInput::consensus_registry_owner](https://github.com/matter-labs/zksync-era/blob/f4b7c12431d4bb063c735947f74e30c749119b5f/zk_toolbox/crates/config/src/forge_interface/deploy_l2_contracts/input.rs#L19)
which has access to contract and wallet configuration and these are
written to a config file just before deployment.

~~I added an optional `developer_multisig` wallet to `WalletConfig`, so
the address can be added at the same place as the `governor` address is;
if `developer_multisig` is missing then `governor` is used. I suppose it
could be made part of the `ContractsConfig` instead, but since this is a
wallet with funds that developers can access, I thought it wouldn't be
out of place in `wallets.yaml` even if one doesn't have any of the
corresponding private keys. Let me know if I should be using something
else.~~

### Testing

Since the `zk_toolbox` is replacing the `zk` commands, and `zk init`
doesn't deploy the consensus registry, we have to use the following
commands to see that the contract is built, deployed and its address is
written to the config file:

```shell
./bin/zkt
zk_inception ecosystem create
zk_inception containers
zk_inception ecosystem init --dev
```

After this we can check if we see the address in the generated config
file:

```console
❯ cat ./chains/era/configs/contracts.yaml | yq .l2.consensus_registry
0x72ada8c211f45e768c9a7781793da84daf1d0d1b
```

Finally clean up:

```shell
zk_supervisor clean all
```

## Why ❔

So that we can deploy the L2 consensus registry contract using the
`zk_toolbox`.

## Checklist

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

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

---------

Co-authored-by: Grzegorz Prusak <pompon.pompon@gmail.com>
github-merge-queue bot pushed a commit to matter-labs/zksync-era that referenced this pull request Sep 4, 2024
## What ❔

Adds a `zk_inception chain deploy-consensus-registry` command.

TODO: 
- [x] Change `contracts` submodule back to `main` once
matter-labs/era-contracts#735 is merged

### Contract Owner

The agreement was that on testnet the `ConsensusRegistry` contract
should be owned by the governor account, which is
0xD64e136566a9E04eb05B30184fF577F52682D182, while on mainnet it should
be owned by the [developer multisig
account](https://app.safe.global/transactions/queue?safe=eth:0x9e543149DdfEEE18e95A4655D07096398Dd2Bf52).

The owner is set in
[DeployL2ContractsInput::consensus_registry_owner](https://github.com/matter-labs/zksync-era/blob/f4b7c12431d4bb063c735947f74e30c749119b5f/zk_toolbox/crates/config/src/forge_interface/deploy_l2_contracts/input.rs#L19)
which has access to contract and wallet configuration and these are
written to a config file just before deployment.

~~I added an optional `developer_multisig` wallet to `WalletConfig`, so
the address can be added at the same place as the `governor` address is;
if `developer_multisig` is missing then `governor` is used. I suppose it
could be made part of the `ContractsConfig` instead, but since this is a
wallet with funds that developers can access, I thought it wouldn't be
out of place in `wallets.yaml` even if one doesn't have any of the
corresponding private keys. Let me know if I should be using something
else.~~

### Testing

Since the `zk_toolbox` is replacing the `zk` commands, and `zk init`
doesn't deploy the consensus registry, we have to use the following
commands to see that the contract is built, deployed and its address is
written to the config file:

```shell
./bin/zkt
zk_inception ecosystem create
zk_inception containers
zk_inception ecosystem init --dev
```

After this we can check if we see the address in the generated config
file:

```console
❯ cat ./chains/era/configs/contracts.yaml | yq .l2.consensus_registry
0x72ada8c211f45e768c9a7781793da84daf1d0d1b
```

Finally clean up:

```shell
zk_supervisor clean all
```

## Why ❔

So that we can deploy the L2 consensus registry contract using the
`zk_toolbox`.

## Checklist

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

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

---------

Co-authored-by: Grzegorz Prusak <pompon.pompon@gmail.com>
github-merge-queue bot pushed a commit to matter-labs/zksync-era that referenced this pull request Sep 4, 2024
## What ❔

Adds a `zk_inception chain deploy-consensus-registry` command.

TODO: 
- [x] Change `contracts` submodule back to `main` once
matter-labs/era-contracts#735 is merged

### Contract Owner

The agreement was that on testnet the `ConsensusRegistry` contract
should be owned by the governor account, which is
0xD64e136566a9E04eb05B30184fF577F52682D182, while on mainnet it should
be owned by the [developer multisig
account](https://app.safe.global/transactions/queue?safe=eth:0x9e543149DdfEEE18e95A4655D07096398Dd2Bf52).

The owner is set in
[DeployL2ContractsInput::consensus_registry_owner](https://github.com/matter-labs/zksync-era/blob/f4b7c12431d4bb063c735947f74e30c749119b5f/zk_toolbox/crates/config/src/forge_interface/deploy_l2_contracts/input.rs#L19)
which has access to contract and wallet configuration and these are
written to a config file just before deployment.

~~I added an optional `developer_multisig` wallet to `WalletConfig`, so
the address can be added at the same place as the `governor` address is;
if `developer_multisig` is missing then `governor` is used. I suppose it
could be made part of the `ContractsConfig` instead, but since this is a
wallet with funds that developers can access, I thought it wouldn't be
out of place in `wallets.yaml` even if one doesn't have any of the
corresponding private keys. Let me know if I should be using something
else.~~

### Testing

Since the `zk_toolbox` is replacing the `zk` commands, and `zk init`
doesn't deploy the consensus registry, we have to use the following
commands to see that the contract is built, deployed and its address is
written to the config file:

```shell
./bin/zkt
zk_inception ecosystem create
zk_inception containers
zk_inception ecosystem init --dev
```

After this we can check if we see the address in the generated config
file:

```console
❯ cat ./chains/era/configs/contracts.yaml | yq .l2.consensus_registry
0x72ada8c211f45e768c9a7781793da84daf1d0d1b
```

Finally clean up:

```shell
zk_supervisor clean all
```

## Why ❔

So that we can deploy the L2 consensus registry contract using the
`zk_toolbox`.

## Checklist

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

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

---------

Co-authored-by: Grzegorz Prusak <pompon.pompon@gmail.com>
github-merge-queue bot pushed a commit to matter-labs/zksync-era that referenced this pull request Sep 4, 2024
## What ❔

Adds a `zk_inception chain deploy-consensus-registry` command.

TODO: 
- [x] Change `contracts` submodule back to `main` once
matter-labs/era-contracts#735 is merged

### Contract Owner

The agreement was that on testnet the `ConsensusRegistry` contract
should be owned by the governor account, which is
0xD64e136566a9E04eb05B30184fF577F52682D182, while on mainnet it should
be owned by the [developer multisig
account](https://app.safe.global/transactions/queue?safe=eth:0x9e543149DdfEEE18e95A4655D07096398Dd2Bf52).

The owner is set in
[DeployL2ContractsInput::consensus_registry_owner](https://github.com/matter-labs/zksync-era/blob/f4b7c12431d4bb063c735947f74e30c749119b5f/zk_toolbox/crates/config/src/forge_interface/deploy_l2_contracts/input.rs#L19)
which has access to contract and wallet configuration and these are
written to a config file just before deployment.

~~I added an optional `developer_multisig` wallet to `WalletConfig`, so
the address can be added at the same place as the `governor` address is;
if `developer_multisig` is missing then `governor` is used. I suppose it
could be made part of the `ContractsConfig` instead, but since this is a
wallet with funds that developers can access, I thought it wouldn't be
out of place in `wallets.yaml` even if one doesn't have any of the
corresponding private keys. Let me know if I should be using something
else.~~

### Testing

Since the `zk_toolbox` is replacing the `zk` commands, and `zk init`
doesn't deploy the consensus registry, we have to use the following
commands to see that the contract is built, deployed and its address is
written to the config file:

```shell
./bin/zkt
zk_inception ecosystem create
zk_inception containers
zk_inception ecosystem init --dev
```

After this we can check if we see the address in the generated config
file:

```console
❯ cat ./chains/era/configs/contracts.yaml | yq .l2.consensus_registry
0x72ada8c211f45e768c9a7781793da84daf1d0d1b
```

Finally clean up:

```shell
zk_supervisor clean all
```

## Why ❔

So that we can deploy the L2 consensus registry contract using the
`zk_toolbox`.

## Checklist

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

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

---------

Co-authored-by: Grzegorz Prusak <pompon.pompon@gmail.com>
github-merge-queue bot pushed a commit to matter-labs/zksync-era that referenced this pull request Sep 5, 2024
## What ❔

Adds a `zk_inception chain deploy-consensus-registry` command.

TODO: 
- [x] Change `contracts` submodule back to `main` once
matter-labs/era-contracts#735 is merged

### Contract Owner

The agreement was that on testnet the `ConsensusRegistry` contract
should be owned by the governor account, which is
0xD64e136566a9E04eb05B30184fF577F52682D182, while on mainnet it should
be owned by the [developer multisig
account](https://app.safe.global/transactions/queue?safe=eth:0x9e543149DdfEEE18e95A4655D07096398Dd2Bf52).

The owner is set in
[DeployL2ContractsInput::consensus_registry_owner](https://github.com/matter-labs/zksync-era/blob/f4b7c12431d4bb063c735947f74e30c749119b5f/zk_toolbox/crates/config/src/forge_interface/deploy_l2_contracts/input.rs#L19)
which has access to contract and wallet configuration and these are
written to a config file just before deployment.

~~I added an optional `developer_multisig` wallet to `WalletConfig`, so
the address can be added at the same place as the `governor` address is;
if `developer_multisig` is missing then `governor` is used. I suppose it
could be made part of the `ContractsConfig` instead, but since this is a
wallet with funds that developers can access, I thought it wouldn't be
out of place in `wallets.yaml` even if one doesn't have any of the
corresponding private keys. Let me know if I should be using something
else.~~

### Testing

Since the `zk_toolbox` is replacing the `zk` commands, and `zk init`
doesn't deploy the consensus registry, we have to use the following
commands to see that the contract is built, deployed and its address is
written to the config file:

```shell
./bin/zkt
zk_inception ecosystem create
zk_inception containers
zk_inception ecosystem init --dev
```

After this we can check if we see the address in the generated config
file:

```console
❯ cat ./chains/era/configs/contracts.yaml | yq .l2.consensus_registry
0x72ada8c211f45e768c9a7781793da84daf1d0d1b
```

Finally clean up:

```shell
zk_supervisor clean all
```

## Why ❔

So that we can deploy the L2 consensus registry contract using the
`zk_toolbox`.

## Checklist

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

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

---------

Co-authored-by: Grzegorz Prusak <pompon.pompon@gmail.com>
github-merge-queue bot pushed a commit to matter-labs/zksync-era that referenced this pull request Sep 5, 2024
## What ❔

Adds a `zk_inception chain deploy-consensus-registry` command.

TODO: 
- [x] Change `contracts` submodule back to `main` once
matter-labs/era-contracts#735 is merged

### Contract Owner

The agreement was that on testnet the `ConsensusRegistry` contract
should be owned by the governor account, which is
0xD64e136566a9E04eb05B30184fF577F52682D182, while on mainnet it should
be owned by the [developer multisig
account](https://app.safe.global/transactions/queue?safe=eth:0x9e543149DdfEEE18e95A4655D07096398Dd2Bf52).

The owner is set in
[DeployL2ContractsInput::consensus_registry_owner](https://github.com/matter-labs/zksync-era/blob/f4b7c12431d4bb063c735947f74e30c749119b5f/zk_toolbox/crates/config/src/forge_interface/deploy_l2_contracts/input.rs#L19)
which has access to contract and wallet configuration and these are
written to a config file just before deployment.

~~I added an optional `developer_multisig` wallet to `WalletConfig`, so
the address can be added at the same place as the `governor` address is;
if `developer_multisig` is missing then `governor` is used. I suppose it
could be made part of the `ContractsConfig` instead, but since this is a
wallet with funds that developers can access, I thought it wouldn't be
out of place in `wallets.yaml` even if one doesn't have any of the
corresponding private keys. Let me know if I should be using something
else.~~

### Testing

Since the `zk_toolbox` is replacing the `zk` commands, and `zk init`
doesn't deploy the consensus registry, we have to use the following
commands to see that the contract is built, deployed and its address is
written to the config file:

```shell
./bin/zkt
zk_inception ecosystem create
zk_inception containers
zk_inception ecosystem init --dev
```

After this we can check if we see the address in the generated config
file:

```console
❯ cat ./chains/era/configs/contracts.yaml | yq .l2.consensus_registry
0x72ada8c211f45e768c9a7781793da84daf1d0d1b
```

Finally clean up:

```shell
zk_supervisor clean all
```

## Why ❔

So that we can deploy the L2 consensus registry contract using the
`zk_toolbox`.

## Checklist

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

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

---------

Co-authored-by: Grzegorz Prusak <pompon.pompon@gmail.com>
github-merge-queue bot pushed a commit to matter-labs/zksync-era that referenced this pull request Sep 5, 2024
## What ❔

Adds a `zk_inception chain deploy-consensus-registry` command.

TODO: 
- [x] Change `contracts` submodule back to `main` once
matter-labs/era-contracts#735 is merged

### Contract Owner

The agreement was that on testnet the `ConsensusRegistry` contract
should be owned by the governor account, which is
0xD64e136566a9E04eb05B30184fF577F52682D182, while on mainnet it should
be owned by the [developer multisig
account](https://app.safe.global/transactions/queue?safe=eth:0x9e543149DdfEEE18e95A4655D07096398Dd2Bf52).

The owner is set in
[DeployL2ContractsInput::consensus_registry_owner](https://github.com/matter-labs/zksync-era/blob/f4b7c12431d4bb063c735947f74e30c749119b5f/zk_toolbox/crates/config/src/forge_interface/deploy_l2_contracts/input.rs#L19)
which has access to contract and wallet configuration and these are
written to a config file just before deployment.

~~I added an optional `developer_multisig` wallet to `WalletConfig`, so
the address can be added at the same place as the `governor` address is;
if `developer_multisig` is missing then `governor` is used. I suppose it
could be made part of the `ContractsConfig` instead, but since this is a
wallet with funds that developers can access, I thought it wouldn't be
out of place in `wallets.yaml` even if one doesn't have any of the
corresponding private keys. Let me know if I should be using something
else.~~

### Testing

Since the `zk_toolbox` is replacing the `zk` commands, and `zk init`
doesn't deploy the consensus registry, we have to use the following
commands to see that the contract is built, deployed and its address is
written to the config file:

```shell
./bin/zkt
zk_inception ecosystem create
zk_inception containers
zk_inception ecosystem init --dev
```

After this we can check if we see the address in the generated config
file:

```console
❯ cat ./chains/era/configs/contracts.yaml | yq .l2.consensus_registry
0x72ada8c211f45e768c9a7781793da84daf1d0d1b
```

Finally clean up:

```shell
zk_supervisor clean all
```

## Why ❔

So that we can deploy the L2 consensus registry contract using the
`zk_toolbox`.

## Checklist

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

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

---------

Co-authored-by: Grzegorz Prusak <pompon.pompon@gmail.com>
github-merge-queue bot pushed a commit to matter-labs/zksync-era that referenced this pull request Sep 5, 2024
## What ❔

Adds a `zk_inception chain deploy-consensus-registry` command.

TODO: 
- [x] Change `contracts` submodule back to `main` once
matter-labs/era-contracts#735 is merged

### Contract Owner

The agreement was that on testnet the `ConsensusRegistry` contract
should be owned by the governor account, which is
0xD64e136566a9E04eb05B30184fF577F52682D182, while on mainnet it should
be owned by the [developer multisig
account](https://app.safe.global/transactions/queue?safe=eth:0x9e543149DdfEEE18e95A4655D07096398Dd2Bf52).

The owner is set in
[DeployL2ContractsInput::consensus_registry_owner](https://github.com/matter-labs/zksync-era/blob/f4b7c12431d4bb063c735947f74e30c749119b5f/zk_toolbox/crates/config/src/forge_interface/deploy_l2_contracts/input.rs#L19)
which has access to contract and wallet configuration and these are
written to a config file just before deployment.

~~I added an optional `developer_multisig` wallet to `WalletConfig`, so
the address can be added at the same place as the `governor` address is;
if `developer_multisig` is missing then `governor` is used. I suppose it
could be made part of the `ContractsConfig` instead, but since this is a
wallet with funds that developers can access, I thought it wouldn't be
out of place in `wallets.yaml` even if one doesn't have any of the
corresponding private keys. Let me know if I should be using something
else.~~

### Testing

Since the `zk_toolbox` is replacing the `zk` commands, and `zk init`
doesn't deploy the consensus registry, we have to use the following
commands to see that the contract is built, deployed and its address is
written to the config file:

```shell
./bin/zkt
zk_inception ecosystem create
zk_inception containers
zk_inception ecosystem init --dev
```

After this we can check if we see the address in the generated config
file:

```console
❯ cat ./chains/era/configs/contracts.yaml | yq .l2.consensus_registry
0x72ada8c211f45e768c9a7781793da84daf1d0d1b
```

Finally clean up:

```shell
zk_supervisor clean all
```

## Why ❔

So that we can deploy the L2 consensus registry contract using the
`zk_toolbox`.

## Checklist

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

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

---------

Co-authored-by: Grzegorz Prusak <pompon.pompon@gmail.com>
github-merge-queue bot pushed a commit to matter-labs/zksync-era that referenced this pull request Sep 5, 2024
## What ❔

Adds a `zk_inception chain deploy-consensus-registry` command.

TODO: 
- [x] Change `contracts` submodule back to `main` once
matter-labs/era-contracts#735 is merged

### Contract Owner

The agreement was that on testnet the `ConsensusRegistry` contract
should be owned by the governor account, which is
0xD64e136566a9E04eb05B30184fF577F52682D182, while on mainnet it should
be owned by the [developer multisig
account](https://app.safe.global/transactions/queue?safe=eth:0x9e543149DdfEEE18e95A4655D07096398Dd2Bf52).

The owner is set in
[DeployL2ContractsInput::consensus_registry_owner](https://github.com/matter-labs/zksync-era/blob/f4b7c12431d4bb063c735947f74e30c749119b5f/zk_toolbox/crates/config/src/forge_interface/deploy_l2_contracts/input.rs#L19)
which has access to contract and wallet configuration and these are
written to a config file just before deployment.

~~I added an optional `developer_multisig` wallet to `WalletConfig`, so
the address can be added at the same place as the `governor` address is;
if `developer_multisig` is missing then `governor` is used. I suppose it
could be made part of the `ContractsConfig` instead, but since this is a
wallet with funds that developers can access, I thought it wouldn't be
out of place in `wallets.yaml` even if one doesn't have any of the
corresponding private keys. Let me know if I should be using something
else.~~

### Testing

Since the `zk_toolbox` is replacing the `zk` commands, and `zk init`
doesn't deploy the consensus registry, we have to use the following
commands to see that the contract is built, deployed and its address is
written to the config file:

```shell
./bin/zkt
zk_inception ecosystem create
zk_inception containers
zk_inception ecosystem init --dev
```

After this we can check if we see the address in the generated config
file:

```console
❯ cat ./chains/era/configs/contracts.yaml | yq .l2.consensus_registry
0x72ada8c211f45e768c9a7781793da84daf1d0d1b
```

Finally clean up:

```shell
zk_supervisor clean all
```

## Why ❔

So that we can deploy the L2 consensus registry contract using the
`zk_toolbox`.

## Checklist

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

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

---------

Co-authored-by: Grzegorz Prusak <pompon.pompon@gmail.com>
github-merge-queue bot pushed a commit to matter-labs/zksync-era that referenced this pull request Sep 5, 2024
## What ❔

Adds a `zk_inception chain deploy-consensus-registry` command.

TODO: 
- [x] Change `contracts` submodule back to `main` once
matter-labs/era-contracts#735 is merged

### Contract Owner

The agreement was that on testnet the `ConsensusRegistry` contract
should be owned by the governor account, which is
0xD64e136566a9E04eb05B30184fF577F52682D182, while on mainnet it should
be owned by the [developer multisig
account](https://app.safe.global/transactions/queue?safe=eth:0x9e543149DdfEEE18e95A4655D07096398Dd2Bf52).

The owner is set in
[DeployL2ContractsInput::consensus_registry_owner](https://github.com/matter-labs/zksync-era/blob/f4b7c12431d4bb063c735947f74e30c749119b5f/zk_toolbox/crates/config/src/forge_interface/deploy_l2_contracts/input.rs#L19)
which has access to contract and wallet configuration and these are
written to a config file just before deployment.

~~I added an optional `developer_multisig` wallet to `WalletConfig`, so
the address can be added at the same place as the `governor` address is;
if `developer_multisig` is missing then `governor` is used. I suppose it
could be made part of the `ContractsConfig` instead, but since this is a
wallet with funds that developers can access, I thought it wouldn't be
out of place in `wallets.yaml` even if one doesn't have any of the
corresponding private keys. Let me know if I should be using something
else.~~

### Testing

Since the `zk_toolbox` is replacing the `zk` commands, and `zk init`
doesn't deploy the consensus registry, we have to use the following
commands to see that the contract is built, deployed and its address is
written to the config file:

```shell
./bin/zkt
zk_inception ecosystem create
zk_inception containers
zk_inception ecosystem init --dev
```

After this we can check if we see the address in the generated config
file:

```console
❯ cat ./chains/era/configs/contracts.yaml | yq .l2.consensus_registry
0x72ada8c211f45e768c9a7781793da84daf1d0d1b
```

Finally clean up:

```shell
zk_supervisor clean all
```

## Why ❔

So that we can deploy the L2 consensus registry contract using the
`zk_toolbox`.

## Checklist

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

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

---------

Co-authored-by: Grzegorz Prusak <pompon.pompon@gmail.com>
github-merge-queue bot pushed a commit to matter-labs/zksync-era that referenced this pull request Sep 5, 2024
## What ❔

Adds a `zk_inception chain deploy-consensus-registry` command.

TODO: 
- [x] Change `contracts` submodule back to `main` once
matter-labs/era-contracts#735 is merged

### Contract Owner

The agreement was that on testnet the `ConsensusRegistry` contract
should be owned by the governor account, which is
0xD64e136566a9E04eb05B30184fF577F52682D182, while on mainnet it should
be owned by the [developer multisig
account](https://app.safe.global/transactions/queue?safe=eth:0x9e543149DdfEEE18e95A4655D07096398Dd2Bf52).

The owner is set in
[DeployL2ContractsInput::consensus_registry_owner](https://github.com/matter-labs/zksync-era/blob/f4b7c12431d4bb063c735947f74e30c749119b5f/zk_toolbox/crates/config/src/forge_interface/deploy_l2_contracts/input.rs#L19)
which has access to contract and wallet configuration and these are
written to a config file just before deployment.

~~I added an optional `developer_multisig` wallet to `WalletConfig`, so
the address can be added at the same place as the `governor` address is;
if `developer_multisig` is missing then `governor` is used. I suppose it
could be made part of the `ContractsConfig` instead, but since this is a
wallet with funds that developers can access, I thought it wouldn't be
out of place in `wallets.yaml` even if one doesn't have any of the
corresponding private keys. Let me know if I should be using something
else.~~

### Testing

Since the `zk_toolbox` is replacing the `zk` commands, and `zk init`
doesn't deploy the consensus registry, we have to use the following
commands to see that the contract is built, deployed and its address is
written to the config file:

```shell
./bin/zkt
zk_inception ecosystem create
zk_inception containers
zk_inception ecosystem init --dev
```

After this we can check if we see the address in the generated config
file:

```console
❯ cat ./chains/era/configs/contracts.yaml | yq .l2.consensus_registry
0x72ada8c211f45e768c9a7781793da84daf1d0d1b
```

Finally clean up:

```shell
zk_supervisor clean all
```

## Why ❔

So that we can deploy the L2 consensus registry contract using the
`zk_toolbox`.

## Checklist

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

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

---------

Co-authored-by: Grzegorz Prusak <pompon.pompon@gmail.com>
github-merge-queue bot pushed a commit to matter-labs/zksync-era that referenced this pull request Sep 5, 2024
## What ❔

Adds a `zk_inception chain deploy-consensus-registry` command.

TODO: 
- [x] Change `contracts` submodule back to `main` once
matter-labs/era-contracts#735 is merged

### Contract Owner

The agreement was that on testnet the `ConsensusRegistry` contract
should be owned by the governor account, which is
0xD64e136566a9E04eb05B30184fF577F52682D182, while on mainnet it should
be owned by the [developer multisig
account](https://app.safe.global/transactions/queue?safe=eth:0x9e543149DdfEEE18e95A4655D07096398Dd2Bf52).

The owner is set in
[DeployL2ContractsInput::consensus_registry_owner](https://github.com/matter-labs/zksync-era/blob/f4b7c12431d4bb063c735947f74e30c749119b5f/zk_toolbox/crates/config/src/forge_interface/deploy_l2_contracts/input.rs#L19)
which has access to contract and wallet configuration and these are
written to a config file just before deployment.

~~I added an optional `developer_multisig` wallet to `WalletConfig`, so
the address can be added at the same place as the `governor` address is;
if `developer_multisig` is missing then `governor` is used. I suppose it
could be made part of the `ContractsConfig` instead, but since this is a
wallet with funds that developers can access, I thought it wouldn't be
out of place in `wallets.yaml` even if one doesn't have any of the
corresponding private keys. Let me know if I should be using something
else.~~

### Testing

Since the `zk_toolbox` is replacing the `zk` commands, and `zk init`
doesn't deploy the consensus registry, we have to use the following
commands to see that the contract is built, deployed and its address is
written to the config file:

```shell
./bin/zkt
zk_inception ecosystem create
zk_inception containers
zk_inception ecosystem init --dev
```

After this we can check if we see the address in the generated config
file:

```console
❯ cat ./chains/era/configs/contracts.yaml | yq .l2.consensus_registry
0x72ada8c211f45e768c9a7781793da84daf1d0d1b
```

Finally clean up:

```shell
zk_supervisor clean all
```

## Why ❔

So that we can deploy the L2 consensus registry contract using the
`zk_toolbox`.

## Checklist

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

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

---------

Co-authored-by: Grzegorz Prusak <pompon.pompon@gmail.com>
github-merge-queue bot pushed a commit to matter-labs/zksync-era that referenced this pull request Sep 5, 2024
## What ❔

Adds a `zk_inception chain deploy-consensus-registry` command.

TODO: 
- [x] Change `contracts` submodule back to `main` once
matter-labs/era-contracts#735 is merged

### Contract Owner

The agreement was that on testnet the `ConsensusRegistry` contract
should be owned by the governor account, which is
0xD64e136566a9E04eb05B30184fF577F52682D182, while on mainnet it should
be owned by the [developer multisig
account](https://app.safe.global/transactions/queue?safe=eth:0x9e543149DdfEEE18e95A4655D07096398Dd2Bf52).

The owner is set in
[DeployL2ContractsInput::consensus_registry_owner](https://github.com/matter-labs/zksync-era/blob/f4b7c12431d4bb063c735947f74e30c749119b5f/zk_toolbox/crates/config/src/forge_interface/deploy_l2_contracts/input.rs#L19)
which has access to contract and wallet configuration and these are
written to a config file just before deployment.

~~I added an optional `developer_multisig` wallet to `WalletConfig`, so
the address can be added at the same place as the `governor` address is;
if `developer_multisig` is missing then `governor` is used. I suppose it
could be made part of the `ContractsConfig` instead, but since this is a
wallet with funds that developers can access, I thought it wouldn't be
out of place in `wallets.yaml` even if one doesn't have any of the
corresponding private keys. Let me know if I should be using something
else.~~

### Testing

Since the `zk_toolbox` is replacing the `zk` commands, and `zk init`
doesn't deploy the consensus registry, we have to use the following
commands to see that the contract is built, deployed and its address is
written to the config file:

```shell
./bin/zkt
zk_inception ecosystem create
zk_inception containers
zk_inception ecosystem init --dev
```

After this we can check if we see the address in the generated config
file:

```console
❯ cat ./chains/era/configs/contracts.yaml | yq .l2.consensus_registry
0x72ada8c211f45e768c9a7781793da84daf1d0d1b
```

Finally clean up:

```shell
zk_supervisor clean all
```

## Why ❔

So that we can deploy the L2 consensus registry contract using the
`zk_toolbox`.

## Checklist

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

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

---------

Co-authored-by: Grzegorz Prusak <pompon.pompon@gmail.com>
github-merge-queue bot pushed a commit to matter-labs/zksync-era that referenced this pull request Sep 5, 2024
## What ❔

Adds a `zk_inception chain deploy-consensus-registry` command.

TODO: 
- [x] Change `contracts` submodule back to `main` once
matter-labs/era-contracts#735 is merged

### Contract Owner

The agreement was that on testnet the `ConsensusRegistry` contract
should be owned by the governor account, which is
0xD64e136566a9E04eb05B30184fF577F52682D182, while on mainnet it should
be owned by the [developer multisig
account](https://app.safe.global/transactions/queue?safe=eth:0x9e543149DdfEEE18e95A4655D07096398Dd2Bf52).

The owner is set in
[DeployL2ContractsInput::consensus_registry_owner](https://github.com/matter-labs/zksync-era/blob/f4b7c12431d4bb063c735947f74e30c749119b5f/zk_toolbox/crates/config/src/forge_interface/deploy_l2_contracts/input.rs#L19)
which has access to contract and wallet configuration and these are
written to a config file just before deployment.

~~I added an optional `developer_multisig` wallet to `WalletConfig`, so
the address can be added at the same place as the `governor` address is;
if `developer_multisig` is missing then `governor` is used. I suppose it
could be made part of the `ContractsConfig` instead, but since this is a
wallet with funds that developers can access, I thought it wouldn't be
out of place in `wallets.yaml` even if one doesn't have any of the
corresponding private keys. Let me know if I should be using something
else.~~

### Testing

Since the `zk_toolbox` is replacing the `zk` commands, and `zk init`
doesn't deploy the consensus registry, we have to use the following
commands to see that the contract is built, deployed and its address is
written to the config file:

```shell
./bin/zkt
zk_inception ecosystem create
zk_inception containers
zk_inception ecosystem init --dev
```

After this we can check if we see the address in the generated config
file:

```console
❯ cat ./chains/era/configs/contracts.yaml | yq .l2.consensus_registry
0x72ada8c211f45e768c9a7781793da84daf1d0d1b
```

Finally clean up:

```shell
zk_supervisor clean all
```

## Why ❔

So that we can deploy the L2 consensus registry contract using the
`zk_toolbox`.

## Checklist

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

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

---------

Co-authored-by: Grzegorz Prusak <pompon.pompon@gmail.com>
github-merge-queue bot pushed a commit to matter-labs/zksync-era that referenced this pull request Sep 6, 2024
## What ❔

Adds a `zk_inception chain deploy-consensus-registry` command.

TODO: 
- [x] Change `contracts` submodule back to `main` once
matter-labs/era-contracts#735 is merged

### Contract Owner

The agreement was that on testnet the `ConsensusRegistry` contract
should be owned by the governor account, which is
0xD64e136566a9E04eb05B30184fF577F52682D182, while on mainnet it should
be owned by the [developer multisig
account](https://app.safe.global/transactions/queue?safe=eth:0x9e543149DdfEEE18e95A4655D07096398Dd2Bf52).

The owner is set in
[DeployL2ContractsInput::consensus_registry_owner](https://github.com/matter-labs/zksync-era/blob/f4b7c12431d4bb063c735947f74e30c749119b5f/zk_toolbox/crates/config/src/forge_interface/deploy_l2_contracts/input.rs#L19)
which has access to contract and wallet configuration and these are
written to a config file just before deployment.

~~I added an optional `developer_multisig` wallet to `WalletConfig`, so
the address can be added at the same place as the `governor` address is;
if `developer_multisig` is missing then `governor` is used. I suppose it
could be made part of the `ContractsConfig` instead, but since this is a
wallet with funds that developers can access, I thought it wouldn't be
out of place in `wallets.yaml` even if one doesn't have any of the
corresponding private keys. Let me know if I should be using something
else.~~

### Testing

Since the `zk_toolbox` is replacing the `zk` commands, and `zk init`
doesn't deploy the consensus registry, we have to use the following
commands to see that the contract is built, deployed and its address is
written to the config file:

```shell
./bin/zkt
zk_inception ecosystem create
zk_inception containers
zk_inception ecosystem init --dev
```

After this we can check if we see the address in the generated config
file:

```console
❯ cat ./chains/era/configs/contracts.yaml | yq .l2.consensus_registry
0x72ada8c211f45e768c9a7781793da84daf1d0d1b
```

Finally clean up:

```shell
zk_supervisor clean all
```

## Why ❔

So that we can deploy the L2 consensus registry contract using the
`zk_toolbox`.

## Checklist

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

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

---------

Co-authored-by: Grzegorz Prusak <pompon.pompon@gmail.com>
github-merge-queue bot pushed a commit to matter-labs/zksync-era that referenced this pull request Sep 6, 2024
## What ❔

Adds a `zk_inception chain deploy-consensus-registry` command.

TODO: 
- [x] Change `contracts` submodule back to `main` once
matter-labs/era-contracts#735 is merged

### Contract Owner

The agreement was that on testnet the `ConsensusRegistry` contract
should be owned by the governor account, which is
0xD64e136566a9E04eb05B30184fF577F52682D182, while on mainnet it should
be owned by the [developer multisig
account](https://app.safe.global/transactions/queue?safe=eth:0x9e543149DdfEEE18e95A4655D07096398Dd2Bf52).

The owner is set in
[DeployL2ContractsInput::consensus_registry_owner](https://github.com/matter-labs/zksync-era/blob/f4b7c12431d4bb063c735947f74e30c749119b5f/zk_toolbox/crates/config/src/forge_interface/deploy_l2_contracts/input.rs#L19)
which has access to contract and wallet configuration and these are
written to a config file just before deployment.

~~I added an optional `developer_multisig` wallet to `WalletConfig`, so
the address can be added at the same place as the `governor` address is;
if `developer_multisig` is missing then `governor` is used. I suppose it
could be made part of the `ContractsConfig` instead, but since this is a
wallet with funds that developers can access, I thought it wouldn't be
out of place in `wallets.yaml` even if one doesn't have any of the
corresponding private keys. Let me know if I should be using something
else.~~

### Testing

Since the `zk_toolbox` is replacing the `zk` commands, and `zk init`
doesn't deploy the consensus registry, we have to use the following
commands to see that the contract is built, deployed and its address is
written to the config file:

```shell
./bin/zkt
zk_inception ecosystem create
zk_inception containers
zk_inception ecosystem init --dev
```

After this we can check if we see the address in the generated config
file:

```console
❯ cat ./chains/era/configs/contracts.yaml | yq .l2.consensus_registry
0x72ada8c211f45e768c9a7781793da84daf1d0d1b
```

Finally clean up:

```shell
zk_supervisor clean all
```

## Why ❔

So that we can deploy the L2 consensus registry contract using the
`zk_toolbox`.

## Checklist

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

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

---------

Co-authored-by: Grzegorz Prusak <pompon.pompon@gmail.com>
github-merge-queue bot pushed a commit to matter-labs/zksync-era that referenced this pull request Sep 6, 2024
## What ❔

Adds a `zk_inception chain deploy-consensus-registry` command.

TODO: 
- [x] Change `contracts` submodule back to `main` once
matter-labs/era-contracts#735 is merged

### Contract Owner

The agreement was that on testnet the `ConsensusRegistry` contract
should be owned by the governor account, which is
0xD64e136566a9E04eb05B30184fF577F52682D182, while on mainnet it should
be owned by the [developer multisig
account](https://app.safe.global/transactions/queue?safe=eth:0x9e543149DdfEEE18e95A4655D07096398Dd2Bf52).

The owner is set in
[DeployL2ContractsInput::consensus_registry_owner](https://github.com/matter-labs/zksync-era/blob/f4b7c12431d4bb063c735947f74e30c749119b5f/zk_toolbox/crates/config/src/forge_interface/deploy_l2_contracts/input.rs#L19)
which has access to contract and wallet configuration and these are
written to a config file just before deployment.

~~I added an optional `developer_multisig` wallet to `WalletConfig`, so
the address can be added at the same place as the `governor` address is;
if `developer_multisig` is missing then `governor` is used. I suppose it
could be made part of the `ContractsConfig` instead, but since this is a
wallet with funds that developers can access, I thought it wouldn't be
out of place in `wallets.yaml` even if one doesn't have any of the
corresponding private keys. Let me know if I should be using something
else.~~

### Testing

Since the `zk_toolbox` is replacing the `zk` commands, and `zk init`
doesn't deploy the consensus registry, we have to use the following
commands to see that the contract is built, deployed and its address is
written to the config file:

```shell
./bin/zkt
zk_inception ecosystem create
zk_inception containers
zk_inception ecosystem init --dev
```

After this we can check if we see the address in the generated config
file:

```console
❯ cat ./chains/era/configs/contracts.yaml | yq .l2.consensus_registry
0x72ada8c211f45e768c9a7781793da84daf1d0d1b
```

Finally clean up:

```shell
zk_supervisor clean all
```

## Why ❔

So that we can deploy the L2 consensus registry contract using the
`zk_toolbox`.

## Checklist

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

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

---------

Co-authored-by: Grzegorz Prusak <pompon.pompon@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants