corvidd/x/registry/genesis.go
Prathamesh Musale de489a4d21 Setup and plumbing for registry module (#4)
Reviewed-on: deep-stack/laconic2d#4
Co-authored-by: Prathamesh Musale <prathamesh.musale0@gmail.com>
Co-committed-by: Prathamesh Musale <prathamesh.musale0@gmail.com>
2024-02-15 07:08:32 +00:00

31 lines
778 B
Go

package registry
// DefaultGenesisState sets default evm genesis state with empty accounts and default params and
// chain config values.
func DefaultGenesisState() *GenesisState {
return &GenesisState{
Params: DefaultParams(),
Records: []Record{},
Authorities: []AuthorityEntry{},
Names: []NameEntry{},
}
}
func NewGenesisState(params Params, records []Record, authorities []AuthorityEntry, names []NameEntry) GenesisState {
return GenesisState{
Params: params,
Records: records,
Authorities: authorities,
Names: names,
}
}
// Validate performs basic genesis state validation returning an error upon any
func (gs *GenesisState) Validate() error {
if err := gs.Params.Validate(); err != nil {
return err
}
return nil
}