From 0ec80580b489d4769b77d26cd50e95e15231cbca Mon Sep 17 00:00:00 2001
From: Ira Miller <72319+iramiller@users.noreply.github.com>
Date: Fri, 27 May 2022 09:59:29 -0600
Subject: [PATCH] Support creation of feegrants supplied from a marker (#832)
* update third party proto deps
* add feegrant creation support to marker tx
* add GrantAllowance msg
* add feegrant keeper to marker setup
* initial implementation of marker grantallowance
* changelog update
* msg tests
* cli methods and admin feegrant to self
* reorder marker cli tests
* rename feegrant proto msg as request
* add another cli test for failing access case
---
CHANGELOG.md | 3 +-
app/app.go | 6 +-
docs/proto-docs.md | 32 ++
proto/provenance/marker/v1/tx.proto | 21 +
x/marker/client/cli/cli_test.go | 66 ++-
x/marker/client/cli/tx.go | 156 +++++
x/marker/keeper/keeper.go | 6 +
x/marker/keeper/keeper_test.go | 43 ++
x/marker/keeper/msg_server.go | 26 +
x/marker/keeper/proposal_handler_test.go | 2 +-
x/marker/module.go | 11 +-
x/marker/simulation/operations.go | 6 +-
x/marker/simulation/proposals.go | 8 +-
x/marker/simulation/proposals_test.go | 2 +-
x/marker/types/msg.go | 84 +++
x/marker/types/msg_test.go | 91 +++
x/marker/types/tx.pb.go | 688 ++++++++++++++++++++---
17 files changed, 1132 insertions(+), 119 deletions(-)
create mode 100644 x/marker/types/msg_test.go
diff --git a/CHANGELOG.md b/CHANGELOG.md
index ce8af7910a..a8ba48ef46 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -39,7 +39,8 @@ Ref: https://keepachangelog.com/en/1.0.0/
### Features
- * Add CONTROLLER, and VALIDATOR PartyTypes for contract execution.
+* Add CONTROLLER, and VALIDATOR PartyTypes for contract execution. [\#824](https://github.com/provenance-io/provenance/pull/824])
+* Add FeeGrant allowance support for marker escrow accounts [#406](https://github.com/provenance-io/provenance/issues/406)
### Improvements
diff --git a/app/app.go b/app/app.go
index 25047c2f42..e4753bf193 100644
--- a/app/app.go
+++ b/app/app.go
@@ -439,7 +439,7 @@ func New(
)
app.MarkerKeeper = markerkeeper.NewKeeper(
- appCodec, keys[markertypes.StoreKey], app.GetSubspace(markertypes.ModuleName), app.AccountKeeper, app.BankKeeper, app.AuthzKeeper, keys[banktypes.StoreKey],
+ appCodec, keys[markertypes.StoreKey], app.GetSubspace(markertypes.ModuleName), app.AccountKeeper, app.BankKeeper, app.AuthzKeeper, app.FeeGrantKeeper, keys[banktypes.StoreKey],
)
app.NameKeeper = namekeeper.NewKeeper(
@@ -579,7 +579,7 @@ func New(
// PROVENANCE
metadata.NewAppModule(appCodec, app.MetadataKeeper, app.AccountKeeper),
- marker.NewAppModule(appCodec, app.MarkerKeeper, app.AccountKeeper, app.BankKeeper),
+ marker.NewAppModule(appCodec, app.MarkerKeeper, app.AccountKeeper, app.BankKeeper, app.FeeGrantKeeper),
name.NewAppModule(appCodec, app.NameKeeper, app.AccountKeeper, app.BankKeeper),
attribute.NewAppModule(appCodec, app.AttributeKeeper, app.AccountKeeper, app.BankKeeper, app.NameKeeper),
msgfeesmodule.NewAppModule(appCodec, app.MsgFeesKeeper, app.interfaceRegistry),
@@ -741,7 +741,7 @@ func New(
authzmodule.NewAppModule(appCodec, app.AuthzKeeper, app.AccountKeeper, app.BankKeeper, app.interfaceRegistry),
metadata.NewAppModule(appCodec, app.MetadataKeeper, app.AccountKeeper),
- marker.NewAppModule(appCodec, app.MarkerKeeper, app.AccountKeeper, app.BankKeeper),
+ marker.NewAppModule(appCodec, app.MarkerKeeper, app.AccountKeeper, app.BankKeeper, app.FeeGrantKeeper),
name.NewAppModule(appCodec, app.NameKeeper, app.AccountKeeper, app.BankKeeper),
attribute.NewAppModule(appCodec, app.AttributeKeeper, app.AccountKeeper, app.BankKeeper, app.NameKeeper),
msgfeesmodule.NewAppModule(appCodec, app.MsgFeesKeeper, app.interfaceRegistry),
diff --git a/docs/proto-docs.md b/docs/proto-docs.md
index f10359c87f..7099629939 100644
--- a/docs/proto-docs.md
+++ b/docs/proto-docs.md
@@ -124,6 +124,8 @@
- [MsgDeleteResponse](#provenance.marker.v1.MsgDeleteResponse)
- [MsgFinalizeRequest](#provenance.marker.v1.MsgFinalizeRequest)
- [MsgFinalizeResponse](#provenance.marker.v1.MsgFinalizeResponse)
+ - [MsgGrantAllowanceRequest](#provenance.marker.v1.MsgGrantAllowanceRequest)
+ - [MsgGrantAllowanceResponse](#provenance.marker.v1.MsgGrantAllowanceResponse)
- [MsgMintRequest](#provenance.marker.v1.MsgMintRequest)
- [MsgMintResponse](#provenance.marker.v1.MsgMintResponse)
- [MsgSetDenomMetadataRequest](#provenance.marker.v1.MsgSetDenomMetadataRequest)
@@ -2030,6 +2032,35 @@ MsgFinalizeResponse defines the Msg/Finalize response type
+
+
+### MsgGrantAllowanceRequest
+MsgGrantAllowanceRequest validates permission to create a fee grant based on marker admin access. If
+successful a feegrant is recorded where the marker account itself is the grantor
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| `denom` | [string](#string) | | |
+| `administrator` | [string](#string) | | |
+| `grantee` | [string](#string) | | grantee is the address of the user being granted an allowance of another user's funds. |
+| `allowance` | [google.protobuf.Any](#google.protobuf.Any) | | allowance can be any of basic and filtered fee allowance (fee FeeGrant module). |
+
+
+
+
+
+
+
+
+### MsgGrantAllowanceResponse
+MsgGrantAllowanceResponse defines the Msg/GrantAllowanceResponse response type.
+
+
+
+
+
+
### MsgMintRequest
@@ -2163,6 +2194,7 @@ Msg defines the Marker Msg service.
| `AddMarker` | [MsgAddMarkerRequest](#provenance.marker.v1.MsgAddMarkerRequest) | [MsgAddMarkerResponse](#provenance.marker.v1.MsgAddMarkerResponse) | AddMarker | |
| `Transfer` | [MsgTransferRequest](#provenance.marker.v1.MsgTransferRequest) | [MsgTransferResponse](#provenance.marker.v1.MsgTransferResponse) | Transfer marker denominated coin between accounts | |
| `SetDenomMetadata` | [MsgSetDenomMetadataRequest](#provenance.marker.v1.MsgSetDenomMetadataRequest) | [MsgSetDenomMetadataResponse](#provenance.marker.v1.MsgSetDenomMetadataResponse) | Allows Denom Metadata (see bank module) to be set for the Marker's Denom | |
+| `GrantAllowance` | [MsgGrantAllowanceRequest](#provenance.marker.v1.MsgGrantAllowanceRequest) | [MsgGrantAllowanceResponse](#provenance.marker.v1.MsgGrantAllowanceResponse) | GrantAllowance grants fee allowance to the grantee on the granter's account with the provided expiration time. | |
diff --git a/proto/provenance/marker/v1/tx.proto b/proto/provenance/marker/v1/tx.proto
index fedd5fc02e..eee7d5baac 100644
--- a/proto/provenance/marker/v1/tx.proto
+++ b/proto/provenance/marker/v1/tx.proto
@@ -1,6 +1,8 @@
syntax = "proto3";
package provenance.marker.v1;
+import "google/protobuf/any.proto";
+import "cosmos_proto/cosmos.proto";
import "gogoproto/gogo.proto";
import "cosmos/base/v1beta1/coin.proto";
import "cosmos/bank/v1beta1/bank.proto";
@@ -38,8 +40,27 @@ service Msg {
rpc Transfer(MsgTransferRequest) returns (MsgTransferResponse);
// Allows Denom Metadata (see bank module) to be set for the Marker's Denom
rpc SetDenomMetadata(MsgSetDenomMetadataRequest) returns (MsgSetDenomMetadataResponse);
+ // GrantAllowance grants fee allowance to the grantee on the granter's
+ // account with the provided expiration time.
+ rpc GrantAllowance(MsgGrantAllowanceRequest) returns (MsgGrantAllowanceResponse);
}
+// MsgGrantAllowanceRequest validates permission to create a fee grant based on marker admin access. If
+// successful a feegrant is recorded where the marker account itself is the grantor
+message MsgGrantAllowanceRequest {
+ string denom = 1;
+ string administrator = 2;
+
+ // grantee is the address of the user being granted an allowance of another user's funds.
+ string grantee = 3;
+
+ // allowance can be any of basic and filtered fee allowance (fee FeeGrant module).
+ google.protobuf.Any allowance = 4 [(cosmos_proto.accepts_interface) = "FeeAllowanceI"];
+}
+
+// MsgGrantAllowanceResponse defines the Msg/GrantAllowanceResponse response type.
+message MsgGrantAllowanceResponse {}
+
// MsgAddMarkerRequest defines the Msg/AddMarker request type
message MsgAddMarkerRequest {
cosmos.base.v1beta1.Coin amount = 1
diff --git a/x/marker/client/cli/cli_test.go b/x/marker/client/cli/cli_test.go
index 843321b325..c1e8a2838f 100644
--- a/x/marker/client/cli/cli_test.go
+++ b/x/marker/client/cli/cli_test.go
@@ -8,6 +8,7 @@ import (
"sort"
"strings"
"testing"
+ "time"
"github.com/gogo/protobuf/proto"
"github.com/spf13/cobra"
@@ -32,6 +33,11 @@ import (
markertypes "github.com/provenance-io/provenance/x/marker/types"
)
+const (
+ oneYear = 365 * 24 * 60 * 60
+ oneHour = 60 * 60
+)
+
type IntegrationTestSuite struct {
suite.Suite
@@ -550,6 +556,21 @@ func (s *IntegrationTestSuite) TestMarkerTxCommands() {
},
true, &sdk.TxResponse{}, 0,
},
+ {
+ "fail to create feegrant not admin",
+ markercli.GetCmdFeeGrant(),
+ []string{
+ "hotdog",
+ s.testnet.Validators[0].Address.String(),
+ s.accountAddresses[0].String(),
+ fmt.Sprintf("--%s=%s", markercli.FlagSpendLimit, sdk.NewCoin("stake", sdk.NewInt(100))),
+ fmt.Sprintf("--%s=%s", markercli.FlagExpiration, getFormattedExpiration(oneYear)),
+ fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation),
+ fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastBlock),
+ fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String()),
+ },
+ false, &sdk.TxResponse{}, 4,
+ },
{
"add single access",
markercli.GetCmdAddAccess(),
@@ -626,6 +647,37 @@ func (s *IntegrationTestSuite) TestMarkerTxCommands() {
},
false, &sdk.TxResponse{}, 0,
},
+ {
+ "create simple feegrant allowance",
+ markercli.GetCmdFeeGrant(),
+ []string{
+ "hotdog",
+ s.testnet.Validators[0].Address.String(),
+ s.accountAddresses[0].String(),
+ fmt.Sprintf("--%s=%s", markercli.FlagSpendLimit, sdk.NewCoin("stake", sdk.NewInt(100))),
+ fmt.Sprintf("--%s=%s", markercli.FlagExpiration, getFormattedExpiration(oneYear)),
+ fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation),
+ fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastBlock),
+ fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String()),
+ },
+ false, &sdk.TxResponse{}, 0,
+ },
+ {
+ "create periodic feegrant allowance",
+ markercli.GetCmdFeeGrant(),
+ []string{
+ "hotdog",
+ s.testnet.Validators[0].Address.String(),
+ s.accountAddresses[0].String(),
+ fmt.Sprintf("--%s=%v", markercli.FlagPeriod, oneHour),
+ fmt.Sprintf("--%s=%s", markercli.FlagPeriodLimit, sdk.NewCoin("stake", sdk.NewInt(100))),
+ fmt.Sprintf("--%s=%s", markercli.FlagExpiration, getFormattedExpiration(oneYear)),
+ fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation),
+ fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastBlock),
+ fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String()),
+ },
+ false, &sdk.TxResponse{}, 0,
+ },
{
"withdraw, fail to parse coins",
markercli.GetCmdWithdrawCoins(),
@@ -1038,16 +1090,6 @@ func (s *IntegrationTestSuite) TestMarkerTxGovProposals() {
}
}
-func (s *IntegrationTestSuite) TestMarkerGetTxCmd() {
- s.Run("marker cli tx commands not nil", func() {
- tx := markercli.NewTxCmd()
- s.Require().NotNil(tx)
- s.Require().Equal(len(tx.Commands()), 14)
- s.Require().Equal(tx.Use, markertypes.ModuleName)
- s.Require().Equal(tx.Short, "Transaction commands for the marker module")
- })
-}
-
func (s *IntegrationTestSuite) TestPaginationWithPageKey() {
asJson := fmt.Sprintf("--%s=json", tmcli.OutputFlag)
@@ -1164,3 +1206,7 @@ func (s *IntegrationTestSuite) TestPaginationWithPageKey() {
}
})
}
+
+func getFormattedExpiration(duration int64) string {
+ return time.Now().Add(time.Duration(duration) * time.Second).Format(time.RFC3339)
+}
diff --git a/x/marker/client/cli/tx.go b/x/marker/client/cli/tx.go
index 9d1376da6c..f295aecd43 100644
--- a/x/marker/client/cli/tx.go
+++ b/x/marker/client/cli/tx.go
@@ -17,6 +17,7 @@ import (
sdkErrors "github.com/cosmos/cosmos-sdk/types/errors"
"github.com/cosmos/cosmos-sdk/version"
"github.com/cosmos/cosmos-sdk/x/authz"
+ "github.com/cosmos/cosmos-sdk/x/feegrant"
govtypes "github.com/cosmos/cosmos-sdk/x/gov/types"
"github.com/spf13/cobra"
@@ -28,6 +29,10 @@ const (
FlagAllowGovernanceControl = "allowGovernanceControl"
FlagTransferLimit = "transfer-limit"
FlagExpiration = "expiration"
+ FlagPeriod = "period"
+ FlagPeriodLimit = "period-limit"
+ FlagSpendLimit = "spend-limit"
+ FlagAllowedMsgs = "allowed-messages"
)
// NewTxCmd returns the top-level command for marker CLI transactions.
@@ -54,6 +59,7 @@ func NewTxCmd() *cobra.Command {
GetCmdMarkerProposal(),
GetCmdGrantAuthorization(),
GetCmdRevokeAuthorization(),
+ GetCmdFeeGrant(),
)
return txCmd
}
@@ -623,3 +629,153 @@ func GetCmdRevokeAuthorization() *cobra.Command {
flags.AddTxFlagsToCmd(cmd)
return cmd
}
+
+// GetCmdFeeGrant returns a CLI command handler for creating a MsgGrantAllowance transaction.
+func GetCmdFeeGrant() *cobra.Command {
+ cmd := &cobra.Command{
+ Use: "feegrant [denom] [administrator_key_or_address] [grantee]",
+ Short: "Grant Fee allowance to an address",
+ Long: strings.TrimSpace(
+ fmt.Sprintf(
+ `Grant authorization to pay fees from your address. Note, the'--from' flag is
+ ignored as it is implied from [administrator].
+
+Examples:
+%s tx %s feegrant markerdenom pb1edlyu... pb1psh7r... --spend-limit 100stake --expiration 2022-01-30T15:04:05Z or
+%s tx %s feegrant markerdenom pb1edlyu... pb1psh7r... --spend-limit 100stake --period 3600 --period-limit 10stake --expiration 36000 or
+%s tx %s feegrant markerdenom pb1edlyu... pb1psh7r... --spend-limit 100stake --expiration 2022-01-30T15:04:05Z
+ --allowed-messages "/cosmos.gov.v1beta1.MsgSubmitProposal,/cosmos.gov.v1beta1.MsgVote"
+ `, version.AppName, types.ModuleName, version.AppName, types.ModuleName, version.AppName, types.ModuleName,
+ ),
+ ),
+ Args: cobra.ExactArgs(3),
+ RunE: func(cmd *cobra.Command, args []string) error {
+ denom := args[0]
+ err := cmd.Flags().Set(flags.FlagFrom, args[1])
+ if err != nil {
+ return err
+ }
+
+ clientCtx, err := client.GetClientTxContext(cmd)
+ if err != nil {
+ return err
+ }
+
+ grantee, err := sdk.AccAddressFromBech32(args[2])
+ if err != nil {
+ return err
+ }
+
+ administrator := clientCtx.GetFromAddress()
+ sl, err := cmd.Flags().GetString(FlagSpendLimit)
+ if err != nil {
+ return err
+ }
+
+ // if `FlagSpendLimit` isn't set, limit will be nil
+ limit, err := sdk.ParseCoinsNormalized(sl)
+ if err != nil {
+ return err
+ }
+
+ exp, err := cmd.Flags().GetString(FlagExpiration)
+ if err != nil {
+ return err
+ }
+
+ basic := feegrant.BasicAllowance{
+ SpendLimit: limit,
+ }
+
+ var expiresAtTime time.Time
+ if exp != "" {
+ expiresAtTime, err = time.Parse(time.RFC3339, exp)
+ if err != nil {
+ return err
+ }
+ basic.Expiration = &expiresAtTime
+ }
+
+ var allowance feegrant.FeeAllowanceI
+ allowance = &basic
+
+ periodClock, err := cmd.Flags().GetInt64(FlagPeriod)
+ if err != nil {
+ return err
+ }
+
+ periodLimitVal, err := cmd.Flags().GetString(FlagPeriodLimit)
+ if err != nil {
+ return err
+ }
+
+ // Check any of period or periodLimit flags set, If set consider it as periodic fee allowance.
+ if periodClock > 0 || periodLimitVal != "" {
+ var periodLimit sdk.Coins
+ periodLimit, err = sdk.ParseCoinsNormalized(periodLimitVal)
+ if err != nil {
+ return err
+ }
+
+ if periodClock <= 0 {
+ return fmt.Errorf("period clock was not set")
+ }
+
+ if periodLimit == nil {
+ return fmt.Errorf("period limit was not set")
+ }
+
+ periodReset := getPeriodReset(periodClock)
+ if exp != "" && periodReset.Sub(expiresAtTime) > 0 {
+ return fmt.Errorf("period (%d) cannot reset after expiration (%v)", periodClock, exp)
+ }
+
+ periodic := feegrant.PeriodicAllowance{
+ Basic: basic,
+ Period: getPeriod(periodClock),
+ PeriodReset: getPeriodReset(periodClock),
+ PeriodSpendLimit: periodLimit,
+ PeriodCanSpend: periodLimit,
+ }
+
+ allowance = &periodic
+ }
+
+ allowedMsgs, err := cmd.Flags().GetStringSlice(FlagAllowedMsgs)
+ if err != nil {
+ return err
+ }
+
+ if len(allowedMsgs) > 0 {
+ allowance, err = feegrant.NewAllowedMsgAllowance(allowance, allowedMsgs)
+ if err != nil {
+ return err
+ }
+ }
+
+ msg, err := types.NewMsgGrantAllowance(denom, administrator, grantee, allowance)
+ if err != nil {
+ return err
+ }
+
+ return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg)
+ },
+ }
+
+ flags.AddTxFlagsToCmd(cmd)
+ cmd.Flags().StringSlice(FlagAllowedMsgs, []string{}, "Set of allowed messages for fee allowance")
+ cmd.Flags().String(FlagExpiration, "", "The RFC 3339 timestamp after which the grant expires for the user")
+ cmd.Flags().String(FlagSpendLimit, "", "Spend limit specifies the max limit can be used, if not mentioned there is no limit")
+ cmd.Flags().Int64(FlagPeriod, 0, "period specifies the time duration in which period_spend_limit coins can be spent before that allowance is reset")
+ cmd.Flags().String(FlagPeriodLimit, "", "period limit specifies the maximum number of coins that can be spent in the period")
+
+ return cmd
+}
+
+func getPeriodReset(duration int64) time.Time {
+ return time.Now().Add(getPeriod(duration))
+}
+
+func getPeriod(duration int64) time.Duration {
+ return time.Duration(duration) * time.Second
+}
diff --git a/x/marker/keeper/keeper.go b/x/marker/keeper/keeper.go
index f093d0a552..d162ffe332 100644
--- a/x/marker/keeper/keeper.go
+++ b/x/marker/keeper/keeper.go
@@ -8,6 +8,7 @@ import (
authkeeper "github.com/cosmos/cosmos-sdk/x/auth/keeper"
authzkeeper "github.com/cosmos/cosmos-sdk/x/authz/keeper"
bankkeeper "github.com/cosmos/cosmos-sdk/x/bank/keeper"
+ feegrantkeeper "github.com/cosmos/cosmos-sdk/x/feegrant/keeper"
paramtypes "github.com/cosmos/cosmos-sdk/x/params/types"
"github.com/provenance-io/provenance/x/marker/types"
@@ -51,6 +52,9 @@ type Keeper struct {
// To handle movement of coin between accounts and check total supply
bankKeeper bankkeeper.Keeper
+ // To pass through grant creation for callers with admin access on a marker.
+ feegrantKeeper feegrantkeeper.Keeper
+
// For access to bank keeper storage outside what their keeper provides.
bankKeeperStoreKey sdk.StoreKey
@@ -73,6 +77,7 @@ func NewKeeper(
authKeeper authkeeper.AccountKeeper,
bankKeeper bankkeeper.Keeper,
authzKeeper authzkeeper.Keeper,
+ feegrantKeeper feegrantkeeper.Keeper,
bankKey sdk.StoreKey,
) Keeper {
if !paramSpace.HasKeyTable() {
@@ -84,6 +89,7 @@ func NewKeeper(
authKeeper: authKeeper,
authzKeeper: authzKeeper,
bankKeeper: bankKeeper,
+ feegrantKeeper: feegrantKeeper,
storeKey: key,
bankKeeperStoreKey: bankKey,
cdc: cdc,
diff --git a/x/marker/keeper/keeper_test.go b/x/marker/keeper/keeper_test.go
index 9724a2a805..e938e8cf31 100644
--- a/x/marker/keeper/keeper_test.go
+++ b/x/marker/keeper/keeper_test.go
@@ -11,6 +11,7 @@ import (
sdk "github.com/cosmos/cosmos-sdk/types"
authtypes "github.com/cosmos/cosmos-sdk/x/auth/types"
banktypes "github.com/cosmos/cosmos-sdk/x/bank/types"
+ "github.com/cosmos/cosmos-sdk/x/feegrant"
"github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1"
"github.com/stretchr/testify/require"
@@ -653,6 +654,48 @@ func TestAccountImplictControl(t *testing.T) {
require.Error(t, app.MarkerKeeper.TransferCoin(ctx, user, user2, user, sdk.NewCoin("testcoin", sdk.NewInt(10))))
}
+func TestMarkerFeeGrant(t *testing.T) {
+ //app, ctx := createTestApp(true)
+ app := simapp.Setup(false)
+ ctx := app.BaseApp.NewContext(false, tmproto.Header{})
+ server := markerkeeper.NewMsgServerImpl(app.MarkerKeeper)
+
+ addr := types.MustGetMarkerAddress("testcoin")
+ user := testUserAddress("admin")
+
+ // no account before its created
+ acc := app.AccountKeeper.GetAccount(ctx, addr)
+ require.Nil(t, acc)
+
+ // create account and check default values
+ acc = types.NewEmptyMarkerAccount("testcoin", user.String(), nil)
+ mac, ok := acc.(types.MarkerAccountI)
+ require.True(t, ok)
+ require.NotNil(t, mac)
+ require.Equal(t, addr, mac.GetAddress())
+ require.EqualValues(t, nil, mac.GetPubKey())
+
+ // NewAccount doesn't call Set, so it's still nil
+ require.Nil(t, app.AccountKeeper.GetAccount(ctx, addr))
+
+ // set some values on the account and save it
+ require.NoError(t, mac.GrantAccess(types.NewAccessGrant(user, []types.Access{types.Access_Mint, types.Access_Admin})))
+
+ app.AccountKeeper.SetAccount(ctx, mac)
+
+ existingSupply := sdk.NewCoin("testcoin", sdk.NewInt(10000))
+ simapp.FundAccount(app, ctx, user, sdk.NewCoins(existingSupply))
+
+ allowance, err := types.NewMsgGrantAllowance(
+ "testcoin",
+ user,
+ testUserAddress("grantee"),
+ &feegrant.BasicAllowance{SpendLimit: sdk.NewCoins(sdk.NewCoin("testcoin", sdk.OneInt()))})
+ require.NoError(t, err, "basic allowance creation failed")
+ _, err = server.GrantAllowance(sdk.WrapSDKContext(ctx), allowance)
+ require.NoError(t, err, "failed to grant basic allowance from admin")
+}
+
// testUserAddress gives a quick way to make a valid test address (no keys though)
func testUserAddress(name string) sdk.AccAddress {
addr := types.MustGetMarkerAddress(name)
diff --git a/x/marker/keeper/msg_server.go b/x/marker/keeper/msg_server.go
index 80eb304b3f..7b7ad2b809 100644
--- a/x/marker/keeper/msg_server.go
+++ b/x/marker/keeper/msg_server.go
@@ -25,6 +25,32 @@ func NewMsgServerImpl(keeper Keeper) types.MsgServer {
var _ types.MsgServer = msgServer{}
+// GrantAllowance grants an allowance from the marker's funds to be used by the grantee.
+func (k msgServer) GrantAllowance(goCtx context.Context, msg *types.MsgGrantAllowanceRequest) (*types.MsgGrantAllowanceResponse, error) {
+ ctx := sdk.UnwrapSDKContext(goCtx)
+ m, err := k.GetMarkerByDenom(ctx, msg.Denom)
+ if err != nil {
+ return nil, sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, err.Error())
+ }
+ admin, err := sdk.AccAddressFromBech32(msg.Administrator)
+ if err != nil {
+ return nil, sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, err.Error())
+ }
+ grantee, err := sdk.AccAddressFromBech32(msg.Grantee)
+ if err != nil {
+ return nil, sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, err.Error())
+ }
+ if !m.AddressHasAccess(admin, types.Access_Admin) {
+ return nil, sdkerrors.Wrap(sdkerrors.ErrUnauthorized, "administrator must have admin grant on marker")
+ }
+ allowance, err := msg.GetFeeAllowanceI()
+ if err != nil {
+ return nil, err
+ }
+ err = k.Keeper.feegrantKeeper.GrantAllowance(ctx, m.GetAddress(), grantee, allowance)
+ return &types.MsgGrantAllowanceResponse{}, err
+}
+
// Handle a message to add a new marker account.
func (k msgServer) AddMarker(goCtx context.Context, msg *types.MsgAddMarkerRequest) (*types.MsgAddMarkerResponse, error) {
ctx := sdk.UnwrapSDKContext(goCtx)
diff --git a/x/marker/keeper/proposal_handler_test.go b/x/marker/keeper/proposal_handler_test.go
index 460f454cd4..64bd1ec35a 100644
--- a/x/marker/keeper/proposal_handler_test.go
+++ b/x/marker/keeper/proposal_handler_test.go
@@ -34,7 +34,7 @@ type IntegrationTestSuite struct {
func (s *IntegrationTestSuite) SetupSuite() {
s.app = provenance.Setup(false)
s.ctx = s.app.BaseApp.NewContext(false, tmproto.Header{})
- s.k = markerkeeper.NewKeeper(s.app.AppCodec(), s.app.GetKey(markertypes.ModuleName), s.app.GetSubspace(markertypes.ModuleName), s.app.AccountKeeper, s.app.BankKeeper, s.app.AuthzKeeper, s.app.GetKey(banktypes.StoreKey))
+ s.k = markerkeeper.NewKeeper(s.app.AppCodec(), s.app.GetKey(markertypes.ModuleName), s.app.GetSubspace(markertypes.ModuleName), s.app.AccountKeeper, s.app.BankKeeper, s.app.AuthzKeeper, s.app.FeeGrantKeeper, s.app.GetKey(banktypes.StoreKey))
s.accountAddr = sdk.AccAddress(secp256k1.GenPrivKey().PubKey().Address())
}
diff --git a/x/marker/module.go b/x/marker/module.go
index b5762194fc..212d15d2d0 100644
--- a/x/marker/module.go
+++ b/x/marker/module.go
@@ -24,6 +24,7 @@ import (
simtypes "github.com/cosmos/cosmos-sdk/types/simulation"
authkeeper "github.com/cosmos/cosmos-sdk/x/auth/keeper"
bankkeeper "github.com/cosmos/cosmos-sdk/x/bank/keeper"
+ feegrantkeeper "github.com/cosmos/cosmos-sdk/x/feegrant/keeper"
"github.com/gorilla/mux"
"github.com/spf13/cobra"
@@ -94,18 +95,20 @@ func (AppModuleBasic) RegisterInterfaces(registry cdctypes.InterfaceRegistry) {
type AppModule struct {
AppModuleBasic
- keeper keeper.Keeper
- accountKeeper authkeeper.AccountKeeper
- bankKeeper bankkeeper.Keeper
+ keeper keeper.Keeper
+ accountKeeper authkeeper.AccountKeeper
+ bankKeeper bankkeeper.Keeper
+ feegrantKeeper feegrantkeeper.Keeper
}
// NewAppModule creates a new AppModule Object
-func NewAppModule(cdc codec.Codec, keeper keeper.Keeper, accountKeeper authkeeper.AccountKeeper, bankKeeper bankkeeper.Keeper) AppModule {
+func NewAppModule(cdc codec.Codec, keeper keeper.Keeper, accountKeeper authkeeper.AccountKeeper, bankKeeper bankkeeper.Keeper, feegrantKeeper feegrantkeeper.Keeper) AppModule {
return AppModule{
AppModuleBasic: AppModuleBasic{cdc: cdc},
keeper: keeper,
accountKeeper: accountKeeper,
bankKeeper: bankKeeper,
+ feegrantKeeper: feegrantKeeper,
}
}
diff --git a/x/marker/simulation/operations.go b/x/marker/simulation/operations.go
index de388870f8..f7dbed6834 100644
--- a/x/marker/simulation/operations.go
+++ b/x/marker/simulation/operations.go
@@ -104,9 +104,9 @@ func SimulateMsgAddMarker(k keeper.Keeper, ak authkeeper.AccountKeeperI, bk bank
sdk.NewIntFromUint64(randomUint64(r, k.GetMaxTotalSupply(ctx))),
simAccount.Address,
mgrAccount.Address,
- types.MarkerType(r.Intn(1)+1), // coin or restricted_coin
- r.Intn(1) > 0, // fixed supply
- r.Intn(1) > 0, // allow gov
+ types.MarkerType(r.Intn(2)+1), // coin or restricted_coin
+ r.Intn(2) > 0, // fixed supply
+ r.Intn(2) > 0, // allow gov
)
return Dispatch(r, app, ctx, ak, bk, simAccount, chainID, msg, nil)
diff --git a/x/marker/simulation/proposals.go b/x/marker/simulation/proposals.go
index eca2eb1e89..07e5df07bd 100644
--- a/x/marker/simulation/proposals.go
+++ b/x/marker/simulation/proposals.go
@@ -86,11 +86,11 @@ func SimulateCreateAddMarkerProposalContent(k keeper.Keeper) simtypes.ContentSim
randomUnrestrictedDenom(r, k.GetUnrestrictedDenomRegex(ctx)),
sdk.NewIntFromUint64(randomUint64(r, k.GetMaxTotalSupply(ctx))), // initial supply
simAccount.Address, // manager
- types.MarkerStatus(r.Intn(2)+1), // initial status (proposed, finalized, active)
- types.MarkerType(r.Intn(1)+1), // coin or restricted_coin
+ types.MarkerStatus(r.Intn(3)+1), // initial status (proposed, finalized, active)
+ types.MarkerType(r.Intn(2)+1), // coin or restricted_coin
[]types.AccessGrant{{Address: simAccount.Address.String(), Permissions: randomAccessTypes(r)}},
- r.Intn(1) > 0, // fixed supply
- r.Intn(1) > 0, // allow gov
+ r.Intn(2) > 0, // fixed supply
+ r.Intn(2) > 0, // allow gov
)
}
}
diff --git a/x/marker/simulation/proposals_test.go b/x/marker/simulation/proposals_test.go
index b7d36505c4..c4ae620fcf 100644
--- a/x/marker/simulation/proposals_test.go
+++ b/x/marker/simulation/proposals_test.go
@@ -29,7 +29,7 @@ func TestProposalContents(t *testing.T) {
accounts := simtypes.RandomAccounts(r, 3)
// execute ProposalContents function
- weightedProposalContent := simulation.ProposalContents(keeper.NewKeeper(app.AppCodec(), app.GetKey(types.ModuleName), app.GetSubspace(types.ModuleName), app.AccountKeeper, app.BankKeeper, app.AuthzKeeper, app.GetKey(banktypes.StoreKey)))
+ weightedProposalContent := simulation.ProposalContents(keeper.NewKeeper(app.AppCodec(), app.GetKey(types.ModuleName), app.GetSubspace(types.ModuleName), app.AccountKeeper, app.BankKeeper, app.AuthzKeeper, app.FeeGrantKeeper, app.GetKey(banktypes.StoreKey)))
require.Len(t, weightedProposalContent, 7)
w0 := weightedProposalContent[0]
diff --git a/x/marker/types/msg.go b/x/marker/types/msg.go
index 356455d309..307912cb6d 100644
--- a/x/marker/types/msg.go
+++ b/x/marker/types/msg.go
@@ -4,9 +4,13 @@ import (
"errors"
"fmt"
+ "github.com/gogo/protobuf/proto"
+
+ codectypes "github.com/cosmos/cosmos-sdk/codec/types"
sdk "github.com/cosmos/cosmos-sdk/types"
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
banktypes "github.com/cosmos/cosmos-sdk/x/bank/types"
+ feegranttypes "github.com/cosmos/cosmos-sdk/x/feegrant"
)
const (
@@ -22,6 +26,7 @@ const (
TypeWithdrawRequest = "withdraw"
TypeTransferRequest = "transfer"
TypeSetMetadataRequest = "setmetadata"
+ TypeGrantAllowance = "grantallowance"
)
// Compile time interface check.
@@ -37,6 +42,7 @@ var (
_ sdk.Msg = &MsgBurnRequest{}
_ sdk.Msg = &MsgWithdrawRequest{}
_ sdk.Msg = &MsgTransferRequest{}
+ _ sdk.Msg = &MsgGrantAllowanceRequest{}
)
// Type returns the message action.
@@ -75,6 +81,9 @@ func (msg MsgTransferRequest) Type() string { return TypeTransferRequest }
// Type returns the message action.
func (msg MsgSetDenomMetadataRequest) Type() string { return TypeSetMetadataRequest }
+// Type returns the message action.
+func (msg MsgGrantAllowanceRequest) Type() string { return TypeGrantAllowance }
+
// NewMsgAddMarkerRequest creates a new marker in a proposed state with a given total supply a denomination
func NewMsgAddMarkerRequest(
denom string, totalSupply sdk.Int, fromAddress sdk.AccAddress, manager sdk.AccAddress, markerType MarkerType, supplyFixed bool, allowGovernanceControl bool, // nolint:interfacer
@@ -546,3 +555,78 @@ func (msg MsgSetDenomMetadataRequest) GetSigners() []sdk.AccAddress {
}
return []sdk.AccAddress{addr}
}
+
+// GetFeeAllowanceI returns unpacked FeeAllowance
+func (msg MsgGrantAllowanceRequest) GetFeeAllowanceI() (feegranttypes.FeeAllowanceI, error) {
+ allowance, ok := msg.Allowance.GetCachedValue().(feegranttypes.FeeAllowanceI)
+ if !ok {
+ return nil, sdkerrors.Wrap(feegranttypes.ErrNoAllowance, "failed to get allowance")
+ }
+
+ return allowance, nil
+}
+
+// NewMsgAddMarkerRequest creates a new marker in a proposed state with a given total supply a denomination
+func NewMsgGrantAllowance(
+ denom string, admin sdk.AccAddress, grantee sdk.AccAddress, allowance feegranttypes.FeeAllowanceI, // nolint:interfacer
+) (*MsgGrantAllowanceRequest, error) {
+ msg, ok := allowance.(proto.Message)
+ if !ok {
+ return nil, sdkerrors.Wrapf(sdkerrors.ErrPackAny, "cannot proto marshal %T", msg)
+ }
+ any, err := codectypes.NewAnyWithValue(msg)
+ if err != nil {
+ return nil, err
+ }
+
+ return &MsgGrantAllowanceRequest{
+ Denom: denom,
+ Administrator: admin.String(),
+ Grantee: grantee.String(),
+ Allowance: any,
+ }, nil
+}
+
+// UnpackInterfaces implements UnpackInterfacesMessage.UnpackInterfaces
+func (msg MsgGrantAllowanceRequest) UnpackInterfaces(unpacker codectypes.AnyUnpacker) error {
+ var allowance feegranttypes.FeeAllowanceI
+ return unpacker.UnpackAny(msg.Allowance, &allowance)
+}
+
+// Route returns the name of the module.
+func (msg MsgGrantAllowanceRequest) Route() string { return ModuleName }
+
+// ValidateBasic runs stateless validation checks on the message.
+func (msg MsgGrantAllowanceRequest) ValidateBasic() error {
+ if msg.Denom == "" {
+ return sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "missing marker denom")
+ }
+ if msg.Administrator == "" {
+ return sdkerrors.Wrap(sdkerrors.ErrInvalidAddress, "missing administrator address")
+ }
+ if msg.Grantee == "" {
+ return sdkerrors.Wrap(sdkerrors.ErrInvalidAddress, "missing grantee address")
+ }
+
+ allowance, err := msg.GetFeeAllowanceI()
+ if err != nil {
+ return err
+ }
+
+ return allowance.ValidateBasic()
+}
+
+// GetSignBytes encodes the message for signing.
+func (msg MsgGrantAllowanceRequest) GetSignBytes() []byte {
+ bz := ModuleCdc.MustMarshalJSON(&msg)
+ return sdk.MustSortJSON(bz)
+}
+
+// GetSigners indicates that the message must have been signed by the address provided.
+func (msg MsgGrantAllowanceRequest) GetSigners() []sdk.AccAddress {
+ addr, err := sdk.AccAddressFromBech32(msg.Administrator)
+ if err != nil {
+ panic(err)
+ }
+ return []sdk.AccAddress{addr}
+}
diff --git a/x/marker/types/msg_test.go b/x/marker/types/msg_test.go
new file mode 100644
index 0000000000..e47532c2f8
--- /dev/null
+++ b/x/marker/types/msg_test.go
@@ -0,0 +1,91 @@
+package types
+
+import (
+ "testing"
+ "time"
+
+ "github.com/stretchr/testify/require"
+
+ "github.com/cosmos/cosmos-sdk/codec"
+ codectypes "github.com/cosmos/cosmos-sdk/codec/types"
+ sdk "github.com/cosmos/cosmos-sdk/types"
+ "github.com/cosmos/cosmos-sdk/x/feegrant"
+)
+
+func TestMsgGrantAllowance(t *testing.T) {
+ cdc := codec.NewProtoCodec(codectypes.NewInterfaceRegistry())
+ addr, _ := sdk.AccAddressFromBech32("cosmos1aeuqja06474dfrj7uqsvukm6rael982kk89mqr")
+ addr2, _ := sdk.AccAddressFromBech32("cosmos1nph3cfzk6trsmfxkeu943nvach5qw4vwstnvkl")
+ testcoin := sdk.NewCoins(sdk.NewInt64Coin("testcoin", 100))
+ threeHours := time.Now().Add(3 * time.Hour)
+ basic := &feegrant.BasicAllowance{
+ SpendLimit: testcoin,
+ Expiration: &threeHours,
+ }
+
+ cases := map[string]struct {
+ denom string
+ grantee sdk.AccAddress
+ administrator sdk.AccAddress
+ allowance *feegrant.BasicAllowance
+ valid bool
+ }{
+ "valid": {
+ denom: "testcoin",
+ grantee: addr,
+ administrator: addr2,
+ allowance: basic,
+ valid: true,
+ },
+ "no grantee": {
+ administrator: addr2,
+ denom: "testcoin",
+ grantee: sdk.AccAddress{},
+ allowance: basic,
+ valid: false,
+ },
+ "no administrator": {
+ administrator: sdk.AccAddress{},
+ denom: "testcoin",
+ grantee: addr,
+ allowance: basic,
+ valid: false,
+ },
+ "no denom": {
+ administrator: sdk.AccAddress{},
+ denom: "",
+ grantee: addr,
+ allowance: basic,
+ valid: false,
+ },
+ "grantee == administrator": {
+ denom: "testcoin",
+ grantee: addr,
+ administrator: addr,
+ allowance: basic,
+ valid: true,
+ },
+ }
+
+ for _, tc := range cases {
+ msg, err := NewMsgGrantAllowance(tc.denom, tc.administrator, tc.grantee, tc.allowance)
+ require.NoError(t, err)
+ err = msg.ValidateBasic()
+
+ if tc.valid {
+ require.NoError(t, err)
+
+ addrSlice := msg.GetSigners()
+ require.Equal(t, tc.administrator.String(), addrSlice[0].String())
+
+ allowance, err := msg.GetFeeAllowanceI()
+ require.NoError(t, err)
+ require.Equal(t, tc.allowance, allowance)
+
+ err = msg.UnpackInterfaces(cdc)
+ require.NoError(t, err)
+ } else {
+ require.Error(t, err)
+ }
+ }
+}
diff --git a/x/marker/types/tx.pb.go b/x/marker/types/tx.pb.go
index c2f7c79469..78e21c9a74 100644
--- a/x/marker/types/tx.pb.go
+++ b/x/marker/types/tx.pb.go
@@ -6,13 +6,15 @@ package types
import (
context "context"
fmt "fmt"
+ types "github.com/cosmos/cosmos-sdk/codec/types"
github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types"
- types "github.com/cosmos/cosmos-sdk/types"
+ types1 "github.com/cosmos/cosmos-sdk/types"
_ "github.com/cosmos/cosmos-sdk/x/bank/types"
github_com_cosmos_cosmos_sdk_x_bank_types "github.com/cosmos/cosmos-sdk/x/bank/types"
_ "github.com/gogo/protobuf/gogoproto"
grpc1 "github.com/gogo/protobuf/grpc"
proto "github.com/gogo/protobuf/proto"
+ _ "github.com/regen-network/cosmos-proto"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
@@ -32,6 +34,115 @@ var _ = math.Inf
// proto package needs to be updated.
const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
+// MsgGrantAllowanceRequest validates permission to create a fee grant based on marker admin access. If
+// successful a feegrant is recorded where the marker account itself is the grantor
+type MsgGrantAllowanceRequest struct {
+ Denom string `protobuf:"bytes,1,opt,name=denom,proto3" json:"denom,omitempty"`
+ Administrator string `protobuf:"bytes,2,opt,name=administrator,proto3" json:"administrator,omitempty"`
+ // grantee is the address of the user being granted an allowance of another user's funds.
+ Grantee string `protobuf:"bytes,3,opt,name=grantee,proto3" json:"grantee,omitempty"`
+ // allowance can be any of basic and filtered fee allowance (fee FeeGrant module).
+ Allowance *types.Any `protobuf:"bytes,4,opt,name=allowance,proto3" json:"allowance,omitempty"`
+}
+
+func (m *MsgGrantAllowanceRequest) Reset() { *m = MsgGrantAllowanceRequest{} }
+func (m *MsgGrantAllowanceRequest) String() string { return proto.CompactTextString(m) }
+func (*MsgGrantAllowanceRequest) ProtoMessage() {}
+func (*MsgGrantAllowanceRequest) Descriptor() ([]byte, []int) {
+ return fileDescriptor_bcb203fb73175ed3, []int{0}
+}
+func (m *MsgGrantAllowanceRequest) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *MsgGrantAllowanceRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_MsgGrantAllowanceRequest.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalToSizedBuffer(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *MsgGrantAllowanceRequest) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_MsgGrantAllowanceRequest.Merge(m, src)
+}
+func (m *MsgGrantAllowanceRequest) XXX_Size() int {
+ return m.Size()
+}
+func (m *MsgGrantAllowanceRequest) XXX_DiscardUnknown() {
+ xxx_messageInfo_MsgGrantAllowanceRequest.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_MsgGrantAllowanceRequest proto.InternalMessageInfo
+
+func (m *MsgGrantAllowanceRequest) GetDenom() string {
+ if m != nil {
+ return m.Denom
+ }
+ return ""
+}
+
+func (m *MsgGrantAllowanceRequest) GetAdministrator() string {
+ if m != nil {
+ return m.Administrator
+ }
+ return ""
+}
+
+func (m *MsgGrantAllowanceRequest) GetGrantee() string {
+ if m != nil {
+ return m.Grantee
+ }
+ return ""
+}
+
+func (m *MsgGrantAllowanceRequest) GetAllowance() *types.Any {
+ if m != nil {
+ return m.Allowance
+ }
+ return nil
+}
+
+// MsgGrantAllowanceResponse defines the Msg/GrantAllowanceResponse response type.
+type MsgGrantAllowanceResponse struct {
+}
+
+func (m *MsgGrantAllowanceResponse) Reset() { *m = MsgGrantAllowanceResponse{} }
+func (m *MsgGrantAllowanceResponse) String() string { return proto.CompactTextString(m) }
+func (*MsgGrantAllowanceResponse) ProtoMessage() {}
+func (*MsgGrantAllowanceResponse) Descriptor() ([]byte, []int) {
+ return fileDescriptor_bcb203fb73175ed3, []int{1}
+}
+func (m *MsgGrantAllowanceResponse) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *MsgGrantAllowanceResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_MsgGrantAllowanceResponse.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalToSizedBuffer(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *MsgGrantAllowanceResponse) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_MsgGrantAllowanceResponse.Merge(m, src)
+}
+func (m *MsgGrantAllowanceResponse) XXX_Size() int {
+ return m.Size()
+}
+func (m *MsgGrantAllowanceResponse) XXX_DiscardUnknown() {
+ xxx_messageInfo_MsgGrantAllowanceResponse.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_MsgGrantAllowanceResponse proto.InternalMessageInfo
+
// MsgAddMarkerRequest defines the Msg/AddMarker request type
type MsgAddMarkerRequest struct {
Amount github_com_cosmos_cosmos_sdk_types.Coin `protobuf:"bytes,1,opt,name=amount,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Coin" json:"amount"`
@@ -48,7 +159,7 @@ func (m *MsgAddMarkerRequest) Reset() { *m = MsgAddMarkerRequest{} }
func (m *MsgAddMarkerRequest) String() string { return proto.CompactTextString(m) }
func (*MsgAddMarkerRequest) ProtoMessage() {}
func (*MsgAddMarkerRequest) Descriptor() ([]byte, []int) {
- return fileDescriptor_bcb203fb73175ed3, []int{0}
+ return fileDescriptor_bcb203fb73175ed3, []int{2}
}
func (m *MsgAddMarkerRequest) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -134,7 +245,7 @@ func (m *MsgAddMarkerResponse) Reset() { *m = MsgAddMarkerResponse{} }
func (m *MsgAddMarkerResponse) String() string { return proto.CompactTextString(m) }
func (*MsgAddMarkerResponse) ProtoMessage() {}
func (*MsgAddMarkerResponse) Descriptor() ([]byte, []int) {
- return fileDescriptor_bcb203fb73175ed3, []int{1}
+ return fileDescriptor_bcb203fb73175ed3, []int{3}
}
func (m *MsgAddMarkerResponse) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -174,7 +285,7 @@ func (m *MsgAddAccessRequest) Reset() { *m = MsgAddAccessRequest{} }
func (m *MsgAddAccessRequest) String() string { return proto.CompactTextString(m) }
func (*MsgAddAccessRequest) ProtoMessage() {}
func (*MsgAddAccessRequest) Descriptor() ([]byte, []int) {
- return fileDescriptor_bcb203fb73175ed3, []int{2}
+ return fileDescriptor_bcb203fb73175ed3, []int{4}
}
func (m *MsgAddAccessRequest) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -232,7 +343,7 @@ func (m *MsgAddAccessResponse) Reset() { *m = MsgAddAccessResponse{} }
func (m *MsgAddAccessResponse) String() string { return proto.CompactTextString(m) }
func (*MsgAddAccessResponse) ProtoMessage() {}
func (*MsgAddAccessResponse) Descriptor() ([]byte, []int) {
- return fileDescriptor_bcb203fb73175ed3, []int{3}
+ return fileDescriptor_bcb203fb73175ed3, []int{5}
}
func (m *MsgAddAccessResponse) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -272,7 +383,7 @@ func (m *MsgDeleteAccessRequest) Reset() { *m = MsgDeleteAccessRequest{}
func (m *MsgDeleteAccessRequest) String() string { return proto.CompactTextString(m) }
func (*MsgDeleteAccessRequest) ProtoMessage() {}
func (*MsgDeleteAccessRequest) Descriptor() ([]byte, []int) {
- return fileDescriptor_bcb203fb73175ed3, []int{4}
+ return fileDescriptor_bcb203fb73175ed3, []int{6}
}
func (m *MsgDeleteAccessRequest) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -330,7 +441,7 @@ func (m *MsgDeleteAccessResponse) Reset() { *m = MsgDeleteAccessResponse
func (m *MsgDeleteAccessResponse) String() string { return proto.CompactTextString(m) }
func (*MsgDeleteAccessResponse) ProtoMessage() {}
func (*MsgDeleteAccessResponse) Descriptor() ([]byte, []int) {
- return fileDescriptor_bcb203fb73175ed3, []int{5}
+ return fileDescriptor_bcb203fb73175ed3, []int{7}
}
func (m *MsgDeleteAccessResponse) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -369,7 +480,7 @@ func (m *MsgFinalizeRequest) Reset() { *m = MsgFinalizeRequest{} }
func (m *MsgFinalizeRequest) String() string { return proto.CompactTextString(m) }
func (*MsgFinalizeRequest) ProtoMessage() {}
func (*MsgFinalizeRequest) Descriptor() ([]byte, []int) {
- return fileDescriptor_bcb203fb73175ed3, []int{6}
+ return fileDescriptor_bcb203fb73175ed3, []int{8}
}
func (m *MsgFinalizeRequest) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -420,7 +531,7 @@ func (m *MsgFinalizeResponse) Reset() { *m = MsgFinalizeResponse{} }
func (m *MsgFinalizeResponse) String() string { return proto.CompactTextString(m) }
func (*MsgFinalizeResponse) ProtoMessage() {}
func (*MsgFinalizeResponse) Descriptor() ([]byte, []int) {
- return fileDescriptor_bcb203fb73175ed3, []int{7}
+ return fileDescriptor_bcb203fb73175ed3, []int{9}
}
func (m *MsgFinalizeResponse) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -459,7 +570,7 @@ func (m *MsgActivateRequest) Reset() { *m = MsgActivateRequest{} }
func (m *MsgActivateRequest) String() string { return proto.CompactTextString(m) }
func (*MsgActivateRequest) ProtoMessage() {}
func (*MsgActivateRequest) Descriptor() ([]byte, []int) {
- return fileDescriptor_bcb203fb73175ed3, []int{8}
+ return fileDescriptor_bcb203fb73175ed3, []int{10}
}
func (m *MsgActivateRequest) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -510,7 +621,7 @@ func (m *MsgActivateResponse) Reset() { *m = MsgActivateResponse{} }
func (m *MsgActivateResponse) String() string { return proto.CompactTextString(m) }
func (*MsgActivateResponse) ProtoMessage() {}
func (*MsgActivateResponse) Descriptor() ([]byte, []int) {
- return fileDescriptor_bcb203fb73175ed3, []int{9}
+ return fileDescriptor_bcb203fb73175ed3, []int{11}
}
func (m *MsgActivateResponse) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -549,7 +660,7 @@ func (m *MsgCancelRequest) Reset() { *m = MsgCancelRequest{} }
func (m *MsgCancelRequest) String() string { return proto.CompactTextString(m) }
func (*MsgCancelRequest) ProtoMessage() {}
func (*MsgCancelRequest) Descriptor() ([]byte, []int) {
- return fileDescriptor_bcb203fb73175ed3, []int{10}
+ return fileDescriptor_bcb203fb73175ed3, []int{12}
}
func (m *MsgCancelRequest) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -600,7 +711,7 @@ func (m *MsgCancelResponse) Reset() { *m = MsgCancelResponse{} }
func (m *MsgCancelResponse) String() string { return proto.CompactTextString(m) }
func (*MsgCancelResponse) ProtoMessage() {}
func (*MsgCancelResponse) Descriptor() ([]byte, []int) {
- return fileDescriptor_bcb203fb73175ed3, []int{11}
+ return fileDescriptor_bcb203fb73175ed3, []int{13}
}
func (m *MsgCancelResponse) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -639,7 +750,7 @@ func (m *MsgDeleteRequest) Reset() { *m = MsgDeleteRequest{} }
func (m *MsgDeleteRequest) String() string { return proto.CompactTextString(m) }
func (*MsgDeleteRequest) ProtoMessage() {}
func (*MsgDeleteRequest) Descriptor() ([]byte, []int) {
- return fileDescriptor_bcb203fb73175ed3, []int{12}
+ return fileDescriptor_bcb203fb73175ed3, []int{14}
}
func (m *MsgDeleteRequest) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -690,7 +801,7 @@ func (m *MsgDeleteResponse) Reset() { *m = MsgDeleteResponse{} }
func (m *MsgDeleteResponse) String() string { return proto.CompactTextString(m) }
func (*MsgDeleteResponse) ProtoMessage() {}
func (*MsgDeleteResponse) Descriptor() ([]byte, []int) {
- return fileDescriptor_bcb203fb73175ed3, []int{13}
+ return fileDescriptor_bcb203fb73175ed3, []int{15}
}
func (m *MsgDeleteResponse) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -729,7 +840,7 @@ func (m *MsgMintRequest) Reset() { *m = MsgMintRequest{} }
func (m *MsgMintRequest) String() string { return proto.CompactTextString(m) }
func (*MsgMintRequest) ProtoMessage() {}
func (*MsgMintRequest) Descriptor() ([]byte, []int) {
- return fileDescriptor_bcb203fb73175ed3, []int{14}
+ return fileDescriptor_bcb203fb73175ed3, []int{16}
}
func (m *MsgMintRequest) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -773,7 +884,7 @@ func (m *MsgMintResponse) Reset() { *m = MsgMintResponse{} }
func (m *MsgMintResponse) String() string { return proto.CompactTextString(m) }
func (*MsgMintResponse) ProtoMessage() {}
func (*MsgMintResponse) Descriptor() ([]byte, []int) {
- return fileDescriptor_bcb203fb73175ed3, []int{15}
+ return fileDescriptor_bcb203fb73175ed3, []int{17}
}
func (m *MsgMintResponse) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -812,7 +923,7 @@ func (m *MsgBurnRequest) Reset() { *m = MsgBurnRequest{} }
func (m *MsgBurnRequest) String() string { return proto.CompactTextString(m) }
func (*MsgBurnRequest) ProtoMessage() {}
func (*MsgBurnRequest) Descriptor() ([]byte, []int) {
- return fileDescriptor_bcb203fb73175ed3, []int{16}
+ return fileDescriptor_bcb203fb73175ed3, []int{18}
}
func (m *MsgBurnRequest) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -856,7 +967,7 @@ func (m *MsgBurnResponse) Reset() { *m = MsgBurnResponse{} }
func (m *MsgBurnResponse) String() string { return proto.CompactTextString(m) }
func (*MsgBurnResponse) ProtoMessage() {}
func (*MsgBurnResponse) Descriptor() ([]byte, []int) {
- return fileDescriptor_bcb203fb73175ed3, []int{17}
+ return fileDescriptor_bcb203fb73175ed3, []int{19}
}
func (m *MsgBurnResponse) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -897,7 +1008,7 @@ func (m *MsgWithdrawRequest) Reset() { *m = MsgWithdrawRequest{} }
func (m *MsgWithdrawRequest) String() string { return proto.CompactTextString(m) }
func (*MsgWithdrawRequest) ProtoMessage() {}
func (*MsgWithdrawRequest) Descriptor() ([]byte, []int) {
- return fileDescriptor_bcb203fb73175ed3, []int{18}
+ return fileDescriptor_bcb203fb73175ed3, []int{20}
}
func (m *MsgWithdrawRequest) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -962,7 +1073,7 @@ func (m *MsgWithdrawResponse) Reset() { *m = MsgWithdrawResponse{} }
func (m *MsgWithdrawResponse) String() string { return proto.CompactTextString(m) }
func (*MsgWithdrawResponse) ProtoMessage() {}
func (*MsgWithdrawResponse) Descriptor() ([]byte, []int) {
- return fileDescriptor_bcb203fb73175ed3, []int{19}
+ return fileDescriptor_bcb203fb73175ed3, []int{21}
}
func (m *MsgWithdrawResponse) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -1003,7 +1114,7 @@ func (m *MsgTransferRequest) Reset() { *m = MsgTransferRequest{} }
func (m *MsgTransferRequest) String() string { return proto.CompactTextString(m) }
func (*MsgTransferRequest) ProtoMessage() {}
func (*MsgTransferRequest) Descriptor() ([]byte, []int) {
- return fileDescriptor_bcb203fb73175ed3, []int{20}
+ return fileDescriptor_bcb203fb73175ed3, []int{22}
}
func (m *MsgTransferRequest) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -1061,7 +1172,7 @@ func (m *MsgTransferResponse) Reset() { *m = MsgTransferResponse{} }
func (m *MsgTransferResponse) String() string { return proto.CompactTextString(m) }
func (*MsgTransferResponse) ProtoMessage() {}
func (*MsgTransferResponse) Descriptor() ([]byte, []int) {
- return fileDescriptor_bcb203fb73175ed3, []int{21}
+ return fileDescriptor_bcb203fb73175ed3, []int{23}
}
func (m *MsgTransferResponse) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -1100,7 +1211,7 @@ func (m *MsgSetDenomMetadataRequest) Reset() { *m = MsgSetDenomMetadataR
func (m *MsgSetDenomMetadataRequest) String() string { return proto.CompactTextString(m) }
func (*MsgSetDenomMetadataRequest) ProtoMessage() {}
func (*MsgSetDenomMetadataRequest) Descriptor() ([]byte, []int) {
- return fileDescriptor_bcb203fb73175ed3, []int{22}
+ return fileDescriptor_bcb203fb73175ed3, []int{24}
}
func (m *MsgSetDenomMetadataRequest) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -1144,7 +1255,7 @@ func (m *MsgSetDenomMetadataResponse) Reset() { *m = MsgSetDenomMetadata
func (m *MsgSetDenomMetadataResponse) String() string { return proto.CompactTextString(m) }
func (*MsgSetDenomMetadataResponse) ProtoMessage() {}
func (*MsgSetDenomMetadataResponse) Descriptor() ([]byte, []int) {
- return fileDescriptor_bcb203fb73175ed3, []int{23}
+ return fileDescriptor_bcb203fb73175ed3, []int{25}
}
func (m *MsgSetDenomMetadataResponse) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -1174,6 +1285,8 @@ func (m *MsgSetDenomMetadataResponse) XXX_DiscardUnknown() {
var xxx_messageInfo_MsgSetDenomMetadataResponse proto.InternalMessageInfo
func init() {
+ proto.RegisterType((*MsgGrantAllowanceRequest)(nil), "provenance.marker.v1.MsgGrantAllowanceRequest")
+ proto.RegisterType((*MsgGrantAllowanceResponse)(nil), "provenance.marker.v1.MsgGrantAllowanceResponse")
proto.RegisterType((*MsgAddMarkerRequest)(nil), "provenance.marker.v1.MsgAddMarkerRequest")
proto.RegisterType((*MsgAddMarkerResponse)(nil), "provenance.marker.v1.MsgAddMarkerResponse")
proto.RegisterType((*MsgAddAccessRequest)(nil), "provenance.marker.v1.MsgAddAccessRequest")
@@ -1203,72 +1316,78 @@ func init() {
func init() { proto.RegisterFile("provenance/marker/v1/tx.proto", fileDescriptor_bcb203fb73175ed3) }
var fileDescriptor_bcb203fb73175ed3 = []byte{
- // 1030 bytes of a gzipped FileDescriptorProto
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x57, 0xc1, 0x6e, 0xdb, 0x46,
- 0x10, 0x35, 0x2b, 0x5b, 0xb1, 0x46, 0xa9, 0x93, 0x6c, 0x5c, 0x87, 0x51, 0x61, 0x59, 0x16, 0xd2,
- 0x58, 0x2d, 0x6a, 0x32, 0x52, 0x2f, 0x45, 0x2e, 0x85, 0xe4, 0x20, 0xe9, 0xa1, 0x2c, 0x02, 0x39,
- 0x40, 0xd1, 0x5e, 0x84, 0x15, 0xb9, 0x66, 0x08, 0x89, 0x5c, 0x95, 0xbb, 0x92, 0xed, 0x02, 0xfd,
- 0x87, 0xa2, 0x97, 0x02, 0x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, 0xe4, 0xb5, 0x33, 0x1b,
+ 0xb1, 0xd4, 0xc3, 0x23, 0x1b, 0xb1, 0xf4, 0x2d, 0x36, 0x6c, 0x22, 0xa2, 0xab, 0x8c, 0x26, 0xc6,
+ 0x38, 0x3b, 0xa3, 0x89, 0x71, 0xee, 0x43, 0x27, 0x70, 0x6b, 0x9c, 0x3c, 0xd0, 0x83, 0xa9, 0xee,
+ 0x53, 0x28, 0xb2, 0xb4, 0xf7, 0x06, 0x1e, 0x2a, 0xf1, 0x73, 0x58, 0x49, 0x3f, 0xd8, 0x90, 0x31,
+ 0x35, 0xc8, 0xc4, 0x27, 0x69, 0xc9, 0x9c, 0xd9, 0x5e, 0xa6, 0x6c, 0x3a, 0x2f, 0xce, 0xcb, 0xda,
+ 0xcb, 0xf3, 0xb2, 0xf6, 0xfa, 0xbc, 0xac, 0xfd, 0x74, 0x51, 0x5e, 0x78, 0x79, 0x51, 0x5e, 0xf8,
+ 0xfb, 0xa2, 0xbc, 0x00, 0x77, 0x5c, 0x3a, 0x31, 0xd8, 0x13, 0xed, 0xbb, 0x51, 0x12, 0x4f, 0x4c,
+ 0x76, 0x5d, 0x3a, 0x72, 0x32, 0x4f, 0xa3, 0x87, 0xb5, 0x60, 0xf3, 0x4e, 0x5e, 0xbc, 0x5d, 0x3f,
+ 0xf9, 0x3f, 0x00, 0x00, 0xff, 0xff, 0x25, 0x11, 0xb2, 0xa2, 0x5e, 0x10, 0x00, 0x00,
}
// Reference imports to suppress errors if they are not otherwise used.
@@ -1307,6 +1426,9 @@ type MsgClient interface {
Transfer(ctx context.Context, in *MsgTransferRequest, opts ...grpc.CallOption) (*MsgTransferResponse, error)
// Allows Denom Metadata (see bank module) to be set for the Marker's Denom
SetDenomMetadata(ctx context.Context, in *MsgSetDenomMetadataRequest, opts ...grpc.CallOption) (*MsgSetDenomMetadataResponse, error)
+ // GrantAllowance grants fee allowance to the grantee on the granter's
+ // account with the provided expiration time.
+ GrantAllowance(ctx context.Context, in *MsgGrantAllowanceRequest, opts ...grpc.CallOption) (*MsgGrantAllowanceResponse, error)
}
type msgClient struct {
@@ -1425,6 +1547,15 @@ func (c *msgClient) SetDenomMetadata(ctx context.Context, in *MsgSetDenomMetadat
return out, nil
}
+func (c *msgClient) GrantAllowance(ctx context.Context, in *MsgGrantAllowanceRequest, opts ...grpc.CallOption) (*MsgGrantAllowanceResponse, error) {
+ out := new(MsgGrantAllowanceResponse)
+ err := c.cc.Invoke(ctx, "/provenance.marker.v1.Msg/GrantAllowance", in, out, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
// MsgServer is the server API for Msg service.
type MsgServer interface {
// Finalize
@@ -1451,6 +1582,9 @@ type MsgServer interface {
Transfer(context.Context, *MsgTransferRequest) (*MsgTransferResponse, error)
// Allows Denom Metadata (see bank module) to be set for the Marker's Denom
SetDenomMetadata(context.Context, *MsgSetDenomMetadataRequest) (*MsgSetDenomMetadataResponse, error)
+ // GrantAllowance grants fee allowance to the grantee on the granter's
+ // account with the provided expiration time.
+ GrantAllowance(context.Context, *MsgGrantAllowanceRequest) (*MsgGrantAllowanceResponse, error)
}
// UnimplementedMsgServer can be embedded to have forward compatible implementations.
@@ -1493,6 +1627,9 @@ func (*UnimplementedMsgServer) Transfer(ctx context.Context, req *MsgTransferReq
func (*UnimplementedMsgServer) SetDenomMetadata(ctx context.Context, req *MsgSetDenomMetadataRequest) (*MsgSetDenomMetadataResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method SetDenomMetadata not implemented")
}
+func (*UnimplementedMsgServer) GrantAllowance(ctx context.Context, req *MsgGrantAllowanceRequest) (*MsgGrantAllowanceResponse, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method GrantAllowance not implemented")
+}
func RegisterMsgServer(s grpc1.Server, srv MsgServer) {
s.RegisterService(&_Msg_serviceDesc, srv)
@@ -1714,6 +1851,24 @@ func _Msg_SetDenomMetadata_Handler(srv interface{}, ctx context.Context, dec fun
return interceptor(ctx, in, info, handler)
}
+func _Msg_GrantAllowance_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(MsgGrantAllowanceRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(MsgServer).GrantAllowance(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: "/provenance.marker.v1.Msg/GrantAllowance",
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(MsgServer).GrantAllowance(ctx, req.(*MsgGrantAllowanceRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
var _Msg_serviceDesc = grpc.ServiceDesc{
ServiceName: "provenance.marker.v1.Msg",
HandlerType: (*MsgServer)(nil),
@@ -1766,11 +1921,94 @@ var _Msg_serviceDesc = grpc.ServiceDesc{
MethodName: "SetDenomMetadata",
Handler: _Msg_SetDenomMetadata_Handler,
},
+ {
+ MethodName: "GrantAllowance",
+ Handler: _Msg_GrantAllowance_Handler,
+ },
},
Streams: []grpc.StreamDesc{},
Metadata: "provenance/marker/v1/tx.proto",
}
+func (m *MsgGrantAllowanceRequest) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBuffer(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *MsgGrantAllowanceRequest) MarshalTo(dAtA []byte) (int, error) {
+ size := m.Size()
+ return m.MarshalToSizedBuffer(dAtA[:size])
+}
+
+func (m *MsgGrantAllowanceRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.Allowance != nil {
+ {
+ size, err := m.Allowance.MarshalToSizedBuffer(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = encodeVarintTx(dAtA, i, uint64(size))
+ }
+ i--
+ dAtA[i] = 0x22
+ }
+ if len(m.Grantee) > 0 {
+ i -= len(m.Grantee)
+ copy(dAtA[i:], m.Grantee)
+ i = encodeVarintTx(dAtA, i, uint64(len(m.Grantee)))
+ i--
+ dAtA[i] = 0x1a
+ }
+ if len(m.Administrator) > 0 {
+ i -= len(m.Administrator)
+ copy(dAtA[i:], m.Administrator)
+ i = encodeVarintTx(dAtA, i, uint64(len(m.Administrator)))
+ i--
+ dAtA[i] = 0x12
+ }
+ if len(m.Denom) > 0 {
+ i -= len(m.Denom)
+ copy(dAtA[i:], m.Denom)
+ i = encodeVarintTx(dAtA, i, uint64(len(m.Denom)))
+ i--
+ dAtA[i] = 0xa
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *MsgGrantAllowanceResponse) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBuffer(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *MsgGrantAllowanceResponse) MarshalTo(dAtA []byte) (int, error) {
+ size := m.Size()
+ return m.MarshalToSizedBuffer(dAtA[:size])
+}
+
+func (m *MsgGrantAllowanceResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ return len(dAtA) - i, nil
+}
+
func (m *MsgAddMarkerRequest) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
@@ -2624,6 +2862,40 @@ func encodeVarintTx(dAtA []byte, offset int, v uint64) int {
dAtA[offset] = uint8(v)
return base
}
+func (m *MsgGrantAllowanceRequest) Size() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ l = len(m.Denom)
+ if l > 0 {
+ n += 1 + l + sovTx(uint64(l))
+ }
+ l = len(m.Administrator)
+ if l > 0 {
+ n += 1 + l + sovTx(uint64(l))
+ }
+ l = len(m.Grantee)
+ if l > 0 {
+ n += 1 + l + sovTx(uint64(l))
+ }
+ if m.Allowance != nil {
+ l = m.Allowance.Size()
+ n += 1 + l + sovTx(uint64(l))
+ }
+ return n
+}
+
+func (m *MsgGrantAllowanceResponse) Size() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ return n
+}
+
func (m *MsgAddMarkerRequest) Size() (n int) {
if m == nil {
return 0
@@ -2982,6 +3254,238 @@ func sovTx(x uint64) (n int) {
func sozTx(x uint64) (n int) {
return sovTx(uint64((x << 1) ^ uint64((int64(x) >> 63))))
}
+func (m *MsgGrantAllowanceRequest) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowTx
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: MsgGrantAllowanceRequest: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: MsgGrantAllowanceRequest: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Denom", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowTx
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthTx
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthTx
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Denom = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Administrator", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowTx
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthTx
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthTx
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Administrator = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Grantee", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowTx
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthTx
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthTx
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Grantee = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Allowance", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowTx
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthTx
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthTx
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Allowance == nil {
+ m.Allowance = &types.Any{}
+ }
+ if err := m.Allowance.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipTx(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return ErrInvalidLengthTx
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *MsgGrantAllowanceResponse) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowTx
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: MsgGrantAllowanceResponse: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: MsgGrantAllowanceResponse: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ default:
+ iNdEx = preIndex
+ skippy, err := skipTx(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return ErrInvalidLengthTx
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
func (m *MsgAddMarkerRequest) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
@@ -4825,7 +5329,7 @@ func (m *MsgWithdrawRequest) Unmarshal(dAtA []byte) error {
if postIndex > l {
return io.ErrUnexpectedEOF
}
- m.Amount = append(m.Amount, types.Coin{})
+ m.Amount = append(m.Amount, types1.Coin{})
if err := m.Amount[len(m.Amount)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}