revm_context_interface::transaction

Trait AccessListTrait

Source
pub trait AccessListTrait: Clone {
    // Required method
    fn iter(
        &self,
    ) -> impl Iterator<Item = (Address, impl Iterator<Item = B256>)>;

    // Provided method
    fn num_account_storages(&self) -> (usize, usize) { ... }
}
Expand description

Access list type is introduced in EIP-2930, and every transaction after it contains access list.

Note

Iterator over access list returns account address and storage slot keys that are warm loaded before transaction execution.

Number of account and storage slots is used to calculate initial tx gas cost.

Required Methods§

Source

fn iter(&self) -> impl Iterator<Item = (Address, impl Iterator<Item = B256>)>

Iterate over access list.

Provided Methods§

Source

fn num_account_storages(&self) -> (usize, usize)

Returns number of account and storage slots.

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 AccessListTrait for AccessList

Source§

fn iter(&self) -> impl Iterator<Item = (Address, impl Iterator<Item = B256>)>

Source§

impl<'a, T: 'a + AccessListTrait + ?Sized> AccessListTrait for &'a T
where &'a T: Clone,

Source§

fn iter(&self) -> impl Iterator<Item = (Address, impl Iterator<Item = B256>)>

Source§

fn num_account_storages(&self) -> (usize, usize)

Source§

impl<T: AccessListTrait + ?Sized> AccessListTrait for Box<T>
where Box<T>: Clone,

Source§

fn iter(&self) -> impl Iterator<Item = (Address, impl Iterator<Item = B256>)>

Source§

fn num_account_storages(&self) -> (usize, usize)

Source§

impl<T: AccessListTrait + ?Sized> AccessListTrait for Rc<T>
where Rc<T>: Clone,

Source§

fn iter(&self) -> impl Iterator<Item = (Address, impl Iterator<Item = B256>)>

Source§

fn num_account_storages(&self) -> (usize, usize)

Source§

impl<T: AccessListTrait + ?Sized> AccessListTrait for Arc<T>
where Arc<T>: Clone,

Source§

fn iter(&self) -> impl Iterator<Item = (Address, impl Iterator<Item = B256>)>

Source§

fn num_account_storages(&self) -> (usize, usize)

Implementors§