From b55f6a03284e74abccc3dd9a1d69b758f46b2382 Mon Sep 17 00:00:00 2001 From: Lazar Date: Mon, 2 Dec 2024 15:26:41 +0100 Subject: [PATCH] adds query for withdrawal addr --- proto/babylon/incentive/query.proto | 26 ++ x/incentive/client/cli/tx.go | 2 +- x/incentive/keeper/query_delegator.go | 32 ++ x/incentive/keeper/query_delegator_test.go | 21 + x/incentive/types/query.pb.go | 463 +++++++++++++++++++-- x/incentive/types/query.pb.gw.go | 101 +++++ 6 files changed, 602 insertions(+), 43 deletions(-) create mode 100644 x/incentive/keeper/query_delegator.go create mode 100644 x/incentive/keeper/query_delegator_test.go diff --git a/proto/babylon/incentive/query.proto b/proto/babylon/incentive/query.proto index 30601ae7..f5e3ab3a 100644 --- a/proto/babylon/incentive/query.proto +++ b/proto/babylon/incentive/query.proto @@ -6,6 +6,7 @@ import "google/api/annotations.proto"; import "babylon/incentive/params.proto"; import "babylon/incentive/incentive.proto"; import "cosmos/base/v1beta1/coin.proto"; +import "cosmos_proto/cosmos.proto"; option go_package = "github.com/babylonlabs-io/babylon/x/incentive/types"; @@ -23,6 +24,11 @@ service Query { rpc BTCStakingGauge(QueryBTCStakingGaugeRequest) returns (QueryBTCStakingGaugeResponse) { option (google.api.http).get = "/babylon/incentive/btc_staking_gauge/{height}"; } + + // DelegatorWithdrawAddress queries withdraw address of a delegator. + rpc DelegatorWithdrawAddress(QueryDelegatorWithdrawAddressRequest) returns (QueryDelegatorWithdrawAddressResponse) { + option (google.api.http).get = "/babylon/incentive/delegators/{delegator_address}/withdraw_address"; + } } // QueryParamsRequest is request type for the Query/Params RPC method. @@ -84,3 +90,23 @@ message QueryBTCStakingGaugeResponse { // gauge is the BTC staking gauge at the queried height BTCStakingGaugeResponse gauge = 1; } + +// QueryDelegatorWithdrawAddressRequest is the request type for the +// Query/DelegatorWithdrawAddress RPC method. +message QueryDelegatorWithdrawAddressRequest { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + + // delegator_address defines the delegator address to query for. + string delegator_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; +} + +// QueryDelegatorWithdrawAddressResponse is the response type for the +// Query/DelegatorWithdrawAddress RPC method. +message QueryDelegatorWithdrawAddressResponse { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + + // withdraw_address defines the delegator address to query for. + string withdraw_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; +} \ No newline at end of file diff --git a/x/incentive/client/cli/tx.go b/x/incentive/client/cli/tx.go index 5958d9b8..4a227a01 100644 --- a/x/incentive/client/cli/tx.go +++ b/x/incentive/client/cli/tx.go @@ -73,7 +73,7 @@ func NewSetWithdrawAddressCmd() *cobra.Command { msg := &types.MsgSetWithdrawAddress{ DelegatorAddress: delAddr.String(), - WithdrawAddress: string(withdrawAddr), + WithdrawAddress: withdrawAddr.String(), } return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) diff --git a/x/incentive/keeper/query_delegator.go b/x/incentive/keeper/query_delegator.go new file mode 100644 index 00000000..b4d9b4a9 --- /dev/null +++ b/x/incentive/keeper/query_delegator.go @@ -0,0 +1,32 @@ +package keeper + +import ( + "context" + "github.com/babylonlabs-io/babylon/x/incentive/types" + sdk "github.com/cosmos/cosmos-sdk/types" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" +) + +func (k Keeper) DelegatorWithdrawAddress(goCtx context.Context, req *types.QueryDelegatorWithdrawAddressRequest) (*types.QueryDelegatorWithdrawAddressResponse, error) { + if req == nil { + return nil, status.Error(codes.InvalidArgument, "invalid request") + } + + if req.DelegatorAddress == "" { + return nil, status.Error(codes.InvalidArgument, "empty delegator address") + } + + ctx := sdk.UnwrapSDKContext(goCtx) + delegatorAddress, err := sdk.AccAddressFromBech32(req.DelegatorAddress) + if err != nil { + return nil, status.Error(codes.InvalidArgument, err.Error()) + } + + withdrawAddr, err := k.GetWithdrawAddr(ctx, delegatorAddress) + if err != nil { + return nil, err + } + + return &types.QueryDelegatorWithdrawAddressResponse{WithdrawAddress: withdrawAddr.String()}, nil +} diff --git a/x/incentive/keeper/query_delegator_test.go b/x/incentive/keeper/query_delegator_test.go new file mode 100644 index 00000000..c65d2e5a --- /dev/null +++ b/x/incentive/keeper/query_delegator_test.go @@ -0,0 +1,21 @@ +package keeper_test + +import ( + "github.com/babylonlabs-io/babylon/testutil/datagen" + testkeeper "github.com/babylonlabs-io/babylon/testutil/keeper" + "github.com/babylonlabs-io/babylon/x/incentive/types" + "github.com/stretchr/testify/require" + "testing" +) + +func TestDelegatorAddressQuery(t *testing.T) { + keeper, ctx := testkeeper.IncentiveKeeper(t, nil, nil, nil) + withdrawalAddr := datagen.GenRandomAccount().GetAddress() + delegatorAddr := datagen.GenRandomAccount().GetAddress() + err := keeper.SetWithdrawAddr(ctx, delegatorAddr, withdrawalAddr) + require.NoError(t, err) + + response, err := keeper.DelegatorWithdrawAddress(ctx, &types.QueryDelegatorWithdrawAddressRequest{DelegatorAddress: delegatorAddr.String()}) + require.NoError(t, err) + require.Equal(t, &types.QueryDelegatorWithdrawAddressResponse{WithdrawAddress: withdrawalAddr.String()}, response) +} diff --git a/x/incentive/types/query.pb.go b/x/incentive/types/query.pb.go index baab5bc9..5feac9fe 100644 --- a/x/incentive/types/query.pb.go +++ b/x/incentive/types/query.pb.go @@ -6,6 +6,7 @@ package types import ( context "context" fmt "fmt" + _ "github.com/cosmos/cosmos-proto" github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" types "github.com/cosmos/cosmos-sdk/types" _ "github.com/cosmos/gogoproto/gogoproto" @@ -402,6 +403,86 @@ func (m *QueryBTCStakingGaugeResponse) GetGauge() *BTCStakingGaugeResponse { return nil } +// QueryDelegatorWithdrawAddressRequest is the request type for the +// Query/DelegatorWithdrawAddress RPC method. +type QueryDelegatorWithdrawAddressRequest struct { + // delegator_address defines the delegator address to query for. + DelegatorAddress string `protobuf:"bytes,1,opt,name=delegator_address,json=delegatorAddress,proto3" json:"delegator_address,omitempty"` +} + +func (m *QueryDelegatorWithdrawAddressRequest) Reset() { *m = QueryDelegatorWithdrawAddressRequest{} } +func (m *QueryDelegatorWithdrawAddressRequest) String() string { return proto.CompactTextString(m) } +func (*QueryDelegatorWithdrawAddressRequest) ProtoMessage() {} +func (*QueryDelegatorWithdrawAddressRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_e1a59cc0c7c44135, []int{8} +} +func (m *QueryDelegatorWithdrawAddressRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryDelegatorWithdrawAddressRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryDelegatorWithdrawAddressRequest.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 *QueryDelegatorWithdrawAddressRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryDelegatorWithdrawAddressRequest.Merge(m, src) +} +func (m *QueryDelegatorWithdrawAddressRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryDelegatorWithdrawAddressRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryDelegatorWithdrawAddressRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryDelegatorWithdrawAddressRequest proto.InternalMessageInfo + +// QueryDelegatorWithdrawAddressResponse is the response type for the +// Query/DelegatorWithdrawAddress RPC method. +type QueryDelegatorWithdrawAddressResponse struct { + // withdraw_address defines the delegator address to query for. + WithdrawAddress string `protobuf:"bytes,1,opt,name=withdraw_address,json=withdrawAddress,proto3" json:"withdraw_address,omitempty"` +} + +func (m *QueryDelegatorWithdrawAddressResponse) Reset() { *m = QueryDelegatorWithdrawAddressResponse{} } +func (m *QueryDelegatorWithdrawAddressResponse) String() string { return proto.CompactTextString(m) } +func (*QueryDelegatorWithdrawAddressResponse) ProtoMessage() {} +func (*QueryDelegatorWithdrawAddressResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_e1a59cc0c7c44135, []int{9} +} +func (m *QueryDelegatorWithdrawAddressResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryDelegatorWithdrawAddressResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryDelegatorWithdrawAddressResponse.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 *QueryDelegatorWithdrawAddressResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryDelegatorWithdrawAddressResponse.Merge(m, src) +} +func (m *QueryDelegatorWithdrawAddressResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryDelegatorWithdrawAddressResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryDelegatorWithdrawAddressResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryDelegatorWithdrawAddressResponse proto.InternalMessageInfo + func init() { proto.RegisterType((*QueryParamsRequest)(nil), "babylon.incentive.QueryParamsRequest") proto.RegisterType((*QueryParamsResponse)(nil), "babylon.incentive.QueryParamsResponse") @@ -412,53 +493,63 @@ func init() { proto.RegisterType((*QueryBTCStakingGaugeRequest)(nil), "babylon.incentive.QueryBTCStakingGaugeRequest") proto.RegisterType((*BTCStakingGaugeResponse)(nil), "babylon.incentive.BTCStakingGaugeResponse") proto.RegisterType((*QueryBTCStakingGaugeResponse)(nil), "babylon.incentive.QueryBTCStakingGaugeResponse") + proto.RegisterType((*QueryDelegatorWithdrawAddressRequest)(nil), "babylon.incentive.QueryDelegatorWithdrawAddressRequest") + proto.RegisterType((*QueryDelegatorWithdrawAddressResponse)(nil), "babylon.incentive.QueryDelegatorWithdrawAddressResponse") } func init() { proto.RegisterFile("babylon/incentive/query.proto", fileDescriptor_e1a59cc0c7c44135) } var fileDescriptor_e1a59cc0c7c44135 = []byte{ - // 644 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x54, 0x4f, 0x6f, 0xd3, 0x30, - 0x14, 0x6f, 0xba, 0xb5, 0x08, 0x33, 0x18, 0x33, 0x13, 0xb4, 0xdd, 0xc8, 0x58, 0x24, 0x60, 0x02, - 0x1a, 0xd3, 0x95, 0x89, 0x3f, 0x12, 0x08, 0x75, 0x42, 0x9c, 0x40, 0x10, 0x38, 0x71, 0x29, 0x4e, - 0x6a, 0xa5, 0x51, 0x5b, 0xbb, 0x8b, 0xdd, 0x96, 0x32, 0x76, 0xe1, 0x13, 0x20, 0xf1, 0x15, 0xb8, - 0xc0, 0x27, 0xd9, 0x71, 0x12, 0x12, 0xe2, 0x04, 0xa8, 0xe5, 0xc4, 0x85, 0xaf, 0x80, 0x62, 0xbb, - 0x55, 0x4a, 0x53, 0x31, 0x24, 0xc4, 0x29, 0x8e, 0xdf, 0xfb, 0xbd, 0xdf, 0xef, 0xf9, 0xfd, 0x6c, - 0x70, 0xd6, 0xc5, 0x6e, 0xbf, 0xc9, 0x28, 0x0a, 0xa8, 0x47, 0xa8, 0x08, 0xba, 0x04, 0xed, 0x74, - 0x48, 0xd8, 0xb7, 0xdb, 0x21, 0x13, 0x0c, 0x2e, 0xe9, 0xb0, 0x3d, 0x0e, 0x17, 0x96, 0x7d, 0xe6, - 0x33, 0x19, 0x45, 0xd1, 0x4a, 0x25, 0x16, 0x56, 0x7d, 0xc6, 0xfc, 0x26, 0x41, 0xb8, 0x1d, 0x20, - 0x4c, 0x29, 0x13, 0x58, 0x04, 0x8c, 0x72, 0x1d, 0x35, 0xa7, 0x59, 0xda, 0x38, 0xc4, 0xad, 0x51, - 0x7c, 0x7d, 0x3a, 0x3e, 0x5e, 0x8d, 0x4a, 0x78, 0x8c, 0xb7, 0x18, 0x47, 0x2e, 0xe6, 0x04, 0x75, - 0x4b, 0x2e, 0x11, 0xb8, 0x84, 0x3c, 0x16, 0x50, 0x15, 0xb7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5, 0xdf, 0xce, 0x13, 0xda, 0xb3, 0xc8, 0x93, 0x8d, - 0x56, 0x40, 0x87, 0xce, 0xd7, 0x7a, 0xb7, 0xa4, 0x5e, 0x04, 0x8b, 0x09, 0x7a, 0x5d, 0xe1, 0x55, - 0xb9, 0x02, 0x29, 0x89, 0x68, 0x57, 0xf9, 0x76, 0xaf, 0xf2, 0x60, 0x7f, 0x60, 0x1a, 0x07, 0x03, - 0xd3, 0xf8, 0x36, 0x30, 0x8d, 0x37, 0x43, 0x33, 0x75, 0x30, 0x34, 0x53, 0x9f, 0x87, 0x66, 0xea, - 0x59, 0x39, 0xe6, 0x42, 0x5d, 0xb2, 0x89, 0x5d, 0x5e, 0x0c, 0xd8, 0x98, 0xe1, 0x45, 0x8c, 0x43, - 0xda, 0xd2, 0xcd, 0xca, 0x07, 0xbc, 0xfc, 0x2b, 0x00, 0x00, 0xff, 0xff, 0xe1, 0xe8, 0x0e, 0x15, - 0x8b, 0x06, 0x00, 0x00, + // 775 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x55, 0x41, 0x4f, 0x13, 0x41, + 0x14, 0xee, 0x16, 0x5a, 0x75, 0x44, 0x81, 0xb1, 0xd1, 0xb6, 0x60, 0x2b, 0x1b, 0x51, 0xa2, 0x76, + 0x47, 0x40, 0x02, 0x92, 0x68, 0xb4, 0x40, 0x4c, 0x4c, 0x34, 0xba, 0x98, 0x98, 0x78, 0xa9, 0xb3, + 0xed, 0x64, 0xbb, 0xa1, 0xec, 0x94, 0x9d, 0x69, 0x6b, 0x45, 0x2e, 0x9e, 0x3c, 0x9a, 0xf8, 0x07, + 0x38, 0x78, 0xd1, 0xa3, 0xf1, 0x47, 0x70, 0x24, 0x7a, 0xd1, 0x8b, 0x1a, 0xf0, 0x60, 0xbc, 0xf8, + 0x17, 0x4c, 0x67, 0x66, 0x9b, 0x96, 0xee, 0x06, 0x48, 0x8c, 0xa7, 0xce, 0xcc, 0x7b, 0xdf, 0x7c, + 0xdf, 0x37, 0xfb, 0xde, 0x2b, 0x38, 0x6b, 0x61, 0xab, 0x59, 0xa1, 0x2e, 0x72, 0xdc, 0x22, 0x71, + 0xb9, 0x53, 0x27, 0x68, 0xad, 0x46, 0xbc, 0xa6, 0x51, 0xf5, 0x28, 0xa7, 0x70, 0x58, 0x85, 0x8d, + 0x76, 0x38, 0x9d, 0xb0, 0xa9, 0x4d, 0x45, 0x14, 0xb5, 0x56, 0x32, 0x31, 0x3d, 0x6a, 0x53, 0x6a, + 0x57, 0x08, 0xc2, 0x55, 0x07, 0x61, 0xd7, 0xa5, 0x1c, 0x73, 0x87, 0xba, 0x4c, 0x45, 0x33, 0xbd, + 0x2c, 0x55, 0xec, 0xe1, 0x55, 0x3f, 0x3e, 0xd6, 0x1b, 0x6f, 0xaf, 0xfc, 0x2b, 0x8a, 0x94, 0xad, + 0x52, 0x86, 0x2c, 0xcc, 0x08, 0xaa, 0x4f, 0x5a, 0x84, 0xe3, 0x49, 0x54, 0xa4, 0x8e, 0xab, 0xe2, + 0x29, 0x19, 0x2f, 0x48, 0x65, 0x72, 0x23, 0x43, 0x7a, 0x02, 0xc0, 0x87, 0x2d, 0x4f, 0x0f, 0x04, + 0xa5, 0x49, 0xd6, 0x6a, 0x84, 0x71, 0xfd, 0x3e, 0x38, 0xd5, 0x75, 0xca, 0xaa, 0xd4, 0x65, 0x04, + 0xce, 0x82, 0xb8, 0x94, 0x96, 0xd4, 0xce, 0x69, 0x13, 0xc7, 0xa7, 0x52, 0x46, 0xcf, 0x13, 0x18, + 0x12, 0x92, 0xef, 0xdf, 0xfa, 0x96, 0x8d, 0x98, 0x2a, 0x5d, 0xbf, 0x06, 0x92, 0xe2, 0x3e, 0x93, + 0x34, 0xb0, 0x57, 0xba, 0x83, 0x6b, 0x36, 0xf1, 0xb9, 0x60, 0x12, 0x1c, 0xc1, 0xa5, 0x92, 0x47, + 0x98, 0xbc, 0x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x3b, + 0x0d, 0x0c, 0xee, 0x29, 0x20, 0x68, 0x84, 0x91, 0x07, 0x77, 0x56, 0x1a, 0x1d, 0x38, 0x5f, 0xe9, + 0x9d, 0x11, 0x7a, 0x11, 0xcc, 0x05, 0xe8, 0xb5, 0x78, 0xb1, 0xc0, 0x24, 0x48, 0x4a, 0x44, 0xeb, + 0xb2, 0x51, 0x37, 0xe0, 0x57, 0x0d, 0x24, 0xc3, 0x8a, 0x09, 0xce, 0x86, 0x89, 0xd8, 0xa7, 0xee, + 0xd3, 0x73, 0x87, 0x07, 0x2a, 0x1b, 0x77, 0x85, 0x8d, 0x45, 0x98, 0x0f, 0xb0, 0xd1, 0xee, 0x0b, + 0x86, 0xd6, 0x7b, 0xda, 0x6a, 0x03, 0xed, 0xad, 0xf7, 0xfc, 0xbd, 0xad, 0x9d, 0x8c, 0xb6, 0xbd, + 0x93, 0xd1, 0x7e, 0xec, 0x64, 0xb4, 0xd7, 0xbb, 0x99, 0xc8, 0xf6, 0x6e, 0x26, 0xf2, 0x65, 0x37, + 0x13, 0x79, 0x32, 0xdd, 0x31, 0x52, 0x14, 0x4f, 0x05, 0x5b, 0x2c, 0xe7, 0xd0, 0x36, 0xed, 0xb3, + 0x0e, 0x62, 0x31, 0x63, 0xac, 0xb8, 0xf8, 0x37, 0x9e, 0xfe, 0x1b, 0x00, 0x00, 0xff, 0xff, 0x3d, + 0xa7, 0x53, 0xdf, 0x73, 0x08, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -479,6 +570,8 @@ type QueryClient interface { RewardGauges(ctx context.Context, in *QueryRewardGaugesRequest, opts ...grpc.CallOption) (*QueryRewardGaugesResponse, error) // BTCStakingGauge queries the BTC staking gauge of a given height BTCStakingGauge(ctx context.Context, in *QueryBTCStakingGaugeRequest, opts ...grpc.CallOption) (*QueryBTCStakingGaugeResponse, error) + // DelegatorWithdrawAddress queries withdraw address of a delegator. + DelegatorWithdrawAddress(ctx context.Context, in *QueryDelegatorWithdrawAddressRequest, opts ...grpc.CallOption) (*QueryDelegatorWithdrawAddressResponse, error) } type queryClient struct { @@ -516,6 +609,15 @@ func (c *queryClient) BTCStakingGauge(ctx context.Context, in *QueryBTCStakingGa return out, nil } +func (c *queryClient) DelegatorWithdrawAddress(ctx context.Context, in *QueryDelegatorWithdrawAddressRequest, opts ...grpc.CallOption) (*QueryDelegatorWithdrawAddressResponse, error) { + out := new(QueryDelegatorWithdrawAddressResponse) + err := c.cc.Invoke(ctx, "/babylon.incentive.Query/DelegatorWithdrawAddress", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // QueryServer is the server API for Query service. type QueryServer interface { // Parameters queries the parameters of the module. @@ -524,6 +626,8 @@ type QueryServer interface { RewardGauges(context.Context, *QueryRewardGaugesRequest) (*QueryRewardGaugesResponse, error) // BTCStakingGauge queries the BTC staking gauge of a given height BTCStakingGauge(context.Context, *QueryBTCStakingGaugeRequest) (*QueryBTCStakingGaugeResponse, error) + // DelegatorWithdrawAddress queries withdraw address of a delegator. + DelegatorWithdrawAddress(context.Context, *QueryDelegatorWithdrawAddressRequest) (*QueryDelegatorWithdrawAddressResponse, error) } // UnimplementedQueryServer can be embedded to have forward compatible implementations. @@ -539,6 +643,9 @@ func (*UnimplementedQueryServer) RewardGauges(ctx context.Context, req *QueryRew func (*UnimplementedQueryServer) BTCStakingGauge(ctx context.Context, req *QueryBTCStakingGaugeRequest) (*QueryBTCStakingGaugeResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method BTCStakingGauge not implemented") } +func (*UnimplementedQueryServer) DelegatorWithdrawAddress(ctx context.Context, req *QueryDelegatorWithdrawAddressRequest) (*QueryDelegatorWithdrawAddressResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method DelegatorWithdrawAddress not implemented") +} func RegisterQueryServer(s grpc1.Server, srv QueryServer) { s.RegisterService(&_Query_serviceDesc, srv) @@ -598,6 +705,24 @@ func _Query_BTCStakingGauge_Handler(srv interface{}, ctx context.Context, dec fu return interceptor(ctx, in, info, handler) } +func _Query_DelegatorWithdrawAddress_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryDelegatorWithdrawAddressRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).DelegatorWithdrawAddress(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/babylon.incentive.Query/DelegatorWithdrawAddress", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).DelegatorWithdrawAddress(ctx, req.(*QueryDelegatorWithdrawAddressRequest)) + } + return interceptor(ctx, in, info, handler) +} + var _Query_serviceDesc = grpc.ServiceDesc{ ServiceName: "babylon.incentive.Query", HandlerType: (*QueryServer)(nil), @@ -614,6 +739,10 @@ var _Query_serviceDesc = grpc.ServiceDesc{ MethodName: "BTCStakingGauge", Handler: _Query_BTCStakingGauge_Handler, }, + { + MethodName: "DelegatorWithdrawAddress", + Handler: _Query_DelegatorWithdrawAddress_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "babylon/incentive/query.proto", @@ -905,6 +1034,66 @@ func (m *QueryBTCStakingGaugeResponse) MarshalToSizedBuffer(dAtA []byte) (int, e return len(dAtA) - i, nil } +func (m *QueryDelegatorWithdrawAddressRequest) 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 *QueryDelegatorWithdrawAddressRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryDelegatorWithdrawAddressRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.DelegatorAddress) > 0 { + i -= len(m.DelegatorAddress) + copy(dAtA[i:], m.DelegatorAddress) + i = encodeVarintQuery(dAtA, i, uint64(len(m.DelegatorAddress))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryDelegatorWithdrawAddressResponse) 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 *QueryDelegatorWithdrawAddressResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryDelegatorWithdrawAddressResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.WithdrawAddress) > 0 { + i -= len(m.WithdrawAddress) + copy(dAtA[i:], m.WithdrawAddress) + i = encodeVarintQuery(dAtA, i, uint64(len(m.WithdrawAddress))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { offset -= sovQuery(v) base := offset @@ -1032,6 +1221,32 @@ func (m *QueryBTCStakingGaugeResponse) Size() (n int) { return n } +func (m *QueryDelegatorWithdrawAddressRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.DelegatorAddress) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryDelegatorWithdrawAddressResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.WithdrawAddress) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + func sovQuery(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } @@ -1789,6 +2004,170 @@ func (m *QueryBTCStakingGaugeResponse) Unmarshal(dAtA []byte) error { } return nil } +func (m *QueryDelegatorWithdrawAddressRequest) 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: QueryDelegatorWithdrawAddressRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryDelegatorWithdrawAddressRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DelegatorAddress", 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.DelegatorAddress = 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 *QueryDelegatorWithdrawAddressResponse) 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: QueryDelegatorWithdrawAddressResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryDelegatorWithdrawAddressResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field WithdrawAddress", 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.WithdrawAddress = 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 skipQuery(dAtA []byte) (n int, err 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 27215ac4..61e86024 100644 --- a/x/incentive/types/query.pb.gw.go +++ b/x/incentive/types/query.pb.gw.go @@ -159,6 +159,60 @@ func local_request_Query_BTCStakingGauge_0(ctx context.Context, marshaler runtim } +func request_Query_DelegatorWithdrawAddress_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryDelegatorWithdrawAddressRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["delegator_address"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "delegator_address") + } + + protoReq.DelegatorAddress, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "delegator_address", err) + } + + msg, err := client.DelegatorWithdrawAddress(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_DelegatorWithdrawAddress_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryDelegatorWithdrawAddressRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["delegator_address"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "delegator_address") + } + + protoReq.DelegatorAddress, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "delegator_address", err) + } + + msg, err := server.DelegatorWithdrawAddress(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. @@ -234,6 +288,29 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv }) + mux.Handle("GET", pattern_Query_DelegatorWithdrawAddress_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + 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_DelegatorWithdrawAddress_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_DelegatorWithdrawAddress_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -335,6 +412,26 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie }) + mux.Handle("GET", pattern_Query_DelegatorWithdrawAddress_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_DelegatorWithdrawAddress_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_DelegatorWithdrawAddress_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -344,6 +441,8 @@ var ( pattern_Query_RewardGauges_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 2, 2, 3}, []string{"babylon", "incentive", "address", "reward_gauge"}, "", runtime.AssumeColonVerbOpt(false))) pattern_Query_BTCStakingGauge_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"babylon", "incentive", "btc_staking_gauge", "height"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_DelegatorWithdrawAddress_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4}, []string{"babylon", "incentive", "delegators", "delegator_address", "withdraw_address"}, "", runtime.AssumeColonVerbOpt(false))) ) var ( @@ -352,4 +451,6 @@ var ( forward_Query_RewardGauges_0 = runtime.ForwardResponseMessage forward_Query_BTCStakingGauge_0 = runtime.ForwardResponseMessage + + forward_Query_DelegatorWithdrawAddress_0 = runtime.ForwardResponseMessage )