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: Fixes for toolbox #3329

Open
wants to merge 12 commits into
base: main
Choose a base branch
from
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use zksync_basic_types::L2ChainId;
use crate::{
consts::INITIAL_DEPLOYMENT_FILE,
traits::{FileConfigWithDefaultName, ZkStackConfig},
ContractsConfig, GenesisConfig, WalletsConfig,
ContractsConfig, GenesisConfig, WalletsConfig, ERC20_DEPLOYMENT_FILE,
};

#[derive(Debug, Deserialize, Serialize, Clone)]
Expand Down Expand Up @@ -69,7 +69,7 @@ pub struct Erc20DeploymentConfig {
}

impl FileConfigWithDefaultName for Erc20DeploymentConfig {
const FILE_NAME: &'static str = INITIAL_DEPLOYMENT_FILE;
const FILE_NAME: &'static str = ERC20_DEPLOYMENT_FILE;
}

impl ZkStackConfig for Erc20DeploymentConfig {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use ethers::types::Address;
use serde::{Deserialize, Serialize};
use zksync_basic_types::L2ChainId;

use crate::{traits::ZkStackConfig, ChainConfig};
use crate::{traits::ZkStackConfig, ChainConfig, EcosystemConfig};

impl ZkStackConfig for DeployL2ContractsInput {}

Expand All @@ -20,15 +20,18 @@ pub struct DeployL2ContractsInput {
}

impl DeployL2ContractsInput {
pub fn new(chain_config: &ChainConfig, era_chain_id: L2ChainId) -> anyhow::Result<Self> {
let contracts = chain_config.get_contracts_config()?;
pub fn new(
ecosystem_config: &EcosystemConfig,
chain_config: &ChainConfig,
) -> anyhow::Result<Self> {
let contracts = ecosystem_config.get_contracts_config()?;
let wallets = chain_config.get_wallets_config()?;
Ok(Self {
era_chain_id,
era_chain_id: ecosystem_config.era_chain_id,
chain_id: chain_config.chain_id,
l1_shared_bridge: contracts.bridges.shared.l1_address,
bridgehub: contracts.ecosystem_contracts.bridgehub_proxy_addr,
governance: wallets.governor.address,
governance: contracts.l1.governance_addr,
StanislavBreadless marked this conversation as resolved.
Show resolved Hide resolved
erc20_bridge: contracts.bridges.erc20.l1_address,
consensus_registry_owner: wallets.governor.address,
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ async fn call_forge(
forge_args: ForgeScriptArgs,
signature: Option<&str>,
) -> anyhow::Result<()> {
let input = DeployL2ContractsInput::new(chain_config, ecosystem_config.era_chain_id)?;
let input = DeployL2ContractsInput::new(ecosystem_config, chain_config)?;
let foundry_contracts_path = chain_config.path_to_foundry();
let secrets = chain_config.get_secrets_config()?;
input.save(
Expand Down
Loading