diff --git a/proto/stride/claim/query.proto b/proto/stride/claim/query.proto index 90ec629528..0a03c87d03 100644 --- a/proto/stride/claim/query.proto +++ b/proto/stride/claim/query.proto @@ -94,6 +94,7 @@ message QueryTotalClaimableRequest { string airdrop_identifier = 1 [ (gogoproto.moretags) = "yaml:\"airdrop_identifier\"" ]; string address = 2 [ (gogoproto.moretags) = "yaml:\"address\"" ]; + bool include_claimed = 3; } message QueryTotalClaimableResponse { diff --git a/proto/stride/claim/tx.proto b/proto/stride/claim/tx.proto index a1b5b608a4..52c963d8b5 100644 --- a/proto/stride/claim/tx.proto +++ b/proto/stride/claim/tx.proto @@ -29,9 +29,7 @@ message MsgSetAirdropAllocations { message MsgSetAirdropAllocationsResponse {} -message MsgClaimFreeAmount { - string user = 1; -} +message MsgClaimFreeAmount { string user = 1; } message MsgClaimFreeAmountResponse { repeated cosmos.base.v1beta1.Coin claimed_amount = 3 [ diff --git a/scripts/airdrop.sh b/scripts/airdrop.sh new file mode 100644 index 0000000000..ebba867184 --- /dev/null +++ b/scripts/airdrop.sh @@ -0,0 +1,59 @@ +### AIRDROP TESTING FLOW +SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) +source ${SCRIPT_DIR}/vars.sh + +# First, start the network with `make start-docker` +# Then, run this script with `bash scripts/airdrop.sh` + +# NOTE: First, store the keys using the following mnemonics +# distributor address: stride1z835j3j65nqr6ng257q0xkkc9gta72gf48txwl +# distributor mnemonic: barrel salmon half click confirm crunch sense defy salute process cart fiscal sport clump weasel render private manage picture spell wreck hill frozen before +echo "barrel salmon half click confirm crunch sense defy salute process cart fiscal sport clump weasel render private manage picture spell wreck hill frozen before" | \ + $STRIDE_MAIN_CMD keys add distributor-test --recover + +# airdrop-test address: stride1nf6v2paty9m22l3ecm7dpakq2c92ueyununayr +# airdrop claimer mnemonic: royal auction state december october hip monster hotel south help bulk supreme history give deliver pigeon license gold carpet rabbit raw wool fatigue donate +echo "royal auction state december october hip monster hotel south help bulk supreme history give deliver pigeon license gold carpet rabbit raw wool fatigue donate" | \ + $STRIDE_MAIN_CMD keys add airdrop-test --recover + +## AIRDROP SETUP +echo "Funding accounts..." +# Transfer uatom from gaia to stride, so that we can liquid stake later +$GAIA_MAIN_CMD tx ibc-transfer transfer transfer channel-0 stride1nf6v2paty9m22l3ecm7dpakq2c92ueyununayr 1000000uatom --from ${GAIA_VAL_PREFIX}1 -y +sleep 5 +# Fund the distributor account +$STRIDE_MAIN_CMD tx bank send val1 stride1z835j3j65nqr6ng257q0xkkc9gta72gf48txwl 600000ustrd --from val1 -y +sleep 5 +# Fund the airdrop account +$STRIDE_MAIN_CMD tx bank send val1 stride1nf6v2paty9m22l3ecm7dpakq2c92ueyununayr 1000000000ustrd --from val1 -y +sleep 5 +# Create the airdrop, so that the airdrop account can claim tokens +$STRIDE_MAIN_CMD tx claim create-airdrop stride 1666792900 40000000 ustrd --from distributor-test -y +sleep 5 +# Set airdrop allocations +$STRIDE_MAIN_CMD tx claim set-airdrop-allocations stride stride1nf6v2paty9m22l3ecm7dpakq2c92ueyununayr 1 --from distributor-test -y +sleep 5 + +# AIRDROP CLAIMS +# Check balances before claims +echo "Initial balance before claim:" +$STRIDE_MAIN_CMD query bank balances stride1nf6v2paty9m22l3ecm7dpakq2c92ueyununayr +# NOTE: You can claim here using the CLI, or from the frontend! +# Claim 20% of the free tokens +echo "Claiming fee amount..." +$STRIDE_MAIN_CMD tx claim claim-free-amount --from airdrop-test --gas 400000 +sleep 5 +echo "Balance after claim:" +$STRIDE_MAIN_CMD query bank balances stride1nf6v2paty9m22l3ecm7dpakq2c92ueyununayr +# Stake, to claim another 20% +echo "Staking..." +$STRIDE_MAIN_CMD tx staking delegate stridevaloper1nnurja9zt97huqvsfuartetyjx63tc5zrj5x9f 100ustrd --from airdrop-test --gas 400000 +sleep 5 +echo "Balance after stake:" +$STRIDE_MAIN_CMD query bank balances stride1nf6v2paty9m22l3ecm7dpakq2c92ueyununayr +# Liquid stake, to claim the final 60% of tokens +echo "Liquid staking..." +$STRIDE_MAIN_CMD tx stakeibc liquid-stake 1000 uatom --from airdrop-test --gas 400000 +sleep 5 +echo "Balance after liquid stake:" +$STRIDE_MAIN_CMD query bank balances stride1nf6v2paty9m22l3ecm7dpakq2c92ueyununayr \ No newline at end of file diff --git a/x/claim/client/cli/query.go b/x/claim/client/cli/query.go index 9817b2a369..a11262c8b9 100644 --- a/x/claim/client/cli/query.go +++ b/x/claim/client/cli/query.go @@ -180,13 +180,13 @@ $ %s query claim claimable-for-action stride1h4astdfzjhcwahtfrh24qtvndzzh49xvqtf // GetCmdQueryClaimable implements the query claimables command. func GetCmdQueryTotalClaimable() *cobra.Command { cmd := &cobra.Command{ - Use: "total-claimable [airdrop-identifier] [address]", - Args: cobra.ExactArgs(2), + Use: "total-claimable [airdrop-identifier] [address] [include-claimed]", + Args: cobra.ExactArgs(3), Short: "Query the total claimable amount remaining for an account.", Long: strings.TrimSpace( fmt.Sprintf(`Query the total claimable amount remaining for an account. Example: -$ %s query claim total-claimable stride stride1h4astdfzjhcwahtfrh24qtvndzzh49xvqtfftk +$ %s query claim total-claimable stride stride1h4astdfzjhcwahtfrh24qtvndzzh49xvqtfftk true `, version.AppName, ), @@ -201,6 +201,7 @@ $ %s query claim total-claimable stride stride1h4astdfzjhcwahtfrh24qtvndzzh49xvq res, err := queryClient.TotalClaimable(context.Background(), &types.QueryTotalClaimableRequest{ AirdropIdentifier: args[0], Address: args[1], + IncludeClaimed: args[2] == "true", }) if err != nil { return err diff --git a/x/claim/keeper/claim.go b/x/claim/keeper/claim.go index 63f5bf5d29..caa286f8ed 100644 --- a/x/claim/keeper/claim.go +++ b/x/claim/keeper/claim.go @@ -343,7 +343,7 @@ func (k Keeper) GetAirdropClaimDenom(ctx sdk.Context, airdropIdentifier string) } // GetClaimable returns claimable amount for a specific action done by an address -func (k Keeper) GetClaimableAmountForAction(ctx sdk.Context, addr sdk.AccAddress, action types.Action, airdropIdentifier string) (sdk.Coins, error) { +func (k Keeper) GetClaimableAmountForAction(ctx sdk.Context, addr sdk.AccAddress, action types.Action, airdropIdentifier string, includeClaimed bool) (sdk.Coins, error) { claimRecord, err := k.GetClaimRecord(ctx, addr, airdropIdentifier) if err != nil { return nil, err @@ -353,8 +353,8 @@ func (k Keeper) GetClaimableAmountForAction(ctx sdk.Context, addr sdk.AccAddress return sdk.Coins{}, nil } - // if action already completed, nothing is claimable - if claimRecord.ActionCompleted[action] { + // if action already completed (and we're not including claimed tokens), nothing is claimable + if !includeClaimed && claimRecord.ActionCompleted[action] { return sdk.Coins{}, nil } @@ -408,7 +408,7 @@ func (k Keeper) GetUserVestings(ctx sdk.Context, addr sdk.AccAddress) (vestingty } // GetClaimable returns claimable amount for a specific action done by an address -func (k Keeper) GetUserTotalClaimable(ctx sdk.Context, addr sdk.AccAddress, airdropIdentifier string) (sdk.Coins, error) { +func (k Keeper) GetUserTotalClaimable(ctx sdk.Context, addr sdk.AccAddress, airdropIdentifier string, includeClaimed bool) (sdk.Coins, error) { claimRecord, err := k.GetClaimRecord(ctx, addr, airdropIdentifier) if err != nil { return sdk.Coins{}, err @@ -420,7 +420,7 @@ func (k Keeper) GetUserTotalClaimable(ctx sdk.Context, addr sdk.AccAddress, aird totalClaimable := sdk.Coins{} for action := range types.Action_name { - claimableForAction, err := k.GetClaimableAmountForAction(ctx, addr, types.Action(action), airdropIdentifier) + claimableForAction, err := k.GetClaimableAmountForAction(ctx, addr, types.Action(action), airdropIdentifier, includeClaimed) if err != nil { return sdk.Coins{}, err } @@ -486,7 +486,7 @@ func (k Keeper) ClaimCoinsForAction(ctx sdk.Context, addr sdk.AccAddress, action return nil, sdkerrors.Wrapf(sdkerrors.ErrInvalidRequest, "invalid airdrop identifier: ClaimCoinsForAction") } - claimableAmount, err := k.GetClaimableAmountForAction(ctx, addr, action, airdropIdentifier) + claimableAmount, err := k.GetClaimableAmountForAction(ctx, addr, action, airdropIdentifier, false) if err != nil { return claimableAmount, err } diff --git a/x/claim/keeper/claim_test.go b/x/claim/keeper/claim_test.go index 0030a6e77c..5b2868391b 100644 --- a/x/claim/keeper/claim_test.go +++ b/x/claim/keeper/claim_test.go @@ -99,12 +99,12 @@ func (suite *KeeperTestSuite) TestHookBeforeAirdropStart() { err = suite.app.ClaimKeeper.SetClaimRecordsWithWeights(suite.ctx, claimRecords) suite.Require().NoError(err) - coins, err := suite.app.ClaimKeeper.GetUserTotalClaimable(suite.ctx, addr1, "stride") + coins, err := suite.app.ClaimKeeper.GetUserTotalClaimable(suite.ctx, addr1, "stride", false) suite.NoError(err) // Now, it is before starting air drop, so this value should return the empty coins suite.True(coins.Empty()) - coins, err = suite.app.ClaimKeeper.GetClaimableAmountForAction(suite.ctx, addr1, types.ACTION_FREE, "stride") + coins, err = suite.app.ClaimKeeper.GetClaimableAmountForAction(suite.ctx, addr1, types.ACTION_FREE, "stride", false) suite.NoError(err) // Now, it is before starting air drop, so this value should return the empty coins suite.True(coins.Empty()) @@ -188,15 +188,15 @@ func (suite *KeeperTestSuite) TestAirdropFlow() { err := suite.app.ClaimKeeper.SetClaimRecordsWithWeights(suite.ctx, claimRecords) suite.Require().NoError(err) - coins, err := suite.app.ClaimKeeper.GetUserTotalClaimable(suite.ctx, addr1, "stride") + coins, err := suite.app.ClaimKeeper.GetUserTotalClaimable(suite.ctx, addr1, "stride", false) suite.Require().NoError(err) suite.Require().Equal(coins.String(), sdk.NewCoins(sdk.NewInt64Coin(sdk.DefaultBondDenom, 50_000_000)).String()) - coins, err = suite.app.ClaimKeeper.GetUserTotalClaimable(suite.ctx, addr2, "stride") + coins, err = suite.app.ClaimKeeper.GetUserTotalClaimable(suite.ctx, addr2, "stride", false) suite.Require().NoError(err) suite.Require().Equal(coins.String(), sdk.NewCoins(sdk.NewInt64Coin(sdk.DefaultBondDenom, 50_000_000)).String()) - coins, err = suite.app.ClaimKeeper.GetUserTotalClaimable(suite.ctx, addr3, "stride") + coins, err = suite.app.ClaimKeeper.GetUserTotalClaimable(suite.ctx, addr3, "stride", false) suite.Require().NoError(err) suite.Require().Equal(coins, sdk.Coins{}) @@ -288,11 +288,11 @@ func (suite *KeeperTestSuite) TestMultiChainAirdropFlow() { err := suite.app.ClaimKeeper.SetClaimRecordsWithWeights(suite.ctx, claimRecords) suite.Require().NoError(err) - coins, err := suite.app.ClaimKeeper.GetUserTotalClaimable(suite.ctx, addr1, "stride") + coins, err := suite.app.ClaimKeeper.GetUserTotalClaimable(suite.ctx, addr1, "stride", false) suite.Require().NoError(err) suite.Require().Equal(coins.String(), sdk.NewCoins(sdk.NewInt64Coin(sdk.DefaultBondDenom, 100_000_000)).String()) - coins, err = suite.app.ClaimKeeper.GetUserTotalClaimable(suite.ctx, addr2, "juno") + coins, err = suite.app.ClaimKeeper.GetUserTotalClaimable(suite.ctx, addr2, "juno", false) suite.Require().NoError(err) suite.Require().Equal(coins.String(), sdk.NewCoins(sdk.NewInt64Coin(sdk.DefaultBondDenom, 0)).String()) @@ -343,6 +343,14 @@ func (suite *KeeperTestSuite) TestMultiChainAirdropFlow() { coins = suite.app.BankKeeper.GetAllBalances(suite.ctx, addr1) suite.Require().Equal(coins.String(), sdk.NewCoins(sdk.NewInt64Coin(sdk.DefaultBondDenom, (claimableAmountForFree+claimableAmountForStake+claimableAmountForLiquidStake)*2)).String()) + // Verify that the max claimable amount is unchanged, even after claims + maxCoins, err := suite.app.ClaimKeeper.GetUserTotalClaimable(suite.ctx, addr1, "stride", true) + suite.Require().NoError(err) + suite.Require().Equal(maxCoins.String(), sdk.NewCoins(sdk.NewInt64Coin(sdk.DefaultBondDenom, 100_000_000)).String()) + claimableCoins, err := suite.app.ClaimKeeper.GetUserTotalClaimable(suite.ctx, addr1, "stride", false) + suite.Require().NoError(err) + suite.Require().Equal(claimableCoins.String(), sdk.NewCoins(sdk.NewInt64Coin(sdk.DefaultBondDenom, 0)).String()) + // check if stride and osmosis airdrops ended properly suite.ctx = suite.ctx.WithBlockHeight(1000) suite.app.ClaimKeeper.EndBlocker(suite.ctx.WithBlockTime(time.Now().Add(types.DefaultAirdropDuration))) diff --git a/x/claim/keeper/grpc_query.go b/x/claim/keeper/grpc_query.go index e16b53aca7..56c1d3c74b 100644 --- a/x/claim/keeper/grpc_query.go +++ b/x/claim/keeper/grpc_query.go @@ -68,7 +68,7 @@ func (k Keeper) ClaimableForAction( return nil, err } - coins, err := k.GetClaimableAmountForAction(ctx, addr, req.Action, req.AirdropIdentifier) + coins, err := k.GetClaimableAmountForAction(ctx, addr, req.Action, req.AirdropIdentifier, false) return &types.QueryClaimableForActionResponse{ Coins: coins, @@ -90,7 +90,7 @@ func (k Keeper) TotalClaimable( return nil, err } - coins, err := k.GetUserTotalClaimable(ctx, addr, req.AirdropIdentifier) + coins, err := k.GetUserTotalClaimable(ctx, addr, req.AirdropIdentifier, req.IncludeClaimed) return &types.QueryTotalClaimableResponse{ Coins: coins, diff --git a/x/claim/spec/04_keeper.md b/x/claim/spec/04_keeper.md index d347fe3e7f..5ae284f623 100644 --- a/x/claim/spec/04_keeper.md +++ b/x/claim/spec/04_keeper.md @@ -16,7 +16,7 @@ Claim keeper module provides utility functions to manage epochs. GetClaimRecords(ctx sdk.Context) []types.ClaimRecord SetClaimRecord(ctx sdk.Context, claimRecord types.ClaimRecord) error SetClaimRecords(ctx sdk.Context, claimRecords []types.ClaimRecord) error - GetClaimableAmountForAction(ctx sdk.Context, addr sdk.AccAddress, action types.Action) (sdk.Coins, error) + GetClaimableAmountForAction(ctx sdk.Context, addr sdk.AccAddress, action types.Action, includeClaimed bool) (sdk.Coins, error) GetUserTotalClaimable(ctx sdk.Context, addr sdk.AccAddress) (sdk.Coins, error) ClaimCoinsForAction(ctx sdk.Context, addr sdk.AccAddress, action types.Action) (sdk.Coins, error) clearInitialClaimables(ctx sdk.Context) diff --git a/x/claim/types/query.pb.go b/x/claim/types/query.pb.go index 6e9045c15c..3108d5e273 100644 --- a/x/claim/types/query.pb.go +++ b/x/claim/types/query.pb.go @@ -411,6 +411,7 @@ func (m *QueryClaimableForActionResponse) GetCoins() github_com_cosmos_cosmos_sd type QueryTotalClaimableRequest struct { AirdropIdentifier string `protobuf:"bytes,1,opt,name=airdrop_identifier,json=airdropIdentifier,proto3" json:"airdrop_identifier,omitempty" yaml:"airdrop_identifier"` Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty" yaml:"address"` + IncludeClaimed bool `protobuf:"varint,3,opt,name=include_claimed,json=includeClaimed,proto3" json:"include_claimed,omitempty"` } func (m *QueryTotalClaimableRequest) Reset() { *m = QueryTotalClaimableRequest{} } @@ -460,6 +461,13 @@ func (m *QueryTotalClaimableRequest) GetAddress() string { return "" } +func (m *QueryTotalClaimableRequest) GetIncludeClaimed() bool { + if m != nil { + return m.IncludeClaimed + } + return false +} + type QueryTotalClaimableResponse struct { Coins github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,1,rep,name=coins,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"coins" yaml:"coins"` } @@ -618,65 +626,67 @@ func init() { func init() { proto.RegisterFile("stride/claim/query.proto", fileDescriptor_baa87682a02846df) } var fileDescriptor_baa87682a02846df = []byte{ - // 924 bytes of a gzipped FileDescriptorProto + // 947 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x56, 0x41, 0x6f, 0xdc, 0x44, - 0x14, 0xce, 0x34, 0x74, 0x2b, 0x26, 0x69, 0xaa, 0x4e, 0x43, 0xd8, 0x75, 0x5a, 0x7b, 0x19, 0x29, - 0x61, 0x91, 0x1a, 0x9b, 0x26, 0x88, 0x03, 0x17, 0xc0, 0x45, 0x28, 0x45, 0x3d, 0x14, 0x03, 0x95, - 0xe0, 0xb2, 0x1a, 0xdb, 0xd3, 0xc5, 0x62, 0xd7, 0xe3, 0x78, 0xec, 0x8a, 0xa8, 0xea, 0x05, 0x0e, - 0xdc, 0xa0, 0x12, 0x20, 0xf1, 0x17, 0x40, 0xe2, 0x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03, 0x3f, 0x81, 0x5b, 0x8f, 0x95, 0xb8, 0x70, 0x80, + 0x05, 0x25, 0xdc, 0xb8, 0xe5, 0xc0, 0x19, 0x79, 0xe6, 0x39, 0x6b, 0x27, 0xde, 0x6e, 0x72, 0x40, + 0xed, 0x25, 0xce, 0xce, 0xfb, 0xde, 0x7b, 0xdf, 0xf7, 0x8d, 0xe7, 0x8d, 0x71, 0x4b, 0xa6, 0x49, + 0xe0, 0x73, 0xdb, 0x0b, 0x59, 0x30, 0xb2, 0x77, 0x33, 0x9e, 0xec, 0x59, 0x71, 0x22, 0x52, 0x41, + 0x16, 0x75, 0xc4, 0x52, 0x11, 0x63, 0x79, 0x28, 0x86, 0x42, 0x05, 0xec, 0xfc, 0x3f, 0x8d, 0x31, + 0xae, 0x0c, 0x85, 0x18, 0x86, 0xdc, 0x66, 0x71, 0x60, 0xb3, 0x28, 0x12, 0x29, 0x4b, 0x03, 0x11, + 0x49, 0x88, 0x9a, 0x9e, 0x90, 0x23, 0x21, 0x6d, 0x97, 0x49, 0x6e, 0xdf, 0xbb, 0xe1, 0xf2, 0x94, + 0xdd, 0xb0, 0x3d, 0x11, 0x44, 0x10, 0xaf, 0xf6, 0x56, 0x7f, 0x21, 0xd2, 0xae, 0x44, 0x62, 0x96, + 0xb0, 0x51, 0x51, 0xf4, 0x0a, 0x84, 0xee, 0x71, 0x99, 0x06, 0xd1, 0xb0, 0x78, 0xea, 0x28, 0xcd, + 0xf0, 0xda, 0xfb, 0xb9, 0x86, 0x77, 0x82, 0x1c, 0xe6, 0x66, 0xa9, 0x48, 0xde, 0xf6, 0x3c, 0x91, + 0x45, 0x69, 0x9f, 0x85, 0x2c, 0xf2, 0xb8, 0xc3, 0x77, 0x33, 0x2e, 0x53, 0x72, 0x0b, 0x13, 0x16, + 0x24, 0x7e, 0x22, 0xe2, 0x41, 0xe0, 0xf3, 0x28, 0x0d, 0xee, 0x06, 0x3c, 0x69, 0xa1, 0x2e, 0xea, + 0xbd, 0xd0, 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xd4, 0xd4, 0x0b, 0x7c, 0x57, 0x7d, 0x10, 0xe4, 0xe0, 0x09, 0x45, 0xfb, 0xbe, 0x5e, 0x79, + 0x40, 0xbe, 0x41, 0xb8, 0x59, 0x1d, 0x11, 0xa4, 0x57, 0xd3, 0xb9, 0x76, 0x12, 0x1a, 0xaf, 0x9c, + 0x02, 0x09, 0xfc, 0x7a, 0x8a, 0x1f, 0x25, 0x5d, 0xe0, 0x97, 0xe6, 0xb0, 0xc1, 0x11, 0xcb, 0x92, + 0x7b, 0x5f, 0x21, 0xbc, 0x58, 0x3e, 0xd7, 0xa4, 0x6e, 0x77, 0x6a, 0x66, 0x88, 0x71, 0x6d, 0x26, + 0x0e, 0xb8, 0xac, 0x2b, 0x2e, 0x5d, 0x62, 0x02, 0x97, 0x4c, 0xf2, 0x64, 0x00, 0x47, 0x51, 0x4e, + 0x98, 0xf4, 0x77, 0x1e, 0xed, 0x9b, 0xe8, 0xf1, 0xbe, 0x89, 0xfe, 0xda, 0x37, 0xd1, 0xc3, 0x03, + 0x73, 0xee, 0xf1, 0x81, 0x39, 0xf7, 0xdb, 0x81, 0x39, 0xf7, 0x89, 0x55, 0x9a, 0x05, 0x1f, 0xa8, + 0xa6, 0x1b, 0xb7, 0x98, 0x2b, 0xed, 0xe2, 0x9b, 0x74, 0xcb, 0xfe, 0xbc, 0xd0, 0x99, 0xcf, 0x05, + 0xb7, 0xa1, 0xbe, 0x4a, 0xb7, 0xfe, 0x0b, 0x00, 0x00, 0xff, 0xff, 0x32, 0x18, 0x46, 0x52, 0x66, + 0x0b, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1231,6 +1241,16 @@ func (m *QueryTotalClaimableRequest) MarshalToSizedBuffer(dAtA []byte) (int, err _ = i var l int _ = l + if m.IncludeClaimed { + i-- + if m.IncludeClaimed { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x18 + } if len(m.Address) > 0 { i -= len(m.Address) copy(dAtA[i:], m.Address) @@ -1502,6 +1522,9 @@ func (m *QueryTotalClaimableRequest) Size() (n int) { if l > 0 { n += 1 + l + sovQuery(uint64(l)) } + if m.IncludeClaimed { + n += 2 + } return n } @@ -2366,6 +2389,26 @@ func (m *QueryTotalClaimableRequest) Unmarshal(dAtA []byte) error { } m.Address = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field IncludeClaimed", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.IncludeClaimed = bool(v != 0) default: iNdEx = preIndex skippy, err := skipQuery(dAtA[iNdEx:])