github.com/InjectiveLabs/sdk-go@v1.53.0/chain/peggy/types/genesis.go (about)

     1  package types
     2  
     3  import "cosmossdk.io/errors"
     4  
     5  // ValidateBasic validates genesis state by looping through the params and
     6  // calling their validation functions
     7  func (s GenesisState) ValidateBasic() error {
     8  	if err := s.Params.ValidateBasic(); err != nil {
     9  		return errors.Wrap(err, "params")
    10  	}
    11  	return nil
    12  }
    13  
    14  // DefaultGenesisState returns empty genesis state
    15  func DefaultGenesisState() *GenesisState {
    16  	return &GenesisState{
    17  		Params: DefaultParams(),
    18  	}
    19  }