cosmos-sdk/core/appmodule/v2/genesis.go
Marko d2e40963ed
refactor(modules): adopt appmodulev2.Hasgenesis (#19627)
Co-authored-by: Julien Robert <julien@rbrt.fr>
2024-03-11 10:22:16 +00:00

18 lines
547 B
Go

package appmodule
import (
"context"
"encoding/json"
)
// HasGenesis defines a custom genesis handling API implementation.
// WARNING: this API is meant as a short-term solution to allow for the
// migration of existing modules to the new app module API. It is intended to be replaced by collections
type HasGenesis interface {
AppModule
DefaultGenesis() json.RawMessage
ValidateGenesis(data json.RawMessage) error
InitGenesis(ctx context.Context, data json.RawMessage) error
ExportGenesis(ctx context.Context) (json.RawMessage, error)
}