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:
@ -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};
|
||||
|
||||
Reference in New Issue
Block a user