-
Notifications
You must be signed in to change notification settings - Fork 648
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: adding basic Msg service and SubmitTx rpc boilerplate #2086
Changes from 13 commits
d20f2d2
48e44b6
3cacc48
ab10570
5eb8eb2
1748c3a
c0a5259
aa6ce16
a4a7708
81d74fd
bd25b55
6e6fe62
fee8080
a605ba6
a0a21ff
6c508cb
a9e44a1
a8bb9ca
c897d0b
ab6a796
656ca38
7f4274e
4eec1dc
e26f181
864cbfb
1f0828a
679d47c
26b6d6f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -6,6 +6,8 @@ import ( | |||||
sdk "github.com/cosmos/cosmos-sdk/types" | ||||||
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" | ||||||
|
||||||
icatypes "github.com/cosmos/ibc-go/v5/modules/apps/27-interchain-accounts/types" | ||||||
clienttypes "github.com/cosmos/ibc-go/v5/modules/core/02-client/types" | ||||||
host "github.com/cosmos/ibc-go/v5/modules/core/24-host" | ||||||
) | ||||||
|
||||||
|
@@ -46,3 +48,24 @@ func (msg MsgRegisterAccount) GetSigners() []sdk.AccAddress { | |||||
|
||||||
return []sdk.AccAddress{accAddr} | ||||||
} | ||||||
|
||||||
// NewMsgSubmitTx creates a new instance of MsgSubmitTx | ||||||
func NewMsgSubmitTx(connectionID, owner string, timeoutHeight clienttypes.Height, timeoutTimestamp uint64, msgs []*icatypes.InterchainAccountPacketData) *MsgSubmitTx { | ||||||
return &MsgSubmitTx{ | ||||||
ConnectionId: connectionID, | ||||||
Owner: owner, | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This should be an AccAddress I believe because it is on the controller chain, we know it should be a valid address There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. is it better to cast it in the proto or check if its a valid addr in ValidateBasic? |
||||||
TimeoutHeight: timeoutHeight, | ||||||
TimeoutTimestamp: timeoutTimestamp, | ||||||
Msgs: msgs, | ||||||
} | ||||||
} | ||||||
|
||||||
// ValidateBasic implements sdk.Msg | ||||||
func (msg MsgSubmitTx) ValidateBasic() error { | ||||||
return nil | ||||||
} | ||||||
|
||||||
// GetSigners implements sdk.Msg | ||||||
func (msg MsgSubmitTx) GetSigners() []sdk.AccAddress { | ||||||
return []sdk.AccAddress{} | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
This needs to be authenticated by owner signature There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yea i would fill out this function in the next PR along with validate basic :) |
||||||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can consolidate these registrations