Skip to main content

DatabaseExt

Trait DatabaseExt 

Source
pub(crate) trait DatabaseExt: JournalTr {
    // Required methods
    fn method_that_takes_inspector_as_argument<InspectorT, BlockT, TxT, CfgT>(
        &mut self,
        env: Env<BlockT, TxT, CfgT>,
        inspector: InspectorT,
    ) -> Result<()>
       where InspectorT: Inspector<Context<BlockT, TxT, CfgT, InMemoryDB, Backend>, EthInterpreter>,
             BlockT: Block,
             TxT: Transaction + Clone,
             CfgT: Cfg;
    fn method_that_constructs_inspector<BlockT, TxT, CfgT>(
        &mut self,
        env: Env<BlockT, TxT, CfgT>,
    ) -> Result<()>
       where BlockT: Block,
             TxT: Transaction + Clone,
             CfgT: Cfg;
}
Expand description

Used in Foundry to provide extended functionality to cheatcodes. The methods are called from the Cheatcodes inspector.

Required Methods§

Source

fn method_that_takes_inspector_as_argument<InspectorT, BlockT, TxT, CfgT>( &mut self, env: Env<BlockT, TxT, CfgT>, inspector: InspectorT, ) -> Result<()>
where InspectorT: Inspector<Context<BlockT, TxT, CfgT, InMemoryDB, Backend>, EthInterpreter>, BlockT: Block, TxT: Transaction + Clone, CfgT: Cfg,

Mimics DatabaseExt::transact See commit_transaction for the generics

Source

fn method_that_constructs_inspector<BlockT, TxT, CfgT>( &mut self, env: Env<BlockT, TxT, CfgT>, ) -> Result<()>
where BlockT: Block, TxT: Transaction + Clone, CfgT: Cfg,

Mimics DatabaseExt::roll_fork_to_transaction

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§