revm_context_interface/transaction/
eip2930.rs

1use auto_impl::auto_impl;
2use primitives::{Address, B256};
3
4/// Access list type is introduced in EIP-2930, and every
5/// transaction after it contains access list.
6///
7/// **Note**: Iterator over access list returns account address and storage slot keys that
8/// are warm loaded before transaction execution.
9///
10/// Number of account and storage slots is used to calculate initial tx gas cost.
11#[auto_impl(&, Box, Arc, Rc)]
12pub trait AccessListItemTr {
13    /// Returns account address.
14    fn address(&self) -> &Address;
15
16    /// Returns storage slot keys.
17    fn storage_slots(&self) -> impl Iterator<Item = &B256>;
18}