From 908d9f8f08abb0cd24b9976a4bbbe9ff64ad2f36 Mon Sep 17 00:00:00 2001 From: Alex Stokes Date: Tue, 7 May 2024 09:26:00 -0600 Subject: [PATCH] hoist `BlobsBundle` type out of specific fork this works until the type changes in a future fork, although it may not change --- mev-rs/src/types/auction_contents.rs | 3 ++- mev-rs/src/types/block_submission.rs | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/mev-rs/src/types/auction_contents.rs b/mev-rs/src/types/auction_contents.rs index feb09e80..99a1f5cd 100644 --- a/mev-rs/src/types/auction_contents.rs +++ b/mev-rs/src/types/auction_contents.rs @@ -1,4 +1,5 @@ use crate::types::ExecutionPayload; +pub use deneb::BlobsBundle; use ethereum_consensus::Fork; pub mod bellatrix { @@ -94,7 +95,7 @@ impl AuctionContents { } } - pub fn blobs_bundle(&self) -> Option<&deneb::BlobsBundle> { + pub fn blobs_bundle(&self) -> Option<&BlobsBundle> { match self { Self::Deneb(inner) => Some(&inner.blobs_bundle), Self::Electra(inner) => Some(&inner.blobs_bundle), diff --git a/mev-rs/src/types/block_submission.rs b/mev-rs/src/types/block_submission.rs index 398be8d5..047c7c31 100644 --- a/mev-rs/src/types/block_submission.rs +++ b/mev-rs/src/types/block_submission.rs @@ -1,4 +1,4 @@ -use crate::types::{auction_contents::deneb::BlobsBundle, ExecutionPayload}; +use crate::types::{auction_contents::BlobsBundle, ExecutionPayload}; use ethereum_consensus::{ primitives::{BlsPublicKey, BlsSignature, ExecutionAddress, Hash32, Slot}, ssz::prelude::*,