chore: use reth_chainspec where possible (#8891)

This commit is contained in:
joshieDo
2024-06-17 18:09:09 +02:00
committed by GitHub
parent 01d81b4dcc
commit 2a5c93fab3
183 changed files with 430 additions and 261 deletions

View File

@ -12,6 +12,7 @@ workspace = true
[dependencies]
# reth
reth-chainspec.workspace = true
reth-primitives.workspace = true
reth-payload-builder.workspace = true
reth-basic-payload-builder.workspace = true
@ -57,6 +58,7 @@ alloy-primitives.workspace = true
[features]
optimism = [
"reth-chainspec/optimism",
"reth-primitives/optimism",
"reth-provider/optimism",
"reth-rpc-types-compat/optimism",

View File

@ -1,3 +1,4 @@
use reth_chainspec::{ChainSpec, Hardfork};
use reth_node_api::{
payload::{
validate_parent_beacon_block_root_presence, EngineApiMessageVersion,
@ -7,7 +8,6 @@ use reth_node_api::{
EngineTypes,
};
use reth_optimism_payload_builder::{OptimismBuiltPayload, OptimismPayloadBuilderAttributes};
use reth_primitives::{ChainSpec, Hardfork};
use reth_rpc_types::{
engine::{
ExecutionPayloadEnvelopeV2, OptimismExecutionPayloadEnvelopeV3,

View File

@ -1,7 +1,8 @@
//! OP transaction pool types
use parking_lot::RwLock;
use reth_chainspec::ChainSpec;
use reth_evm_optimism::RethL1BlockInfo;
use reth_primitives::{Block, ChainSpec, GotExpected, InvalidTransactionError, SealedBlock};
use reth_primitives::{Block, GotExpected, InvalidTransactionError, SealedBlock};
use reth_provider::{BlockReaderIdExt, StateProviderFactory};
use reth_revm::L1BlockInfo;
use reth_transaction_pool::{
@ -202,9 +203,10 @@ pub struct OpL1BlockInfo {
#[cfg(test)]
mod tests {
use crate::txpool::OpTransactionValidator;
use reth_chainspec::MAINNET;
use reth_primitives::{
Signature, Transaction, TransactionSigned, TransactionSignedEcRecovered, TxDeposit, TxKind,
MAINNET, U256,
U256,
};
use reth_provider::test_utils::MockEthProvider;
use reth_transaction_pool::{

View File

@ -1,8 +1,9 @@
use reth::{rpc::types::engine::PayloadAttributes, tasks::TaskManager};
use reth_chainspec::{ChainSpecBuilder, BASE_MAINNET};
use reth_e2e_test_utils::{transaction::TransactionTestContext, wallet::Wallet, NodeHelperType};
use reth_node_optimism::{OptimismBuiltPayload, OptimismNode, OptimismPayloadBuilderAttributes};
use reth_payload_builder::EthPayloadBuilderAttributes;
use reth_primitives::{Address, ChainSpecBuilder, Genesis, B256, BASE_MAINNET};
use reth_primitives::{Address, Genesis, B256};
use std::sync::Arc;
use tokio::sync::Mutex;