From 8e3b7a0c5c32f12fda2ac16b5bdd344516da7373 Mon Sep 17 00:00:00 2001 From: Jiri Date: Tue, 1 Aug 2023 14:46:32 +0200 Subject: [PATCH] Changes --- types/module/module.go | 1 + x/verification/client/cli/query.go | 214 ------------------ x/verification/client/cli/tx.go | 18 +- x/verification/client/rest/query.go | 118 ---------- x/verification/client/rest/rest.go | 19 -- x/verification/client/rest/tx.go | 51 ----- x/verification/client/testutil/cli_helpers.go | 26 --- x/verification/client/testutil/cli_test.go | 0 x/verification/client/testutil/suite.go | 0 x/verification/module.go | 130 ----------- x/verification/types/codec.go | 22 +- x/verification/types/msgs.go | 13 +- 12 files changed, 19 insertions(+), 593 deletions(-) delete mode 100644 x/verification/client/cli/query.go delete mode 100644 x/verification/client/rest/query.go delete mode 100644 x/verification/client/rest/rest.go delete mode 100644 x/verification/client/rest/tx.go delete mode 100644 x/verification/client/testutil/cli_helpers.go delete mode 100644 x/verification/client/testutil/cli_test.go delete mode 100644 x/verification/client/testutil/suite.go delete mode 100644 x/verification/module.go diff --git a/types/module/module.go b/types/module/module.go index 795553e78c..7a56a91009 100644 --- a/types/module/module.go +++ b/types/module/module.go @@ -85,6 +85,7 @@ func (bm BasicManager) RegisterInterfaces(registry codectypes.InterfaceRegistry) for _, m := range bm { m.RegisterInterfaces(registry) } + } // DefaultGenesis provides default genesis information for all modules diff --git a/x/verification/client/cli/query.go b/x/verification/client/cli/query.go deleted file mode 100644 index a9cdadb975..0000000000 --- a/x/verification/client/cli/query.go +++ /dev/null @@ -1,214 +0,0 @@ -package cli - -import ( - "fmt" - "strings" - - "github.com/spf13/cobra" - - "github.com/cosmos/cosmos-sdk/client" - "github.com/cosmos/cosmos-sdk/client/flags" - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/version" - "github.com/cosmos/cosmos-sdk/x/bank/types" -) - -const ( - FlagDenom = "denom" -) - -// GetQueryCmd returns the parent command for all x/bank CLi query commands. The -// provided clientCtx should have, at a minimum, a verifier, Tendermint RPC client, -// and marshaler set. -func GetQueryCmd() *cobra.Command { - cmd := &cobra.Command{ - Use: types.ModuleName, - Short: "Querying commands for the bank module", - DisableFlagParsing: true, - SuggestionsMinimumDistance: 2, - RunE: client.ValidateCmd, - } - - cmd.AddCommand( - GetBalancesCmd(), - GetCmdQueryTotalSupply(), - GetCmdDenomsMetadata(), - ) - - return cmd -} - -func GetBalancesCmd() *cobra.Command { - cmd := &cobra.Command{ - Use: "balances [address]", - Short: "Query for account balances by address", - Long: strings.TrimSpace( - fmt.Sprintf(`Query the total balance of an account or of a specific denomination. - -Example: - $ %s query %s balances [address] - $ %s query %s balances [address] --denom=[denom] -`, - version.AppName, types.ModuleName, version.AppName, types.ModuleName, - ), - ), - Args: cobra.ExactArgs(1), - RunE: func(cmd *cobra.Command, args []string) error { - clientCtx, err := client.GetClientQueryContext(cmd) - if err != nil { - return err - } - denom, err := cmd.Flags().GetString(FlagDenom) - if err != nil { - return err - } - - queryClient := types.NewQueryClient(clientCtx) - - addr, err := sdk.AccAddressFromBech32(args[0]) - if err != nil { - return err - } - - pageReq, err := client.ReadPageRequest(cmd.Flags()) - if err != nil { - return err - } - ctx := cmd.Context() - if denom == "" { - params := types.NewQueryAllBalancesRequest(addr, pageReq) - res, err := queryClient.AllBalances(ctx, params) - if err != nil { - return err - } - return clientCtx.PrintProto(res) - } - - params := types.NewQueryBalanceRequest(addr, denom) - res, err := queryClient.Balance(ctx, params) - if err != nil { - return err - } - - return clientCtx.PrintProto(res.Balance) - }, - } - - cmd.Flags().String(FlagDenom, "", "The specific balance denomination to query for") - flags.AddQueryFlagsToCmd(cmd) - flags.AddPaginationFlagsToCmd(cmd, "all balances") - - return cmd -} - -// GetCmdDenomsMetadata defines the cobra command to query client denomination metadata. -func GetCmdDenomsMetadata() *cobra.Command { - cmd := &cobra.Command{ - Use: "denom-metadata", - Short: "Query the client metadata for coin denominations", - Long: strings.TrimSpace( - fmt.Sprintf(`Query the client metadata for all the registered coin denominations - -Example: - To query for the client metadata of all coin denominations use: - $ %s query %s denom-metadata - -To query for the client metadata of a specific coin denomination use: - $ %s query %s denom-metadata --denom=[denom] -`, - version.AppName, types.ModuleName, version.AppName, types.ModuleName, - ), - ), - RunE: func(cmd *cobra.Command, _ []string) error { - clientCtx, err := client.GetClientQueryContext(cmd) - if err != nil { - return err - } - denom, err := cmd.Flags().GetString(FlagDenom) - if err != nil { - return err - } - - queryClient := types.NewQueryClient(clientCtx) - - if denom == "" { - res, err := queryClient.DenomsMetadata(cmd.Context(), &types.QueryDenomsMetadataRequest{}) - if err != nil { - return err - } - - return clientCtx.PrintProto(res) - } - - res, err := queryClient.DenomMetadata(cmd.Context(), &types.QueryDenomMetadataRequest{Denom: denom}) - if err != nil { - return err - } - - return clientCtx.PrintProto(res) - }, - } - - cmd.Flags().String(FlagDenom, "", "The specific denomination to query client metadata for") - flags.AddQueryFlagsToCmd(cmd) - - return cmd -} - -func GetCmdQueryTotalSupply() *cobra.Command { - cmd := &cobra.Command{ - Use: "total", - Short: "Query the total supply of coins of the chain", - Long: strings.TrimSpace( - fmt.Sprintf(`Query total supply of coins that are held by accounts in the chain. - -Example: - $ %s query %s total - -To query for the total supply of a specific coin denomination use: - $ %s query %s total --denom=[denom] -`, - version.AppName, types.ModuleName, version.AppName, types.ModuleName, - ), - ), - RunE: func(cmd *cobra.Command, args []string) error { - clientCtx, err := client.GetClientQueryContext(cmd) - if err != nil { - return err - } - denom, err := cmd.Flags().GetString(FlagDenom) - if err != nil { - return err - } - - queryClient := types.NewQueryClient(clientCtx) - ctx := cmd.Context() - - pageReq, err := client.ReadPageRequest(cmd.Flags()) - if err != nil { - return err - } - if denom == "" { - res, err := queryClient.TotalSupply(ctx, &types.QueryTotalSupplyRequest{Pagination: pageReq}) - if err != nil { - return err - } - - return clientCtx.PrintProto(res) - } - - res, err := queryClient.SupplyOf(ctx, &types.QuerySupplyOfRequest{Denom: denom}) - if err != nil { - return err - } - - return clientCtx.PrintProto(&res.Amount) - }, - } - - cmd.Flags().String(FlagDenom, "", "The specific balance denomination to query for") - flags.AddQueryFlagsToCmd(cmd) - flags.AddPaginationFlagsToCmd(cmd, "all supply totals") - - return cmd -} diff --git a/x/verification/client/cli/tx.go b/x/verification/client/cli/tx.go index d752113dc9..1a314fd642 100644 --- a/x/verification/client/cli/tx.go +++ b/x/verification/client/cli/tx.go @@ -3,7 +3,6 @@ package cli import ( "github.com/spf13/cobra" - "encoding/base64" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" "github.com/cosmos/cosmos-sdk/client/tx" @@ -14,7 +13,7 @@ import ( func NewTxCmd() *cobra.Command { txCmd := &cobra.Command{ Use: types.ModuleName, - Short: "Bank transaction subcommands", + Short: "Verification transaction subcommands", DisableFlagParsing: true, SuggestionsMinimumDistance: 2, RunE: client.ValidateCmd, @@ -28,8 +27,8 @@ func NewTxCmd() *cobra.Command { // NewSendTxCmd returns a CLI command handler for creating a MsgSend transaction. func NewSendTxCmd() *cobra.Command { cmd := &cobra.Command{ - Use: "verification [from_key_or_address] [to_address] [amount]", - Short: `Send funds from one account to another. Note, the'--from' flag is + Use: "send [from_key_or_address] [to_address] [amount]", + Short: `send verification message from account with arbitrery data. Note, the'--from' flag is ignored as it is implied from [from_key_or_address].`, Args: cobra.ExactArgs(3), RunE: func(cmd *cobra.Command, args []string) error { @@ -39,18 +38,9 @@ ignored as it is implied from [from_key_or_address].`, return err } - decoded_data, err := base64.StdEncoding.DecodeString(args[1]) - if err != nil { - return err - } - msg := &types.MsgSignData{ FromAddress: clientCtx.GetFromAddress().String(), - Data: decoded_data, - } - - if err := msg.ValidateBasic(); err != nil { - return err + Data: []byte("abc"), } return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) diff --git a/x/verification/client/rest/query.go b/x/verification/client/rest/query.go deleted file mode 100644 index 7c88c790f8..0000000000 --- a/x/verification/client/rest/query.go +++ /dev/null @@ -1,118 +0,0 @@ -package rest - -import ( - "fmt" - "net/http" - - "github.com/gorilla/mux" - - "github.com/cosmos/cosmos-sdk/client" - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/types/rest" - "github.com/cosmos/cosmos-sdk/x/bank/types" -) - -// QueryBalancesRequestHandlerFn returns a REST handler that queries for all -// account balances or a specific balance by denomination. -func QueryBalancesRequestHandlerFn(clientCtx client.Context) http.HandlerFunc { - return func(w http.ResponseWriter, r *http.Request) { - w.Header().Set("Content-Type", "application/json") - - vars := mux.Vars(r) - bech32addr := vars["address"] - - addr, err := sdk.AccAddressFromBech32(bech32addr) - if rest.CheckInternalServerError(w, err) { - return - } - - ctx, ok := rest.ParseQueryHeightOrReturnBadRequest(w, clientCtx, r) - if !ok { - return - } - - var ( - params interface{} - route string - ) - - denom := r.FormValue("denom") - if denom == "" { - params = types.NewQueryAllBalancesRequest(addr, nil) - route = fmt.Sprintf("custom/%s/%s", types.QuerierRoute, types.QueryAllBalances) - } else { - params = types.NewQueryBalanceRequest(addr, denom) - route = fmt.Sprintf("custom/%s/%s", types.QuerierRoute, types.QueryBalance) - } - - bz, err := ctx.LegacyAmino.MarshalJSON(params) - if rest.CheckBadRequestError(w, err) { - return - } - - res, height, err := ctx.QueryWithData(route, bz) - if rest.CheckInternalServerError(w, err) { - return - } - - ctx = ctx.WithHeight(height) - rest.PostProcessResponse(w, ctx, res) - } -} - -// HTTP request handler to query the total supply of coins -func totalSupplyHandlerFn(clientCtx client.Context) http.HandlerFunc { - return func(w http.ResponseWriter, r *http.Request) { - _, page, limit, err := rest.ParseHTTPArgsWithLimit(r, 0) - if rest.CheckBadRequestError(w, err) { - return - } - - clientCtx, ok := rest.ParseQueryHeightOrReturnBadRequest(w, clientCtx, r) - if !ok { - return - } - - params := types.NewQueryTotalSupplyParams(page, limit) - bz, err := clientCtx.LegacyAmino.MarshalJSON(params) - - if rest.CheckBadRequestError(w, err) { - return - } - - res, height, err := clientCtx.QueryWithData(fmt.Sprintf("custom/%s/%s", types.QuerierRoute, types.QueryTotalSupply), bz) - - if rest.CheckInternalServerError(w, err) { - return - } - - clientCtx = clientCtx.WithHeight(height) - rest.PostProcessResponse(w, clientCtx, res) - } -} - -// HTTP request handler to query the supply of a single denom -func supplyOfHandlerFn(clientCtx client.Context) http.HandlerFunc { - return func(w http.ResponseWriter, r *http.Request) { - denom := mux.Vars(r)["denom"] - clientCtx, ok := rest.ParseQueryHeightOrReturnBadRequest(w, clientCtx, r) - if !ok { - return - } - - params := types.NewQuerySupplyOfParams(denom) - bz, err := clientCtx.LegacyAmino.MarshalJSON(params) - - if rest.CheckBadRequestError(w, err) { - return - } - - res, height, err := clientCtx.QueryWithData(fmt.Sprintf("custom/%s/%s", types.QuerierRoute, types.QuerySupplyOf), bz) - if rest.CheckInternalServerError(w, err) { - return - } - - clientCtx = clientCtx.WithHeight(height) - rest.PostProcessResponse(w, clientCtx, res) - } -} diff --git a/x/verification/client/rest/rest.go b/x/verification/client/rest/rest.go deleted file mode 100644 index db4909c532..0000000000 --- a/x/verification/client/rest/rest.go +++ /dev/null @@ -1,19 +0,0 @@ -package rest - -import ( - "github.com/gorilla/mux" - - "github.com/cosmos/cosmos-sdk/client/rest" - - "github.com/cosmos/cosmos-sdk/client" -) - -// RegisterHandlers registers all x/bank transaction and query HTTP REST handlers -// on the provided mux router. -func RegisterHandlers(clientCtx client.Context, rtr *mux.Router) { - r := rest.WithHTTPDeprecationHeaders(rtr) - r.HandleFunc("/bank/accounts/{address}/transfers", NewSendRequestHandlerFn(clientCtx)).Methods("POST") - r.HandleFunc("/bank/balances/{address}", QueryBalancesRequestHandlerFn(clientCtx)).Methods("GET") - r.HandleFunc("/bank/total", totalSupplyHandlerFn(clientCtx)).Methods("GET") - r.HandleFunc("/bank/total/{denom}", supplyOfHandlerFn(clientCtx)).Methods("GET") -} diff --git a/x/verification/client/rest/tx.go b/x/verification/client/rest/tx.go deleted file mode 100644 index e630710dff..0000000000 --- a/x/verification/client/rest/tx.go +++ /dev/null @@ -1,51 +0,0 @@ -package rest - -import ( - "net/http" - - "github.com/gorilla/mux" - - "github.com/cosmos/cosmos-sdk/client" - "github.com/cosmos/cosmos-sdk/client/tx" - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/types/rest" - "github.com/cosmos/cosmos-sdk/x/bank/types" -) - -// SendReq defines the properties of a send request's body. -type SendReq struct { - BaseReq rest.BaseReq `json:"base_req" yaml:"base_req"` - Amount sdk.Coins `json:"amount" yaml:"amount"` -} - -// NewSendRequestHandlerFn returns an HTTP REST handler for creating a MsgSend -// transaction. -func NewSendRequestHandlerFn(clientCtx client.Context) http.HandlerFunc { - return func(w http.ResponseWriter, r *http.Request) { - vars := mux.Vars(r) - bech32Addr := vars["address"] - - toAddr, err := sdk.AccAddressFromBech32(bech32Addr) - if rest.CheckBadRequestError(w, err) { - return - } - - var req SendReq - if !rest.ReadRESTReq(w, r, clientCtx.LegacyAmino, &req) { - return - } - - req.BaseReq = req.BaseReq.Sanitize() - if !req.BaseReq.ValidateBasic(w) { - return - } - - fromAddr, err := sdk.AccAddressFromBech32(req.BaseReq.From) - if rest.CheckBadRequestError(w, err) { - return - } - - msg := types.NewMsgSend(fromAddr, toAddr, req.Amount) - tx.WriteGeneratedTxResponse(clientCtx, w, req.BaseReq, msg) - } -} diff --git a/x/verification/client/testutil/cli_helpers.go b/x/verification/client/testutil/cli_helpers.go deleted file mode 100644 index a1a33c4f67..0000000000 --- a/x/verification/client/testutil/cli_helpers.go +++ /dev/null @@ -1,26 +0,0 @@ -package testutil - -import ( - "fmt" - - "github.com/tendermint/tendermint/libs/cli" - - "github.com/cosmos/cosmos-sdk/client" - "github.com/cosmos/cosmos-sdk/testutil" - clitestutil "github.com/cosmos/cosmos-sdk/testutil/cli" - bankcli "github.com/cosmos/cosmos-sdk/x/bank/client/cli" -) - -func MsgSendExec(clientCtx client.Context, from, to, amount fmt.Stringer, extraArgs ...string) (testutil.BufferWriter, error) { - args := []string{from.String(), to.String(), amount.String()} - args = append(args, extraArgs...) - - return clitestutil.ExecTestCLICmd(clientCtx, bankcli.NewSendTxCmd(), args) -} - -func QueryBalancesExec(clientCtx client.Context, address fmt.Stringer, extraArgs ...string) (testutil.BufferWriter, error) { - args := []string{address.String(), fmt.Sprintf("--%s=json", cli.OutputFlag)} - args = append(args, extraArgs...) - - return clitestutil.ExecTestCLICmd(clientCtx, bankcli.GetBalancesCmd(), args) -} diff --git a/x/verification/client/testutil/cli_test.go b/x/verification/client/testutil/cli_test.go deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/x/verification/client/testutil/suite.go b/x/verification/client/testutil/suite.go deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/x/verification/module.go b/x/verification/module.go deleted file mode 100644 index 9e0bce1a2c..0000000000 --- a/x/verification/module.go +++ /dev/null @@ -1,130 +0,0 @@ -package verification - -import ( - "encoding/json" - codectypes "github.com/cosmos/cosmos-sdk/codec/types" - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/types/module" - v040 "github.com/cosmos/cosmos-sdk/x/bank/legacy/v040" - "github.com/gorilla/mux" - "github.com/grpc-ecosystem/grpc-gateway/runtime" - "github.com/spf13/cobra" - abci "github.com/tendermint/tendermint/abci/types" - - "github.com/cosmos/cosmos-sdk/client" - "github.com/cosmos/cosmos-sdk/codec" - "github.com/cosmos/cosmos-sdk/x/verification/client/cli" - "github.com/cosmos/cosmos-sdk/x/verification/client/rest" - "github.com/cosmos/cosmos-sdk/x/verification/types" -) - -var ( - _ module.AppModule = AppModule{} - _ module.AppModuleBasic = AppModuleBasic{} -) - -// AppModuleBasic defines the basic application module used by the verification module. -type AppModuleBasic struct { - cdc codec.Codec -} - -func NewAppModuleBasic(cdc codec.Codec) AppModuleBasic { - return AppModuleBasic{cdc} -} - -// Name returns the verification module's name. -func (AppModuleBasic) Name() string { return types.ModuleName } - -// RegisterRESTRoutes registers the REST routes for the verification module. -func (AppModuleBasic) RegisterRESTRoutes(clientCtx client.Context, rtr *mux.Router) { - rest.RegisterHandlers(clientCtx, rtr) -} - -// GetTxCmd returns the root tx command for the verification module. -func (AppModuleBasic) GetTxCmd() *cobra.Command { - return cli.NewTxCmd() -} - -// GetQueryCmd returns no root query command for the verification module. -func (AppModuleBasic) GetQueryCmd() *cobra.Command { - return cli.GetQueryCmd() -} - -// AppModule implements an application module for the bank module. -type AppModule struct { - AppModuleBasic -} - -// RegisterLegacyAminoCodec registers the bank module's types on the LegacyAmino codec. -func (AppModuleBasic) RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { - types.RegisterLegacyAminoCodec(cdc) -} - -// RegisterInterfaces registers interfaces and implementations of the bank module. -func (AppModuleBasic) RegisterInterfaces(registry codectypes.InterfaceRegistry) { - types.RegisterInterfaces(registry) - - // Register legacy interfaces for migration scripts. - v040.RegisterInterfaces(registry) -} - -// DefaultGenesis returns default genesis state as raw bytes for the bank -// module. -func (AppModuleBasic) DefaultGenesis(cdc codec.JSONCodec) json.RawMessage { - return nil -} - -// ValidateGenesis performs genesis state validation for the bank module. -func (AppModuleBasic) ValidateGenesis(cdc codec.JSONCodec, _ client.TxEncodingConfig, bz json.RawMessage) error { - return nil -} - -// RegisterGRPCGatewayRoutes registers the gRPC Gateway routes for the bank module. -func (AppModuleBasic) RegisterGRPCGatewayRoutes(clientCtx client.Context, mux *runtime.ServeMux) { - return -} - -// InitGenesis performs genesis initialization for the bank module. It returns -// no validator updates. -func (am AppModule) InitGenesis(ctx sdk.Context, cdc codec.JSONCodec, data json.RawMessage) []abci.ValidatorUpdate { - return []abci.ValidatorUpdate{} -} - -// ExportGenesis returns the exported genesis state as raw bytes for the bank -// module. -func (am AppModule) ExportGenesis(ctx sdk.Context, cdc codec.JSONCodec) json.RawMessage { - return nil -} - -// QuerierRoute returns the bank module's querier route name. -func (AppModule) QuerierRoute() string { return types.RouterKey } - -// LegacyQuerierHandler returns the bank module sdk.Querier. -func (am AppModule) LegacyQuerierHandler(legacyQuerierCdc *codec.LegacyAmino) sdk.Querier { - return nil -} - -// RegisterInvariants registers the bank module invariants. -func (am AppModule) RegisterInvariants(ir sdk.InvariantRegistry) { - return -} - -// Route returns the message routing key for the bank module. -func (am AppModule) Route() sdk.Route { - return sdk.NewRoute(types.RouterKey, nil) -} - -// RegisterServices registers module services. -func (am AppModule) RegisterServices(cfg module.Configurator) { - return -} - -// NewAppModule creates a new AppModule object -func NewAppModule(cdc codec.Codec) AppModule { - return AppModule{ - AppModuleBasic: AppModuleBasic{cdc: cdc}, - } -} - -// ConsensusVersion implements AppModule/ConsensusVersion. -func (AppModule) ConsensusVersion() uint64 { return 2 } diff --git a/x/verification/types/codec.go b/x/verification/types/codec.go index 55a33b9ca3..047211fd19 100644 --- a/x/verification/types/codec.go +++ b/x/verification/types/codec.go @@ -4,6 +4,9 @@ import ( "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/codec/types" cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/msgservice" + "github.com/cosmos/cosmos-sdk/x/authz" ) // RegisterLegacyAminoCodec registers the necessary x/bank interfaces and concrete types @@ -13,17 +16,14 @@ func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { } func RegisterInterfaces(registry types.InterfaceRegistry) { - - /* - registry.RegisterImplementations((*sdk.Msg)(nil), - &MsgSignData{}, - ) - registry.RegisterImplementations( - (*authz.Authorization)(nil), - ) - - msgservice.RegisterMsgServiceDesc(registry, &_Msg_serviceDesc) - */ + registry.RegisterImplementations((*sdk.Msg)(nil), + &MsgSignData{}, + ) + registry.RegisterImplementations( + (*authz.Authorization)(nil), + ) + + msgservice.RegisterMsgServiceDesc(registry, &_Msg_serviceDesc) } var ( diff --git a/x/verification/types/msgs.go b/x/verification/types/msgs.go index 43cfef3c8e..6f0d3b7c64 100644 --- a/x/verification/types/msgs.go +++ b/x/verification/types/msgs.go @@ -7,20 +7,11 @@ import ( // bank message types const ( - TypeMsgSignData = "sigdata" + TypeMsgSignData = "signdata" ) var _ sdk.Msg = &MsgSignData{} -/* -// NewMsgSignData - construct a msg to send coins from one account to another. -// -//nolint:interfacer -func NewMsgSignData(fromAddr, data []byte) *MsgSignData { - return &MsgSignData{FromAddress: fromAddr.String(), Data: data} -} -*/ - // Route Implements Msg. func (msg MsgSignData) Route() string { return RouterKey } @@ -50,3 +41,5 @@ func (msg MsgSignData) GetSigners() []sdk.AccAddress { } return []sdk.AccAddress{from} } + +// ValidateBasic - v