mirror of
https://github.com/serai-dex/serai.git
synced 2025-12-08 12:19:24 +00:00
Update serai-ethereum-processor to compile
This commit is contained in:
@@ -8,10 +8,9 @@ static ALLOCATOR: zalloc::ZeroizingAlloc<std::alloc::System> =
|
||||
|
||||
use std::sync::Arc;
|
||||
|
||||
use alloy_core::primitives::U256;
|
||||
use alloy_simple_request_transport::SimpleRequest;
|
||||
use alloy_rpc_client::ClientBuilder;
|
||||
use alloy_provider::{Provider, RootProvider};
|
||||
use alloy_provider::RootProvider;
|
||||
|
||||
use serai_client::validator_sets::primitives::Session;
|
||||
|
||||
@@ -63,20 +62,10 @@ async fn main() {
|
||||
ClientBuilder::default().transport(SimpleRequest::new(bin::url()), true),
|
||||
));
|
||||
|
||||
let chain_id = loop {
|
||||
match provider.get_chain_id().await {
|
||||
Ok(chain_id) => break U256::try_from(chain_id).unwrap(),
|
||||
Err(e) => {
|
||||
log::error!("couldn't connect to the Ethereum node for the chain ID: {e:?}");
|
||||
tokio::time::sleep(core::time::Duration::from_secs(5)).await;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
bin::main_loop::<SetInitialKey, _, KeyGenParams, _>(
|
||||
db.clone(),
|
||||
Rpc { db: db.clone(), provider: provider.clone() },
|
||||
Scheduler::<bin::Db>::new(SmartContract { chain_id }),
|
||||
Scheduler::<bin::Db>::new(SmartContract),
|
||||
TransactionPublisher::new(db, provider, {
|
||||
let relayer_hostname = env::var("ETHEREUM_RELAYER_HOSTNAME")
|
||||
.expect("ethereum relayer hostname wasn't specified")
|
||||
|
||||
Reference in New Issue
Block a user