diff --git a/.github/workflows/ci-core-reusable.yml b/.github/workflows/ci-core-reusable.yml
index c757ef75231f..a1e542be4e7f 100644
--- a/.github/workflows/ci-core-reusable.yml
+++ b/.github/workflows/ci-core-reusable.yml
@@ -244,7 +244,6 @@ jobs:
- name: Prepare the server to be the synclayer
run: |
ci_run zk dev2 supply-rich-wallets
- ci_run zk contract build --zkSync
ci_run zk contract prepare-sync-layer
ci_run zk contract register-sync-layer-counterpart
@@ -258,10 +257,8 @@ jobs:
ci_run zk config prepare-l1-hyperchain --env-name test-chain --chain-id 320
ci_run zk env test-chain
ci_run zk config compile test-chain --diff 5
- ci_run zk init hyper
- ci_run zk server --time-to-live 120 &>server2.log
- sleep 120
- ci_run zk server --tx-aggregation-paused --time-to-live 60 &>server2.log
+ ci_run zk init hyper --skip-contract-compilation-override
+
ci_run zk contract migrate-to-sync-layer
ci_run zk contract prepare-sync-layer-validators
ci_run zk contract update-config-for-sync-layer
diff --git a/contracts b/contracts
index 8152af98817b..7206350a0ffd 160000
--- a/contracts
+++ b/contracts
@@ -1 +1 @@
-Subproject commit 8152af98817b7baa7205a81901810202c589a87e
+Subproject commit 7206350a0ffd9f2de0ecd38e7f9e2cd711a5dd81
diff --git a/core/bin/external_node/src/config/mod.rs b/core/bin/external_node/src/config/mod.rs
index 7f0dd89efbca..142b4b81330e 100644
--- a/core/bin/external_node/src/config/mod.rs
+++ b/core/bin/external_node/src/config/mod.rs
@@ -111,6 +111,7 @@ pub(crate) struct RemoteENConfig {
// a different name, with names adapted only for consistency.
pub l1_shared_bridge_proxy_addr: Option
,
pub l2_shared_bridge_addr: Option,
+ pub l2_legacy_shared_bridge_addr: Option,
pub l1_erc20_bridge_proxy_addr: Option,
pub l2_erc20_bridge_addr: Option,
pub l1_weth_bridge_addr: Option,
@@ -138,6 +139,10 @@ impl RemoteENConfig {
.get_native_token_vault_proxy_addr()
.rpc_context("get_native_token_vault")
.await?;
+ let l2_legacy_shared_bridge_addr = client
+ .get_legacy_shared_bridge()
+ .rpc_context("get_legacy_shared_bridge")
+ .await?;
let genesis = client.genesis_config().rpc_context("genesis").await.ok();
let ecosystem_contracts = client
.get_ecosystem_contracts()
@@ -203,6 +208,7 @@ impl RemoteENConfig {
l2_erc20_bridge_addr: l2_erc20_default_bridge,
l1_shared_bridge_proxy_addr: bridges.l1_shared_default_bridge,
l2_shared_bridge_addr: l2_erc20_shared_bridge,
+ l2_legacy_shared_bridge_addr,
l1_weth_bridge_addr: bridges.l1_weth_bridge,
l2_weth_bridge_addr: bridges.l2_weth_bridge,
base_token_addr,
@@ -234,6 +240,7 @@ impl RemoteENConfig {
l1_shared_bridge_proxy_addr: Some(Address::repeat_byte(5)),
l1_weth_bridge_addr: None,
l2_shared_bridge_addr: Some(Address::repeat_byte(6)),
+ l2_legacy_shared_bridge_addr: Some(Address::repeat_byte(7)),
l1_batch_commit_data_generator_mode: L1BatchCommitmentMode::Rollup,
dummy_verifier: true,
l2_native_token_vault_proxy_addr: Some(Address::repeat_byte(7)),
@@ -1421,6 +1428,7 @@ impl From<&ExternalNodeConfig> for InternalApiConfig {
dummy_verifier: config.remote.dummy_verifier,
l1_batch_commit_data_generator_mode: config.remote.l1_batch_commit_data_generator_mode,
l2_native_token_vault_proxy_addr: config.remote.l2_native_token_vault_proxy_addr,
+ l2_legacy_shared_bridge_addr: config.remote.l2_legacy_shared_bridge_addr,
}
}
}
diff --git a/core/bin/external_node/src/node_builder.rs b/core/bin/external_node/src/node_builder.rs
index 7c40c297e107..70912552d93d 100644
--- a/core/bin/external_node/src/node_builder.rs
+++ b/core/bin/external_node/src/node_builder.rs
@@ -200,6 +200,10 @@ impl ExternalNodeBuilder {
.remote
.l2_native_token_vault_proxy_addr
.expect("L2 native token vault proxy address is not set"),
+ self.config
+ .remote
+ .l2_legacy_shared_bridge_addr
+ .expect("L2 legacy shared bridge address is not set"),
self.config.optional.l2_block_seal_queue_capacity,
)
.with_pre_insert_txs(true) // EN requires txs to be pre-inserted.
diff --git a/core/bin/zksync_server/src/node_builder.rs b/core/bin/zksync_server/src/node_builder.rs
index f3f8a38c954c..15ba1f73cb93 100644
--- a/core/bin/zksync_server/src/node_builder.rs
+++ b/core/bin/zksync_server/src/node_builder.rs
@@ -246,6 +246,9 @@ impl MainNodeBuilder {
self.contracts_config
.l2_native_token_vault_proxy_addr
.context("L2 native token vault proxy address")?,
+ self.contracts_config
+ .l2_legacy_shared_bridge_addr
+ .context("L2 legacy shared bridge address")?,
sk_config.l2_block_seal_queue_capacity,
)
.with_protective_reads_persistence_enabled(sk_config.protective_reads_persistence_enabled);
diff --git a/core/lib/basic_types/src/protocol_version.rs b/core/lib/basic_types/src/protocol_version.rs
index f7601c440ff3..ce9150145958 100644
--- a/core/lib/basic_types/src/protocol_version.rs
+++ b/core/lib/basic_types/src/protocol_version.rs
@@ -139,6 +139,10 @@ impl ProtocolVersionId {
self <= &Self::Version22
}
+ pub fn is_pre_gateway(&self) -> bool {
+ self <= &Self::Version24
+ }
+
pub fn is_1_4_0(&self) -> bool {
self >= &ProtocolVersionId::Version18 && self < &ProtocolVersionId::Version20
}
diff --git a/core/lib/config/src/configs/contracts.rs b/core/lib/config/src/configs/contracts.rs
index ee61441539bd..bf88c100cce9 100644
--- a/core/lib/config/src/configs/contracts.rs
+++ b/core/lib/config/src/configs/contracts.rs
@@ -30,6 +30,7 @@ pub struct ContractsConfig {
pub validator_timelock_addr: Address,
pub l1_shared_bridge_proxy_addr: Option,
pub l2_shared_bridge_addr: Option,
+ pub l2_legacy_shared_bridge_addr: Option,
pub l1_erc20_bridge_proxy_addr: Option,
pub l2_erc20_bridge_addr: Option,
pub l1_weth_bridge_proxy_addr: Option,
@@ -61,6 +62,7 @@ impl ContractsConfig {
l2_erc20_bridge_addr: Some(Address::repeat_byte(0x0c)),
l1_shared_bridge_proxy_addr: Some(Address::repeat_byte(0x0e)),
l2_shared_bridge_addr: Some(Address::repeat_byte(0x0f)),
+ l2_legacy_shared_bridge_addr: Some(Address::repeat_byte(0x10)),
l1_weth_bridge_proxy_addr: Some(Address::repeat_byte(0x0b)),
l2_weth_bridge_addr: Some(Address::repeat_byte(0x0c)),
l2_testnet_paymaster_addr: Some(Address::repeat_byte(0x11)),
diff --git a/core/lib/config/src/testonly.rs b/core/lib/config/src/testonly.rs
index b095648e8bac..348c2a95848b 100644
--- a/core/lib/config/src/testonly.rs
+++ b/core/lib/config/src/testonly.rs
@@ -251,6 +251,7 @@ impl Distribution for EncodeDist {
l2_erc20_bridge_addr: self.sample_opt(|| rng.gen()),
l1_shared_bridge_proxy_addr: self.sample_opt(|| rng.gen()),
l2_shared_bridge_addr: self.sample_opt(|| rng.gen()),
+ l2_legacy_shared_bridge_addr: self.sample_opt(|| rng.gen()),
l1_weth_bridge_proxy_addr: self.sample_opt(|| rng.gen()),
l2_weth_bridge_addr: self.sample_opt(|| rng.gen()),
l2_testnet_paymaster_addr: self.sample_opt(|| rng.gen()),
diff --git a/core/lib/contracts/src/lib.rs b/core/lib/contracts/src/lib.rs
index efcc4625ef98..aaa890f5cddf 100644
--- a/core/lib/contracts/src/lib.rs
+++ b/core/lib/contracts/src/lib.rs
@@ -36,11 +36,11 @@ const FORGE_PATH_PREFIX: &str = "contracts/l1-contracts/out";
const BRIDGEHUB_CONTRACT_FILE: (&str, &str) = ("bridgehub", "IBridgehub.sol/IBridgehub.json");
const STATE_TRANSITION_CONTRACT_FILE: (&str, &str) = (
"state-transition",
- "IStateTransitionManager.sol/IStateTransitionManager.json",
+ "IChainTypeManager.sol/IChainTypeManager.json",
);
const ZKSYNC_HYPERCHAIN_CONTRACT_FILE: (&str, &str) = (
"state-transition/chain-interfaces",
- "IZkSyncHyperchain.sol/IZkSyncHyperchain.json",
+ "IZKChain.sol/IZKChain.json",
);
const DIAMOND_INIT_CONTRACT_FILE: (&str, &str) = (
"state-transition",
diff --git a/core/lib/env_config/src/contracts.rs b/core/lib/env_config/src/contracts.rs
index 68d26114d373..d1c6a252b028 100644
--- a/core/lib/env_config/src/contracts.rs
+++ b/core/lib/env_config/src/contracts.rs
@@ -98,6 +98,7 @@ mod tests {
l2_native_token_vault_proxy_addr: Some(addr(
"0xfc073319977e314f251eae6ae6be76b0b3baeecf",
)),
+ l2_legacy_shared_bridge_addr: Some(addr("0x8656770FA78c830456B00B4fFCeE6b1De0e1b888")),
chain_admin_addr: Some(addr("0xdd6fa5c14e7550b4caf2aa2818d24c69cbc347ff")),
l2_da_validator_addr: Some(addr("0xed6fa5c14e7550b4caf2aa2818d24c69cbc347ff")),
}
@@ -130,6 +131,7 @@ CONTRACTS_USER_FACING_DIAMOND_PROXY_ADDR="0xF00B988a98Ca742e7958DeF9F7823b590871
CONTRACTS_L2_NATIVE_TOKEN_VAULT_PROXY_ADDR="0xfc073319977e314f251eae6ae6be76b0b3baeecf"
CONTRACTS_L2_DA_VALIDATOR_ADDR="0xed6fa5c14e7550b4caf2aa2818d24c69cbc347ff"
CONTRACTS_CHAIN_ADMIN_ADDR="0xdd6fa5c14e7550b4caf2aa2818d24c69cbc347ff"
+CONTRACTS_L2_LEGACY_SHARED_BRIDGE_ADDR="0x8656770FA78c830456B00B4fFCeE6b1De0e1b888"
"#;
lock.set_env(config);
diff --git a/core/lib/l1_contract_interface/src/i_executor/methods/commit_batches.rs b/core/lib/l1_contract_interface/src/i_executor/methods/commit_batches.rs
index 883804f0bd6f..e1bddf67ded2 100644
--- a/core/lib/l1_contract_interface/src/i_executor/methods/commit_batches.rs
+++ b/core/lib/l1_contract_interface/src/i_executor/methods/commit_batches.rs
@@ -1,14 +1,13 @@
use zksync_types::{
commitment::{L1BatchCommitmentMode, L1BatchWithMetadata},
- ethabi::Token,
+ ethabi::{encode, Token},
pubdata_da::PubdataDA,
};
use crate::{
- i_executor::structures::{CommitBatchInfo, StoredBatchInfo},
- Tokenizable, Tokenize,
+ i_executor::structures::{CommitBatchInfo, StoredBatchInfo, SUPPORTED_ENCODING_VERSION},
+ Tokenizable,
};
-
/// Input required to encode `commitBatches` call for a contract
#[derive(Debug)]
pub struct CommitBatches<'a> {
@@ -18,15 +17,33 @@ pub struct CommitBatches<'a> {
pub mode: L1BatchCommitmentMode,
}
-impl Tokenize for CommitBatches<'_> {
- fn into_tokens(self) -> Vec {
+impl CommitBatches<'_> {
+ pub fn into_tokens(self, pre_gateway: bool) -> Vec {
let stored_batch_info = StoredBatchInfo::from(self.last_committed_l1_batch).into_token();
- let l1_batches_to_commit = self
+ let l1_batches_to_commit: Vec = self
.l1_batches
.iter()
.map(|batch| CommitBatchInfo::new(self.mode, batch, self.pubdata_da).into_token())
.collect();
- vec![stored_batch_info, Token::Array(l1_batches_to_commit)]
+ let encoded_data = encode(&[
+ stored_batch_info.clone(),
+ Token::Array(l1_batches_to_commit.clone()),
+ ]);
+ let commit_data = [[SUPPORTED_ENCODING_VERSION].to_vec(), encoded_data]
+ .concat()
+ .to_vec();
+ if pre_gateway {
+ vec![stored_batch_info, Token::Array(l1_batches_to_commit)]
+ } else {
+ vec![
+ Token::Uint((self.last_committed_l1_batch.header.number.0 + 1).into()),
+ Token::Uint(
+ (self.last_committed_l1_batch.header.number.0 + self.l1_batches.len() as u32)
+ .into(),
+ ),
+ Token::Bytes(commit_data),
+ ]
+ }
}
}
diff --git a/core/lib/l1_contract_interface/src/i_executor/methods/execute_batches.rs b/core/lib/l1_contract_interface/src/i_executor/methods/execute_batches.rs
index 631eacc3412b..bbf022011834 100644
--- a/core/lib/l1_contract_interface/src/i_executor/methods/execute_batches.rs
+++ b/core/lib/l1_contract_interface/src/i_executor/methods/execute_batches.rs
@@ -1,9 +1,12 @@
use zksync_types::{
commitment::{L1BatchWithMetadata, PriorityOpsMerkleProof},
- ethabi::Token,
+ ethabi::{encode, Token},
};
-use crate::{i_executor::structures::StoredBatchInfo, Tokenizable, Tokenize};
+use crate::{
+ i_executor::structures::{StoredBatchInfo, SUPPORTED_ENCODING_VERSION},
+ Tokenizable, Tokenize,
+};
/// Input required to encode `executeBatches` call.
#[derive(Debug, Clone)]
@@ -14,7 +17,7 @@ pub struct ExecuteBatches {
impl Tokenize for &ExecuteBatches {
fn into_tokens(self) -> Vec {
- vec![
+ let encoded_data = encode(&[
Token::Array(
self.l1_batches
.iter()
@@ -27,6 +30,15 @@ impl Tokenize for &ExecuteBatches {
.map(|proof| proof.into_token())
.collect(),
),
+ ]);
+ let commit_data = [[SUPPORTED_ENCODING_VERSION].to_vec(), encoded_data]
+ .concat()
+ .to_vec();
+
+ vec![
+ Token::Uint((self.l1_batches[0].header.number.0).into()),
+ Token::Uint((self.l1_batches[self.l1_batches.len() - 1].header.number.0).into()),
+ Token::Bytes(commit_data),
]
}
}
diff --git a/core/lib/l1_contract_interface/src/i_executor/methods/prove_batches.rs b/core/lib/l1_contract_interface/src/i_executor/methods/prove_batches.rs
index 935d8a44e0b7..086ec84fb00b 100644
--- a/core/lib/l1_contract_interface/src/i_executor/methods/prove_batches.rs
+++ b/core/lib/l1_contract_interface/src/i_executor/methods/prove_batches.rs
@@ -1,8 +1,15 @@
use crypto_codegen::serialize_proof;
use zksync_prover_interface::outputs::L1BatchProofForL1;
-use zksync_types::{commitment::L1BatchWithMetadata, ethabi::Token, U256};
+use zksync_types::{
+ commitment::L1BatchWithMetadata,
+ ethabi::{encode, Token},
+ U256,
+};
-use crate::{i_executor::structures::StoredBatchInfo, Tokenizable, Tokenize};
+use crate::{
+ i_executor::structures::{StoredBatchInfo, SUPPORTED_ENCODING_VERSION},
+ Tokenizable, Tokenize,
+};
/// Input required to encode `proveBatches` call.
#[derive(Debug, Clone)]
@@ -15,7 +22,7 @@ pub struct ProveBatches {
impl Tokenize for &ProveBatches {
fn into_tokens(self) -> Vec {
- let prev_l1_batch = StoredBatchInfo::from(&self.prev_l1_batch).into_token();
+ let prev_l1_batch_info = StoredBatchInfo::from(&self.prev_l1_batch).into_token();
let batches_arg = self
.l1_batches
.iter()
@@ -42,26 +49,46 @@ impl Tokenize for &ProveBatches {
.unwrap()
.is_pre_boojum()
{
- Token::Array(
- aggregation_result_coords
- .iter()
- .map(|bytes| Token::Uint(U256::from_big_endian(bytes)))
- .collect(),
- )
+ aggregation_result_coords
+ .iter()
+ .map(|bytes| Token::Uint(U256::from_big_endian(bytes)))
+ .collect()
} else {
- Token::Array(Vec::new())
+ Vec::new()
};
- let proof_input = Token::Tuple(vec![
- aggregation_result_coords,
- Token::Array(proof.into_iter().map(Token::Uint).collect()),
- ]);
+ let proof_input = Token::Array(
+ [
+ aggregation_result_coords,
+ proof.into_iter().map(Token::Uint).collect(),
+ ]
+ .concat()
+ .to_vec(),
+ ); // todo this changed, might have to be debugged.
+
+ let encoded_data = encode(&[prev_l1_batch_info, batches_arg, proof_input]);
+ let commit_data = [[SUPPORTED_ENCODING_VERSION].to_vec(), encoded_data]
+ .concat()
+ .to_vec();
- vec![prev_l1_batch, batches_arg, proof_input]
+ vec![
+ Token::Uint((self.prev_l1_batch.header.number.0 + 1).into()),
+ Token::Uint(
+ (self.prev_l1_batch.header.number.0 + self.l1_batches.len() as u32).into(),
+ ),
+ Token::Bytes(commit_data),
+ ]
} else {
+ let encoded_data = encode(&[prev_l1_batch_info, batches_arg, Token::Array(vec![])]);
+ let commit_data = [[SUPPORTED_ENCODING_VERSION].to_vec(), encoded_data]
+ .concat()
+ .to_vec();
+
vec![
- prev_l1_batch,
- batches_arg,
- Token::Tuple(vec![Token::Array(vec![]), Token::Array(vec![])]),
+ Token::Uint((self.prev_l1_batch.header.number.0 + 1).into()),
+ Token::Uint(
+ (self.prev_l1_batch.header.number.0 + self.l1_batches.len() as u32).into(),
+ ),
+ Token::Bytes(commit_data),
]
}
}
diff --git a/core/lib/l1_contract_interface/src/i_executor/structures/commit_batch_info.rs b/core/lib/l1_contract_interface/src/i_executor/structures/commit_batch_info.rs
index 58d6ca8363f3..f51f2244527e 100644
--- a/core/lib/l1_contract_interface/src/i_executor/structures/commit_batch_info.rs
+++ b/core/lib/l1_contract_interface/src/i_executor/structures/commit_batch_info.rs
@@ -5,7 +5,7 @@ use zksync_types::{
pre_boojum_serialize_commitments, serialize_commitments, L1BatchCommitmentMode,
L1BatchWithMetadata,
},
- ethabi::Token,
+ ethabi::{ParamType, Token},
pubdata_da::PubdataDA,
web3::{contract::Error as ContractError, keccak256},
ProtocolVersionId, H256, U256,
@@ -42,6 +42,21 @@ impl<'a> CommitBatchInfo<'a> {
}
}
+ pub fn schema() -> ParamType {
+ ParamType::Tuple(vec![
+ ParamType::Uint(64), // `batch_number`
+ ParamType::Uint(64), // `timestamp`
+ ParamType::Uint(64), // `index_repeated_storage_changes`
+ ParamType::FixedBytes(32), // `new_state_root`
+ ParamType::Uint(256), // `numberOfLayer1Txs`
+ ParamType::FixedBytes(32), // `priorityOperationsHash`
+ ParamType::FixedBytes(32), // `bootloaderHeapInitialContentsHash`
+ ParamType::FixedBytes(32), // `eventsQueueStateHash`
+ ParamType::Bytes, // `systemLogs`
+ ParamType::Bytes, // `operatorDAInput`
+ ])
+ }
+
fn base_tokens(&self) -> Vec {
if self
.l1_batch_with_metadata
diff --git a/core/lib/l1_contract_interface/src/i_executor/structures/mod.rs b/core/lib/l1_contract_interface/src/i_executor/structures/mod.rs
index d1ed57e41f2e..b6d2eefac300 100644
--- a/core/lib/l1_contract_interface/src/i_executor/structures/mod.rs
+++ b/core/lib/l1_contract_interface/src/i_executor/structures/mod.rs
@@ -2,5 +2,6 @@
mod commit_batch_info;
mod stored_batch_info;
+pub const SUPPORTED_ENCODING_VERSION: u8 = 0;
pub use self::{commit_batch_info::CommitBatchInfo, stored_batch_info::StoredBatchInfo};
diff --git a/core/lib/l1_contract_interface/src/i_executor/structures/stored_batch_info.rs b/core/lib/l1_contract_interface/src/i_executor/structures/stored_batch_info.rs
index 8373c46e36bb..18b28f34c29f 100644
--- a/core/lib/l1_contract_interface/src/i_executor/structures/stored_batch_info.rs
+++ b/core/lib/l1_contract_interface/src/i_executor/structures/stored_batch_info.rs
@@ -1,6 +1,6 @@
use zksync_types::{
commitment::L1BatchWithMetadata,
- ethabi::{self, Token},
+ ethabi::{self, ParamType, Token},
web3,
web3::contract::Error as ContractError,
H256, U256,
@@ -28,6 +28,19 @@ impl StoredBatchInfo {
.clone()
.into_token()])))
}
+
+ pub fn schema() -> ParamType {
+ ParamType::Tuple(vec![
+ ParamType::Uint(64), // `batch_number`
+ ParamType::FixedBytes(32), // `batch_hash`
+ ParamType::Uint(64), // `index_repeated_storage_changes`
+ ParamType::Uint(256), // `number_of_layer1_txs`
+ ParamType::FixedBytes(32), // `priority_operations_hash`
+ ParamType::FixedBytes(32), // `l2_logs_tree_root`
+ ParamType::Uint(256), // `timestamp`
+ ParamType::FixedBytes(32), // `commitment`
+ ])
+ }
}
impl From<&L1BatchWithMetadata> for StoredBatchInfo {
diff --git a/core/lib/multivm/src/versions/vm_latest/tests/l1_messenger.rs b/core/lib/multivm/src/versions/vm_latest/tests/l1_messenger.rs
index 3463ac1301bd..7f79f46dbe83 100644
--- a/core/lib/multivm/src/versions/vm_latest/tests/l1_messenger.rs
+++ b/core/lib/multivm/src/versions/vm_latest/tests/l1_messenger.rs
@@ -20,8 +20,8 @@ use crate::{
},
};
-pub(crate) const L2_DA_VALIDATOR_OUTPUT_HASH_KEY: usize = 7;
-pub(crate) const USED_L2_DA_VALIDATOR_ADDRESS_KEY: usize = 8;
+pub(crate) const L2_DA_VALIDATOR_OUTPUT_HASH_KEY: usize = 5;
+pub(crate) const USED_L2_DA_VALIDATOR_ADDRESS_KEY: usize = 6;
pub(crate) fn encoded_uncompressed_state_diffs(input: &PubdataInput) -> Vec {
let mut result = vec![];
diff --git a/core/lib/protobuf_config/src/contracts.rs b/core/lib/protobuf_config/src/contracts.rs
index 1f62fb166b0b..a022c9aa1a1a 100644
--- a/core/lib/protobuf_config/src/contracts.rs
+++ b/core/lib/protobuf_config/src/contracts.rs
@@ -76,6 +76,12 @@ impl ProtoRepr for proto::Contracts {
.map(|x| parse_h160(x))
.transpose()
.context("l2_shared_bridge_addr")?,
+ l2_legacy_shared_bridge_addr: l2
+ .l2_legacy_shared_bridge_addr
+ .as_ref()
+ .map(|x| parse_h160(x))
+ .transpose()
+ .context("l2_legacy_shared_bridge_addr")?,
l1_weth_bridge_proxy_addr: weth_bridge
.as_ref()
.and_then(|bridge| bridge.l1_address.as_ref().map(|x| parse_h160(x)))
@@ -170,6 +176,9 @@ impl ProtoRepr for proto::Contracts {
.l2_native_token_vault_proxy_addr
.map(|a| format!("{:?}", a)),
l2_da_validator_addr: this.l2_da_validator_addr.map(|a| format!("{:?}", a)),
+ l2_legacy_shared_bridge_addr: this
+ .l2_legacy_shared_bridge_addr
+ .map(|a| format!("{:?}", a)),
}),
bridges: Some(proto::Bridges {
shared: Some(proto::Bridge {
diff --git a/core/lib/protobuf_config/src/proto/config/contracts.proto b/core/lib/protobuf_config/src/proto/config/contracts.proto
index 7b478598bc64..63e5eb1a3e9b 100644
--- a/core/lib/protobuf_config/src/proto/config/contracts.proto
+++ b/core/lib/protobuf_config/src/proto/config/contracts.proto
@@ -23,6 +23,7 @@ message L2 {
optional string testnet_paymaster_addr = 1; // optional; H160
optional string l2_native_token_vault_proxy_addr = 2; // optional; H160
optional string l2_da_validator_addr = 3; // optional; H160
+ optional string l2_legacy_shared_bridge_addr = 4; // optional; H160
}
message Bridge {
diff --git a/core/lib/types/src/system_contracts.rs b/core/lib/types/src/system_contracts.rs
index 65df071521b4..4caf81fd0cf4 100644
--- a/core/lib/types/src/system_contracts.rs
+++ b/core/lib/types/src/system_contracts.rs
@@ -189,13 +189,13 @@ static SYSTEM_CONTRACT_LIST: [(&str, &str, Address, ContractLanguage); 30] = [
ContractLanguage::Sol,
),
(
- "../../../l2-contracts/artifacts-zk/contracts/bridge/",
+ "../../../l1-contracts/artifacts-zk/contracts/bridge/asset-router/",
"L2AssetRouter",
L2_ASSET_ROUTER_ADDRESS,
ContractLanguage::Sol,
),
(
- "../../../l2-contracts/artifacts-zk/contracts/bridge/",
+ "../../../l1-contracts/artifacts-zk/contracts/bridge/ntv/",
"L2NativeTokenVault",
L2_NATIVE_TOKEN_VAULT_ADDRESS,
ContractLanguage::Sol,
diff --git a/core/lib/web3_decl/src/namespaces/zks.rs b/core/lib/web3_decl/src/namespaces/zks.rs
index edd11db290db..4ef3310368a8 100644
--- a/core/lib/web3_decl/src/namespaces/zks.rs
+++ b/core/lib/web3_decl/src/namespaces/zks.rs
@@ -55,6 +55,9 @@ pub trait ZksNamespace {
#[method(name = "getNativeTokenVault")]
async fn get_native_token_vault_proxy_addr(&self) -> RpcResult