-
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.
fix(go): implement GetSignBytes for MsgDepositDeployment
Signed-off-by: Artur Troian <[email protected]>
- Loading branch information
Showing
3 changed files
with
33 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package v1 | ||
|
||
import ( | ||
"github.com/cosmos/cosmos-sdk/codec" | ||
cdctypes "github.com/cosmos/cosmos-sdk/codec/types" | ||
) | ||
|
||
var ( | ||
// ModuleCdc references the global x/deployment module codec. Note, the codec should | ||
// ONLY be used in certain instances of tests and for JSON encoding as Amino is | ||
// still used for that purpose. | ||
// | ||
// The actual codec used for serialization should be provided to x/deployment and | ||
// defined at the application level. | ||
// | ||
// Deprecated: ModuleCdc use is deprecated | ||
ModuleCdc = codec.NewProtoCodec(cdctypes.NewInterfaceRegistry()) | ||
) | ||
|
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,13 @@ | ||
package v1 | ||
|
||
import ( | ||
sdk "github.com/cosmos/cosmos-sdk/types" | ||
) | ||
|
||
// GetSignBytes encodes the message for signing | ||
// | ||
// Deprecated: GetSignBytes is deprecated | ||
func (msg *MsgDepositDeployment) GetSignBytes() []byte { | ||
return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(msg)) | ||
} | ||
|
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