pub trait Genesis {
    type Context: Context;
    type Config;

    // Required method
    fn genesis(
        &self,
        config: &Self::Config,
        working_set: &mut WorkingSet<<<Self as Genesis>::Context as Spec>::Storage>
    ) -> Result<(), Error>;
}
Expand description

Methods from this trait should be called only once during the rollup deployment.

Required Associated Types§

source

type Context: Context

source

type Config

Initial configuration for the module.

Required Methods§

source

fn genesis( &self, config: &Self::Config, working_set: &mut WorkingSet<<<Self as Genesis>::Context as Spec>::Storage> ) -> Result<(), Error>

Initializes the state of the rollup.

Implementors§

source§

impl<T> Genesis for Twhere T: Module,

§

type Context = <T as Module>::Context

§

type Config = <T as Module>::Config