diff --git a/docs/static/openapi.yml b/docs/static/openapi.yml index 098948200..384e5c719 100644 --- a/docs/static/openapi.yml +++ b/docs/static/openapi.yml @@ -40520,109 +40520,6 @@ paths: type: string tags: - Query - /elys-network/elys/incentive/all_program_rewards: - get: - summary: Queries all program rewards - operationId: ElysIncentiveAllProgramRewards - responses: - '200': - description: A successful response. - schema: - type: object - properties: - usdc_staking_rewards: - type: array - items: - type: object - properties: - denom: - type: string - amount: - type: string - description: >- - Coin defines a token with a denomination and an amount. - - - NOTE: The amount field is an Int which implements the custom - method - - signatures required by gogoproto. - elys_staking_rewards: - type: array - items: - type: object - properties: - denom: - type: string - amount: - type: string - description: >- - Coin defines a token with a denomination and an amount. - - - NOTE: The amount field is an Int which implements the custom - method - - signatures required by gogoproto. - eden_staking_rewards: - type: array - items: - type: object - properties: - denom: - type: string - amount: - type: string - description: >- - Coin defines a token with a denomination and an amount. - - - NOTE: The amount field is an Int which implements the custom - method - - signatures required by gogoproto. - edenb_staking_rewards: - type: array - items: - type: object - properties: - denom: - type: string - amount: - type: string - description: >- - Coin defines a token with a denomination and an amount. - - - NOTE: The amount field is an Int which implements the custom - method - - signatures required by gogoproto. - default: - description: An unexpected error response. - schema: - type: object - properties: - code: - type: integer - format: int32 - message: - type: string - details: - type: array - items: - type: object - properties: - '@type': - type: string - additionalProperties: {} - parameters: - - name: address - in: query - required: false - type: string - tags: - - Query /elys-network/elys/incentive/apr/{withdraw_type}/{denom}: get: summary: Calculate APR @@ -86296,65 +86193,6 @@ definitions: NOTE: The amount field is an Int which implements the custom method signatures required by gogoproto. - elys.incentive.QueryAllProgramRewardsResponse: - type: object - properties: - usdc_staking_rewards: - type: array - items: - type: object - properties: - denom: - type: string - amount: - type: string - description: |- - Coin defines a token with a denomination and an amount. - - NOTE: The amount field is an Int which implements the custom method - signatures required by gogoproto. - elys_staking_rewards: - type: array - items: - type: object - properties: - denom: - type: string - amount: - type: string - description: |- - Coin defines a token with a denomination and an amount. - - NOTE: The amount field is an Int which implements the custom method - signatures required by gogoproto. - eden_staking_rewards: - type: array - items: - type: object - properties: - denom: - type: string - amount: - type: string - description: |- - Coin defines a token with a denomination and an amount. - - NOTE: The amount field is an Int which implements the custom method - signatures required by gogoproto. - edenb_staking_rewards: - type: array - items: - type: object - properties: - denom: - type: string - amount: - type: string - description: |- - Coin defines a token with a denomination and an amount. - - NOTE: The amount field is an Int which implements the custom method - signatures required by gogoproto. elys.incentive.QueryAprResponse: type: object properties: diff --git a/proto/elys/incentive/query.proto b/proto/elys/incentive/query.proto index 011062df3..6cfb201aa 100644 --- a/proto/elys/incentive/query.proto +++ b/proto/elys/incentive/query.proto @@ -27,11 +27,6 @@ service Query { rpc PoolRewards(QueryPoolRewardsRequest) returns (QueryPoolRewardsResponse) { option (google.api.http).get = "/elys-network/elys/incentive/pool_rewards"; } - - // Queries all program rewards - rpc AllProgramRewards(QueryAllProgramRewardsRequest) returns (QueryAllProgramRewardsResponse) { - option (google.api.http).get = "/elys-network/elys/incentive/all_program_rewards"; - } } message QueryAprRequest { @@ -92,29 +87,6 @@ message QueryAprsResponse { ]; } -message QueryAllProgramRewardsRequest { - string address = 1; -} - -message QueryAllProgramRewardsResponse { - repeated cosmos.base.v1beta1.Coin usdc_staking_rewards = 1 [ - (gogoproto.nullable) = false, - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" - ]; - repeated cosmos.base.v1beta1.Coin elys_staking_rewards = 2 [ - (gogoproto.nullable) = false, - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" - ]; - repeated cosmos.base.v1beta1.Coin eden_staking_rewards = 3 [ - (gogoproto.nullable) = false, - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" - ]; - repeated cosmos.base.v1beta1.Coin edenb_staking_rewards = 4 [ - (gogoproto.nullable) = false, - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" - ]; -} - message QueryPoolRewardsRequest { repeated uint64 pool_ids = 1; cosmos.base.query.v1beta1.PageRequest pagination = 2; diff --git a/wasmbindings/types/types.go b/wasmbindings/types/types.go index aaadb07b2..c2e80d9cb 100644 --- a/wasmbindings/types/types.go +++ b/wasmbindings/types/types.go @@ -159,9 +159,8 @@ type ElysQuery struct { EpochsCurrentEpoch *epochstypes.QueryCurrentEpochRequest `json:"epochs_current_epoch,omitempty"` // incentive queriers - IncentiveApr *incentivetypes.QueryAprRequest `json:"incentive_apr,omitempty"` - IncentiveAprs *incentivetypes.QueryAprsRequest `json:"incentive_aprs,omitempty"` - IncentiveAllProgramRewards *incentivetypes.QueryAllProgramRewardsRequest `json:"incentive_all_program_rewards,omitempty"` + IncentiveApr *incentivetypes.QueryAprRequest `json:"incentive_apr,omitempty"` + IncentiveAprs *incentivetypes.QueryAprsRequest `json:"incentive_aprs,omitempty"` // masterchef queriers MasterchefParams *mastercheftypes.QueryParamsRequest `json:"masterchef_params,omitempty"` diff --git a/x/amm/keeper/query_balance.go b/x/amm/keeper/query_balance.go index 3adf926ab..9d51e6565 100644 --- a/x/amm/keeper/query_balance.go +++ b/x/amm/keeper/query_balance.go @@ -3,11 +3,9 @@ package keeper import ( "context" - errorsmod "cosmossdk.io/errors" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" "github.com/elys-network/elys/x/amm/types" - assetprofiletypes "github.com/elys-network/elys/x/assetprofile/types" paramtypes "github.com/elys-network/elys/x/parameter/types" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" @@ -27,23 +25,13 @@ func (k Keeper) Balance(goCtx context.Context, req *types.QueryBalanceRequest) ( return nil, sdkerrors.ErrInvalidAddress } + // Calculates balance in bank module + // For Eden/EdenB, calculates commitment claimed amount balance := k.bankKeeper.GetBalance(ctx, address, denom) - if denom != paramtypes.Elys { + if denom == paramtypes.Eden || denom == paramtypes.EdenB { commitment := k.commitmentKeeper.GetCommitments(ctx, addr) claimed := commitment.GetClaimedForDenom(denom) - commitBalance := sdk.NewCoin(denom, claimed) - - baseCurrency, found := k.assetProfileKeeper.GetUsdcDenom(ctx) - if !found { - return nil, errorsmod.Wrapf(assetprofiletypes.ErrAssetProfileNotFound, "asset %s not found", paramtypes.BaseCurrency) - } - - // If it is USDC, we should add bank module balance as well. - if denom == baseCurrency { - balance = balance.Add(commitBalance) - } else { - balance = commitBalance - } + balance = sdk.NewCoin(denom, claimed) } return &types.QueryBalanceResponse{ diff --git a/x/incentive/client/cli/queries.go b/x/incentive/client/cli/queries.go index 63a316c51..a4831876f 100644 --- a/x/incentive/client/cli/queries.go +++ b/x/incentive/client/cli/queries.go @@ -114,30 +114,3 @@ func CmdPoolRewards() *cobra.Command { return cmd } - -func CmdAllProgramRewards() *cobra.Command { - cmd := &cobra.Command{ - Use: "all-program-rewards [address]", - Short: "calculate all program rewards", - Example: "elysd q incentive all-program-rewards [address]", - Args: cobra.ExactArgs(1), - RunE: func(cmd *cobra.Command, args []string) error { - clientCtx := client.GetClientContextFromCmd(cmd) - queryClient := types.NewQueryClient(clientCtx) - - params := &types.QueryAllProgramRewardsRequest{ - Address: args[0], - } - res, err := queryClient.AllProgramRewards(context.Background(), params) - if err != nil { - return err - } - - return clientCtx.PrintProto(res) - }, - } - - flags.AddQueryFlagsToCmd(cmd) - - return cmd -} diff --git a/x/incentive/client/cli/query.go b/x/incentive/client/cli/query.go index 3719415ce..283af7025 100644 --- a/x/incentive/client/cli/query.go +++ b/x/incentive/client/cli/query.go @@ -22,7 +22,6 @@ func GetQueryCmd(queryRoute string) *cobra.Command { cmd.AddCommand(CmdApr()) cmd.AddCommand(CmdAprs()) cmd.AddCommand(CmdPoolRewards()) - cmd.AddCommand(CmdAllProgramRewards()) // this line is used by starport scaffolding # 1 return cmd diff --git a/x/incentive/client/wasm/querier.go b/x/incentive/client/wasm/querier.go index 10bda75c4..f02e756f9 100644 --- a/x/incentive/client/wasm/querier.go +++ b/x/incentive/client/wasm/querier.go @@ -26,8 +26,6 @@ func (oq *Querier) HandleQuery(ctx sdk.Context, query wasmbindingstypes.ElysQuer return oq.queryApr(ctx, query.IncentiveApr) case query.IncentiveAprs != nil: return oq.queryAprs(ctx, query.IncentiveAprs) - case query.IncentiveAllProgramRewards != nil: - return oq.queryAllProgramRewards(ctx, query.IncentiveAllProgramRewards) default: // This handler cannot handle the query return nil, wasmbindingstypes.ErrCannotHandleQuery diff --git a/x/incentive/client/wasm/query_all_program_rewards.go b/x/incentive/client/wasm/query_all_program_rewards.go deleted file mode 100644 index 84a56db63..000000000 --- a/x/incentive/client/wasm/query_all_program_rewards.go +++ /dev/null @@ -1,22 +0,0 @@ -package wasm - -import ( - "encoding/json" - - errorsmod "cosmossdk.io/errors" - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/elys-network/elys/x/incentive/types" -) - -func (oq *Querier) queryAllProgramRewards(ctx sdk.Context, query *types.QueryAllProgramRewardsRequest) ([]byte, error) { - resp, err := oq.keeper.AllProgramRewards(ctx, query) - if err != nil { - return nil, errorsmod.Wrap(err, "failed to get all program rewards") - } - - responseBytes, err := json.Marshal(resp) - if err != nil { - return nil, errorsmod.Wrap(err, "failed to serialize all program rewards response") - } - return responseBytes, nil -} diff --git a/x/incentive/keeper/queries.go b/x/incentive/keeper/queries.go index 3afe8c12f..7932004a9 100644 --- a/x/incentive/keeper/queries.go +++ b/x/incentive/keeper/queries.go @@ -8,7 +8,6 @@ import ( commitmenttypes "github.com/elys-network/elys/x/commitment/types" "github.com/elys-network/elys/x/incentive/types" ptypes "github.com/elys-network/elys/x/parameter/types" - stablestaketypes "github.com/elys-network/elys/x/stablestake/types" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" ) @@ -159,63 +158,6 @@ func (k Keeper) PoolRewards(goCtx context.Context, req *types.QueryPoolRewardsRe }, nil } -func (k Keeper) AllProgramRewards(goCtx context.Context, req *types.QueryAllProgramRewardsRequest) (*types.QueryAllProgramRewardsResponse, error) { - if req == nil { - return nil, status.Error(codes.InvalidArgument, "invalid request") - } - ctx := sdk.UnwrapSDKContext(goCtx) - - k.masterchef.AfterWithdraw(ctx, stablestaketypes.PoolId, req.Address, sdk.ZeroInt()) - - stableStakeRewards := sdk.Coins{} - for _, rewardDenom := range k.masterchef.GetRewardDenoms(ctx, stablestaketypes.PoolId) { - userRewardInfo, found := k.masterchef.GetUserRewardInfo(ctx, req.Address, stablestaketypes.PoolId, rewardDenom) - if found && userRewardInfo.RewardPending.IsPositive() { - stableStakeRewards = stableStakeRewards.Add( - sdk.NewCoin( - rewardDenom, - userRewardInfo.RewardPending.TruncateInt(), - ), - ) - } - } - - delAddr := sdk.MustAccAddressFromBech32(req.Address) - delegations := k.estaking.Keeper.GetDelegatorDelegations(ctx, delAddr, 5000) - elysStakingRewards := sdk.Coins{} - for _, del := range delegations { - rewards, err := k.estaking.DelegationRewards(ctx, req.Address, del.ValidatorAddress) - if err != nil { - return nil, err - } - finalRewards, _ := rewards.TruncateDecimal() - elysStakingRewards = elysStakingRewards.Add(finalRewards...) - } - - // Eden commit rewards - edenVal := k.estaking.GetParams(ctx).EdenCommitVal - edenCommitRewards, err := k.estaking.DelegationRewards(ctx, req.Address, edenVal) - if err != nil { - edenCommitRewards = []sdk.DecCoin{} - } - finalEdenCommitRewards, _ := edenCommitRewards.TruncateDecimal() - - // EdenB commit rewards - edenBVal := k.estaking.GetParams(ctx).EdenbCommitVal - edenBCommitRewards, err := k.estaking.DelegationRewards(ctx, req.Address, edenBVal) - if err != nil { - edenBCommitRewards = []sdk.DecCoin{} - } - finalEdenBCommitRewards, _ := edenBCommitRewards.TruncateDecimal() - - return &types.QueryAllProgramRewardsResponse{ - UsdcStakingRewards: stableStakeRewards, - ElysStakingRewards: elysStakingRewards, - EdenStakingRewards: finalEdenCommitRewards, - EdenbStakingRewards: finalEdenBCommitRewards, - }, nil -} - // Generate earn pool struct func (k *Keeper) generatePoolRewards(ctx sdk.Context, ammPool *ammtypes.Pool) types.PoolRewards { // Get rewards amount diff --git a/x/incentive/types/query.pb.go b/x/incentive/types/query.pb.go index 6a9460891..c2d1481b9 100644 --- a/x/incentive/types/query.pb.go +++ b/x/incentive/types/query.pb.go @@ -205,118 +205,6 @@ func (m *QueryAprsResponse) XXX_DiscardUnknown() { var xxx_messageInfo_QueryAprsResponse proto.InternalMessageInfo -type QueryAllProgramRewardsRequest struct { - Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` -} - -func (m *QueryAllProgramRewardsRequest) Reset() { *m = QueryAllProgramRewardsRequest{} } -func (m *QueryAllProgramRewardsRequest) String() string { return proto.CompactTextString(m) } -func (*QueryAllProgramRewardsRequest) ProtoMessage() {} -func (*QueryAllProgramRewardsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_29b04b3fcad26af2, []int{4} -} -func (m *QueryAllProgramRewardsRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryAllProgramRewardsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryAllProgramRewardsRequest.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 *QueryAllProgramRewardsRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryAllProgramRewardsRequest.Merge(m, src) -} -func (m *QueryAllProgramRewardsRequest) XXX_Size() int { - return m.Size() -} -func (m *QueryAllProgramRewardsRequest) XXX_DiscardUnknown() { - xxx_messageInfo_QueryAllProgramRewardsRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryAllProgramRewardsRequest proto.InternalMessageInfo - -func (m *QueryAllProgramRewardsRequest) GetAddress() string { - if m != nil { - return m.Address - } - return "" -} - -type QueryAllProgramRewardsResponse struct { - UsdcStakingRewards github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,1,rep,name=usdc_staking_rewards,json=usdcStakingRewards,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"usdc_staking_rewards"` - ElysStakingRewards github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,2,rep,name=elys_staking_rewards,json=elysStakingRewards,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"elys_staking_rewards"` - EdenStakingRewards github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,3,rep,name=eden_staking_rewards,json=edenStakingRewards,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"eden_staking_rewards"` - EdenbStakingRewards github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,4,rep,name=edenb_staking_rewards,json=edenbStakingRewards,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"edenb_staking_rewards"` -} - -func (m *QueryAllProgramRewardsResponse) Reset() { *m = QueryAllProgramRewardsResponse{} } -func (m *QueryAllProgramRewardsResponse) String() string { return proto.CompactTextString(m) } -func (*QueryAllProgramRewardsResponse) ProtoMessage() {} -func (*QueryAllProgramRewardsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_29b04b3fcad26af2, []int{5} -} -func (m *QueryAllProgramRewardsResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryAllProgramRewardsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryAllProgramRewardsResponse.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 *QueryAllProgramRewardsResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryAllProgramRewardsResponse.Merge(m, src) -} -func (m *QueryAllProgramRewardsResponse) XXX_Size() int { - return m.Size() -} -func (m *QueryAllProgramRewardsResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryAllProgramRewardsResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryAllProgramRewardsResponse proto.InternalMessageInfo - -func (m *QueryAllProgramRewardsResponse) GetUsdcStakingRewards() github_com_cosmos_cosmos_sdk_types.Coins { - if m != nil { - return m.UsdcStakingRewards - } - return nil -} - -func (m *QueryAllProgramRewardsResponse) GetElysStakingRewards() github_com_cosmos_cosmos_sdk_types.Coins { - if m != nil { - return m.ElysStakingRewards - } - return nil -} - -func (m *QueryAllProgramRewardsResponse) GetEdenStakingRewards() github_com_cosmos_cosmos_sdk_types.Coins { - if m != nil { - return m.EdenStakingRewards - } - return nil -} - -func (m *QueryAllProgramRewardsResponse) GetEdenbStakingRewards() github_com_cosmos_cosmos_sdk_types.Coins { - if m != nil { - return m.EdenbStakingRewards - } - return nil -} - type QueryPoolRewardsRequest struct { PoolIds []uint64 `protobuf:"varint,1,rep,packed,name=pool_ids,json=poolIds,proto3" json:"pool_ids,omitempty"` Pagination *query.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` @@ -326,7 +214,7 @@ func (m *QueryPoolRewardsRequest) Reset() { *m = QueryPoolRewardsRequest func (m *QueryPoolRewardsRequest) String() string { return proto.CompactTextString(m) } func (*QueryPoolRewardsRequest) ProtoMessage() {} func (*QueryPoolRewardsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_29b04b3fcad26af2, []int{6} + return fileDescriptor_29b04b3fcad26af2, []int{4} } func (m *QueryPoolRewardsRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -379,7 +267,7 @@ func (m *PoolRewards) Reset() { *m = PoolRewards{} } func (m *PoolRewards) String() string { return proto.CompactTextString(m) } func (*PoolRewards) ProtoMessage() {} func (*PoolRewards) Descriptor() ([]byte, []int) { - return fileDescriptor_29b04b3fcad26af2, []int{7} + return fileDescriptor_29b04b3fcad26af2, []int{5} } func (m *PoolRewards) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -430,7 +318,7 @@ func (m *QueryPoolRewardsResponse) Reset() { *m = QueryPoolRewardsRespon func (m *QueryPoolRewardsResponse) String() string { return proto.CompactTextString(m) } func (*QueryPoolRewardsResponse) ProtoMessage() {} func (*QueryPoolRewardsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_29b04b3fcad26af2, []int{8} + return fileDescriptor_29b04b3fcad26af2, []int{6} } func (m *QueryPoolRewardsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -471,8 +359,6 @@ func init() { proto.RegisterType((*QueryAprResponse)(nil), "elys.incentive.QueryAprResponse") proto.RegisterType((*QueryAprsRequest)(nil), "elys.incentive.QueryAprsRequest") proto.RegisterType((*QueryAprsResponse)(nil), "elys.incentive.QueryAprsResponse") - proto.RegisterType((*QueryAllProgramRewardsRequest)(nil), "elys.incentive.QueryAllProgramRewardsRequest") - proto.RegisterType((*QueryAllProgramRewardsResponse)(nil), "elys.incentive.QueryAllProgramRewardsResponse") proto.RegisterType((*QueryPoolRewardsRequest)(nil), "elys.incentive.QueryPoolRewardsRequest") proto.RegisterType((*PoolRewards)(nil), "elys.incentive.PoolRewards") proto.RegisterType((*QueryPoolRewardsResponse)(nil), "elys.incentive.QueryPoolRewardsResponse") @@ -481,66 +367,57 @@ func init() { func init() { proto.RegisterFile("elys/incentive/query.proto", fileDescriptor_29b04b3fcad26af2) } var fileDescriptor_29b04b3fcad26af2 = []byte{ - // 931 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x56, 0x41, 0x6f, 0x1b, 0x45, - 0x14, 0xce, 0xc6, 0x9b, 0xa4, 0x19, 0xa7, 0x81, 0x0e, 0x41, 0xdd, 0x18, 0xd8, 0xa4, 0x8b, 0x54, - 0x5c, 0x50, 0x76, 0x1b, 0x73, 0xa0, 0x70, 0x40, 0x4d, 0xa0, 0x88, 0x9e, 0x08, 0xdb, 0xf4, 0xc2, - 0xc5, 0x1a, 0x7b, 0x47, 0xdb, 0x55, 0xd6, 0x33, 0xdb, 0x99, 0x4d, 0x82, 0x55, 0x22, 0x24, 0x8e, - 0x9c, 0x90, 0x7a, 0xe7, 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, 0x2a, 0xe6, 0x21, 0x90, 0x7f, - 0x8f, 0x08, 0xb6, 0xdf, 0xcf, 0x68, 0xb8, 0x52, 0xd8, 0xc3, 0x09, 0xaf, 0xa1, 0x85, 0x88, 0x32, - 0xde, 0x73, 0xe6, 0x37, 0xad, 0xe6, 0x72, 0xa8, 0x0f, 0xde, 0x3e, 0x7a, 0x7d, 0x48, 0x24, 0x33, - 0xce, 0x24, 0xc5, 0x77, 0x51, 0x8d, 0x64, 0x42, 0xe1, 0x2f, 0xef, 0xfa, 0xcf, 0x5e, 0x6c, 0xcc, - 0xfd, 0xf9, 0x62, 0xe3, 0x66, 0x9c, 0xe4, 0x8f, 0x0e, 0x3b, 0x40, 0x64, 0x12, 0x69, 0xfe, 0x6c, - 0xc9, 0xe8, 0x20, 0x00, 0x41, 0xd2, 0xbf, 0xcf, 0xf2, 0x10, 0x5c, 0x3d, 0x3c, 0x44, 0x95, 0x46, - 0xbf, 0x77, 0xb6, 0x88, 0xae, 0x95, 0x2e, 0x0d, 0x57, 0x88, 0xae, 0x1e, 0xca, 0xa8, 0xdb, 0x26, - 0x99, 0x68, 0xc3, 0x8f, 0x29, 0x59, 0xeb, 0xe0, 0xbb, 0x93, 0x89, 0x87, 0x32, 0xea, 0x02, 0x26, - 0x8d, 0x28, 0x1b, 0x62, 0xce, 0x4f, 0x87, 0x09, 0x20, 0x05, 0xe6, 0x3e, 0x5a, 0x1d, 0xe8, 0x84, - 0xfb, 0x8e, 0x53, 0x9b, 0x0a, 0x74, 0xc5, 0x08, 0xbd, 0x07, 0x18, 0x80, 0x3a, 0x50, 0xaa, 0x51, - 0xed, 0xe9, 0x50, 0x8d, 0x54, 0x8d, 0x5a, 0xce, 0x29, 0x3c, 0x38, 0x0b, 0x33, 0xe5, 0x14, 0x40, - 0x47, 0x72, 0xaa, 0x30, 0x17, 0x67, 0xca, 0xa9, 0xc2, 0x34, 0xd1, 0x77, 0x86, 0xa0, 0x4b, 0xd3, - 0x47, 0xdf, 0x29, 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 0x05, - 0x16, 0x46, 0xce, 0x2d, 0x25, 0xe7, 0x5d, 0x7c, 0xe3, 0x65, 0x72, 0x24, 0x7e, 0x5a, 0xa9, 0xa6, - 0xf7, 0xce, 0x45, 0x1f, 0xaf, 0xf4, 0x46, 0xf3, 0xe5, 0x86, 0x46, 0xcd, 0xb6, 0x52, 0xf3, 0x01, - 0xbe, 0x75, 0xa1, 0x1a, 0x55, 0xc3, 0xa6, 0xd8, 0xf0, 0xaf, 0x16, 0xba, 0x36, 0x36, 0x7d, 0xf1, - 0xd6, 0xf9, 0x91, 0x4f, 0x98, 0xf0, 0x0d, 0xff, 0x55, 0xcd, 0x8d, 0xce, 0x3b, 0x4a, 0x67, 0x0b, - 0xdf, 0xbe, 0x38, 0x6b, 0x69, 0x0a, 0x6b, 0x34, 0x00, 0x14, 0x72, 0x77, 0xbf, 0x7c, 0x76, 0xea, - 0x5a, 0xcf, 0x4f, 0x5d, 0xeb, 0xef, 0x53, 0xd7, 0xfa, 0xe9, 0xcc, 0x9d, 0x7b, 0x7e, 0xe6, 0xce, - 0xfd, 0x71, 0xe6, 0xce, 0x7d, 0xe3, 0x97, 0x2a, 0x7f, 0x1c, 0xf5, 0xdb, 0x12, 0xae, 0xea, 0x82, - 0xce, 0xa2, 0x5a, 0x7b, 0x3f, 0xfc, 0x2f, 0x00, 0x00, 0xff, 0xff, 0xf3, 0x4f, 0x08, 0x2f, 0xdd, - 0x0b, 0x00, 0x00, + // 792 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x95, 0xcf, 0x4f, 0x13, 0x41, + 0x14, 0xc7, 0xbb, 0xf4, 0x07, 0x30, 0x05, 0xd4, 0x09, 0x09, 0xdb, 0x6a, 0xda, 0xb2, 0x26, 0x58, + 0x34, 0xec, 0x4a, 0x3d, 0x68, 0x3c, 0x18, 0xa8, 0x62, 0xe4, 0x24, 0xae, 0x70, 0xf1, 0x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xaa, 0x9a, 0x12, 0x6f, 0xfd, 0xa3, 0xbf, 0x01, 0x00, 0x00, 0xff, 0xff, + 0xae, 0x27, 0xf7, 0x69, 0xd2, 0x08, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -561,8 +438,6 @@ type QueryClient interface { Aprs(ctx context.Context, in *QueryAprsRequest, opts ...grpc.CallOption) (*QueryAprsResponse, error) // Queries PoolReward items PoolRewards(ctx context.Context, in *QueryPoolRewardsRequest, opts ...grpc.CallOption) (*QueryPoolRewardsResponse, error) - // Queries all program rewards - AllProgramRewards(ctx context.Context, in *QueryAllProgramRewardsRequest, opts ...grpc.CallOption) (*QueryAllProgramRewardsResponse, error) } type queryClient struct { @@ -600,15 +475,6 @@ func (c *queryClient) PoolRewards(ctx context.Context, in *QueryPoolRewardsReque return out, nil } -func (c *queryClient) AllProgramRewards(ctx context.Context, in *QueryAllProgramRewardsRequest, opts ...grpc.CallOption) (*QueryAllProgramRewardsResponse, error) { - out := new(QueryAllProgramRewardsResponse) - err := c.cc.Invoke(ctx, "/elys.incentive.Query/AllProgramRewards", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - // QueryServer is the server API for Query service. type QueryServer interface { // Calculate APR @@ -617,8 +483,6 @@ type QueryServer interface { Aprs(context.Context, *QueryAprsRequest) (*QueryAprsResponse, error) // Queries PoolReward items PoolRewards(context.Context, *QueryPoolRewardsRequest) (*QueryPoolRewardsResponse, error) - // Queries all program rewards - AllProgramRewards(context.Context, *QueryAllProgramRewardsRequest) (*QueryAllProgramRewardsResponse, error) } // UnimplementedQueryServer can be embedded to have forward compatible implementations. @@ -634,9 +498,6 @@ func (*UnimplementedQueryServer) Aprs(ctx context.Context, req *QueryAprsRequest func (*UnimplementedQueryServer) PoolRewards(ctx context.Context, req *QueryPoolRewardsRequest) (*QueryPoolRewardsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method PoolRewards not implemented") } -func (*UnimplementedQueryServer) AllProgramRewards(ctx context.Context, req *QueryAllProgramRewardsRequest) (*QueryAllProgramRewardsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method AllProgramRewards not implemented") -} func RegisterQueryServer(s grpc1.Server, srv QueryServer) { s.RegisterService(&_Query_serviceDesc, srv) @@ -696,24 +557,6 @@ func _Query_PoolRewards_Handler(srv interface{}, ctx context.Context, dec func(i return interceptor(ctx, in, info, handler) } -func _Query_AllProgramRewards_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryAllProgramRewardsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).AllProgramRewards(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/elys.incentive.Query/AllProgramRewards", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).AllProgramRewards(ctx, req.(*QueryAllProgramRewardsRequest)) - } - return interceptor(ctx, in, info, handler) -} - var _Query_serviceDesc = grpc.ServiceDesc{ ServiceName: "elys.incentive.Query", HandlerType: (*QueryServer)(nil), @@ -730,10 +573,6 @@ var _Query_serviceDesc = grpc.ServiceDesc{ MethodName: "PoolRewards", Handler: _Query_PoolRewards_Handler, }, - { - MethodName: "AllProgramRewards", - Handler: _Query_AllProgramRewards_Handler, - }, }, Streams: []grpc.StreamDesc{}, Metadata: "elys/incentive/query.proto", @@ -953,115 +792,6 @@ func (m *QueryAprsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *QueryAllProgramRewardsRequest) 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 *QueryAllProgramRewardsRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryAllProgramRewardsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Address) > 0 { - i -= len(m.Address) - copy(dAtA[i:], m.Address) - i = encodeVarintQuery(dAtA, i, uint64(len(m.Address))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *QueryAllProgramRewardsResponse) 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 *QueryAllProgramRewardsResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryAllProgramRewardsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.EdenbStakingRewards) > 0 { - for iNdEx := len(m.EdenbStakingRewards) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.EdenbStakingRewards[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - } - if len(m.EdenStakingRewards) > 0 { - for iNdEx := len(m.EdenStakingRewards) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.EdenStakingRewards[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - } - if len(m.ElysStakingRewards) > 0 { - for iNdEx := len(m.ElysStakingRewards) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.ElysStakingRewards[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - if len(m.UsdcStakingRewards) > 0 { - for iNdEx := len(m.UsdcStakingRewards) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.UsdcStakingRewards[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - func (m *QueryPoolRewardsRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -1280,52 +1010,6 @@ func (m *QueryAprsResponse) Size() (n int) { return n } -func (m *QueryAllProgramRewardsRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Address) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *QueryAllProgramRewardsResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.UsdcStakingRewards) > 0 { - for _, e := range m.UsdcStakingRewards { - l = e.Size() - n += 1 + l + sovQuery(uint64(l)) - } - } - if len(m.ElysStakingRewards) > 0 { - for _, e := range m.ElysStakingRewards { - l = e.Size() - n += 1 + l + sovQuery(uint64(l)) - } - } - if len(m.EdenStakingRewards) > 0 { - for _, e := range m.EdenStakingRewards { - l = e.Size() - n += 1 + l + sovQuery(uint64(l)) - } - } - if len(m.EdenbStakingRewards) > 0 { - for _, e := range m.EdenbStakingRewards { - l = e.Size() - n += 1 + l + sovQuery(uint64(l)) - } - } - return n -} - func (m *QueryPoolRewardsRequest) Size() (n int) { if m == nil { return 0 @@ -2012,274 +1696,6 @@ func (m *QueryAprsResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryAllProgramRewardsRequest) 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 ErrIntOverflowQuery - } - 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: QueryAllProgramRewardsRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryAllProgramRewardsRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - 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 ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Address = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QueryAllProgramRewardsResponse) 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 ErrIntOverflowQuery - } - 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: QueryAllProgramRewardsResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryAllProgramRewardsResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field UsdcStakingRewards", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.UsdcStakingRewards = append(m.UsdcStakingRewards, types1.Coin{}) - if err := m.UsdcStakingRewards[len(m.UsdcStakingRewards)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ElysStakingRewards", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ElysStakingRewards = append(m.ElysStakingRewards, types1.Coin{}) - if err := m.ElysStakingRewards[len(m.ElysStakingRewards)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field EdenStakingRewards", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.EdenStakingRewards = append(m.EdenStakingRewards, types1.Coin{}) - if err := m.EdenStakingRewards[len(m.EdenStakingRewards)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field EdenbStakingRewards", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.EdenbStakingRewards = append(m.EdenbStakingRewards, types1.Coin{}) - if err := m.EdenbStakingRewards[len(m.EdenbStakingRewards)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} func (m *QueryPoolRewardsRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 diff --git a/x/incentive/types/query.pb.gw.go b/x/incentive/types/query.pb.gw.go index 53be496d5..baf1035db 100644 --- a/x/incentive/types/query.pb.gw.go +++ b/x/incentive/types/query.pb.gw.go @@ -168,42 +168,6 @@ func local_request_Query_PoolRewards_0(ctx context.Context, marshaler runtime.Ma } -var ( - filter_Query_AllProgramRewards_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) - -func request_Query_AllProgramRewards_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryAllProgramRewardsRequest - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_AllProgramRewards_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.AllProgramRewards(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_Query_AllProgramRewards_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryAllProgramRewardsRequest - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_AllProgramRewards_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.AllProgramRewards(ctx, &protoReq) - return msg, metadata, err - -} - // RegisterQueryHandlerServer registers the http handlers for service Query to "mux". // UnaryRPC :call QueryServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. @@ -270,26 +234,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv }) - mux.Handle("GET", pattern_Query_AllProgramRewards_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_Query_AllProgramRewards_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Query_AllProgramRewards_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - return nil } @@ -391,26 +335,6 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie }) - mux.Handle("GET", pattern_Query_AllProgramRewards_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_Query_AllProgramRewards_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Query_AllProgramRewards_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - return nil } @@ -420,8 +344,6 @@ var ( pattern_Query_Aprs_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"elys-network", "elys", "incentive", "aprs"}, "", runtime.AssumeColonVerbOpt(true))) pattern_Query_PoolRewards_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"elys-network", "elys", "incentive", "pool_rewards"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_Query_AllProgramRewards_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"elys-network", "elys", "incentive", "all_program_rewards"}, "", runtime.AssumeColonVerbOpt(true))) ) var ( @@ -430,6 +352,4 @@ var ( forward_Query_Aprs_0 = runtime.ForwardResponseMessage forward_Query_PoolRewards_0 = runtime.ForwardResponseMessage - - forward_Query_AllProgramRewards_0 = runtime.ForwardResponseMessage )