From 8babf5826511bc4d078d337172015171c215dd08 Mon Sep 17 00:00:00 2001 From: Ranadeep Biswas Date: Fri, 22 Nov 2024 17:46:49 +0100 Subject: [PATCH] fix env --- src/tests/network/env.rs | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/src/tests/network/env.rs b/src/tests/network/env.rs index cdf90aa..90a3f12 100644 --- a/src/tests/network/env.rs +++ b/src/tests/network/env.rs @@ -11,10 +11,23 @@ impl EthereumNetwork for EnvNetwork { fn network_config(&self) -> EthereumConfig { EthereumConfig { - el_socket: env!("EL_SOCKET").parse().unwrap(), - cl_socket: Some(env!("CL_SOCKET").parse().unwrap()), - mnemonics: vec![env!("MNEMONIC").to_string()], - block_time: env!("BLOCK_TIME").parse().unwrap(), + el_socket: std::env::var("EL_SOCKET") + .expect("missing EL_SOCKET") + .parse() + .unwrap(), + cl_socket: Some( + std::env::var("CL_SOCKET") + .expect("missing CL_SOCKET") + .parse() + .unwrap(), + ), + mnemonics: vec![std::env::var("MNEMONIC") + .expect("missing MNEMONIC") + .to_string()], + block_time: std::env::var("BLOCK_TIME") + .expect("missing BLOCK_TIME") + .parse() + .unwrap(), } }