func ExportGenesis(ctx sdk.Context, k keeper.Keeper) *types.GenesisState {
	var supers []types.Super
	k.IterateSupers(
		ctx,
		func(super types.Super) bool {
			supers = append(supers, super)
			return false
		},
	)
	return types.NewGenesisState(supers)
}
ExportGenesis outputs genesis data
package guardian
import (
	"fmt"
	sdk "github.com/cosmos/cosmos-sdk/types"
	"github.com/irisnet/irishub/modules/guardian/keeper"
	"github.com/irisnet/irishub/modules/guardian/types"
)
func InitGenesis(ctx sdk.Context, keeper keeper.Keeper, data types.GenesisState) {
	if err := ValidateGenesis(data); err != nil {
		panic(fmt.Errorf("failed to initialize guardian genesis state: %s", err.Error()))
	}
	for _, super := range data.Supers {
		keeper.AddSuper(ctx, super)
	}
}