Skip to content
This repository was archived by the owner on Mar 26, 2025. It is now read-only.

Commit 6d8db02

Browse files
authored
dep: bump alloy to 0.3.6, fix breaking changes (#43)
* dep: bump alloy to 0.3.6, fix breaking changes * chore: fmt
1 parent f2f38ca commit 6d8db02

File tree

14 files changed

+59
-83
lines changed

14 files changed

+59
-83
lines changed

Cargo.toml

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ members = [ "crates/*" ]
33
resolver = "2"
44

55
[workspace.package]
6-
version = "0.7.3"
6+
version = "0.8.0"
77
edition = "2021"
88
rust-version = "1.76"
99
authors = ["Zenith Contributors"]
@@ -16,21 +16,8 @@ alloy-primitives = { version = "0.8", features = ["serde", "tiny-keccak"] }
1616
alloy-sol-types = { version = "0.8", features = ["json"] }
1717
alloy-rlp = { version = "0.3.4" }
1818

19-
alloy-contract = { version = "0.3", default-features = false }
20-
alloy-consensus = { version = "0.3", default-features = false, features = ["k256", "kzg"] }
21-
alloy-eips = { version = "0.3", default-features = false}
22-
alloy-json-rpc = { version = "0.3", default-features = false }
23-
alloy-network = { version = "0.3", default-features = false }
24-
alloy-node-bindings = { version = "0.3", default-features = false }
25-
alloy-provider = { version = "0.3", default-features = false, features = ["ws"] }
26-
alloy-rpc-types = { version = "0.3", default-features = false }
27-
alloy-rpc-types-eth = { version = "0.3", default-features = false }
28-
alloy-rpc-client = { version = "0.3", default-features = false }
29-
alloy-signer = { version = "0.3", default-features = false }
30-
alloy-signer-local = { version = "0.3", default-features = false }
31-
alloy-signer-aws = { version = "0.3", default-features = false }
32-
alloy-transport = { version = "0.3", default-features = false }
33-
alloy-transport-http = { version = "0.3", default-features = false }
19+
alloy = { version = "=0.3.6", features = ["full", "json-rpc", "signer-aws"] }
20+
alloy-contract = { version = "=0.3.6", features = ["pubsub"] }
3421

3522
aws-config = "1.1.7"
3623
aws-sdk-kms = "1.15.0"

crates/builder/Cargo.toml

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -25,20 +25,7 @@ alloy-primitives.workspace = true
2525
alloy-rlp.workspace = true
2626
alloy-sol-types.workspace = true
2727

28-
alloy-contract.workspace = true
29-
alloy-consensus.workspace = true
30-
alloy-json-rpc.workspace = true
31-
alloy-network.workspace = true
32-
alloy-node-bindings.workspace = true
33-
alloy-provider.workspace = true
34-
alloy-rpc-types.workspace = true
35-
alloy-rpc-types-eth.workspace = true
36-
alloy-rpc-client.workspace = true
37-
alloy-signer.workspace = true
38-
alloy-signer-local.workspace = true
39-
alloy-signer-aws.workspace = true
40-
alloy-transport.workspace = true
41-
alloy-transport-http.workspace = true
28+
alloy.workspace = true
4229

4330
aws-sdk-kms.workspace = true
4431
aws-config.workspace = true

crates/builder/src/config.rs

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
use crate::signer::{LocalOrAws, SignerError};
2-
use alloy_network::{Ethereum, EthereumWallet};
3-
use alloy_primitives::Address;
4-
use alloy_provider::{
2+
use alloy::network::{Ethereum, EthereumWallet};
3+
use alloy::providers::fillers::BlobGasFiller;
4+
use alloy::providers::{
55
fillers::{ChainIdFiller, FillProvider, GasFiller, JoinFill, NonceFiller, WalletFiller},
66
Identity, ProviderBuilder, RootProvider,
77
};
8-
use alloy_transport::BoxTransport;
8+
use alloy::transports::BoxTransport;
9+
use alloy_primitives::Address;
910
use std::{borrow::Cow, env, num, str::FromStr};
1011
use zenith_types::Zenith;
1112

@@ -81,7 +82,7 @@ pub enum ConfigError {
8182
Hex(#[from] hex::FromHexError),
8283
/// Error connecting to the provider
8384
#[error("failed to connect to provider: {0}")]
84-
Provider(#[from] alloy_transport::TransportError),
85+
Provider(#[from] alloy::transports::TransportError),
8586
/// Error connecting to the signer
8687
#[error("failed to connect to signer: {0}")]
8788
Signer(#[from] SignerError),
@@ -97,7 +98,10 @@ impl ConfigError {
9798
/// Provider type used by this transaction
9899
pub type Provider = FillProvider<
99100
JoinFill<
100-
JoinFill<JoinFill<JoinFill<Identity, GasFiller>, NonceFiller>, ChainIdFiller>,
101+
JoinFill<
102+
Identity,
103+
JoinFill<GasFiller, JoinFill<BlobGasFiller, JoinFill<NonceFiller, ChainIdFiller>>>,
104+
>,
101105
WalletFiller<EthereumWallet>,
102106
>,
103107
RootProvider<BoxTransport>,

crates/builder/src/service.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
use std::{fmt::Debug, net::SocketAddr};
22

3-
use alloy_consensus::TxEnvelope;
4-
use alloy_json_rpc::{ErrorPayload, Id};
5-
use alloy_network::eip2718::Decodable2718;
3+
use alloy::consensus::TxEnvelope;
4+
use alloy::network::eip2718::Decodable2718;
5+
use alloy::rpc::json_rpc::{ErrorPayload, Id};
66
use alloy_primitives::B256;
77
use axum::{
88
extract::State,
@@ -121,8 +121,8 @@ pub async fn ingest_rpc_handler(
121121

122122
// MUST be eth_sendRawTransaction method
123123
if method != "eth_sendRawTransaction" {
124-
return Ok(Json(alloy_json_rpc::Response {
125-
payload: alloy_json_rpc::ResponsePayload::<(), ()>::Failure(ErrorPayload {
124+
return Ok(Json(alloy::rpc::json_rpc::Response {
125+
payload: alloy::rpc::json_rpc::ResponsePayload::<(), ()>::Failure(ErrorPayload {
126126
code: -6969,
127127
message: "Method not found".to_string(),
128128
data: None,
@@ -140,8 +140,8 @@ pub async fn ingest_rpc_handler(
140140
let hash = include_tx(state, tx).await?;
141141

142142
// return JSON-RPC response
143-
let resp = alloy_json_rpc::Response {
144-
payload: alloy_json_rpc::ResponsePayload::<_, ()>::Success(hash),
143+
let resp = alloy::rpc::json_rpc::Response {
144+
payload: alloy::rpc::json_rpc::ResponsePayload::<_, ()>::Success(hash),
145145
id,
146146
};
147147

crates/builder/src/signer.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
use alloy_consensus::SignableTransaction;
1+
use alloy::consensus::SignableTransaction;
2+
use alloy::signers::aws::{AwsSigner, AwsSignerError};
3+
use alloy::signers::local::{LocalSignerError, PrivateKeySigner};
4+
use alloy::signers::Signature;
25
use alloy_primitives::{Address, ChainId, B256};
3-
use alloy_signer::Signature;
4-
use alloy_signer_aws::{AwsSigner, AwsSignerError};
5-
use alloy_signer_local::{LocalSignerError, PrivateKeySigner};
66
use aws_config::BehaviorVersion;
77

88
/// Abstraction over local signer or
@@ -55,7 +55,7 @@ impl LocalOrAws {
5555
}
5656

5757
#[async_trait::async_trait]
58-
impl alloy_network::TxSigner<Signature> for LocalOrAws {
58+
impl alloy::network::TxSigner<Signature> for LocalOrAws {
5959
fn address(&self) -> Address {
6060
match self {
6161
LocalOrAws::Local(signer) => signer.address(),
@@ -66,7 +66,7 @@ impl alloy_network::TxSigner<Signature> for LocalOrAws {
6666
async fn sign_transaction(
6767
&self,
6868
tx: &mut dyn SignableTransaction<Signature>,
69-
) -> alloy_signer::Result<Signature> {
69+
) -> alloy::signers::Result<Signature> {
7070
match self {
7171
LocalOrAws::Local(signer) => signer.sign_transaction(tx).await,
7272
LocalOrAws::Aws(signer) => signer.sign_transaction(tx).await,
@@ -75,9 +75,9 @@ impl alloy_network::TxSigner<Signature> for LocalOrAws {
7575
}
7676

7777
#[async_trait::async_trait]
78-
impl alloy_signer::Signer<Signature> for LocalOrAws {
78+
impl alloy::signers::Signer<Signature> for LocalOrAws {
7979
/// Signs the given hash.
80-
async fn sign_hash(&self, hash: &B256) -> alloy_signer::Result<Signature> {
80+
async fn sign_hash(&self, hash: &B256) -> alloy::signers::Result<Signature> {
8181
match self {
8282
LocalOrAws::Local(signer) => signer.sign_hash(hash).await,
8383
LocalOrAws::Aws(signer) => signer.sign_hash(hash).await,

crates/builder/src/tasks/block.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use alloy_consensus::{SidecarBuilder, SidecarCoder, TxEnvelope};
1+
use alloy::consensus::{SidecarBuilder, SidecarCoder, TxEnvelope};
22
use alloy_primitives::{keccak256, Bytes, B256};
33
use std::{sync::OnceLock, time::Duration};
44
use tokio::{select, sync::mpsc, task::JoinHandle};

crates/builder/src/tasks/submit.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
use alloy_consensus::SimpleCoder;
2-
use alloy_network::TransactionBuilder;
1+
use alloy::consensus::SimpleCoder;
2+
use alloy::network::{TransactionBuilder, TransactionBuilder4844};
3+
use alloy::providers::{Provider as _, WalletProvider};
4+
use alloy::rpc::types::eth::TransactionRequest;
5+
use alloy::signers::Signer;
6+
use alloy::sol_types::SolCall;
7+
use alloy::transports::TransportError;
38
use alloy_primitives::{FixedBytes, U256};
4-
use alloy_provider::{Provider as _, WalletProvider};
5-
use alloy_rpc_types_eth::TransactionRequest;
6-
use alloy_signer::Signer;
7-
use alloy_sol_types::SolCall;
8-
use alloy_transport::TransportError;
99
use eyre::{bail, eyre};
1010
use tokio::{sync::mpsc, task::JoinHandle};
1111
use tracing::{debug, error, instrument, trace};

crates/builder/src/tasks/tx_poller.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use std::time::Duration;
22
use std::{collections::HashMap, time};
33

4-
use alloy_consensus::TxEnvelope;
4+
use alloy::consensus::TxEnvelope;
55
use alloy_primitives::TxHash;
66

77
use eyre::Error;

crates/builder/tests/tx_poller_test.rs

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

4-
use alloy_consensus::{SignableTransaction, TxEip1559, TxEnvelope};
4+
use alloy::consensus::{SignableTransaction, TxEip1559, TxEnvelope};
5+
use alloy::signers::{local::PrivateKeySigner, SignerSync};
56
use alloy_primitives::{bytes, Address, TxKind, U256};
6-
use alloy_signer::SignerSync;
7-
use alloy_signer_local::PrivateKeySigner;
87

98
use builder::config::BuilderConfig;
109
use builder::tasks::{block::BlockBuilder, tx_poller};

crates/types/Cargo.toml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,14 @@ repository.workspace = true
1313
[dependencies]
1414
alloy-primitives.workspace = true
1515
alloy-sol-types.workspace = true
16+
alloy-rlp.workspace = true
1617

17-
alloy-consensus.workspace = true
18+
alloy.workspace = true
1819
alloy-contract.workspace = true
19-
alloy-eips.workspace = true
20-
alloy-signer.workspace = true
2120

2221
serde.workspace = true
23-
alloy-rlp.workspace = true
2422

2523
[dev-dependencies]
2624
serde_json = "1.0.116"
27-
alloy-signer-local.workspace = true
25+
alloy.workspace = true
2826
tokio = { version = "1.37.0", features = ["macros"] }

0 commit comments

Comments
 (0)