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

fix(zk-toolbox): use chain admin for bridgehub #2857

Merged
merged 3 commits into from
Sep 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions zk_toolbox/crates/config/src/contracts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ impl ContractsConfig {
self.ecosystem_contracts
.diamond_cut_data
.clone_from(&deploy_l1_output.contracts_config.diamond_cut_data);
self.l1.chain_admin_addr = deploy_l1_output.deployed_addresses.chain_admin;
}

pub fn set_chain_contracts(&mut self, register_chain_output: &RegisterChainOutput) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ pub struct DeployL1DeployedAddressesOutput {
pub governance_addr: Address,
pub transparent_proxy_admin_addr: Address,
pub validator_timelock_addr: Address,
pub chain_admin: Address,
pub bridgehub: L1BridgehubOutput,
pub bridges: L1BridgesOutput,
pub state_transition: L1StateTransitionOutput,
Expand Down
37 changes: 36 additions & 1 deletion zk_toolbox/crates/zk_inception/src/commands/ecosystem/init.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ use super::{
setup_observability,
};
use crate::{
accept_ownership::accept_owner,
accept_ownership::{accept_admin, accept_owner},
commands::{
chain::{self, args::init::PortOffset},
ecosystem::create_configs::{
Expand Down Expand Up @@ -332,6 +332,17 @@ async fn deploy_ecosystem_inner(
)
.await?;

accept_admin(
shell,
config,
contracts_config.l1.chain_admin_addr,
config.get_wallets()?.governor_private_key(),
contracts_config.ecosystem_contracts.bridgehub_proxy_addr,
&forge_args,
l1_rpc_url.clone(),
)
.await?;

accept_owner(
shell,
config,
Expand All @@ -343,6 +354,17 @@ async fn deploy_ecosystem_inner(
)
.await?;

accept_admin(
shell,
config,
contracts_config.l1.chain_admin_addr,
config.get_wallets()?.governor_private_key(),
contracts_config.bridges.shared.l1_address,
&forge_args,
l1_rpc_url.clone(),
)
.await?;

accept_owner(
shell,
config,
Expand All @@ -356,6 +378,19 @@ async fn deploy_ecosystem_inner(
)
.await?;

accept_admin(
shell,
config,
contracts_config.l1.chain_admin_addr,
config.get_wallets()?.governor_private_key(),
contracts_config
.ecosystem_contracts
.state_transition_proxy_addr,
&forge_args,
l1_rpc_url.clone(),
)
.await?;

Ok(contracts_config)
}

Expand Down
4 changes: 2 additions & 2 deletions zk_toolbox/crates/zk_supervisor/src/commands/test/rust.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ use crate::{
dals::{Dal, CORE_DAL_PATH, PROVER_DAL_PATH},
defaults::{TEST_DATABASE_PROVER_URL, TEST_DATABASE_SERVER_URL},
messages::{
MSG_CHAIN_NOT_FOUND_ERR, MSG_POSTGRES_CONFIG_NOT_FOUND_ERR,
MSG_RESETTING_TEST_DATABASES, MSG_UNIT_TESTS_RUN_SUCCESS, MSG_USING_CARGO_NEXTEST,
MSG_CHAIN_NOT_FOUND_ERR, MSG_POSTGRES_CONFIG_NOT_FOUND_ERR, MSG_RESETTING_TEST_DATABASES,
MSG_UNIT_TESTS_RUN_SUCCESS, MSG_USING_CARGO_NEXTEST,
},
};

Expand Down
Loading