diff --git a/crates/rpc-types-engine/src/sidecar.rs b/crates/rpc-types-engine/src/sidecar.rs index 4785542ede3..a760068157d 100644 --- a/crates/rpc-types-engine/src/sidecar.rs +++ b/crates/rpc-types-engine/src/sidecar.rs @@ -69,11 +69,21 @@ impl ExecutionPayloadSidecar { self.cancun.as_ref() } + /// Consumes the type and returns the [`CancunPayloadFields`] + pub fn into_cancun(self) -> Option { + self.cancun.into_inner() + } + /// Returns a reference to the [`PraguePayloadFields`]. pub const fn prague(&self) -> Option<&PraguePayloadFields> { self.prague.as_ref() } + /// Consumes the type and returns the [`PraguePayloadFields`]. + pub fn into_prague(self) -> Option { + self.prague.into_inner() + } + /// Returns the parent beacon block root, if any. pub fn parent_beacon_block_root(&self) -> Option { self.cancun.parent_beacon_block_root()