mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 19:09:54 +00:00
dev: add requests to EthBuiltPayload (#12072)
This commit is contained in:
@ -65,7 +65,7 @@
|
||||
//! },
|
||||
//! ..Default::default()
|
||||
//! };
|
||||
//! let payload = EthBuiltPayload::new(self.attributes.id, payload.seal_slow(), U256::ZERO, None);
|
||||
//! let payload = EthBuiltPayload::new(self.attributes.id, payload.seal_slow(), U256::ZERO, None, None);
|
||||
//! Ok(payload)
|
||||
//! }
|
||||
//!
|
||||
|
||||
@ -89,6 +89,7 @@ impl PayloadJob for TestPayloadJob {
|
||||
Block::default().seal_slow(),
|
||||
U256::ZERO,
|
||||
Some(ExecutedBlock::default()),
|
||||
Some(Default::default()),
|
||||
))
|
||||
}
|
||||
|
||||
|
||||
@ -20,6 +20,7 @@ reth-transaction-pool.workspace = true
|
||||
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
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
use crate::{PayloadEvents, PayloadKind, PayloadTypes};
|
||||
use alloy_eips::eip7685::Requests;
|
||||
use alloy_primitives::{Address, B256, U256};
|
||||
use alloy_rpc_types::{
|
||||
engine::{PayloadAttributes as EthPayloadAttributes, PayloadId},
|
||||
@ -65,6 +66,9 @@ pub trait BuiltPayload: Send + Sync + std::fmt::Debug {
|
||||
fn executed_block(&self) -> Option<ExecutedBlock> {
|
||||
None
|
||||
}
|
||||
|
||||
/// Returns the EIP-7865 requests for the payload if any.
|
||||
fn requests(&self) -> Option<Requests>;
|
||||
}
|
||||
|
||||
/// This can be implemented by types that describe a currently running payload job.
|
||||
|
||||
Reference in New Issue
Block a user