Skip to main content

FoundryChain

Trait FoundryChain 

Source
pub trait FoundryChain<Tx>:
    Clone
    + Debug
    + Default
    + Send
    + Sync {
    // Provided methods
    fn for_transaction(_tx: &Tx) -> Self { ... }
    fn for_block(
        _grandparent: &[Tx],
        _parent: &[Tx],
        _current: &[Tx],
        _current_tx_index: usize,
    ) -> Self { ... }
    fn refresh_journal<J: FoundryJournal>(&self, _journal: &mut J) { ... }
}
Expand description

Foundry extension for chain context type

Every family that doesn’t need chain metadata uses ().

Provided Methods§

Source

fn for_transaction(_tx: &Tx) -> Self

Builds chain context for a standalone synthetic transaction.

Source

fn for_block( _grandparent: &[Tx], _parent: &[Tx], _current: &[Tx], _current_tx_index: usize, ) -> Self

Builds chain context for a transaction at an exact block position.

Source

fn refresh_journal<J: FoundryJournal>(&self, _journal: &mut J)

Refreshes journal state derived from the active chain position.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl FoundryChain<OpTx> for L1BlockInfo

Available on crate feature optimism only.
Source§

impl FoundryChain<TxEnv> for MonadChainContext

Available on crate feature monad only.
Source§

fn for_transaction(tx: &TxEnv) -> Self

Source§

fn for_block( grandparent: &[TxEnv], parent: &[TxEnv], current: &[TxEnv], current_tx_index: usize, ) -> Self

Source§

fn refresh_journal<J: FoundryJournal>(&self, journal: &mut J)

Source§

impl<Tx> FoundryChain<Tx> for ()

Implementors§