TransactionEnv

Trait TransactionEnv 

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 { ... }
}
Available on crate feature evm only.
Expand description

Abstraction over transaction environment.

Required Methods§

fn set_gas_limit(&mut self, gas_limit: u64)

Set the gas limit.

fn nonce(&self) -> u64

Returns the configured nonce.

fn set_nonce(&mut self, nonce: u64)

Sets the nonce.

fn set_access_list(&mut self, access_list: AccessList)

Set access list.

Provided Methods§

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

Set the gas limit.

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

Sets the nonce.

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.

Implementors§