mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
feat: add missing from impls (#13527)
This commit is contained in:
@ -4,7 +4,7 @@ use alloc::vec::Vec;
|
||||
pub use alloy_consensus::transaction::PooledTransaction;
|
||||
use alloy_consensus::{
|
||||
transaction::RlpEcdsaTx, SignableTransaction, Signed, Transaction as _, TxEip1559, TxEip2930,
|
||||
TxEip4844, TxEip4844Variant, TxEip4844WithSidecar, TxEip7702, TxLegacy, Typed2718,
|
||||
TxEip4844, TxEip4844Variant, TxEip4844WithSidecar, TxEip7702, TxEnvelope, TxLegacy, Typed2718,
|
||||
TypedTransaction,
|
||||
};
|
||||
use alloy_eips::{
|
||||
@ -1465,6 +1465,26 @@ impl From<Signed<TxEip4844WithSidecar>> for TransactionSigned {
|
||||
}
|
||||
}
|
||||
|
||||
impl From<Signed<TxEip4844Variant>> for TransactionSigned {
|
||||
fn from(value: Signed<TxEip4844Variant>) -> Self {
|
||||
let (tx, sig, hash) = value.into_parts();
|
||||
Self::new(tx.into(), sig, hash)
|
||||
}
|
||||
}
|
||||
|
||||
impl From<TxEnvelope> for TransactionSigned {
|
||||
fn from(value: TxEnvelope) -> Self {
|
||||
match value {
|
||||
TxEnvelope::Legacy(tx) => tx.into(),
|
||||
TxEnvelope::Eip2930(tx) => tx.into(),
|
||||
TxEnvelope::Eip1559(tx) => tx.into(),
|
||||
TxEnvelope::Eip4844(tx) => tx.into(),
|
||||
TxEnvelope::Eip7702(tx) => tx.into(),
|
||||
_ => unreachable!(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl From<TransactionSigned> for Signed<Transaction> {
|
||||
fn from(value: TransactionSigned) -> Self {
|
||||
let (tx, sig, hash) = value.into_parts();
|
||||
|
||||
Reference in New Issue
Block a user