diff --git a/go/node/deployment/v1/codec.go b/go/node/deployment/v1/codec.go new file mode 100644 index 00000000..0cad24fd --- /dev/null +++ b/go/node/deployment/v1/codec.go @@ -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()) +) + diff --git a/go/node/deployment/v1/msgs.go b/go/node/deployment/v1/msgs.go new file mode 100644 index 00000000..7bbe13ec --- /dev/null +++ b/go/node/deployment/v1/msgs.go @@ -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)) +} + diff --git a/proto/node/akash/deployment/v1/msg.proto b/proto/node/akash/deployment/v1/msg.proto index e2196f9a..34f6cf24 100644 --- a/proto/node/akash/deployment/v1/msg.proto +++ b/proto/node/akash/deployment/v1/msg.proto @@ -10,7 +10,6 @@ import "akash/deployment/v1/deployment.proto"; option go_package = "pkg.akt.dev/go/node/deployment/v1"; - // MsgDepositDeployment deposits more funds into the deposit account message MsgDepositDeployment { option (gogoproto.equal) = false; @@ -36,5 +35,5 @@ message MsgDepositDeployment { ]; } -// MsgCreateDeploymentResponse defines the Msg/CreateDeployment response type. +// MsgDepositDeploymentResponse defines response type for the MsgDepositDeployment. message MsgDepositDeploymentResponse {}