a21e9ea387
* Add proto files for onboarding module * Add generated proto bindings * Define onboarding object * Define the participants state in keeper * Update genesis file to initialize and export module state to/from genesis * Add msg to onboard participant * Register command to enroll participant * Add functionality to decode ethereum address from signature * Add comments for messages and fields * Fix lint errors in proto files * Add message validation and events in msg_server * Reuse crypto utils from go-nitro * Sign entire eth_payload object * Use google API for rpc method * Regenerate proto bindings --------- Co-authored-by: Prathamesh Musale <prathamesh.musale0@gmail.com>
25 lines
521 B
Go
25 lines
521 B
Go
package onboarding
|
|
|
|
func DefaultGenesisState() *GenesisState {
|
|
return &GenesisState{
|
|
Params: DefaultParams(),
|
|
Participants: []Participant{},
|
|
}
|
|
}
|
|
|
|
func NewGenesisState(params Params, participants []Participant) *GenesisState {
|
|
return &GenesisState{
|
|
Params: params,
|
|
Participants: participants,
|
|
}
|
|
}
|
|
|
|
// 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
|
|
}
|