optimism: replace reth-primitive imports (#10800)

This commit is contained in:
Håvard Anda Estensen
2024-09-10 12:51:43 +02:00
committed by GitHub
parent 1b74f16ec3
commit 0213e8841f
24 changed files with 56 additions and 40 deletions

View File

@ -31,6 +31,7 @@ reth-chain-state.workspace = true
# ethereum
revm.workspace = true
alloy-primitives.workspace = true
alloy-rlp.workspace = true
# misc

View File

@ -4,6 +4,7 @@ use crate::{
error::OptimismPayloadBuilderError,
payload::{OptimismBuiltPayload, OptimismPayloadBuilderAttributes},
};
use alloy_primitives::U256;
use reth_basic_payload_builder::*;
use reth_chain_state::ExecutedBlock;
use reth_chainspec::{EthereumHardforks, OptimismHardfork};
@ -13,7 +14,7 @@ use reth_payload_builder::error::PayloadBuilderError;
use reth_primitives::{
constants::{BEACON_NONCE, EMPTY_RECEIPTS, EMPTY_TRANSACTIONS},
eip4844::calculate_excess_blob_gas,
proofs, Block, Header, IntoRecoveredTransaction, Receipt, TxType, EMPTY_OMMER_ROOT_HASH, U256,
proofs, Block, Header, IntoRecoveredTransaction, Receipt, TxType, EMPTY_OMMER_ROOT_HASH,
};
use reth_provider::StateProviderFactory;
use reth_revm::database::StateProviderDatabase;

View File

@ -13,7 +13,7 @@ pub enum OptimismPayloadBuilderError {
L1BlockInfoParseFailed,
/// Thrown when a database account could not be loaded.
#[error("failed to load account {0}")]
AccountLoadFailed(reth_primitives::Address),
AccountLoadFailed(alloy_primitives::Address),
/// Thrown when force deploy of create2deployer code fails.
#[error("failed to force create2deployer account code")]
ForceCreate2DeployerFail,

View File

@ -2,6 +2,7 @@
//! Optimism builder support
use alloy_primitives::{Address, B256, U256};
use alloy_rlp::Encodable;
use reth_chain_state::ExecutedBlock;
use reth_chainspec::{ChainSpec, EthereumHardforks};
@ -11,8 +12,7 @@ use reth_payload_primitives::{BuiltPayload, PayloadBuilderAttributes};
use reth_primitives::{
revm_primitives::{BlobExcessGasAndPrice, BlockEnv, CfgEnv, CfgEnvWithHandlerCfg, SpecId},
transaction::WithEncoded,
Address, BlobTransactionSidecar, Header, SealedBlock, TransactionSigned, Withdrawals, B256,
U256,
BlobTransactionSidecar, Header, SealedBlock, TransactionSigned, Withdrawals,
};
/// Re-export for use in downstream arguments.
pub use reth_rpc_types::optimism::OptimismPayloadAttributes;