Skip to content

Commit 5b9221e

Browse files
committed
rename file
Signed-off-by: Danil <[email protected]>
1 parent 83bbc32 commit 5b9221e

File tree

3 files changed

+8
-29
lines changed

3 files changed

+8
-29
lines changed

zkstack_cli/crates/config/src/forge_interface/gateway_vote_preparation/input.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,9 @@ impl GatewayVotePreparationConfig {
6767
max_number_of_chains: U256::from(initial_deployment_config.max_number_of_chains),
6868
create2_factory_salt: initial_deployment_config.create2_factory_salt,
6969
create2_factory_addr: initial_deployment_config.create2_factory_addr,
70-
// FIX ME set correct value
71-
validator_timelock_execution_delay: U256::from(100),
70+
validator_timelock_execution_delay: U256::from(
71+
initial_deployment_config.validator_timelock_execution_delay,
72+
),
7273
genesis_root: H256::from_str(&genesis_input.genesis_root_hash()?)?,
7374
genesis_rollup_leaf_index: U256::from(genesis_input.rollup_last_leaf_index()?),
7475
genesis_batch_commitment: H256::from_str(&genesis_input.genesis_commitment()?)?,

zkstack_cli/crates/zkstack/src/commands/chain/build_transactions.rs

Lines changed: 4 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
use std::path::PathBuf;
2-
31
use anyhow::Context;
42
use ethers::utils::hex::ToHexExt;
53
use xshell::Shell;
@@ -19,7 +17,7 @@ use crate::{
1917
};
2018

2119
pub const REGISTER_CHAIN_TXNS_FILE_SRC: &str =
22-
"l1-contracts/broadcast/RegisterZKChain.s.sol/9/dry-run/";
20+
"l1-contracts/broadcast/RegisterZKChain.s.sol/9/dry-run/522bb704-latest.json";
2321
pub const REGISTER_CHAIN_TXNS_FILE_DST: &str = "register-zk-chain-txns.json";
2422

2523
const SCRIPT_CONFIG_FILE_SRC: &str = "l1-contracts/script-config/register-zk-chain.toml";
@@ -78,13 +76,9 @@ pub(crate) async fn run(args: BuildTransactionsArgs, shell: &Shell) -> anyhow::R
7876
.context(MSG_CHAIN_TXN_OUT_PATH_INVALID_ERR)?;
7977

8078
shell.copy_file(
81-
find_file(
82-
config
83-
.contracts_path_for_ctm(vm_option)
84-
.join(REGISTER_CHAIN_TXNS_FILE_SRC),
85-
"latest",
86-
)
87-
.expect("Failed to find register chain transactions file"),
79+
config
80+
.contracts_path_for_ctm(vm_option)
81+
.join(REGISTER_CHAIN_TXNS_FILE_SRC),
8882
args.out.join(REGISTER_CHAIN_TXNS_FILE_DST),
8983
)?;
9084

@@ -99,19 +93,3 @@ pub(crate) async fn run(args: BuildTransactionsArgs, shell: &Shell) -> anyhow::R
9993
logger::success(MSG_CHAIN_TRANSACTIONS_BUILT);
10094
Ok(())
10195
}
102-
103-
fn find_file(path: PathBuf, partial_name: &str) -> Option<PathBuf> {
104-
let entries = std::fs::read_dir(path).ok()?;
105-
106-
for entry in entries {
107-
let entry = entry.ok()?;
108-
let file_name = entry.file_name();
109-
let file_name_str = file_name.to_string_lossy();
110-
111-
if file_name_str.contains(partial_name) {
112-
return Some(entry.path());
113-
}
114-
}
115-
116-
None
117-
}

0 commit comments

Comments
 (0)