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
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.