From fa83edd348b9dd9675b8ae480440dd508b559127 Mon Sep 17 00:00:00 2001 From: Stanislav Breadless Date: Wed, 18 Dec 2024 13:20:10 +0100 Subject: [PATCH] remove unused function --- .../src/commands/chain/gateway_upgrade.rs | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/zkstack_cli/crates/zkstack/src/commands/chain/gateway_upgrade.rs b/zkstack_cli/crates/zkstack/src/commands/chain/gateway_upgrade.rs index 1eb67b4b2a1..453bc0fc182 100644 --- a/zkstack_cli/crates/zkstack/src/commands/chain/gateway_upgrade.rs +++ b/zkstack_cli/crates/zkstack/src/commands/chain/gateway_upgrade.rs @@ -146,23 +146,6 @@ pub fn encode_ntv_asset_id(l1_chain_id: U256, addr: Address) -> H256 { H256(keccak256(&encoded_data)) } -fn replace_in_file(file_path: &str, target: &str, replacement: &str) -> std::io::Result<()> { - // Read the file content - let content = std::fs::read_to_string(file_path)?; - - // Replace all occurrences of the target substring - let modified_content = content.replace(target, replacement); - - // Write the modified content back to the file - let mut file = std::fs::OpenOptions::new() - .write(true) - .truncate(true) // Clear the file before writing - .open(file_path)?; - - file.write_all(modified_content.as_bytes())?; - Ok(()) -} - async fn adapt_config(shell: &Shell, chain_config: ChainConfig) -> anyhow::Result<()> { println!("Adapting config"); let mut contracts_config = chain_config.get_contracts_config()?;