pub trait ExtensionsFactory<Block: BlockT>: Send + Sync {
    // Required method
    fn extensions_for(
        &self,
        block_hash: Block::Hash,
        block_number: NumberFor<Block>
    ) -> Extensions;
}
Expand description

Generate the starting set of Extensions.

These Extensions are passed to the environment a runtime is executed in.

Required Methods§

source

fn extensions_for( &self, block_hash: Block::Hash, block_number: NumberFor<Block> ) -> Extensions

Create Extensions for the given input.

  • block_hash: The hash of the block in the context that extensions will be used.
  • block_number: The number of the block in the context that extensions will be used.

Implementations on Foreign Types§

source§

impl<Block: BlockT, T: ExtensionsFactory<Block>> ExtensionsFactory<Block> for Vec<T>

source§

fn extensions_for( &self, block_hash: Block::Hash, block_number: NumberFor<Block> ) -> Extensions

source§

impl<Block: BlockT> ExtensionsFactory<Block> for ()

source§

fn extensions_for(&self, _: Block::Hash, _: NumberFor<Block>) -> Extensions

Implementors§

source§

impl<Block: BlockT, Ext: Default + Extension> ExtensionsFactory<Block> for ExtensionBeforeBlock<Block, Ext>