forked from cerc-io/laconicd
Implement onboarding module for testnet validator enrollment (#3)
* 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>
This commit is contained in:
@@ -52,21 +52,21 @@ func NewAppModuleBasic(m AppModule) module.AppModuleBasic {
|
||||
|
||||
// module.AppModuleBasic
|
||||
|
||||
// Name returns the checkers module's name.
|
||||
// Name returns the registry module's name.
|
||||
func (AppModule) Name() string { return registrytypes.ModuleName }
|
||||
|
||||
// RegisterLegacyAminoCodec registers the checkers module's types on the LegacyAmino codec.
|
||||
// RegisterLegacyAminoCodec registers the registry module's types on the LegacyAmino codec.
|
||||
// New modules do not need to support Amino.
|
||||
func (AppModule) RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) {}
|
||||
|
||||
// RegisterGRPCGatewayRoutes registers the gRPC Gateway routes for the checkers module.
|
||||
// RegisterGRPCGatewayRoutes registers the gRPC Gateway routes for the registry module.
|
||||
func (AppModule) RegisterGRPCGatewayRoutes(clientCtx client.Context, mux *gwruntime.ServeMux) {
|
||||
if err := registrytypes.RegisterQueryHandlerClient(context.Background(), mux, registrytypes.NewQueryClient(clientCtx)); err != nil {
|
||||
panic(err)
|
||||
}
|
||||
}
|
||||
|
||||
// RegisterInterfaces registers interfaces and implementations of the checkers module.
|
||||
// RegisterInterfaces registers interfaces and implementations of the registry module.
|
||||
func (AppModule) RegisterInterfaces(registry codectypes.InterfaceRegistry) {
|
||||
registrytypes.RegisterInterfaces(registry)
|
||||
}
|
||||
@@ -91,7 +91,7 @@ func (AppModule) ValidateGenesis(cdc codec.JSONCodec, _ client.TxEncodingConfig,
|
||||
return data.Validate()
|
||||
}
|
||||
|
||||
// InitGenesis performs genesis initialization for the checkers module.
|
||||
// InitGenesis performs genesis initialization for the registry module.
|
||||
// It returns no validator updates.
|
||||
func (am AppModule) InitGenesis(ctx sdk.Context, cdc codec.JSONCodec, data json.RawMessage) {
|
||||
var genesisState registrytypes.GenesisState
|
||||
|
||||
Reference in New Issue
Block a user