Skip to content
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
7 changes: 7 additions & 0 deletions zk_toolbox/crates/config/src/contracts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ use crate::{
deploy_ecosystem::output::DeployL1Output,
deploy_l2_contracts::output::{
ConsensusRegistryOutput, DefaultL2UpgradeOutput, InitializeBridgeOutput,
Multicall3Output,
},
register_chain::output::RegisterChainOutput,
},
Expand Down Expand Up @@ -102,6 +103,11 @@ impl ContractsConfig {
self.l2.default_l2_upgrader = default_upgrade_output.l2_default_upgrader;
Ok(())
}

pub fn set_multicall3(&mut self, multicall3_output: &Multicall3Output) -> anyhow::Result<()> {
self.l2.multicall3 = Some(multicall3_output.multicall3);
Ok(())
}
}

impl FileConfigWithDefaultName for ContractsConfig {
Expand Down Expand Up @@ -152,4 +158,5 @@ pub struct L2Contracts {
pub testnet_paymaster_addr: Address,
pub default_l2_upgrader: Address,
pub consensus_registry: Option<Address>,
pub multicall3: Option<Address>,
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ use crate::traits::ZkToolboxConfig;
impl ZkToolboxConfig for InitializeBridgeOutput {}
impl ZkToolboxConfig for DefaultL2UpgradeOutput {}
impl ZkToolboxConfig for ConsensusRegistryOutput {}
impl ZkToolboxConfig for Multicall3Output {}

#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct InitializeBridgeOutput {
Expand All @@ -23,3 +24,8 @@ pub struct ConsensusRegistryOutput {
pub consensus_registry_implementation: Address,
pub consensus_registry_proxy: Address,
}

#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct Multicall3Output {
pub multicall3: Address,
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@ use config::{
forge_interface::{
deploy_l2_contracts::{
input::DeployL2ContractsInput,
output::{ConsensusRegistryOutput, DefaultL2UpgradeOutput, InitializeBridgeOutput},
output::{
ConsensusRegistryOutput, DefaultL2UpgradeOutput, InitializeBridgeOutput,
Multicall3Output,
},
},
script_params::DEPLOY_L2_CONTRACTS_SCRIPT_PARAMS,
},
Expand Down Expand Up @@ -205,6 +208,7 @@ pub async fn deploy_l2_contracts(
contracts_config.set_l2_shared_bridge(&InitializeBridgeOutput::read(shell, out)?)?;
contracts_config.set_default_l2_upgrade(&DefaultL2UpgradeOutput::read(shell, out)?)?;
contracts_config.set_consensus_registry(&ConsensusRegistryOutput::read(shell, out)?)?;
contracts_config.set_multicall3(&Multicall3Output::read(shell, out)?)?;
Ok(())
},
)
Expand Down
Loading