Trait TransactionEnv

Source
pub trait TransactionEnv:
    Transaction
    + Debug
    + Clone
    + Send
    + Sync
    + 'static {
    // Required methods
    fn set_gas_limit(&mut self, gas_limit: u64);
    fn nonce(&self) -> u64;
    fn set_nonce(&mut self, nonce: u64);
    fn set_access_list(&mut self, access_list: AccessList);

    // Provided methods
    fn with_gas_limit(self, gas_limit: u64) -> Self { ... }
    fn with_nonce(self, nonce: u64) -> Self { ... }
    fn with_access_list(self, access_list: AccessList) -> Self { ... }
}
Expand description

Abstraction over transaction environment.

Required Methods§

Source

fn set_gas_limit(&mut self, gas_limit: u64)

Set the gas limit.

Source

fn nonce(&self) -> u64

Returns the configured nonce.

Source

fn set_nonce(&mut self, nonce: u64)

Sets the nonce.

Source

fn set_access_list(&mut self, access_list: AccessList)

Set access list.

Provided Methods§

Source

fn with_gas_limit(self, gas_limit: u64) -> Self

Set the gas limit.

Source

fn with_nonce(self, nonce: u64) -> Self

Sets the nonce.

Source

fn with_access_list(self, access_list: AccessList) -> Self

Set access list.

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§

Source§

impl TransactionEnv for TxEnv

Source§

fn set_gas_limit(&mut self, gas_limit: u64)

Source§

fn nonce(&self) -> u64

Source§

fn set_nonce(&mut self, nonce: u64)

Source§

fn set_access_list(&mut self, access_list: AccessList)

Source§

impl<T: TransactionEnv> TransactionEnv for OpTransaction<T>

Available on crate feature op only.
Source§

fn set_gas_limit(&mut self, gas_limit: u64)

Source§

fn nonce(&self) -> u64

Source§

fn set_nonce(&mut self, nonce: u64)

Source§

fn set_access_list(&mut self, access_list: AccessList)

Implementors§