5ee988ccd8
* Add common message types and update proto gen script * Update proto gen script to generate pulsar proto code * Upgrade direct deps * Populate params and genesis files * Setup keeper files * Setup module files with depinject and autocli * Add placeholder keeper methods * Integrate bond module into the chain
28 lines
586 B
Go
28 lines
586 B
Go
package bond
|
|
|
|
// DefaultGenesisState sets default evm genesis state with empty accounts and default params and
|
|
// chain config values.
|
|
func DefaultGenesisState() *GenesisState {
|
|
return &GenesisState{
|
|
Params: DefaultParams(),
|
|
Bonds: []*Bond{},
|
|
}
|
|
}
|
|
|
|
func NewGenesisState(params Params, bonds []*Bond) *GenesisState {
|
|
return &GenesisState{
|
|
Params: params,
|
|
Bonds: bonds,
|
|
}
|
|
}
|
|
|
|
// Validate performs basic genesis state validation returning an error upon any
|
|
func (gs *GenesisState) Validate() error {
|
|
err := gs.Params.Validate()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
return nil
|
|
}
|