corvidd/x/auction/genesis.go
Prathamesh Musale cb1f723475 Add commands to create and get auctions (#2)
To be added in an upcoming PR:
- commands to commit, reveal and get bids

Reviewed-on: deep-stack/laconic2d#2
Co-authored-by: Prathamesh Musale <prathamesh.musale0@gmail.com>
Co-committed-by: Prathamesh Musale <prathamesh.musale0@gmail.com>
2024-02-12 08:34:40 +00:00

25 lines
528 B
Go

package auction
func DefaultGenesisState() *GenesisState {
return &GenesisState{
Params: DefaultParams(),
Auctions: &Auctions{Auctions: []Auction{}},
}
}
func NewGenesisState(params Params, auctions []Auction) *GenesisState {
return &GenesisState{
Params: params,
Auctions: &Auctions{Auctions: auctions},
}
}
// 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
}