Skip to content

Commit

Permalink
chore: move to alloy pt6 (#2004)
Browse files Browse the repository at this point in the history
  • Loading branch information
gabriel-aranha-cw authored Feb 6, 2025
1 parent 9de7f30 commit 03a7a8d
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 116 deletions.
94 changes: 0 additions & 94 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ rust_decimal = "=1.36.0"
rustc-hash = "=2.0.0"
smallvec = "=1.13.2"
static_assertions = "=1.1.0"
strum = "=0.26.2"
strum = { version = "=0.26.2", features = ["derive"] }
quick_cache = "=0.6.9"
sugars = "=3.0.1"
thiserror = "=1.0.61"
Expand Down Expand Up @@ -75,7 +75,6 @@ futures-channel = "=0.3.31"
# ethereum / rpc
ethabi = "=18.0.0"
ethereum-types = "=0.14.1"
ethers-core = "=2.0.14"
keccak-hasher = "=0.15.3" # this version must be compatible with triehash
rlp = "=0.5.2"
triehash = "=0.8.4"
Expand Down
5 changes: 0 additions & 5 deletions src/alias.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,6 @@ pub type AlloyConsensusHeader = alloy_consensus::Header;
pub type AlloyHeader = alloy_rpc_types_eth::Header;
pub type AlloyUint256 = alloy_primitives::Uint<256, 4>;

// -----------------------------------------------------------------------------
// Ethers
// -----------------------------------------------------------------------------
pub type EthersBytes = ethers_core::types::Bytes;

// -----------------------------------------------------------------------------
// REVM
// -----------------------------------------------------------------------------
Expand Down
13 changes: 0 additions & 13 deletions src/eth/primitives/bytes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ use std::ops::DerefMut;

use display_json::DebugAsJson;

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

impl From<EthersBytes> for Bytes {
fn from(value: EthersBytes) -> Self {
Self(value.0.into())
}
}

impl From<RevmBytes> for Bytes {
fn from(value: RevmBytes) -> Self {
Self(value.0.into())
Expand Down Expand Up @@ -99,12 +92,6 @@ impl DerefMut for Bytes {
}
}

impl From<Bytes> for EthersBytes {
fn from(value: Bytes) -> Self {
value.0.into()
}
}

impl From<Bytes> for RevmBytes {
fn from(value: Bytes) -> Self {
value.0.into()
Expand Down
4 changes: 2 additions & 2 deletions src/infra/blockchain_client/blockchain_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ use jsonrpsee::ws_client::WsClientBuilder;
use tokio::sync::RwLock;
use tokio::sync::RwLockReadGuard;

use crate::alias::AlloyBytes;
use crate::alias::AlloyTransaction;
use crate::alias::EthersBytes;
use crate::alias::JsonValue;
use crate::eth::primitives::Address;
use crate::eth::primitives::BlockNumber;
Expand Down Expand Up @@ -215,7 +215,7 @@ impl BlockchainClient {
// -------------------------------------------------------------------------

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

let tx = to_json_value(tx);
Expand Down

0 comments on commit 03a7a8d

Please sign in to comment.