Trait BalIndexedDatabase
pub trait BalIndexedDatabase: Database {
// Required methods
fn set_bal_index(&mut self, index: u64);
fn bump_bal_index(&mut self);
}Expand description
Database that tracks the current block-level access list (BAL) index from EIP-7928.
BAL values are indexed by their position in block execution. Index 0 is reserved for
pre-transaction block execution changes, such as system contract calls. Regular transactions
start at index 1, so transaction 0 in the block uses BAL index 1, transaction 1 uses BAL
index 2, and so on. Post-transaction block execution changes use the index after the last
transaction.
Required Methods§
fn set_bal_index(&mut self, index: u64)
fn set_bal_index(&mut self, index: u64)
Sets the current EIP-7928 BAL index for subsequent database reads and writes.
Use index 0 for pre-transaction block execution, tx_index + 1 for regular transactions
in the block, and the next index after the last transaction for post-transaction block
execution. In other words, regular block transactions start at BAL index 1.
fn bump_bal_index(&mut self)
fn bump_bal_index(&mut self)
Advances the current BAL index.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".