Skip to content

Commit a7467c9

Browse files
authored
feat: add missing conversion fns (#3124)
1 parent 330bac2 commit a7467c9

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

crates/consensus/src/transaction/eip4844.rs

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ use core::{fmt, mem};
1515

1616
#[cfg(feature = "kzg")]
1717
use alloy_eips::eip4844::BlobTransactionValidationError;
18+
use alloy_eips::eip7594::{BlobTransactionSidecarEip7594, BlobTransactionSidecarVariant};
1819

1920
/// [EIP-4844 Blob Transaction](https://eips.ethereum.org/EIPS/eip-4844#blob-transaction)
2021
///
@@ -73,6 +74,22 @@ impl<T: Encodable7594> From<Signed<TxEip4844WithSidecar<T>>> for Signed<TxEip484
7374
}
7475
}
7576

77+
impl From<TxEip4844Variant<BlobTransactionSidecar>>
78+
for TxEip4844Variant<BlobTransactionSidecarVariant>
79+
{
80+
fn from(value: TxEip4844Variant<BlobTransactionSidecar>) -> Self {
81+
value.map_sidecar(Into::into)
82+
}
83+
}
84+
85+
impl From<TxEip4844Variant<BlobTransactionSidecarEip7594>>
86+
for TxEip4844Variant<BlobTransactionSidecarVariant>
87+
{
88+
fn from(value: TxEip4844Variant<BlobTransactionSidecarEip7594>) -> Self {
89+
value.map_sidecar(Into::into)
90+
}
91+
}
92+
7693
impl<T> From<TxEip4844WithSidecar<T>> for TxEip4844Variant<T> {
7794
fn from(tx: TxEip4844WithSidecar<T>) -> Self {
7895
Self::TxEip4844WithSidecar(tx)

0 commit comments

Comments
 (0)