InitGenesis performs the module's genesis initialization It returns no validator updates.
(ctx sdk.Context, cdc codec.JSONCodec, gs json.RawMessage)
| 123 | // InitGenesis performs the module's genesis initialization It returns |
| 124 | // no validator updates. |
| 125 | func (am AppModule) InitGenesis(ctx sdk.Context, cdc codec.JSONCodec, gs json.RawMessage) { |
| 126 | var genState types.GenesisState |
| 127 | // Initialize global index to index in genesis state |
| 128 | cdc.MustUnmarshalJSON(gs, &genState) |
| 129 | |
| 130 | am.keeper.InitGenesis(ctx, genState) |
| 131 | } |
| 132 | |
| 133 | // ExportGenesis returns the module's exported genesis state as raw JSON bytes. |
| 134 | func (am AppModule) ExportGenesis(ctx sdk.Context, cdc codec.JSONCodec) json.RawMessage { |