Skip to content

Commit 6a7d622

Browse files
committed
Revert "Revive provider methods on ParentChain."
This reverts commit 3d58117.
1 parent 633ad0f commit 6a7d622

File tree

5 files changed

+5
-21
lines changed

5 files changed

+5
-21
lines changed

Cargo.lock

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

timeboost-config/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ secp256k1 = { workspace = true }
1818
serde = { workspace = true }
1919
thiserror = { workspace = true }
2020
timeboost-crypto = { path = "../timeboost-crypto" }
21-
timeboost-types = { path = "../timeboost-types" }
2221
tokio = { workspace = true }
2322
toml = { workspace = true }
2423
tracing = { workspace = true }

timeboost-config/src/chain.rs

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
1+
use alloy::eips::BlockNumberOrTag;
12
use alloy::primitives::Address;
2-
use alloy::providers::ProviderBuilder;
3-
use alloy::{eips::BlockNumberOrTag, network::EthereumWallet};
43
use bon::Builder;
54
use serde::{Deserialize, Serialize};
6-
use timeboost_types::{HttpProvider, HttpProviderWithWallet};
75
use url::Url;
86

97
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, Builder)]
@@ -20,15 +18,3 @@ pub struct ParentChain {
2018
pub block_tag: BlockNumberOrTag,
2119
pub key_manager_contract: Address,
2220
}
23-
24-
impl ParentChain {
25-
pub fn provider(&self) -> HttpProvider {
26-
ProviderBuilder::new().connect_http(self.rpc_url.clone())
27-
}
28-
29-
pub fn provider_with_wallet(&self, wallet: EthereumWallet) -> HttpProviderWithWallet {
30-
ProviderBuilder::new()
31-
.wallet(wallet)
32-
.connect_http(self.rpc_url.clone())
33-
}
34-
}

timeboost/src/binaries/sailfish.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use std::{iter::repeat_with, path::PathBuf, sync::Arc, time::Duration};
22

33
use ::metrics::prometheus::PrometheusMetrics;
4-
use alloy::providers::Provider;
4+
use alloy::providers::{Provider, ProviderBuilder};
55
use anyhow::{Context, Result};
66
use cliquenet::{Network, NetworkMetrics, Overlay};
77
use committable::{Commitment, Committable, RawCommitmentBuilder};
@@ -91,7 +91,7 @@ async fn main() -> Result<()> {
9191
let dh_keypair = x25519::Keypair::from(config.keys.dh.secret.clone());
9292

9393
// syncing with contract to get peers keys and network addresses
94-
let provider = config.chain.parent.provider();
94+
let provider = ProviderBuilder::new().connect_http(config.chain.parent.rpc_url);
9595
assert_eq!(
9696
provider.get_chain_id().await?,
9797
config.chain.parent.id,

timeboost/src/binaries/timeboost.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use std::path::PathBuf;
22

3-
use alloy::providers::Provider;
3+
use alloy::providers::{Provider, ProviderBuilder};
44
use anyhow::{Context, Result, bail};
55
use cliquenet::AddressableCommittee;
66
use multisig::CommitteeId;
@@ -108,7 +108,7 @@ async fn main() -> Result<()> {
108108
let dh_keypair = x25519::Keypair::from(node_config.keys.dh.secret.clone());
109109

110110
// syncing with contract to get peers keys and network addresses
111-
let provider = node_config.chain.parent.provider();
111+
let provider = ProviderBuilder::new().connect_http(node_config.chain.parent.rpc_url.clone());
112112
assert_eq!(
113113
provider.get_chain_id().await?,
114114
node_config.chain.parent.id,

0 commit comments

Comments
 (0)