mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
chore: improve deps for payload prims (#12374)
This commit is contained in:
@ -16,6 +16,7 @@ workflows:
|
||||
# Do not try to add a new section into `[features]` of `A` only because `B` expose that feature. There are edge-cases where this is still needed, but we can add them manually.
|
||||
"--left-side-feature-missing=ignore",
|
||||
# Ignore the case that `A` it outside of the workspace. Otherwise it will report errors in external dependencies that we have no influence on.
|
||||
|
||||
"--left-side-outside-workspace=ignore",
|
||||
# Auxillary flags:
|
||||
"--offline",
|
||||
|
||||
2
Cargo.lock
generated
2
Cargo.lock
generated
@ -8417,7 +8417,7 @@ version = "1.1.1"
|
||||
dependencies = [
|
||||
"alloy-eips",
|
||||
"alloy-primitives",
|
||||
"alloy-rpc-types",
|
||||
"alloy-rpc-types-engine",
|
||||
"async-trait",
|
||||
"op-alloy-rpc-types-engine",
|
||||
"pin-project",
|
||||
|
||||
@ -32,7 +32,7 @@ reth-chainspec = { workspace = true, optional = true }
|
||||
|
||||
# ethereum
|
||||
alloy-primitives.workspace = true
|
||||
alloy-rpc-types-engine.workspace = true
|
||||
alloy-rpc-types-engine = { workspace = true, features = ["std"] }
|
||||
alloy-eips.workspace = true
|
||||
|
||||
# async
|
||||
|
||||
@ -22,7 +22,7 @@ reth-rpc-types-compat.workspace = true
|
||||
reth-evm.workspace = true
|
||||
reth-execution-types.workspace = true
|
||||
reth-payload-builder.workspace = true
|
||||
reth-payload-primitives.workspace = true
|
||||
reth-payload-primitives = { workspace = true, features = ["op"] }
|
||||
reth-basic-payload-builder.workspace = true
|
||||
reth-trie.workspace = true
|
||||
reth-chain-state.workspace = true
|
||||
|
||||
@ -22,8 +22,8 @@ reth-chain-state.workspace = true
|
||||
# alloy
|
||||
alloy-eips.workspace = true
|
||||
alloy-primitives.workspace = true
|
||||
alloy-rpc-types = { workspace = true, features = ["engine"] }
|
||||
op-alloy-rpc-types-engine.workspace = true
|
||||
alloy-rpc-types-engine = { workspace = true, features = ["serde"] }
|
||||
op-alloy-rpc-types-engine = { workspace = true, optional = true }
|
||||
|
||||
# async
|
||||
async-trait.workspace = true
|
||||
@ -35,3 +35,6 @@ pin-project.workspace = true
|
||||
serde.workspace = true
|
||||
thiserror.workspace = true
|
||||
tracing.workspace = true
|
||||
|
||||
[features]
|
||||
op = ["dep:op-alloy-rpc-types-engine"]
|
||||
@ -1,6 +1,7 @@
|
||||
use crate::{MessageValidationKind, PayloadAttributes};
|
||||
use alloy_eips::eip4895::Withdrawal;
|
||||
use alloy_primitives::B256;
|
||||
use alloy_rpc_types::engine::ExecutionPayload;
|
||||
use alloy_rpc_types_engine::ExecutionPayload;
|
||||
|
||||
/// Either an [`ExecutionPayload`] or a types that implements the [`PayloadAttributes`] trait.
|
||||
///
|
||||
@ -39,7 +40,7 @@ where
|
||||
Attributes: PayloadAttributes,
|
||||
{
|
||||
/// Return the withdrawals for the payload or attributes.
|
||||
pub fn withdrawals(&self) -> Option<&Vec<alloy_rpc_types::Withdrawal>> {
|
||||
pub fn withdrawals(&self) -> Option<&Vec<Withdrawal>> {
|
||||
match self {
|
||||
Self::ExecutionPayload { payload, .. } => payload.withdrawals(),
|
||||
Self::PayloadAttributes(attributes) => attributes.withdrawals(),
|
||||
|
||||
@ -1,11 +1,7 @@
|
||||
use crate::{PayloadEvents, PayloadKind, PayloadTypes};
|
||||
use alloy_eips::eip7685::Requests;
|
||||
use alloy_eips::{eip4895::Withdrawal, eip7685::Requests};
|
||||
use alloy_primitives::{Address, B256, U256};
|
||||
use alloy_rpc_types::{
|
||||
engine::{PayloadAttributes as EthPayloadAttributes, PayloadId},
|
||||
Withdrawal,
|
||||
};
|
||||
use op_alloy_rpc_types_engine::OpPayloadAttributes;
|
||||
use alloy_rpc_types_engine::{PayloadAttributes as EthPayloadAttributes, PayloadId};
|
||||
use reth_chain_state::ExecutedBlock;
|
||||
use reth_primitives::{SealedBlock, Withdrawals};
|
||||
use tokio::sync::oneshot;
|
||||
@ -146,7 +142,8 @@ impl PayloadAttributes for EthPayloadAttributes {
|
||||
}
|
||||
}
|
||||
|
||||
impl PayloadAttributes for OpPayloadAttributes {
|
||||
#[cfg(feature = "op")]
|
||||
impl PayloadAttributes for op_alloy_rpc_types_engine::OpPayloadAttributes {
|
||||
fn timestamp(&self) -> u64 {
|
||||
self.payload_attributes.timestamp
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user