reth_rpc_types_compat::transaction

Trait TransactionCompat

Source
pub trait TransactionCompat<T = TransactionSigned>:
    Send
    + Sync
    + Unpin
    + Clone
    + Debug {
    type Transaction: Serialize + for<'de> Deserialize<'de> + Send + Sync + Unpin + Clone + Debug;
    type Error: Error + Into<ErrorObject<'static>>;

    // Required methods
    fn fill(
        &self,
        tx: TransactionSignedEcRecovered<T>,
        tx_inf: TransactionInfo,
    ) -> Result<Self::Transaction, Self::Error>;
    fn otterscan_api_truncate_input(tx: &mut Self::Transaction);
}
Expand description

Builds RPC transaction w.r.t. network.

Required Associated Types§

Source

type Transaction: Serialize + for<'de> Deserialize<'de> + Send + Sync + Unpin + Clone + Debug

RPC transaction response type.

Source

type Error: Error + Into<ErrorObject<'static>>

RPC transaction error type.

Required Methods§

Source

fn fill( &self, tx: TransactionSignedEcRecovered<T>, tx_inf: TransactionInfo, ) -> Result<Self::Transaction, Self::Error>

Create a new rpc transaction result for a pending signed transaction, setting block environment related fields to None.

Source

fn otterscan_api_truncate_input(tx: &mut Self::Transaction)

Truncates the input of a transaction to only the first 4 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.

Implementors§