Trait FromTxWithEncoded

pub trait FromTxWithEncoded<Tx> {
    // Required method
    fn from_encoded_tx(tx: &Tx, sender: Address, encoded: Bytes) -> Self;
}
Expand description

Helper user-facing trait to allow implementing IntoTxEnv on instances of [WithEncoded]. This allows creating transaction environments directly from EIP-2718 encoded bytes.

Required Methods§

fn from_encoded_tx(tx: &Tx, sender: Address, encoded: Bytes) -> Self

Builds a TxEnv from a transaction, its sender, and encoded transaction bytes.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

§

impl FromTxWithEncoded<OpTxEnvelope> for OpTransaction<TxEnv>

§

fn from_encoded_tx( tx: &OpTxEnvelope, caller: Address, encoded: Bytes, ) -> OpTransaction<TxEnv>

§

impl FromTxWithEncoded<TransactionSigned> for TxEnv

§

fn from_encoded_tx( tx: &TransactionSigned, sender: Address, encoded: Bytes, ) -> TxEnv

§

impl FromTxWithEncoded<TxEip1559> for TxEnv

§

fn from_encoded_tx(tx: &TxEip1559, sender: Address, _encoded: Bytes) -> TxEnv

§

impl FromTxWithEncoded<TxEip2930> for TxEnv

§

fn from_encoded_tx(tx: &TxEip2930, sender: Address, _encoded: Bytes) -> TxEnv

§

impl FromTxWithEncoded<TxEip4844> for TxEnv

§

fn from_encoded_tx(tx: &TxEip4844, sender: Address, _encoded: Bytes) -> TxEnv

§

impl FromTxWithEncoded<TxEip7702> for TxEnv

§

fn from_encoded_tx(tx: &TxEip7702, sender: Address, _encoded: Bytes) -> TxEnv

§

impl FromTxWithEncoded<TxLegacy> for TxEnv

§

fn from_encoded_tx(tx: &TxLegacy, sender: Address, _encoded: Bytes) -> TxEnv

§

impl<Eip4844> FromTxWithEncoded<EthereumTxEnvelope<Eip4844>> for TxEnv
where Eip4844: AsRef<TxEip4844>,

§

fn from_encoded_tx( tx: &EthereumTxEnvelope<Eip4844>, caller: Address, encoded: Bytes, ) -> TxEnv

Implementors§

§

impl<TxEnv, T> FromTxWithEncoded<&T> for TxEnv
where TxEnv: FromTxWithEncoded<T>,

impl FromTxWithEncoded<TransactionSigned> for TxEnv