2024-02-09 08:44:45 +00:00
|
|
|
package auction
|
|
|
|
|
|
|
|
func DefaultGenesisState() *GenesisState {
|
|
|
|
return &GenesisState{
|
|
|
|
Params: DefaultParams(),
|
2024-02-12 08:34:40 +00:00
|
|
|
Auctions: &Auctions{Auctions: []Auction{}},
|
2024-02-09 08:44:45 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2024-02-12 08:34:40 +00:00
|
|
|
func NewGenesisState(params Params, auctions []Auction) *GenesisState {
|
2024-02-09 08:44:45 +00:00
|
|
|
return &GenesisState{
|
|
|
|
Params: params,
|
2024-02-12 08:34:40 +00:00
|
|
|
Auctions: &Auctions{Auctions: auctions},
|
2024-02-09 08:44:45 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// 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
|
|
|
|
}
|