diff --git a/crates/da-clients/ethereum/src/config.rs b/crates/da-clients/ethereum/src/config.rs index 807c0492..c5d9b4fb 100644 --- a/crates/da-clients/ethereum/src/config.rs +++ b/crates/da-clients/ethereum/src/config.rs @@ -1,13 +1,13 @@ -use std::{env, path::Path}; use std::str::FromStr; +use std::{env, path::Path}; +use alloy::signers::wallet::LocalWallet; use alloy::{network::Ethereum, providers::ProviderBuilder, rpc::client::RpcClient}; +use async_trait::async_trait; use c_kzg::KzgSettings; use da_client_interface::DaConfig; use url::Url; use utils::env_utils::get_env_var_or_panic; -use async_trait::async_trait; -use alloy::signers::wallet::LocalWallet; use crate::EthereumDaClient; @@ -26,9 +26,10 @@ impl DaConfig for EthereumDaConfig { memory_pages_contract: get_env_var_or_panic("MEMORY_PAGES_CONTRACT_ADDRESS"), private_key: get_env_var_or_panic("PRIVATE_KEY"), } - } - async fn build_client(&self) -> EthereumDaClient{ - let client = RpcClient::new_http(Url::from_str(self.rpc_url.as_str()).expect("Failed to parse ETHEREUM_RPC_URL")); + } + async fn build_client(&self) -> EthereumDaClient { + let client = + RpcClient::new_http(Url::from_str(self.rpc_url.as_str()).expect("Failed to parse ETHEREUM_RPC_URL")); let provider = ProviderBuilder::<_, Ethereum>::new().on_client(client); let wallet: LocalWallet = env::var("PK").expect("PK must be set").parse().expect("issue while parsing"); // let wallet: LocalWallet = config.private_key.as_str().parse();