mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
chore: use reth_chainspec where possible (#8891)
This commit is contained in:
@ -12,6 +12,7 @@ workspace = true
|
||||
|
||||
[dependencies]
|
||||
# Reth
|
||||
reth-chainspec.workspace = true
|
||||
reth-evm.workspace = true
|
||||
reth-primitives.workspace = true
|
||||
reth-revm.workspace = true
|
||||
|
||||
@ -1,8 +1,9 @@
|
||||
//! EIP-6110 deposit requests parsing
|
||||
use alloy_eips::eip6110::{DepositRequest, MAINNET_DEPOSIT_CONTRACT_ADDRESS};
|
||||
use alloy_sol_types::{sol, SolEvent};
|
||||
use reth_chainspec::ChainSpec;
|
||||
use reth_evm::execute::BlockValidationError;
|
||||
use reth_primitives::{ChainSpec, Receipt, Request};
|
||||
use reth_primitives::{Receipt, Request};
|
||||
use revm_primitives::Log;
|
||||
|
||||
sol! {
|
||||
@ -85,7 +86,8 @@ fn parse_deposit_from_log(log: &Log<DepositEvent>) -> DepositRequest {
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
use reth_primitives::{TxType, MAINNET};
|
||||
use reth_chainspec::MAINNET;
|
||||
use reth_primitives::TxType;
|
||||
|
||||
#[test]
|
||||
fn test_parse_deposit_from_log() {
|
||||
|
||||
@ -4,6 +4,7 @@ use crate::{
|
||||
dao_fork::{DAO_HARDFORK_BENEFICIARY, DAO_HARDKFORK_ACCOUNTS},
|
||||
EthEvmConfig,
|
||||
};
|
||||
use reth_chainspec::{ChainSpec, MAINNET};
|
||||
use reth_ethereum_consensus::validate_block_post_execution;
|
||||
use reth_evm::{
|
||||
execute::{
|
||||
@ -14,8 +15,7 @@ use reth_evm::{
|
||||
};
|
||||
use reth_execution_types::ExecutionOutcome;
|
||||
use reth_primitives::{
|
||||
BlockNumber, BlockWithSenders, ChainSpec, Hardfork, Header, Receipt, Request, Withdrawals,
|
||||
MAINNET, U256,
|
||||
BlockNumber, BlockWithSenders, Hardfork, Header, Receipt, Request, Withdrawals, U256,
|
||||
};
|
||||
use reth_prune_types::PruneModes;
|
||||
use reth_revm::{
|
||||
@ -461,10 +461,10 @@ mod tests {
|
||||
eip4788::{BEACON_ROOTS_ADDRESS, BEACON_ROOTS_CODE, SYSTEM_ADDRESS},
|
||||
eip7002::{WITHDRAWAL_REQUEST_PREDEPLOY_ADDRESS, WITHDRAWAL_REQUEST_PREDEPLOY_CODE},
|
||||
};
|
||||
use reth_chainspec::{ChainSpecBuilder, ForkCondition};
|
||||
use reth_primitives::{
|
||||
constants::{EMPTY_ROOT_HASH, ETH_TO_WEI},
|
||||
keccak256, public_key_to_address, Account, Block, ChainSpecBuilder, ForkCondition,
|
||||
Transaction, TxKind, TxLegacy, B256,
|
||||
keccak256, public_key_to_address, Account, Block, Transaction, TxKind, TxLegacy, B256,
|
||||
};
|
||||
use reth_revm::{
|
||||
database::StateProviderDatabase, state_change::HISTORY_SERVE_WINDOW,
|
||||
|
||||
@ -8,11 +8,12 @@
|
||||
#![cfg_attr(not(test), warn(unused_crate_dependencies))]
|
||||
#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))]
|
||||
|
||||
use reth_chainspec::ChainSpec;
|
||||
use reth_evm::{ConfigureEvm, ConfigureEvmEnv};
|
||||
use reth_primitives::{
|
||||
revm::{config::revm_spec, env::fill_tx_env},
|
||||
revm_primitives::{AnalysisKind, CfgEnvWithHandlerCfg, TxEnv},
|
||||
Address, ChainSpec, Head, Header, TransactionSigned, U256,
|
||||
Address, Head, Header, TransactionSigned, U256,
|
||||
};
|
||||
use reth_revm::{Database, EvmBuilder};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user