-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'feat/vesting-delegate' of https://github.com/decentrio/…
…mesh-security-sdk into feat/native-immediate-unbonding
- Loading branch information
Showing
7 changed files
with
25 additions
and
463 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
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
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
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
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
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 |
---|---|---|
@@ -1,35 +1 @@ | ||
package types | ||
|
||
import ( | ||
sdk "github.com/cosmos/cosmos-sdk/types" | ||
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" | ||
) | ||
|
||
const ( | ||
TypeMsgTest = "test" | ||
) | ||
|
||
var _ sdk.Msg = &MsgTest{} | ||
|
||
func (msg MsgTest) Route() string { return ModuleName } | ||
func (msg MsgTest) Type() string { return TypeMsgTest } | ||
func (msg MsgTest) ValidateBasic() error { | ||
_, err := sdk.AccAddressFromBech32(msg.Sender) | ||
if err != nil { | ||
return sdkerrors.Wrapf(sdkerrors.ErrInvalidAddress, "Invalid sender address (%s)", err) | ||
} | ||
|
||
return nil | ||
} | ||
|
||
func (msg MsgTest) GetSignBytes() []byte { | ||
return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(&msg)) | ||
} | ||
|
||
func (msg MsgTest) GetSigners() []sdk.AccAddress { | ||
sender, err := sdk.AccAddressFromBech32(msg.Sender) | ||
if err != nil { | ||
panic(err) | ||
} | ||
return []sdk.AccAddress{sender} | ||
} |
Oops, something went wrong.