refactor: phase out alloy-rpc-types usage (#12395)

This commit is contained in:
Hoa Nguyen
2024-11-08 17:36:17 +07:00
committed by GitHub
parent c5ab4243e7
commit f373efe01d
66 changed files with 106 additions and 110 deletions

29
Cargo.lock generated
View File

@ -1168,7 +1168,7 @@ version = "1.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e4fa97bb310c33c811334143cf64c5bb2b7b3c06e453db6b095d7061eff8f113"
dependencies = [
"fastrand 2.1.1",
"fastrand 2.2.0",
"tokio",
]
@ -2896,7 +2896,7 @@ version = "0.0.0"
dependencies = [
"alloy-eips",
"alloy-primitives",
"alloy-rpc-types",
"alloy-rpc-types-eth",
"clap",
"futures-util",
"reth",
@ -2956,7 +2956,7 @@ name = "example-db-access"
version = "0.0.0"
dependencies = [
"alloy-primitives",
"alloy-rpc-types",
"alloy-rpc-types-eth",
"eyre",
"reth-chainspec",
"reth-db",
@ -3115,9 +3115,9 @@ dependencies = [
[[package]]
name = "fastrand"
version = "2.1.1"
version = "2.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e8c02a5121d4ea3eb16a80748c74f5549a5665e4c21333c6098f283870fbdea6"
checksum = "486f806e73c5707928240ddc295403b1b93c96a02038563881c4a2fd84b81ac4"
[[package]]
name = "fastrlp"
@ -6800,8 +6800,8 @@ dependencies = [
"alloy-eips",
"alloy-primitives",
"alloy-provider",
"alloy-rpc-types",
"alloy-rpc-types-engine",
"alloy-rpc-types-eth",
"auto_impl",
"eyre",
"futures",
@ -7051,7 +7051,8 @@ dependencies = [
"alloy-eips",
"alloy-network",
"alloy-primitives",
"alloy-rpc-types",
"alloy-rpc-types-engine",
"alloy-rpc-types-eth",
"alloy-signer",
"alloy-signer-local",
"derive_more 1.0.0",
@ -8324,7 +8325,6 @@ dependencies = [
"alloy-consensus",
"alloy-eips",
"alloy-primitives",
"alloy-rpc-types",
"alloy-rpc-types-eth",
"derive_more 1.0.0",
"jsonrpsee-types",
@ -8623,6 +8623,7 @@ dependencies = [
"alloy-rpc-types-admin",
"alloy-rpc-types-beacon",
"alloy-rpc-types-debug",
"alloy-rpc-types-engine",
"alloy-rpc-types-eth",
"alloy-rpc-types-mev",
"alloy-rpc-types-trace",
@ -8709,7 +8710,6 @@ version = "1.1.1"
dependencies = [
"alloy-eips",
"alloy-primitives",
"alloy-rpc-types",
"alloy-rpc-types-eth",
"alloy-rpc-types-trace",
"futures",
@ -8820,9 +8820,9 @@ dependencies = [
"alloy-json-rpc",
"alloy-network",
"alloy-primitives",
"alloy-rpc-types",
"alloy-rpc-types-eth",
"alloy-rpc-types-mev",
"alloy-serde",
"async-trait",
"auto_impl",
"dyn-clone",
@ -8859,7 +8859,6 @@ dependencies = [
"alloy-consensus",
"alloy-eips",
"alloy-primitives",
"alloy-rpc-types",
"alloy-rpc-types-eth",
"alloy-sol-types",
"derive_more 1.0.0",
@ -8933,9 +8932,9 @@ dependencies = [
"alloy-eips",
"alloy-primitives",
"alloy-rlp",
"alloy-rpc-types",
"alloy-rpc-types-engine",
"alloy-rpc-types-eth",
"alloy-serde",
"reth-primitives",
"reth-trie-common",
"serde",
@ -10429,12 +10428,12 @@ checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369"
[[package]]
name = "tempfile"
version = "3.13.0"
version = "3.14.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f0f2c9fc62d0beef6951ccffd757e241266a2c833136efbe35af6cd2567dca5b"
checksum = "28cce251fcbc87fac86a866eeb0d6c2d536fc16d06f184bb61aeae11aa4cee0c"
dependencies = [
"cfg-if",
"fastrand 2.1.1",
"fastrand 2.2.0",
"once_cell",
"rustix",
"windows-sys 0.59.0",

View File

@ -21,7 +21,7 @@ reth-tracing.workspace = true
alloy-consensus = { workspace = true, features = ["serde"] }
alloy-eips.workspace = true
alloy-provider = { workspace = true, features = ["ws"] }
alloy-rpc-types.workspace = true
alloy-rpc-types-eth.workspace = true
alloy-rpc-types-engine.workspace = true
alloy-primitives.workspace = true

View File

@ -1,8 +1,8 @@
use alloy_consensus::Transaction;
use alloy_eips::eip2718::Encodable2718;
use alloy_primitives::B256;
use alloy_rpc_types::{Block, BlockTransactions};
use alloy_rpc_types_engine::{ExecutionPayloadV1, ExecutionPayloadV2, ExecutionPayloadV3};
use alloy_rpc_types_eth::{Block, BlockTransactions};
use reth_node_api::EngineTypes;
use reth_rpc_builder::auth::AuthServerHandle;
use reth_tracing::tracing::warn;

View File

@ -1,6 +1,6 @@
use crate::BlockProvider;
use alloy_eips::BlockNumberOrTag;
use alloy_rpc_types::Block;
use alloy_rpc_types_eth::Block;
use reqwest::Client;
use reth_tracing::tracing::warn;
use serde::Deserialize;

View File

@ -1,7 +1,7 @@
use crate::BlockProvider;
use alloy_eips::BlockNumberOrTag;
use alloy_provider::{Provider, ProviderBuilder};
use alloy_rpc_types::{Block, BlockTransactionsKind};
use alloy_rpc_types_eth::{Block, BlockTransactionsKind};
use futures::StreamExt;
use tokio::sync::mpsc::Sender;

View File

@ -41,7 +41,8 @@ tokio-stream.workspace = true
serde_json.workspace = true
alloy-signer.workspace = true
alloy-signer-local = { workspace = true, features = ["mnemonic"] }
alloy-rpc-types.workspace = true
alloy-rpc-types-eth.workspace = true
alloy-rpc-types-engine.workspace = true
alloy-network.workspace = true
alloy-consensus = { workspace = true, features = ["kzg"] }
tracing.workspace = true

View File

@ -1,7 +1,7 @@
use std::{marker::PhantomData, pin::Pin};
use alloy_primitives::{BlockHash, BlockNumber, Bytes, B256};
use alloy_rpc_types::BlockNumberOrTag;
use alloy_rpc_types_eth::BlockNumberOrTag;
use eyre::Ok;
use futures_util::Future;
use reth::{

View File

@ -1,4 +1,4 @@
use alloy_rpc_types::engine::ExecutionPayloadEnvelopeV4;
use alloy_rpc_types_engine::ExecutionPayloadEnvelopeV4;
use op_alloy_rpc_types_engine::{OpExecutionPayloadEnvelopeV3, OpExecutionPayloadEnvelopeV4};
use reth::rpc::types::engine::{ExecutionPayloadEnvelopeV3, ExecutionPayloadV3};

View File

@ -4,7 +4,7 @@ use alloy_network::{
eip2718::Encodable2718, Ethereum, EthereumWallet, TransactionBuilder, TransactionBuilder4844,
};
use alloy_primitives::{hex, Address, Bytes, TxKind, B256, U256};
use alloy_rpc_types::{Authorization, TransactionInput, TransactionRequest};
use alloy_rpc_types_eth::{Authorization, TransactionInput, TransactionRequest};
use alloy_signer::SignerSync;
use alloy_signer_local::PrivateKeySigner;
use eyre::Ok;

View File

@ -37,7 +37,6 @@ reth-optimism-forks.workspace = true
alloy-eips.workspace = true
alloy-primitives.workspace = true
alloy-rpc-types-eth.workspace = true
alloy-rpc-types.workspace = true
alloy-consensus.workspace = true
op-alloy-network.workspace = true
op-alloy-rpc-types.workspace = true

View File

@ -1,6 +1,6 @@
//! RPC errors specific to OP.
use alloy_rpc_types::error::EthRpcErrorCode;
use alloy_rpc_types_eth::error::EthRpcErrorCode;
use jsonrpsee_types::error::INTERNAL_ERROR_CODE;
use reth_optimism_evm::OpBlockExecutionError;
use reth_primitives::revm_primitives::{InvalidTransaction, OptimismInvalidTransaction};

View File

@ -1,6 +1,6 @@
//! Loads and formats OP block RPC response.
use alloy_rpc_types::BlockId;
use alloy_rpc_types_eth::BlockId;
use op_alloy_network::Network;
use op_alloy_rpc_types::OpTransactionReceipt;
use reth_chainspec::ChainSpecProvider;

View File

@ -1,7 +1,7 @@
//! Loads and formats OP receipt RPC response.
use alloy_eips::eip2718::Encodable2718;
use alloy_rpc_types::{Log, TransactionReceipt};
use alloy_rpc_types_eth::{Log, TransactionReceipt};
use op_alloy_consensus::{
DepositTransaction, OpDepositReceipt, OpDepositReceiptWithBloom, OpReceiptEnvelope,
};

View File

@ -2,7 +2,7 @@
use alloy_consensus::{Signed, Transaction as _};
use alloy_primitives::{Bytes, B256};
use alloy_rpc_types::TransactionInfo;
use alloy_rpc_types_eth::TransactionInfo;
use op_alloy_consensus::OpTxEnvelope;
use op_alloy_rpc_types::Transaction;
use reth_node_api::FullNodeComponents;
@ -121,7 +121,7 @@ where
.unwrap_or_else(|| inner.max_fee_per_gas());
Transaction {
inner: alloy_rpc_types::Transaction {
inner: alloy_rpc_types_eth::Transaction {
inner,
block_hash,
block_number,

View File

@ -1,8 +1,8 @@
use jsonrpsee::{core::RpcResult, proc_macros::rpc};
use alloy_primitives::{Address, Bytes, B256, U256};
use alloy_rpc_types::Block;
use alloy_rpc_types_anvil::{Forking, Metadata, MineOptions, NodeInfo};
use alloy_rpc_types_eth::Block;
/// Anvil rpc interface.
/// https://book.getfoundry.sh/reference/anvil/#custom-methods

View File

@ -1,8 +1,7 @@
use alloy_eips::{BlockId, BlockNumberOrTag};
use alloy_primitives::{Address, Bytes, B256};
use alloy_rpc_types::{Block, Bundle, StateContext};
use alloy_rpc_types_debug::ExecutionWitness;
use alloy_rpc_types_eth::transaction::TransactionRequest;
use alloy_rpc_types_eth::{transaction::TransactionRequest, Block, Bundle, StateContext};
use alloy_rpc_types_trace::geth::{
BlockTraceResult, GethDebugTracingCallOptions, GethDebugTracingOptions, GethTrace, TraceResult,
};

View File

@ -6,15 +6,15 @@
use alloy_eips::{eip4844::BlobAndProofV1, eip7685::Requests, BlockId, BlockNumberOrTag};
use alloy_json_rpc::RpcObject;
use alloy_primitives::{Address, BlockHash, Bytes, B256, U256, U64};
use alloy_rpc_types::{
state::StateOverride, BlockOverrides, EIP1186AccountProofResponse, Filter, Log, SyncStatus,
};
use alloy_rpc_types_engine::{
ClientVersionV1, ExecutionPayloadBodiesV1, ExecutionPayloadInputV2, ExecutionPayloadV1,
ExecutionPayloadV3, ForkchoiceState, ForkchoiceUpdated, PayloadId, PayloadStatus,
TransitionConfiguration,
};
use alloy_rpc_types_eth::transaction::TransactionRequest;
use alloy_rpc_types_eth::{
state::StateOverride, transaction::TransactionRequest, BlockOverrides,
EIP1186AccountProofResponse, Filter, Log, SyncStatus,
};
use alloy_serde::JsonStorageKey;
use jsonrpsee::{core::RpcResult, proc_macros::rpc};
use reth_engine_primitives::EngineTypes;

View File

@ -1,7 +1,7 @@
use alloy_eips::BlockId;
use alloy_json_rpc::RpcObject;
use alloy_primitives::{Address, Bytes, TxHash, B256};
use alloy_rpc_types::Header;
use alloy_rpc_types_eth::Header;
use alloy_rpc_types_trace::otterscan::{
BlockDetails, ContractCreator, InternalOperation, OtsBlockTransactions, TraceEntry,
TransactionsWithReceipts,

View File

@ -1,7 +1,8 @@
use alloy_eips::BlockId;
use alloy_primitives::{map::HashSet, Bytes, B256};
use alloy_rpc_types::{state::StateOverride, BlockOverrides, Index};
use alloy_rpc_types_eth::transaction::TransactionRequest;
use alloy_rpc_types_eth::{
state::StateOverride, transaction::TransactionRequest, BlockOverrides, Index,
};
use alloy_rpc_types_trace::{
filter::TraceFilter,
opcode::{BlockOpcodeGas, TransactionOpcodeGas},

View File

@ -33,13 +33,13 @@ reth-trie.workspace = true
reth-node-api.workspace = true
# ethereum
alloy-serde.workspace = true
alloy-eips.workspace = true
alloy-dyn-abi = { workspace = true, features = ["eip712"] }
alloy-json-rpc.workspace = true
alloy-network.workspace = true
alloy-primitives.workspace = true
alloy-rpc-types-eth.workspace = true
alloy-rpc-types.workspace = true
alloy-rpc-types-mev.workspace = true
alloy-consensus.workspace = true

View File

@ -4,14 +4,14 @@ use alloy_dyn_abi::TypedData;
use alloy_eips::{eip2930::AccessListResult, BlockId, BlockNumberOrTag};
use alloy_json_rpc::RpcObject;
use alloy_primitives::{Address, Bytes, B256, B64, U256, U64};
use alloy_rpc_types::{
serde_helpers::JsonStorageKey,
use alloy_rpc_types_eth::{
simulate::{SimulatePayload, SimulatedBlock},
state::{EvmOverrides, StateOverride},
transaction::TransactionRequest,
BlockOverrides, Bundle, EIP1186AccountProofResponse, EthCallResponse, FeeHistory, Header,
Index, StateContext, SyncStatus, Work,
};
use alloy_rpc_types_eth::transaction::TransactionRequest;
use alloy_serde::JsonStorageKey;
use jsonrpsee::{core::RpcResult, proc_macros::rpc};
use reth_rpc_server_types::{result::internal_rpc_err, ToRpcResult};
use tracing::trace;
@ -276,7 +276,7 @@ pub trait EthApi<T: RpcObject, B: RpcObject, R: RpcObject> {
&self,
address: Address,
block: BlockId,
) -> RpcResult<Option<alloy_rpc_types::Account>>;
) -> RpcResult<Option<alloy_rpc_types_eth::Account>>;
/// Introduced in EIP-1559, returns suggestion for the priority for dynamic fee transactions.
#[method(name = "maxPriorityFeePerGas")]
@ -694,7 +694,7 @@ where
&self,
address: Address,
block: BlockId,
) -> RpcResult<Option<alloy_rpc_types::Account>> {
) -> RpcResult<Option<alloy_rpc_types_eth::Account>> {
trace!(target: "rpc::eth", "Serving eth_getAccount");
Ok(EthState::get_account(self, address, block).await?)
}

View File

@ -1,7 +1,7 @@
//! `eth_` RPC API for filtering.
use alloy_json_rpc::RpcObject;
use alloy_rpc_types::{Filter, FilterChanges, FilterId, Log, PendingTransactionFilterKind};
use alloy_rpc_types_eth::{Filter, FilterChanges, FilterId, Log, PendingTransactionFilterKind};
use jsonrpsee::{core::RpcResult, proc_macros::rpc};
/// Rpc Interface for poll-based ethereum filter API.

View File

@ -3,7 +3,7 @@
use std::sync::Arc;
use alloy_eips::BlockId;
use alloy_rpc_types::{Block, Header, Index};
use alloy_rpc_types_eth::{Block, Header, Index};
use futures::Future;
use reth_primitives::{Receipt, SealedBlock, SealedBlockWithSenders};
use reth_provider::{BlockIdReader, BlockReader, BlockReaderIdExt, HeaderProvider};

View File

@ -8,12 +8,12 @@ use crate::{
use alloy_consensus::BlockHeader;
use alloy_eips::{eip1559::calc_next_block_base_fee, eip2930::AccessListResult};
use alloy_primitives::{Address, Bytes, TxKind, B256, U256};
use alloy_rpc_types::{
use alloy_rpc_types_eth::{
simulate::{SimBlock, SimulatePayload, SimulatedBlock},
state::{EvmOverrides, StateOverride},
transaction::TransactionRequest,
BlockId, Bundle, EthCallResponse, StateContext, TransactionInfo,
};
use alloy_rpc_types_eth::transaction::TransactionRequest;
use futures::Future;
use reth_chainspec::{EthChainSpec, MIN_TRANSACTION_GAS};
use reth_evm::{ConfigureEvm, ConfigureEvmEnv};

View File

@ -1,7 +1,7 @@
//! Loads fee history from database. Helper trait for `eth_` fee and transaction RPC methods.
use alloy_primitives::U256;
use alloy_rpc_types::{BlockNumberOrTag, FeeHistory};
use alloy_rpc_types_eth::{BlockNumberOrTag, FeeHistory};
use futures::Future;
use reth_chainspec::EthChainSpec;
use reth_provider::{BlockIdReader, ChainSpecProvider, HeaderProvider};

View File

@ -10,7 +10,7 @@ use alloy_eips::{
eip4844::MAX_DATA_GAS_PER_BLOCK, eip7685::EMPTY_REQUESTS_HASH, merge::BEACON_NONCE,
};
use alloy_primitives::{BlockNumber, B256, U256};
use alloy_rpc_types::BlockNumberOrTag;
use alloy_rpc_types_eth::BlockNumberOrTag;
use futures::Future;
use reth_chainspec::{EthChainSpec, EthereumHardforks};
use reth_evm::{

View File

@ -1,7 +1,7 @@
//! Loads chain metadata.
use alloy_primitives::{Address, U256, U64};
use alloy_rpc_types::{Stage, SyncInfo, SyncStatus};
use alloy_rpc_types_eth::{Stage, SyncInfo, SyncStatus};
use futures::Future;
use reth_chainspec::{ChainInfo, EthereumHardforks};
use reth_errors::{RethError, RethResult};

View File

@ -4,7 +4,8 @@
use alloy_consensus::constants::KECCAK_EMPTY;
use alloy_eips::BlockId;
use alloy_primitives::{Address, Bytes, B256, U256};
use alloy_rpc_types::{serde_helpers::JsonStorageKey, Account, EIP1186AccountProofResponse};
use alloy_rpc_types_eth::{Account, EIP1186AccountProofResponse};
use alloy_serde::JsonStorageKey;
use futures::Future;
use reth_chainspec::{EthChainSpec, EthereumHardforks};
use reth_errors::RethError;

View File

@ -4,7 +4,7 @@ use std::{fmt::Display, sync::Arc};
use crate::{FromEvmError, RpcNodeCore};
use alloy_primitives::B256;
use alloy_rpc_types::{BlockId, TransactionInfo};
use alloy_rpc_types_eth::{BlockId, TransactionInfo};
use futures::Future;
use reth_chainspec::ChainSpecProvider;
use reth_evm::{system_calls::SystemCaller, ConfigureEvm, ConfigureEvmEnv};

View File

@ -6,8 +6,7 @@ use alloy_dyn_abi::TypedData;
use alloy_eips::{eip2718::Encodable2718, BlockId};
use alloy_network::TransactionBuilder;
use alloy_primitives::{Address, Bytes, TxHash, B256};
use alloy_rpc_types::{BlockNumberOrTag, TransactionInfo};
use alloy_rpc_types_eth::transaction::TransactionRequest;
use alloy_rpc_types_eth::{transaction::TransactionRequest, BlockNumberOrTag, TransactionInfo};
use futures::Future;
use reth_primitives::{Receipt, SealedBlockWithSenders, TransactionMeta, TransactionSigned};
use reth_provider::{BlockNumReader, BlockReaderIdExt, ReceiptProvider, TransactionsProvider};

View File

@ -1,7 +1,7 @@
//! `eth_` RPC API for pubsub subscription.
use alloy_json_rpc::RpcObject;
use alloy_rpc_types::pubsub::{Params, SubscriptionKind};
use alloy_rpc_types_eth::pubsub::{Params, SubscriptionKind};
use jsonrpsee::proc_macros::rpc;
/// Ethereum pub-sub rpc interface.

View File

@ -6,7 +6,7 @@ use std::{
};
use alloy_network::Network;
use alloy_rpc_types::Block;
use alloy_rpc_types_eth::Block;
use reth_rpc_types_compat::TransactionCompat;
use crate::{AsEthApiError, FromEthApiError, FromEvmError};
@ -22,7 +22,7 @@ pub trait EthApiTypes: Send + Sync + Clone {
+ Send
+ Sync;
/// Blockchain primitive types, specific to network, e.g. block and transaction.
type NetworkTypes: Network<HeaderResponse = alloy_rpc_types::Header>;
type NetworkTypes: Network<HeaderResponse = alloy_rpc_types_eth::Header>;
/// Conversion methods for transaction RPC type.
type TransactionCompat: Send + Sync + Clone + fmt::Debug;

View File

@ -35,7 +35,6 @@ alloy-rpc-types-eth.workspace = true
revm.workspace = true
revm-inspectors.workspace = true
revm-primitives = { workspace = true, features = ["dev"] }
alloy-rpc-types.workspace = true
alloy-eips.workspace = true
# rpc

View File

@ -116,7 +116,7 @@ impl reth_storage_api::BlockHashReader for StateProviderTraitObjWrapper<'_> {
fn convert_block_hash(
&self,
hash_or_number: alloy_rpc_types::BlockHashOrNumber,
hash_or_number: alloy_rpc_types_eth::BlockHashOrNumber,
) -> reth_errors::ProviderResult<Option<B256>> {
self.0.convert_block_hash(hash_or_number)
}

View File

@ -4,7 +4,7 @@ use std::time::Duration;
use alloy_eips::BlockId;
use alloy_primitives::{Address, Bytes, U256};
use alloy_rpc_types::{error::EthRpcErrorCode, request::TransactionInputError, BlockError};
use alloy_rpc_types_eth::{error::EthRpcErrorCode, request::TransactionInputError, BlockError};
use alloy_sol_types::decode_revert_reason;
use reth_errors::RethError;
use reth_primitives::revm_primitives::InvalidHeader;

View File

@ -8,7 +8,7 @@ use std::{
use alloy_eips::eip1559::calc_next_block_base_fee;
use alloy_primitives::B256;
use alloy_rpc_types::TxGasAndReward;
use alloy_rpc_types_eth::TxGasAndReward;
use futures::{
future::{Fuse, FusedFuture},
FutureExt, Stream, StreamExt,

View File

@ -4,7 +4,7 @@
use alloy_consensus::constants::GWEI_TO_WEI;
use alloy_eips::BlockNumberOrTag;
use alloy_primitives::{B256, U256};
use alloy_rpc_types::BlockId;
use alloy_rpc_types_eth::BlockId;
use derive_more::{Deref, DerefMut, From, Into};
use itertools::Itertools;
use reth_rpc_server_types::constants;

View File

@ -4,7 +4,7 @@
use alloy_eips::BlockNumHash;
use alloy_primitives::TxHash;
use alloy_rpc_types::{FilteredParams, Log};
use alloy_rpc_types_eth::{FilteredParams, Log};
use reth_chainspec::ChainInfo;
use reth_errors::ProviderError;
use reth_primitives::{Receipt, SealedBlockWithSenders};
@ -179,7 +179,7 @@ pub fn get_filter_block_range(
#[cfg(test)]
mod tests {
use alloy_rpc_types::Filter;
use alloy_rpc_types_eth::Filter;
use super::*;
@ -242,8 +242,8 @@ mod tests {
let start_block = info.best_number;
let (from_block_number, to_block_number) = get_filter_block_range(
from_block.and_then(alloy_rpc_types::BlockNumberOrTag::as_number),
to_block.and_then(alloy_rpc_types::BlockNumberOrTag::as_number),
from_block.and_then(alloy_rpc_types_eth::BlockNumberOrTag::as_number),
to_block.and_then(alloy_rpc_types_eth::BlockNumberOrTag::as_number),
start_block,
info,
);

View File

@ -2,7 +2,7 @@
use alloy_consensus::{ReceiptEnvelope, Transaction};
use alloy_primitives::{Address, TxKind};
use alloy_rpc_types::{Log, ReceiptWithBloom, TransactionReceipt};
use alloy_rpc_types_eth::{Log, ReceiptWithBloom, TransactionReceipt};
use reth_primitives::{Receipt, TransactionMeta, TransactionSigned, TxType};
use revm_primitives::calc_blob_gasprice;
@ -59,7 +59,7 @@ pub fn build_receipt<T>(
})
.collect();
let rpc_receipt = alloy_rpc_types::Receipt {
let rpc_receipt = alloy_rpc_types_eth::Receipt {
status: receipt.success.into(),
cumulative_gas_used: receipt.cumulative_gas_used as u128,
logs,

View File

@ -1,7 +1,7 @@
//! utilities for working with revm
use alloy_primitives::{Address, B256, U256};
use alloy_rpc_types::{
use alloy_rpc_types_eth::{
state::{AccountOverride, StateOverride},
BlockOverrides,
};

View File

@ -2,11 +2,11 @@
use alloy_consensus::{Transaction as _, TxEip4844Variant, TxType, TypedTransaction};
use alloy_primitives::PrimitiveSignature as Signature;
use alloy_rpc_types::{
use alloy_rpc_types_eth::{
simulate::{SimCallResult, SimulateError, SimulatedBlock},
transaction::TransactionRequest,
Block, BlockTransactionsKind,
};
use alloy_rpc_types_eth::transaction::TransactionRequest;
use jsonrpsee_types::ErrorObject;
use reth_primitives::{
proofs::{calculate_receipt_root, calculate_transaction_root},
@ -225,7 +225,7 @@ pub fn build_block<T: TransactionCompat>(
.into_iter()
.map(|log| {
log_index += 1;
alloy_rpc_types::Log {
alloy_rpc_types_eth::Log {
inner: log,
log_index: Some(log_index - 1),
transaction_index: Some(transaction_index as u64),

View File

@ -3,7 +3,7 @@
//! Transaction wrapper that labels transaction with its origin.
use alloy_primitives::B256;
use alloy_rpc_types::TransactionInfo;
use alloy_rpc_types_eth::TransactionInfo;
use reth_primitives::TransactionSignedEcRecovered;
use reth_rpc_types_compat::{
transaction::{from_recovered, from_recovered_with_block_context},

View File

@ -19,7 +19,6 @@ reth-rpc-api = { workspace = true, features = ["client"] }
# ethereum
alloy-primitives.workspace = true
alloy-rpc-types-eth.workspace = true
alloy-rpc-types.workspace = true
alloy-rpc-types-trace.workspace = true
alloy-eips.workspace = true

View File

@ -8,8 +8,7 @@ use std::{
use alloy_eips::BlockId;
use alloy_primitives::{TxHash, B256};
use alloy_rpc_types::{Block, Transaction};
use alloy_rpc_types_eth::transaction::TransactionRequest;
use alloy_rpc_types_eth::{transaction::TransactionRequest, Block, Transaction};
use alloy_rpc_types_trace::{
common::TraceResult,
geth::{GethDebugTracerType, GethDebugTracingOptions, GethTrace},

View File

@ -2,8 +2,7 @@
use alloy_eips::BlockId;
use alloy_primitives::{map::HashSet, Bytes, TxHash, B256};
use alloy_rpc_types::Index;
use alloy_rpc_types_eth::transaction::TransactionRequest;
use alloy_rpc_types_eth::{transaction::TransactionRequest, Index};
use alloy_rpc_types_trace::{
filter::TraceFilter,
parity::{LocalizedTransactionTrace, TraceResults, TraceType},

View File

@ -1,7 +1,7 @@
//! Integration tests for the trace API.
use alloy_primitives::map::HashSet;
use alloy_rpc_types::{Block, Transaction};
use alloy_rpc_types_eth::{Block, Transaction};
use alloy_rpc_types_trace::{
filter::TraceFilter, parity::TraceType, tracerequest::TraceCallRequest,
};

View File

@ -17,10 +17,10 @@ reth-primitives.workspace = true
reth-trie-common.workspace = true
# ethereum
alloy-serde.workspace = true
alloy-eips.workspace = true
alloy-primitives.workspace = true
alloy-rlp.workspace = true
alloy-rpc-types.workspace = true
alloy-rpc-types-eth = { workspace = true, default-features = false, features = ["serde"] }
alloy-rpc-types-engine.workspace = true
alloy-consensus.workspace = true

View File

@ -3,7 +3,7 @@
use alloy_consensus::Sealed;
use alloy_primitives::{B256, U256};
use alloy_rlp::Encodable;
use alloy_rpc_types::{
use alloy_rpc_types_eth::{
Block, BlockError, BlockTransactions, BlockTransactionsKind, Header, TransactionInfo,
};
use reth_primitives::{Block as PrimitiveBlock, BlockWithSenders, Withdrawals};

View File

@ -1,7 +1,7 @@
//! Compatibility functions for rpc proof related types.
use alloy_rpc_types::serde_helpers::JsonStorageKey;
use alloy_rpc_types_eth::{EIP1186AccountProofResponse, EIP1186StorageProof};
use alloy_serde::JsonStorageKey;
use reth_trie_common::{AccountProof, StorageProof};
/// Creates a new rpc storage proof from a primitive storage proof type.

View File

@ -3,7 +3,7 @@
use std::fmt;
use alloy_consensus::Transaction as _;
use alloy_rpc_types::{
use alloy_rpc_types_eth::{
request::{TransactionInput, TransactionRequest},
TransactionInfo,
};

View File

@ -47,14 +47,15 @@ alloy-genesis.workspace = true
alloy-network.workspace = true
alloy-primitives.workspace = true
alloy-rlp.workspace = true
alloy-rpc-types.workspace = true
alloy-rpc-types-beacon.workspace = true
alloy-rpc-types-eth = { workspace = true, features = ["jsonrpsee-types"] }
alloy-rpc-types.workspace = true
alloy-rpc-types-eth = { workspace = true, features = ["jsonrpsee-types", "serde"] }
alloy-rpc-types-debug.workspace = true
alloy-rpc-types-trace.workspace = true
alloy-rpc-types-mev.workspace = true
alloy-rpc-types-txpool.workspace = true
alloy-rpc-types-admin.workspace = true
alloy-rpc-types-engine.workspace = true
alloy-serde.workspace = true
revm = { workspace = true, features = [
"optional_block_gas_limit",

View File

@ -1,11 +1,11 @@
use alloy_eips::{eip2718::Encodable2718, BlockId, BlockNumberOrTag};
use alloy_primitives::{Address, Bytes, B256, U256};
use alloy_rlp::{Decodable, Encodable};
use alloy_rpc_types::{
state::EvmOverrides, Block as RpcBlock, BlockError, Bundle, StateContext, TransactionInfo,
};
use alloy_rpc_types_debug::ExecutionWitness;
use alloy_rpc_types_eth::transaction::TransactionRequest;
use alloy_rpc_types_eth::{
state::EvmOverrides, transaction::TransactionRequest, Block as RpcBlock, BlockError, Bundle,
StateContext, TransactionInfo,
};
use alloy_rpc_types_trace::geth::{
call::FlatCallFrame, BlockTraceResult, FourByteFrame, GethDebugBuiltInTracerType,
GethDebugTracerType, GethDebugTracingCallOptions, GethDebugTracingOptions, GethTrace,

View File

@ -1,9 +1,9 @@
use alloy_eips::{BlockId, BlockNumberOrTag};
use alloy_primitives::{Address, Bytes, B256, U256, U64};
use alloy_rpc_types::{
state::StateOverride, BlockOverrides, EIP1186AccountProofResponse, Filter, Log, SyncStatus,
use alloy_rpc_types_eth::{
state::StateOverride, transaction::TransactionRequest, BlockOverrides,
EIP1186AccountProofResponse, Filter, Log, SyncStatus,
};
use alloy_rpc_types_eth::transaction::TransactionRequest;
use alloy_serde::JsonStorageKey;
use jsonrpsee::core::RpcResult as Result;
use reth_rpc_api::{EngineEthApiServer, EthApiServer, EthFilterApiServer};

View File

@ -106,7 +106,7 @@ where
.into())
}
let block_id: alloy_rpc_types::BlockId = state_block_number.into();
let block_id: alloy_rpc_types_eth::BlockId = state_block_number.into();
// Note: the block number is considered the `parent` block: <https://github.com/flashbots/mev-geth/blob/fddf97beec5877483f879a77b7dea2e58a58d653/internal/ethapi/api.go#L2104>
let (cfg, mut block_env, at) = self.eth_api().evm_env_at(block_id).await?;

View File

@ -10,7 +10,7 @@ use std::{
};
use alloy_primitives::TxHash;
use alloy_rpc_types::{
use alloy_rpc_types_eth::{
BlockNumHash, Filter, FilterBlockOption, FilterChanges, FilterId, FilteredParams, Log,
PendingTransactionFilterKind,
};

View File

@ -1,6 +1,6 @@
//! Contains RPC handler implementations specific to blocks.
use alloy_rpc_types::{BlockId, TransactionReceipt};
use alloy_rpc_types_eth::{BlockId, TransactionReceipt};
use reth_primitives::TransactionMeta;
use reth_provider::{BlockReaderIdExt, HeaderProvider};
use reth_rpc_eth_api::{

View File

@ -2,7 +2,7 @@
use alloy_consensus::{Signed, Transaction as _, TxEip4844Variant, TxEnvelope};
use alloy_network::{Ethereum, Network};
use alloy_rpc_types::{Transaction, TransactionInfo};
use alloy_rpc_types_eth::{Transaction, TransactionInfo};
use reth_primitives::{TransactionSigned, TransactionSignedEcRecovered};
use reth_rpc_types_compat::TransactionCompat;

View File

@ -3,7 +3,7 @@
use std::sync::Arc;
use alloy_primitives::TxHash;
use alloy_rpc_types::{
use alloy_rpc_types_eth::{
pubsub::{
Params, PubSubSyncStatus, SubscriptionKind, SubscriptionResult as EthSubscriptionResult,
SyncStatusMetadata,

View File

@ -2,7 +2,7 @@
use alloy_eips::BlockNumberOrTag;
use alloy_primitives::U256;
use alloy_rpc_types::BlockId;
use alloy_rpc_types_eth::BlockId;
use alloy_rpc_types_mev::{
BundleItem, Inclusion, Privacy, RefundConfig, SendBundleRequest, SimBundleLogs,
SimBundleOverrides, SimBundleResponse, Validity,

View File

@ -2,7 +2,7 @@ use alloy_consensus::Transaction;
use alloy_eips::{BlockId, BlockNumberOrTag};
use alloy_network::{ReceiptResponse, TransactionResponse};
use alloy_primitives::{Address, Bytes, TxHash, B256, U256};
use alloy_rpc_types::{BlockTransactions, Header, TransactionReceipt};
use alloy_rpc_types_eth::{BlockTransactions, Header, TransactionReceipt};
use alloy_rpc_types_trace::{
otterscan::{
BlockDetails, ContractCreator, InternalOperation, OperationType, OtsBlockTransactions,

View File

@ -1,10 +1,10 @@
use alloy_eips::BlockId;
use alloy_primitives::{map::HashSet, Bytes, B256, U256};
use alloy_rpc_types::{
use alloy_rpc_types_eth::{
state::{EvmOverrides, StateOverride},
transaction::TransactionRequest,
BlockOverrides, Index,
};
use alloy_rpc_types_eth::transaction::TransactionRequest;
use alloy_rpc_types_trace::{
filter::TraceFilter,
opcode::{BlockOpcodeGas, TransactionOpcodeGas},

View File

@ -1,12 +1,12 @@
use alloy_consensus::{BlobTransactionValidationError, EnvKzgSettings, Transaction};
use alloy_eips::eip4844::kzg_to_versioned_hash;
use alloy_rpc_types::engine::{
BlobsBundleV1, CancunPayloadFields, ExecutionPayload, ExecutionPayloadSidecar,
};
use alloy_rpc_types_beacon::relay::{
BidTrace, BuilderBlockValidationRequest, BuilderBlockValidationRequestV2,
BuilderBlockValidationRequestV3, BuilderBlockValidationRequestV4,
};
use alloy_rpc_types_engine::{
BlobsBundleV1, CancunPayloadFields, ExecutionPayload, ExecutionPayloadSidecar,
};
use async_trait::async_trait;
use jsonrpsee::core::RpcResult;
use reth_chainspec::{ChainSpecProvider, EthereumHardforks};

View File

@ -8,7 +8,7 @@ license.workspace = true
[dependencies]
reth.workspace = true
reth-node-ethereum.workspace = true
alloy-rpc-types.workspace = true
alloy-rpc-types-eth.workspace = true
clap = { workspace = true, features = ["derive"] }
futures-util.workspace = true
alloy-primitives.workspace = true

View File

@ -12,7 +12,7 @@
use alloy_eips::BlockNumberOrTag;
use alloy_primitives::Address;
use alloy_rpc_types::state::EvmOverrides;
use alloy_rpc_types_eth::state::EvmOverrides;
use clap::Parser;
use futures_util::StreamExt;
use reth::{

View File

@ -14,7 +14,7 @@ reth-provider.workspace = true
reth-node-ethereum.workspace = true
reth-node-types.workspace = true
alloy-rpc-types.workspace = true
alloy-rpc-types-eth.workspace = true
alloy-primitives.workspace = true

View File

@ -1,5 +1,5 @@
use alloy_primitives::{Address, Sealable, B256};
use alloy_rpc_types::{Filter, FilteredParams};
use alloy_rpc_types_eth::{Filter, FilteredParams};
use reth_chainspec::ChainSpecBuilder;
use reth_db::{open_db_read_only, DatabaseEnv};
use reth_node_ethereum::EthereumNode;