Skip to content

Commit 661c8c8

Browse files
authored
feat(repo): rust 1.85 (#59)
1 parent 4f46318 commit 661c8c8

File tree

11 files changed

+17
-21
lines changed

11 files changed

+17
-21
lines changed

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ name = "zenith-builder-example"
33
version = "0.1.1"
44
description = "Zenith Builder Example"
55

6-
edition = "2021"
7-
rust-version = "1.82"
6+
edition = "2024"
7+
rust-version = "1.85"
88
authors = ["init4"]
99
license = "Apache-2.0 OR MIT"
1010
homepage = "https://github.com/init4tech/builder"

bin/submit_transaction.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ use alloy::{
66
signers::aws::AwsSigner,
77
};
88
use aws_config::BehaviorVersion;
9-
use builder::config::{load_address, load_string, load_u64, load_url, Provider};
9+
use builder::config::{Provider, load_address, load_string, load_u64, load_url};
1010
use init4_bin_base::{
1111
deps::metrics::{counter, histogram},
1212
init4,

src/config.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ use alloy::{
33
network::{Ethereum, EthereumWallet},
44
primitives::Address,
55
providers::{
6+
Identity, ProviderBuilder, RootProvider,
67
fillers::{
78
BlobGasFiller, ChainIdFiller, FillProvider, GasFiller, JoinFill, NonceFiller,
89
WalletFiller,
910
},
10-
Identity, ProviderBuilder, RootProvider,
1111
},
1212
transports::BoxTransport,
1313
};

src/service.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
use std::{fmt::Debug, net::SocketAddr};
22

33
use axum::{
4+
Router,
45
http::StatusCode,
56
response::{IntoResponse, Response},
67
routing::get,
7-
Router,
88
};
99
use tracing::{Instrument, Span};
1010

src/signer.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
use alloy::consensus::SignableTransaction;
2-
use alloy::primitives::{Address, ChainId, B256};
2+
use alloy::primitives::{Address, B256, ChainId};
3+
use alloy::signers::Signature;
34
use alloy::signers::aws::{AwsSigner, AwsSignerError};
45
use alloy::signers::local::{LocalSignerError, PrivateKeySigner};
5-
use alloy::signers::Signature;
66
use aws_config::BehaviorVersion;
77

88
/// Abstraction over local signer or

src/tasks/block.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@ use crate::config::{BuilderConfig, WalletlessProvider};
55
use alloy::{
66
consensus::{SidecarBuilder, SidecarCoder, TxEnvelope},
77
eips::eip2718::Decodable2718,
8-
primitives::{keccak256, Bytes, B256},
8+
primitives::{B256, Bytes, keccak256},
99
providers::Provider as _,
1010
rlp::Buf,
1111
};
1212
use std::time::{SystemTime, UNIX_EPOCH};
1313
use std::{sync::OnceLock, time::Duration};
1414
use tokio::{sync::mpsc, task::JoinHandle};
15-
use tracing::{debug, error, info, trace, Instrument};
16-
use zenith_types::{encode_txns, Alloy2718Coder, ZenithEthBundle};
15+
use tracing::{Instrument, debug, error, info, trace};
16+
use zenith_types::{Alloy2718Coder, ZenithEthBundle, encode_txns};
1717

1818
/// Ethereum's slot time in seconds.
1919
pub const ETHEREUM_SLOT_TIME: u64 = 12;
@@ -267,7 +267,7 @@ mod tests {
267267
use alloy::{
268268
eips::eip2718::Encodable2718,
269269
network::{EthereumWallet, TransactionBuilder},
270-
rpc::types::{mev::EthSendBundle, TransactionRequest},
270+
rpc::types::{TransactionRequest, mev::EthSendBundle},
271271
signers::local::PrivateKeySigner,
272272
};
273273
use zenith_types::ZenithEthBundle;

src/tasks/bundler.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -86,11 +86,7 @@ impl BundlePoller {
8686
.iter()
8787
.filter_map(
8888
|(key, expiry)| {
89-
if expiry.elapsed().is_zero() {
90-
Some(key.clone())
91-
} else {
92-
None
93-
}
89+
if expiry.elapsed().is_zero() { Some(key.clone()) } else { None }
9490
},
9591
)
9692
.collect();

src/tasks/oauth.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ use std::sync::Arc;
44

55
use crate::config::BuilderConfig;
66
use oauth2::{
7+
AuthUrl, ClientId, ClientSecret, EmptyExtraTokenFields, StandardTokenResponse, TokenUrl,
78
basic::{BasicClient, BasicTokenType},
89
reqwest::async_http_client,
9-
AuthUrl, ClientId, ClientSecret, EmptyExtraTokenFields, StandardTokenResponse, TokenUrl,
1010
};
1111
use tokio::{sync::RwLock, task::JoinHandle};
1212

src/tasks/submit.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use crate::{
55
utils::extract_signature_components,
66
};
77
use alloy::{
8-
consensus::{constants::GWEI_TO_WEI, SimpleCoder},
8+
consensus::{SimpleCoder, constants::GWEI_TO_WEI},
99
eips::BlockNumberOrTag,
1010
network::{TransactionBuilder, TransactionBuilder4844},
1111
primitives::{FixedBytes, TxHash, U256},

src/utils.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use alloy::primitives::{PrimitiveSignature, B256};
1+
use alloy::primitives::{B256, PrimitiveSignature};
22

33
/// Extracts the components of a signature.
44
/// Currently alloy has no function for extracting the components of a signature.

tests/tx_poller_test.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ mod tests {
22
use std::str::FromStr;
33

44
use alloy::consensus::{SignableTransaction, TxEip1559, TxEnvelope};
5-
use alloy::primitives::{bytes, Address, TxKind, U256};
6-
use alloy::signers::{local::PrivateKeySigner, SignerSync};
5+
use alloy::primitives::{Address, TxKind, U256, bytes};
6+
use alloy::signers::{SignerSync, local::PrivateKeySigner};
77
use builder::config::BuilderConfig;
88
use builder::tasks::tx_poller;
99
use eyre::{Ok, Result};

0 commit comments

Comments
 (0)