mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
refactor: phase out alloy-rpc-types usage (#12395)
This commit is contained in:
29
Cargo.lock
generated
29
Cargo.lock
generated
@ -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",
|
||||
|
||||
@ -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
|
||||
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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;
|
||||
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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::{
|
||||
|
||||
@ -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};
|
||||
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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};
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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,
|
||||
};
|
||||
|
||||
@ -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,
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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,
|
||||
};
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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,
|
||||
|
||||
@ -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},
|
||||
|
||||
@ -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
|
||||
|
||||
|
||||
@ -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?)
|
||||
}
|
||||
|
||||
@ -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.
|
||||
|
||||
@ -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};
|
||||
|
||||
@ -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};
|
||||
|
||||
@ -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};
|
||||
|
||||
@ -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::{
|
||||
|
||||
@ -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};
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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};
|
||||
|
||||
@ -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};
|
||||
|
||||
@ -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.
|
||||
|
||||
@ -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;
|
||||
|
||||
|
||||
@ -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
|
||||
|
||||
2
crates/rpc/rpc-eth-types/src/cache/db.rs
vendored
2
crates/rpc/rpc-eth-types/src/cache/db.rs
vendored
@ -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)
|
||||
}
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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,
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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,
|
||||
);
|
||||
|
||||
@ -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,
|
||||
|
||||
@ -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,
|
||||
};
|
||||
|
||||
@ -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),
|
||||
|
||||
@ -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},
|
||||
|
||||
@ -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
|
||||
|
||||
|
||||
@ -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},
|
||||
|
||||
@ -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},
|
||||
|
||||
@ -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,
|
||||
};
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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};
|
||||
|
||||
@ -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.
|
||||
|
||||
@ -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,
|
||||
};
|
||||
|
||||
@ -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",
|
||||
|
||||
@ -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,
|
||||
|
||||
@ -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};
|
||||
|
||||
@ -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?;
|
||||
|
||||
|
||||
@ -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,
|
||||
};
|
||||
|
||||
@ -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::{
|
||||
|
||||
@ -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;
|
||||
|
||||
|
||||
@ -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,
|
||||
|
||||
@ -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,
|
||||
|
||||
@ -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,
|
||||
|
||||
@ -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},
|
||||
|
||||
@ -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};
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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::{
|
||||
|
||||
@ -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
|
||||
|
||||
|
||||
|
||||
@ -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;
|
||||
|
||||
Reference in New Issue
Block a user