diff --git a/contracts b/contracts index 3a1b5d4b94ff..bce4b2d0f34b 160000 --- a/contracts +++ b/contracts @@ -1 +1 @@ -Subproject commit 3a1b5d4b94ffb00f03d436a7db7e48589eb74d39 +Subproject commit bce4b2d0f34bd87f1aaadd291772935afb1c3bd6 diff --git a/zk_toolbox/crates/config/src/contracts.rs b/zk_toolbox/crates/config/src/contracts.rs index 0d4b1c7b1f81..8296aa188527 100644 --- a/zk_toolbox/crates/config/src/contracts.rs +++ b/zk_toolbox/crates/config/src/contracts.rs @@ -7,6 +7,7 @@ use crate::{ deploy_ecosystem::output::DeployL1Output, deploy_l2_contracts::output::{ ConsensusRegistryOutput, DefaultL2UpgradeOutput, InitializeBridgeOutput, + Multicall3Output, }, register_chain::output::RegisterChainOutput, }, @@ -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 { @@ -152,4 +158,5 @@ pub struct L2Contracts { pub testnet_paymaster_addr: Address, pub default_l2_upgrader: Address, pub consensus_registry: Option
, + pub multicall3: Option
, } diff --git a/zk_toolbox/crates/config/src/forge_interface/deploy_l2_contracts/output.rs b/zk_toolbox/crates/config/src/forge_interface/deploy_l2_contracts/output.rs index 860e7e293f99..ca5cac12c02d 100644 --- a/zk_toolbox/crates/config/src/forge_interface/deploy_l2_contracts/output.rs +++ b/zk_toolbox/crates/config/src/forge_interface/deploy_l2_contracts/output.rs @@ -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 { @@ -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, +} diff --git a/zk_toolbox/crates/zk_inception/src/commands/chain/deploy_l2_contracts.rs b/zk_toolbox/crates/zk_inception/src/commands/chain/deploy_l2_contracts.rs index 7545ec2ec26f..5bfc0a623488 100644 --- a/zk_toolbox/crates/zk_inception/src/commands/chain/deploy_l2_contracts.rs +++ b/zk_toolbox/crates/zk_inception/src/commands/chain/deploy_l2_contracts.rs @@ -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, }, @@ -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(()) }, )