Documentation ¶
Index ¶
Constants ¶
const (
ApiModuleName = "GenesisBuilder"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GenesisBuilder ¶
type Module ¶
type Module struct {
// contains filtered or unexported fields
}
Module implements the GenesisBuilder Runtime API definition.
For more information about API definition, see: https://github.com/paritytech/polkadot-sdk/blob/master/substrate/primitives/genesis-builder/src/lib.rs#L38
func New ¶
func New(modules []primitives.Module, logger log.RuntimeLogger) Module
func (Module) BuildConfig ¶
BuildConfig validates the genesis configuration and stores it in the storage. It takes two arguments: - dataPtr: Pointer to the data in the Wasm memory. - dataLen: Length of the data. which represent the SCALE-encoded serialised JSON genesis configuration. The serialised bytes must contain the genesis configuration for each runtime module.
func (Module) CreateDefaultConfig ¶
CreateDefaultConfig returns the default genesis configuration of the runtime. Includes all modules' JSON default configuration. Returns a pointer-size of the serialised JSON representation of the default genesis configuration.
func (Module) Item ¶
func (m Module) Item() primitives.ApiItem
Item returns the first 8 bytes of the Blake2b hash of the name and version of the api module.