Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
apoorvsadana committed Aug 18, 2024
1 parent ca51313 commit f54fb3e
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 20 deletions.
1 change: 0 additions & 1 deletion .env.test
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ MONGODB_CONNECTION_STRING="mongodb://localhost:27017"


# Ethereum Settlement
DEFAULT_SETTLEMENT_CLIENT_RPC="http://localhost:8545"
DEFAULT_L1_CORE_CONTRACT_ADDRESS="0xc662c410C0ECf747543f5bA90660f6ABeBD9C8c4"
SHOULD_IMPERSONATE_ACCOUNT="true"
TEST_DUMMY_CONTRACT_ADDRESS="0xE5b6F5e695BA6E4aeD92B68c4CC8Df1160D69A81"
5 changes: 1 addition & 4 deletions crates/settlement-clients/ethereum/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,9 @@ use alloy::{
signers::local::PrivateKeySigner,
};

// use eyre::Result;
use alloy::eips::eip2930::AccessList;
use alloy::eips::eip4844::BYTES_PER_BLOB;
use alloy::hex;
use alloy::providers::ext::AnvilApi;
// use alloy::node_bindings::Anvil;
use alloy::rpc::types::TransactionRequest;
use alloy_primitives::Bytes;
use async_trait::async_trait;
Expand All @@ -30,6 +27,7 @@ use mockall::{automock, lazy_static, predicate::*};
use alloy::providers::ProviderBuilder;
use conversion::{get_input_data_for_eip_4844, prepare_sidecar};
use settlement_client_interface::{SettlementClient, SettlementVerificationStatus, SETTLEMENT_SETTINGS_NAME};
#[cfg(test)]
use url::Url;
use utils::{env_utils::get_env_var_or_panic, settings::SettingsProvider};

Expand Down Expand Up @@ -297,7 +295,6 @@ impl SettlementClient for EthereumSettlementClient {
mod test_config {
use super::*;
use alloy::network::TransactionBuilder;
use tests::STARKNET_OPERATOR_ADDRESS;

pub async fn configure_transaction(
provider: Arc<RootProvider<Http<Client>>>,
Expand Down
11 changes: 2 additions & 9 deletions crates/settlement-clients/ethereum/src/tests/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ use tokio::time::sleep;
use utils::env_utils::get_env_var_or_panic;

use settlement_client_interface::SettlementClient;
use utils::settings::default::DefaultSettingsProvider;

use crate::conversion::to_padded_hex;
use crate::EthereumSettlementClient;
Expand Down Expand Up @@ -74,19 +73,13 @@ sol! {
}
}

pub struct TestSetup {
pub anvil: AnvilInstance,
pub ethereum_settlement_client: EthereumSettlementClient,
pub provider: alloy::providers::RootProvider<alloy::transports::http::Http<reqwest::Client>>,
}

struct EthereumTestBuilder {
fork_block: Option<u64>,
impersonator: Option<Address>,
}

struct EthereumTest {
anvil: AnvilInstance,
_anvil: AnvilInstance,
provider: alloy::providers::RootProvider<alloy::transports::http::Http<reqwest::Client>>,
rpc_url: Url,
}
Expand Down Expand Up @@ -127,7 +120,7 @@ impl EthereumTestBuilder {

let rpc_url = anvil.endpoint_url();

EthereumTest { anvil, provider, rpc_url }
EthereumTest { _anvil: anvil, provider, rpc_url }
}
}

Expand Down
6 changes: 0 additions & 6 deletions crates/settlement-clients/starknet/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -127,12 +127,6 @@ impl SettlementClient for StarknetSettlementClient {
Ok(format!("0x{:x}", invoke_result.transaction_hash))
}

/// Should be used to update state on core contract when DA is in blobs/alt DA
#[allow(unused)]
async fn update_state_blobs(&self, program_output: Vec<[u8; 32]>, kzg_proof: [u8; 48]) -> Result<String> {
!unimplemented!("not available for starknet settlement layer")
}

/// Should verify the inclusion of a tx in the settlement layer
async fn verify_tx_inclusion(&self, tx_hash: &str) -> Result<SettlementVerificationStatus> {
let tx_hash = FieldElement::from_hex_be(tx_hash)?;
Expand Down

0 comments on commit f54fb3e

Please sign in to comment.