pub fn add_chain_config(&mut self, config: &ExplorerChainConfig) {
        // Replace if config with the same network name already exists
        if let Some(index) = self
            .environment_config
            .networks
            .iter()
            .position(|c| c.name == config.name)
        {
            self.environment_config.networks[index] = config.clone();
            return;
        }
        self.environment_config.networks.push(config.clone());
    }
Adds or updates a given chain configuration.
zkstack_cli/crates/config/src/explorer.rs