BundleDriver

Trait BundleDriver 

Source
pub trait BundleDriver<Db, Insp = NoOpInspector>
where Db: Database + DatabaseCommit, Insp: Inspector<Ctx<Db>>,
{ type Error: Error + From<EVMError<Db::Error>>; // Required methods fn run_bundle( &mut self, trevm: EvmNeedsTx<Db, Insp>, ) -> DriveBundleResult<Self, Db, Insp>; fn post_bundle( &mut self, trevm: &EvmNeedsTx<Db, Insp>, ) -> Result<(), Self::Error>; }
Expand description

Driver for a bundle of transactions. This trait allows a type to specify the entire lifecycle of a bundle, simulating the entire list of transactions.

Required Associated Types§

Source

type Error: Error + From<EVMError<Db::Error>>

An error type for this driver.

Required Methods§

Source

fn run_bundle( &mut self, trevm: EvmNeedsTx<Db, Insp>, ) -> DriveBundleResult<Self, Db, Insp>

Run the transactions contained in the bundle.

Source

fn post_bundle( &mut self, trevm: &EvmNeedsTx<Db, Insp>, ) -> Result<(), Self::Error>

Run post

Implementations on Foreign Types§

Source§

impl<Db, Insp> BundleDriver<Db, Insp> for EthCallBundle
where Db: Database + DatabaseCommit, Insp: Inspector<Ctx<Db>>,

Source§

type Error = BundleError<Db>

Source§

fn run_bundle( &mut self, trevm: EvmNeedsTx<Db, Insp>, ) -> DriveBundleResult<Self, Db, Insp>

Source§

fn post_bundle( &mut self, _trevm: &EvmNeedsTx<Db, Insp>, ) -> Result<(), Self::Error>

Source§

impl<Db, Insp> BundleDriver<Db, Insp> for EthSendBundle
where Db: Database + DatabaseCommit, Insp: Inspector<Ctx<Db>>,

An implementation of BundleDriver for EthSendBundle. This allows us to drive a bundle of transactions and accumulate the resulting state in the EVM. Allows to simply take an EthSendBundle and get the resulting EVM state.

Source§

type Error = BundleError<Db>

Source§

fn run_bundle( &mut self, trevm: EvmNeedsTx<Db, Insp>, ) -> DriveBundleResult<Self, Db, Insp>

Source§

fn post_bundle( &mut self, _trevm: &EvmNeedsTx<Db, Insp>, ) -> Result<(), Self::Error>

Implementors§