-
Notifications
You must be signed in to change notification settings - Fork 610
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: adding basic
Msg
service and RegisterAccount
rpc boilerpla…
…te (#2068) (#2109) * adding new controller msg service, register account types, register interfaces and boilerplate * fixing typo * fixing protodoc and regenerate godocs * adding channel id to MsgRegisterAccountResponse (cherry picked from commit 5765fe7) Co-authored-by: Damian Nolan <[email protected]>
- Loading branch information
1 parent
d8d0a7e
commit 2acc05b
Showing
8 changed files
with
819 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
modules/apps/27-interchain-accounts/controller/keeper/msg_server.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package keeper | ||
|
||
import ( | ||
"context" | ||
|
||
"github.com/cosmos/ibc-go/v5/modules/apps/27-interchain-accounts/controller/types" | ||
) | ||
|
||
var _ types.MsgServer = Keeper{} | ||
|
||
// RegisterAccount defines a rpc handler for MsgRegisterAccount | ||
func (k Keeper) RegisterAccount(goCtx context.Context, msg *types.MsgRegisterAccount) (*types.MsgRegisterAccountResponse, error) { | ||
return &types.MsgRegisterAccountResponse{}, nil | ||
} |
11 changes: 11 additions & 0 deletions
11
modules/apps/27-interchain-accounts/controller/types/codec.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package types | ||
|
||
import ( | ||
codectypes "github.com/cosmos/cosmos-sdk/codec/types" | ||
sdk "github.com/cosmos/cosmos-sdk/types" | ||
) | ||
|
||
// RegisterInterfaces registers the interchain accounts controller message types using the provided InterfaceRegistry | ||
func RegisterInterfaces(registry codectypes.InterfaceRegistry) { | ||
registry.RegisterImplementations((*sdk.Msg)(nil), &MsgRegisterAccount{}) | ||
} |
24 changes: 24 additions & 0 deletions
24
modules/apps/27-interchain-accounts/controller/types/msgs.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package types | ||
|
||
import ( | ||
sdk "github.com/cosmos/cosmos-sdk/types" | ||
) | ||
|
||
// NewMsgRegisterAccount creates a new instance of MsgRegisterAccount | ||
func NewMsgRegisterAccount(connectionID, owner, version string) *MsgRegisterAccount { | ||
return &MsgRegisterAccount{ | ||
ConnectionId: connectionID, | ||
Owner: owner, | ||
Version: version, | ||
} | ||
} | ||
|
||
// ValidateBasic implements sdk.Msg | ||
func (msg MsgRegisterAccount) ValidateBasic() error { | ||
return nil | ||
} | ||
|
||
// GetSigners implements sdk.Msg | ||
func (msg MsgRegisterAccount) GetSigners() []sdk.AccAddress { | ||
return []sdk.AccAddress{} | ||
} |
Oops, something went wrong.