Skip to content

Commit 03a7a8d

Browse files
chore: move to alloy pt6 (#2004)
1 parent 9de7f30 commit 03a7a8d

File tree

5 files changed

+3
-116
lines changed

5 files changed

+3
-116
lines changed

Cargo.lock

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

Cargo.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ rust_decimal = "=1.36.0"
3737
rustc-hash = "=2.0.0"
3838
smallvec = "=1.13.2"
3939
static_assertions = "=1.1.0"
40-
strum = "=0.26.2"
40+
strum = { version = "=0.26.2", features = ["derive"] }
4141
quick_cache = "=0.6.9"
4242
sugars = "=3.0.1"
4343
thiserror = "=1.0.61"
@@ -75,7 +75,6 @@ futures-channel = "=0.3.31"
7575
# ethereum / rpc
7676
ethabi = "=18.0.0"
7777
ethereum-types = "=0.14.1"
78-
ethers-core = "=2.0.14"
7978
keccak-hasher = "=0.15.3" # this version must be compatible with triehash
8079
rlp = "=0.5.2"
8180
triehash = "=0.8.4"

src/alias.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,6 @@ pub type AlloyConsensusHeader = alloy_consensus::Header;
3030
pub type AlloyHeader = alloy_rpc_types_eth::Header;
3131
pub type AlloyUint256 = alloy_primitives::Uint<256, 4>;
3232

33-
// -----------------------------------------------------------------------------
34-
// Ethers
35-
// -----------------------------------------------------------------------------
36-
pub type EthersBytes = ethers_core::types::Bytes;
37-
3833
// -----------------------------------------------------------------------------
3934
// REVM
4035
// -----------------------------------------------------------------------------

src/eth/primitives/bytes.rs

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ use std::ops::DerefMut;
44

55
use display_json::DebugAsJson;
66

7-
use crate::alias::EthersBytes;
87
use crate::alias::RevmBytes;
98
use crate::alias::RevmOutput;
109
use crate::gen_newtype_from;
@@ -55,12 +54,6 @@ impl<'de> serde::Deserialize<'de> for Bytes {
5554
// -----------------------------------------------------------------------------
5655
gen_newtype_from!(self = Bytes, other = Vec<u8>, &[u8], [u8; 32]);
5756

58-
impl From<EthersBytes> for Bytes {
59-
fn from(value: EthersBytes) -> Self {
60-
Self(value.0.into())
61-
}
62-
}
63-
6457
impl From<RevmBytes> for Bytes {
6558
fn from(value: RevmBytes) -> Self {
6659
Self(value.0.into())
@@ -99,12 +92,6 @@ impl DerefMut for Bytes {
9992
}
10093
}
10194

102-
impl From<Bytes> for EthersBytes {
103-
fn from(value: Bytes) -> Self {
104-
value.0.into()
105-
}
106-
}
107-
10895
impl From<Bytes> for RevmBytes {
10996
fn from(value: Bytes) -> Self {
11097
value.0.into()

src/infra/blockchain_client/blockchain_client.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ use jsonrpsee::ws_client::WsClientBuilder;
1212
use tokio::sync::RwLock;
1313
use tokio::sync::RwLockReadGuard;
1414

15+
use crate::alias::AlloyBytes;
1516
use crate::alias::AlloyTransaction;
16-
use crate::alias::EthersBytes;
1717
use crate::alias::JsonValue;
1818
use crate::eth::primitives::Address;
1919
use crate::eth::primitives::BlockNumber;
@@ -215,7 +215,7 @@ impl BlockchainClient {
215215
// -------------------------------------------------------------------------
216216

217217
/// Forwards a transaction to leader.
218-
pub async fn send_raw_transaction_to_leader(&self, tx: EthersBytes, rpc_client: &RpcClientApp) -> Result<Hash, StratusError> {
218+
pub async fn send_raw_transaction_to_leader(&self, tx: AlloyBytes, rpc_client: &RpcClientApp) -> Result<Hash, StratusError> {
219219
tracing::debug!("sending raw transaction to leader");
220220

221221
let tx = to_json_value(tx);

0 commit comments

Comments
 (0)