feat(cli/api): add validator distribution info grpc gateway get endpoint (#13144)

This commit is contained in:
Sai Kumar 2022-09-05 20:31:01 +05:30 committed by GitHub
parent 2efee04e4f
commit 65fff07a34
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 2648 additions and 516 deletions

View File

@ -75,6 +75,7 @@ Ref: https://keepachangelog.com/en/1.0.0/
* [#13101](https://github.com/cosmos/cosmos-sdk/pull/13101) Remove weights from `simapp/params` and `testutil/sims`. They are now in their respective modules.
* (simapp) [#13107](https://github.com/cosmos/cosmos-sdk/pull/13107) Call `SetIAVLCacheSize` with the configured value in simapp.
* [#12398](https://github.com/cosmos/cosmos-sdk/issues/12398) Refactor all `x` modules to unit-test via mocks and decouple `simapp`.
* [#13144](https://github.com/cosmos/cosmos-sdk/pull/13144) Add validator distribution info grpc gateway get endpoint.
### State Machine Breaking

File diff suppressed because it is too large Load Diff

View File

@ -24,6 +24,8 @@ const _ = grpc.SupportPackageIsVersion7
type QueryClient interface {
// Params queries params of the distribution module.
Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error)
// ValidatorDistributionInfo queries validator commision and self-delegation rewards for validator
ValidatorDistributionInfo(ctx context.Context, in *QueryValidatorDistributionInfoRequest, opts ...grpc.CallOption) (*QueryValidatorDistributionInfoResponse, error)
// ValidatorOutstandingRewards queries rewards of a validator address.
ValidatorOutstandingRewards(ctx context.Context, in *QueryValidatorOutstandingRewardsRequest, opts ...grpc.CallOption) (*QueryValidatorOutstandingRewardsResponse, error)
// ValidatorCommission queries accumulated commission for a validator.
@ -60,6 +62,15 @@ func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts .
return out, nil
}
func (c *queryClient) ValidatorDistributionInfo(ctx context.Context, in *QueryValidatorDistributionInfoRequest, opts ...grpc.CallOption) (*QueryValidatorDistributionInfoResponse, error) {
out := new(QueryValidatorDistributionInfoResponse)
err := c.cc.Invoke(ctx, "/cosmos.distribution.v1beta1.Query/ValidatorDistributionInfo", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *queryClient) ValidatorOutstandingRewards(ctx context.Context, in *QueryValidatorOutstandingRewardsRequest, opts ...grpc.CallOption) (*QueryValidatorOutstandingRewardsResponse, error) {
out := new(QueryValidatorOutstandingRewardsResponse)
err := c.cc.Invoke(ctx, "/cosmos.distribution.v1beta1.Query/ValidatorOutstandingRewards", in, out, opts...)
@ -138,6 +149,8 @@ func (c *queryClient) CommunityPool(ctx context.Context, in *QueryCommunityPoolR
type QueryServer interface {
// Params queries params of the distribution module.
Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error)
// ValidatorDistributionInfo queries validator commision and self-delegation rewards for validator
ValidatorDistributionInfo(context.Context, *QueryValidatorDistributionInfoRequest) (*QueryValidatorDistributionInfoResponse, error)
// ValidatorOutstandingRewards queries rewards of a validator address.
ValidatorOutstandingRewards(context.Context, *QueryValidatorOutstandingRewardsRequest) (*QueryValidatorOutstandingRewardsResponse, error)
// ValidatorCommission queries accumulated commission for a validator.
@ -165,6 +178,9 @@ type UnimplementedQueryServer struct {
func (UnimplementedQueryServer) Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Params not implemented")
}
func (UnimplementedQueryServer) ValidatorDistributionInfo(context.Context, *QueryValidatorDistributionInfoRequest) (*QueryValidatorDistributionInfoResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method ValidatorDistributionInfo not implemented")
}
func (UnimplementedQueryServer) ValidatorOutstandingRewards(context.Context, *QueryValidatorOutstandingRewardsRequest) (*QueryValidatorOutstandingRewardsResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method ValidatorOutstandingRewards not implemented")
}
@ -220,6 +236,24 @@ func _Query_Params_Handler(srv interface{}, ctx context.Context, dec func(interf
return interceptor(ctx, in, info, handler)
}
func _Query_ValidatorDistributionInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(QueryValidatorDistributionInfoRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(QueryServer).ValidatorDistributionInfo(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/cosmos.distribution.v1beta1.Query/ValidatorDistributionInfo",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(QueryServer).ValidatorDistributionInfo(ctx, req.(*QueryValidatorDistributionInfoRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Query_ValidatorOutstandingRewards_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(QueryValidatorOutstandingRewardsRequest)
if err := dec(in); err != nil {
@ -375,6 +409,10 @@ var Query_ServiceDesc = grpc.ServiceDesc{
MethodName: "Params",
Handler: _Query_Params_Handler,
},
{
MethodName: "ValidatorDistributionInfo",
Handler: _Query_ValidatorDistributionInfo_Handler,
},
{
MethodName: "ValidatorOutstandingRewards",
Handler: _Query_ValidatorOutstandingRewards_Handler,

View File

@ -17,6 +17,12 @@ service Query {
option (google.api.http).get = "/cosmos/distribution/v1beta1/params";
}
// ValidatorDistributionInfo queries validator commision and self-delegation rewards for validator
rpc ValidatorDistributionInfo(QueryValidatorDistributionInfoRequest)
returns (QueryValidatorDistributionInfoResponse) {
option (google.api.http).get = "/cosmos/distribution/v1beta1/validators/{validator_address}";
}
// ValidatorOutstandingRewards queries rewards of a validator address.
rpc ValidatorOutstandingRewards(QueryValidatorOutstandingRewardsRequest)
returns (QueryValidatorOutstandingRewardsResponse) {
@ -74,6 +80,26 @@ message QueryParamsResponse {
Params params = 1 [(gogoproto.nullable) = false];
}
// QueryValidatorDistributionInfoRequest is the request type for the Query/ValidatorDistributionInfo RPC method.
message QueryValidatorDistributionInfoRequest {
// validator_address defines the validator address to query for.
string validator_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
}
// QueryValidatorDistributionInfoResponse is the response type for the Query/ValidatorDistributionInfo RPC method.
message QueryValidatorDistributionInfoResponse {
// operator_address defines the validator operator address.
string operator_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
// self_bond_rewards defines the self delegations rewards.
repeated cosmos.base.v1beta1.DecCoin self_bond_rewards = 2
[(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.DecCoins"];
// commission defines the commision the validator received.
repeated cosmos.base.v1beta1.DecCoin commission = 3 [
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.DecCoins",
(gogoproto.nullable) = false
];
}
// QueryValidatorOutstandingRewardsRequest is the request type for the
// Query/ValidatorOutstandingRewards RPC method.
message QueryValidatorOutstandingRewardsRequest {

View File

@ -26,6 +26,7 @@ func GetQueryCmd() *cobra.Command {
distQueryCmd.AddCommand(
GetCmdQueryParams(),
GetCmdQueryValidatorDistributionInfo(),
GetCmdQueryValidatorOutstandingRewards(),
GetCmdQueryValidatorCommission(),
GetCmdQueryValidatorSlashes(),
@ -62,6 +63,50 @@ func GetCmdQueryParams() *cobra.Command {
return cmd
}
// GetCmdQueryValidatorDistributionInfo implements the query validator distribution info command.
func GetCmdQueryValidatorDistributionInfo() *cobra.Command {
bech32PrefixValAddr := sdk.GetConfig().GetBech32ValidatorAddrPrefix()
cmd := &cobra.Command{
Use: "validator-distribution-info [validator]",
Args: cobra.ExactArgs(1),
Short: "Query validator distribution info",
Long: strings.TrimSpace(
fmt.Sprintf(`Query validator distribution info.
Example:
$ %s query distribution validator-distribution-info %s1lwjmdnks33xwnmfayc64ycprww49n33mtm92ne
`,
version.AppName, bech32PrefixValAddr,
),
),
RunE: func(cmd *cobra.Command, args []string) error {
clientCtx, err := client.GetClientQueryContext(cmd)
if err != nil {
return err
}
validatorAddr, err := sdk.ValAddressFromBech32(args[0])
if err != nil {
return err
}
queryClient := types.NewQueryClient(clientCtx)
res, err := queryClient.ValidatorDistributionInfo(cmd.Context(), &types.QueryValidatorDistributionInfoRequest{
ValidatorAddress: validatorAddr.String(),
})
if err != nil {
return err
}
return clientCtx.PrintProto(res)
},
}
flags.AddQueryFlagsToCmd(cmd)
return cmd
}
// GetCmdQueryValidatorOutstandingRewards implements the query validator
// outstanding rewards command.
func GetCmdQueryValidatorOutstandingRewards() *cobra.Command {

View File

@ -75,6 +75,44 @@ func (s *GRPCQueryTestSuite) TestQueryParamsGRPC() {
}
}
func (s *GRPCQueryTestSuite) TestQueryValidatorDistributionInfoGRPC() {
val := s.network.Validators[0]
baseURL := val.APIAddress
testCases := []struct {
name string
url string
expErr bool
respType proto.Message
}{
{
"gRPC request with wrong validator address",
fmt.Sprintf("%s/cosmos/distribution/v1beta1/validators/%s", baseURL, "wrongAddress"),
true,
&types.QueryValidatorDistributionInfoResponse{},
},
{
"gRPC request with valid validator address ",
fmt.Sprintf("%s/cosmos/distribution/v1beta1/validators/%s", baseURL, val.ValAddress.String()),
false,
&types.QueryValidatorDistributionInfoResponse{},
},
}
for _, tc := range testCases {
tc := tc
resp, err := rest.GetRequest(tc.url)
s.Run(tc.name, func() {
if tc.expErr {
s.Require().Error(val.ClientCtx.Codec.UnmarshalJSON(resp, tc.respType))
} else {
s.Require().NoError(err)
s.Require().NoError(val.ClientCtx.Codec.UnmarshalJSON(resp, tc.respType))
}
})
}
}
func (s *GRPCQueryTestSuite) TestQueryOutstandingRewardsGRPC() {
val := s.network.Validators[0]
baseURL := val.APIAddress

View File

@ -108,6 +108,48 @@ withdraw_addr_enabled: true`,
}
}
func (s *IntegrationTestSuite) TestGetCmdQueryValidatorDistributionInfo() {
val := s.network.Validators[0]
testCases := []struct {
name string
args []string
expErr bool
}{
{
"invalid val address",
[]string{"invalid address", fmt.Sprintf("--%s=json", tmcli.OutputFlag)},
true,
},
{
"json output",
[]string{val.ValAddress.String(), fmt.Sprintf("--%s=json", tmcli.OutputFlag)},
false,
},
{
"text output",
[]string{val.ValAddress.String(), fmt.Sprintf("--%s=text", tmcli.OutputFlag)},
false,
},
}
for _, tc := range testCases {
tc := tc
s.Run(tc.name, func() {
cmd := cli.GetCmdQueryValidatorDistributionInfo()
clientCtx := val.ClientCtx
_, err := clitestutil.ExecTestCLICmd(clientCtx, cmd, tc.args)
if tc.expErr {
s.Require().Error(err)
} else {
s.Require().NoError(err)
}
})
}
}
func (s *IntegrationTestSuite) TestGetCmdQueryValidatorOutstandingRewards() {
val := s.network.Validators[0]

View File

@ -32,6 +32,49 @@ func (k Querier) Params(c context.Context, req *types.QueryParamsRequest) (*type
return &types.QueryParamsResponse{Params: params}, nil
}
// ValidatorDistributionInfo query validator's commission and self-delegation rewards
func (k Querier) ValidatorDistributionInfo(c context.Context, req *types.QueryValidatorDistributionInfoRequest) (*types.QueryValidatorDistributionInfoResponse, error) {
if req == nil {
return nil, status.Error(codes.InvalidArgument, "invalid request")
}
if req.ValidatorAddress == "" {
return nil, status.Error(codes.InvalidArgument, "empty validator address")
}
ctx := sdk.UnwrapSDKContext(c)
valAdr, err := sdk.ValAddressFromBech32(req.ValidatorAddress)
if err != nil {
return nil, err
}
// self-delegation rewards
val := k.stakingKeeper.Validator(ctx, valAdr)
if val == nil {
return nil, sdkerrors.Wrap(types.ErrNoValidatorExists, req.ValidatorAddress)
}
delAdr := sdk.AccAddress(valAdr)
del := k.stakingKeeper.Delegation(ctx, delAdr, valAdr)
if del == nil {
return nil, types.ErrNoDelegationExists
}
endingPeriod := k.IncrementValidatorPeriod(ctx, val)
rewards := k.CalculateDelegationRewards(ctx, val, del, endingPeriod)
// validator's commission
validatorCommission := k.GetValidatorAccumulatedCommission(ctx, valAdr)
return &types.QueryValidatorDistributionInfoResponse{
Commission: validatorCommission.Commission,
OperatorAddress: delAdr.String(),
SelfBondRewards: rewards,
}, nil
}
// ValidatorOutstandingRewards queries rewards of a validator address
func (k Querier) ValidatorOutstandingRewards(c context.Context, req *types.QueryValidatorOutstandingRewardsRequest) (*types.QueryValidatorOutstandingRewardsResponse, error) {
if req == nil {

View File

@ -116,6 +116,118 @@ func (m *QueryParamsResponse) GetParams() Params {
return Params{}
}
// QueryValidatorDistributionInfoRequest is the request type for the Query/ValidatorDistributionInfo RPC method.
type QueryValidatorDistributionInfoRequest struct {
// validator_address defines the validator address to query for.
ValidatorAddress string `protobuf:"bytes,1,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty"`
}
func (m *QueryValidatorDistributionInfoRequest) Reset() { *m = QueryValidatorDistributionInfoRequest{} }
func (m *QueryValidatorDistributionInfoRequest) String() string { return proto.CompactTextString(m) }
func (*QueryValidatorDistributionInfoRequest) ProtoMessage() {}
func (*QueryValidatorDistributionInfoRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_5efd02cbc06efdc9, []int{2}
}
func (m *QueryValidatorDistributionInfoRequest) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *QueryValidatorDistributionInfoRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_QueryValidatorDistributionInfoRequest.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 *QueryValidatorDistributionInfoRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_QueryValidatorDistributionInfoRequest.Merge(m, src)
}
func (m *QueryValidatorDistributionInfoRequest) XXX_Size() int {
return m.Size()
}
func (m *QueryValidatorDistributionInfoRequest) XXX_DiscardUnknown() {
xxx_messageInfo_QueryValidatorDistributionInfoRequest.DiscardUnknown(m)
}
var xxx_messageInfo_QueryValidatorDistributionInfoRequest proto.InternalMessageInfo
func (m *QueryValidatorDistributionInfoRequest) GetValidatorAddress() string {
if m != nil {
return m.ValidatorAddress
}
return ""
}
// QueryValidatorDistributionInfoResponse is the response type for the Query/ValidatorDistributionInfo RPC method.
type QueryValidatorDistributionInfoResponse struct {
// operator_address defines the validator operator address.
OperatorAddress string `protobuf:"bytes,1,opt,name=operator_address,json=operatorAddress,proto3" json:"operator_address,omitempty"`
// self_bond_rewards defines the self delegations rewards.
SelfBondRewards github_com_cosmos_cosmos_sdk_types.DecCoins `protobuf:"bytes,2,rep,name=self_bond_rewards,json=selfBondRewards,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.DecCoins" json:"self_bond_rewards"`
// commission defines the commision the validator received.
Commission github_com_cosmos_cosmos_sdk_types.DecCoins `protobuf:"bytes,3,rep,name=commission,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.DecCoins" json:"commission"`
}
func (m *QueryValidatorDistributionInfoResponse) Reset() {
*m = QueryValidatorDistributionInfoResponse{}
}
func (m *QueryValidatorDistributionInfoResponse) String() string { return proto.CompactTextString(m) }
func (*QueryValidatorDistributionInfoResponse) ProtoMessage() {}
func (*QueryValidatorDistributionInfoResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_5efd02cbc06efdc9, []int{3}
}
func (m *QueryValidatorDistributionInfoResponse) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *QueryValidatorDistributionInfoResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_QueryValidatorDistributionInfoResponse.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 *QueryValidatorDistributionInfoResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_QueryValidatorDistributionInfoResponse.Merge(m, src)
}
func (m *QueryValidatorDistributionInfoResponse) XXX_Size() int {
return m.Size()
}
func (m *QueryValidatorDistributionInfoResponse) XXX_DiscardUnknown() {
xxx_messageInfo_QueryValidatorDistributionInfoResponse.DiscardUnknown(m)
}
var xxx_messageInfo_QueryValidatorDistributionInfoResponse proto.InternalMessageInfo
func (m *QueryValidatorDistributionInfoResponse) GetOperatorAddress() string {
if m != nil {
return m.OperatorAddress
}
return ""
}
func (m *QueryValidatorDistributionInfoResponse) GetSelfBondRewards() github_com_cosmos_cosmos_sdk_types.DecCoins {
if m != nil {
return m.SelfBondRewards
}
return nil
}
func (m *QueryValidatorDistributionInfoResponse) GetCommission() github_com_cosmos_cosmos_sdk_types.DecCoins {
if m != nil {
return m.Commission
}
return nil
}
// QueryValidatorOutstandingRewardsRequest is the request type for the
// Query/ValidatorOutstandingRewards RPC method.
type QueryValidatorOutstandingRewardsRequest struct {
@ -129,7 +241,7 @@ func (m *QueryValidatorOutstandingRewardsRequest) Reset() {
func (m *QueryValidatorOutstandingRewardsRequest) String() string { return proto.CompactTextString(m) }
func (*QueryValidatorOutstandingRewardsRequest) ProtoMessage() {}
func (*QueryValidatorOutstandingRewardsRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_5efd02cbc06efdc9, []int{2}
return fileDescriptor_5efd02cbc06efdc9, []int{4}
}
func (m *QueryValidatorOutstandingRewardsRequest) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@ -177,7 +289,7 @@ func (m *QueryValidatorOutstandingRewardsResponse) Reset() {
func (m *QueryValidatorOutstandingRewardsResponse) String() string { return proto.CompactTextString(m) }
func (*QueryValidatorOutstandingRewardsResponse) ProtoMessage() {}
func (*QueryValidatorOutstandingRewardsResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_5efd02cbc06efdc9, []int{3}
return fileDescriptor_5efd02cbc06efdc9, []int{5}
}
func (m *QueryValidatorOutstandingRewardsResponse) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@ -224,7 +336,7 @@ func (m *QueryValidatorCommissionRequest) Reset() { *m = QueryValidatorC
func (m *QueryValidatorCommissionRequest) String() string { return proto.CompactTextString(m) }
func (*QueryValidatorCommissionRequest) ProtoMessage() {}
func (*QueryValidatorCommissionRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_5efd02cbc06efdc9, []int{4}
return fileDescriptor_5efd02cbc06efdc9, []int{6}
}
func (m *QueryValidatorCommissionRequest) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@ -271,7 +383,7 @@ func (m *QueryValidatorCommissionResponse) Reset() { *m = QueryValidator
func (m *QueryValidatorCommissionResponse) String() string { return proto.CompactTextString(m) }
func (*QueryValidatorCommissionResponse) ProtoMessage() {}
func (*QueryValidatorCommissionResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_5efd02cbc06efdc9, []int{5}
return fileDescriptor_5efd02cbc06efdc9, []int{7}
}
func (m *QueryValidatorCommissionResponse) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@ -324,7 +436,7 @@ func (m *QueryValidatorSlashesRequest) Reset() { *m = QueryValidatorSlas
func (m *QueryValidatorSlashesRequest) String() string { return proto.CompactTextString(m) }
func (*QueryValidatorSlashesRequest) ProtoMessage() {}
func (*QueryValidatorSlashesRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_5efd02cbc06efdc9, []int{6}
return fileDescriptor_5efd02cbc06efdc9, []int{8}
}
func (m *QueryValidatorSlashesRequest) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@ -366,7 +478,7 @@ func (m *QueryValidatorSlashesResponse) Reset() { *m = QueryValidatorSla
func (m *QueryValidatorSlashesResponse) String() string { return proto.CompactTextString(m) }
func (*QueryValidatorSlashesResponse) ProtoMessage() {}
func (*QueryValidatorSlashesResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_5efd02cbc06efdc9, []int{7}
return fileDescriptor_5efd02cbc06efdc9, []int{9}
}
func (m *QueryValidatorSlashesResponse) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@ -422,7 +534,7 @@ func (m *QueryDelegationRewardsRequest) Reset() { *m = QueryDelegationRe
func (m *QueryDelegationRewardsRequest) String() string { return proto.CompactTextString(m) }
func (*QueryDelegationRewardsRequest) ProtoMessage() {}
func (*QueryDelegationRewardsRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_5efd02cbc06efdc9, []int{8}
return fileDescriptor_5efd02cbc06efdc9, []int{10}
}
func (m *QueryDelegationRewardsRequest) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@ -462,7 +574,7 @@ func (m *QueryDelegationRewardsResponse) Reset() { *m = QueryDelegationR
func (m *QueryDelegationRewardsResponse) String() string { return proto.CompactTextString(m) }
func (*QueryDelegationRewardsResponse) ProtoMessage() {}
func (*QueryDelegationRewardsResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_5efd02cbc06efdc9, []int{9}
return fileDescriptor_5efd02cbc06efdc9, []int{11}
}
func (m *QueryDelegationRewardsResponse) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@ -509,7 +621,7 @@ func (m *QueryDelegationTotalRewardsRequest) Reset() { *m = QueryDelegat
func (m *QueryDelegationTotalRewardsRequest) String() string { return proto.CompactTextString(m) }
func (*QueryDelegationTotalRewardsRequest) ProtoMessage() {}
func (*QueryDelegationTotalRewardsRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_5efd02cbc06efdc9, []int{10}
return fileDescriptor_5efd02cbc06efdc9, []int{12}
}
func (m *QueryDelegationTotalRewardsRequest) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@ -551,7 +663,7 @@ func (m *QueryDelegationTotalRewardsResponse) Reset() { *m = QueryDelega
func (m *QueryDelegationTotalRewardsResponse) String() string { return proto.CompactTextString(m) }
func (*QueryDelegationTotalRewardsResponse) ProtoMessage() {}
func (*QueryDelegationTotalRewardsResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_5efd02cbc06efdc9, []int{11}
return fileDescriptor_5efd02cbc06efdc9, []int{13}
}
func (m *QueryDelegationTotalRewardsResponse) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@ -605,7 +717,7 @@ func (m *QueryDelegatorValidatorsRequest) Reset() { *m = QueryDelegatorV
func (m *QueryDelegatorValidatorsRequest) String() string { return proto.CompactTextString(m) }
func (*QueryDelegatorValidatorsRequest) ProtoMessage() {}
func (*QueryDelegatorValidatorsRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_5efd02cbc06efdc9, []int{12}
return fileDescriptor_5efd02cbc06efdc9, []int{14}
}
func (m *QueryDelegatorValidatorsRequest) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@ -645,7 +757,7 @@ func (m *QueryDelegatorValidatorsResponse) Reset() { *m = QueryDelegator
func (m *QueryDelegatorValidatorsResponse) String() string { return proto.CompactTextString(m) }
func (*QueryDelegatorValidatorsResponse) ProtoMessage() {}
func (*QueryDelegatorValidatorsResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_5efd02cbc06efdc9, []int{13}
return fileDescriptor_5efd02cbc06efdc9, []int{15}
}
func (m *QueryDelegatorValidatorsResponse) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@ -685,7 +797,7 @@ func (m *QueryDelegatorWithdrawAddressRequest) Reset() { *m = QueryDeleg
func (m *QueryDelegatorWithdrawAddressRequest) String() string { return proto.CompactTextString(m) }
func (*QueryDelegatorWithdrawAddressRequest) ProtoMessage() {}
func (*QueryDelegatorWithdrawAddressRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_5efd02cbc06efdc9, []int{14}
return fileDescriptor_5efd02cbc06efdc9, []int{16}
}
func (m *QueryDelegatorWithdrawAddressRequest) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@ -725,7 +837,7 @@ func (m *QueryDelegatorWithdrawAddressResponse) Reset() { *m = QueryDele
func (m *QueryDelegatorWithdrawAddressResponse) String() string { return proto.CompactTextString(m) }
func (*QueryDelegatorWithdrawAddressResponse) ProtoMessage() {}
func (*QueryDelegatorWithdrawAddressResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_5efd02cbc06efdc9, []int{15}
return fileDescriptor_5efd02cbc06efdc9, []int{17}
}
func (m *QueryDelegatorWithdrawAddressResponse) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@ -763,7 +875,7 @@ func (m *QueryCommunityPoolRequest) Reset() { *m = QueryCommunityPoolReq
func (m *QueryCommunityPoolRequest) String() string { return proto.CompactTextString(m) }
func (*QueryCommunityPoolRequest) ProtoMessage() {}
func (*QueryCommunityPoolRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_5efd02cbc06efdc9, []int{16}
return fileDescriptor_5efd02cbc06efdc9, []int{18}
}
func (m *QueryCommunityPoolRequest) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@ -803,7 +915,7 @@ func (m *QueryCommunityPoolResponse) Reset() { *m = QueryCommunityPoolRe
func (m *QueryCommunityPoolResponse) String() string { return proto.CompactTextString(m) }
func (*QueryCommunityPoolResponse) ProtoMessage() {}
func (*QueryCommunityPoolResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_5efd02cbc06efdc9, []int{17}
return fileDescriptor_5efd02cbc06efdc9, []int{19}
}
func (m *QueryCommunityPoolResponse) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@ -842,6 +954,8 @@ func (m *QueryCommunityPoolResponse) GetPool() github_com_cosmos_cosmos_sdk_type
func init() {
proto.RegisterType((*QueryParamsRequest)(nil), "cosmos.distribution.v1beta1.QueryParamsRequest")
proto.RegisterType((*QueryParamsResponse)(nil), "cosmos.distribution.v1beta1.QueryParamsResponse")
proto.RegisterType((*QueryValidatorDistributionInfoRequest)(nil), "cosmos.distribution.v1beta1.QueryValidatorDistributionInfoRequest")
proto.RegisterType((*QueryValidatorDistributionInfoResponse)(nil), "cosmos.distribution.v1beta1.QueryValidatorDistributionInfoResponse")
proto.RegisterType((*QueryValidatorOutstandingRewardsRequest)(nil), "cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsRequest")
proto.RegisterType((*QueryValidatorOutstandingRewardsResponse)(nil), "cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsResponse")
proto.RegisterType((*QueryValidatorCommissionRequest)(nil), "cosmos.distribution.v1beta1.QueryValidatorCommissionRequest")
@ -865,78 +979,84 @@ func init() {
}
var fileDescriptor_5efd02cbc06efdc9 = []byte{
// 1129 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 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, 0x50, 0x18, 0x17, 0x7f, 0x4e, 0x59, 0x7d, 0x15, 0x00, 0x00, 0xff,
0xff, 0xc6, 0xc9, 0xca, 0xd1, 0x61, 0x12, 0x00, 0x00,
// 1228 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x58, 0x4d, 0x6c, 0x1b, 0x45,
0x14, 0xf6, 0x38, 0x69, 0x4a, 0x5f, 0x29, 0x49, 0xa6, 0x11, 0x72, 0x36, 0xc1, 0x8e, 0x36, 0xb4,
0x89, 0x88, 0xe2, 0x6d, 0x12, 0xa9, 0x40, 0x43, 0x05, 0xb1, 0x93, 0x52, 0xd4, 0xaa, 0x4d, 0xdd,
0xaa, 0x29, 0x5c, 0xac, 0xb5, 0x77, 0xba, 0x5e, 0xd5, 0xde, 0x71, 0x76, 0xd6, 0x09, 0x51, 0x95,
0x0b, 0xa5, 0x12, 0x17, 0x24, 0x24, 0x2e, 0x3d, 0xe6, 0xcc, 0x19, 0x84, 0xc4, 0x99, 0x43, 0x8f,
0x15, 0x48, 0x88, 0x13, 0x45, 0x09, 0x42, 0xe5, 0xc0, 0x99, 0x2b, 0xf2, 0xcc, 0xac, 0xbd, 0xeb,
0x9f, 0xb5, 0x1d, 0xc7, 0xa7, 0x6c, 0xde, 0xce, 0xfb, 0xde, 0xfb, 0xde, 0xcf, 0xec, 0x97, 0xc0,
0x5c, 0x9e, 0xb2, 0x12, 0x65, 0x9a, 0x61, 0x31, 0xd7, 0xb1, 0x72, 0x15, 0xd7, 0xa2, 0xb6, 0xb6,
0xb3, 0x94, 0x23, 0xae, 0xbe, 0xa4, 0x6d, 0x57, 0x88, 0xb3, 0x97, 0x2c, 0x3b, 0xd4, 0xa5, 0x78,
0x4a, 0x1c, 0x4c, 0xfa, 0x0f, 0x26, 0xe5, 0x41, 0xe5, 0x1d, 0x89, 0x92, 0xd3, 0x19, 0x11, 0x5e,
0x35, 0x8c, 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4, 0xda, 0xee, 0xe8, 0xf3,
0xc5, 0x6c, 0xa1, 0x06, 0xba, 0x59, 0xcc, 0xf6, 0xc2, 0xa5, 0x9b, 0xc5, 0x0c, 0x91, 0x20, 0x5d,
0x2e, 0x66, 0x07, 0x86, 0xf5, 0xd9, 0xc6, 0xff, 0x21, 0x88, 0xb5, 0xd3, 0x0a, 0x78, 0xad, 0x87,
0x5c, 0x5b, 0x0b, 0x1c, 0x25, 0xd5, 0x0f, 0x84, 0xe4, 0x7c, 0x8f, 0x73, 0xbe, 0x85, 0x6f, 0xf6,
0xc3, 0xb9, 0x51, 0xec, 0xe0, 0x1f, 0x10, 0x9c, 0x0b, 0xe8, 0x11, 0x7c, 0xb9, 0x73, 0xae, 0xad,
0xe4, 0x8d, 0xf2, 0x6e, 0xcf, 0x7e, 0x92, 0xd8, 0x0a, 0x27, 0xb6, 0x88, 0x17, 0x42, 0x89, 0xe5,
0x3d, 0xdf, 0x6c, 0x55, 0xc6, 0xa4, 0x6e, 0x3c, 0x3f, 0x8c, 0xa3, 0x17, 0x87, 0x71, 0xf4, 0xe7,
0x61, 0x1c, 0x7d, 0x73, 0x14, 0x8f, 0xbc, 0x38, 0x8a, 0x47, 0x7e, 0x3f, 0x8a, 0x47, 0x3e, 0x5b,
0x0a, 0xd5, 0x44, 0x9f, 0x07, 0xd1, 0xb9, 0x44, 0xca, 0x8d, 0xf0, 0x7f, 0x06, 0xae, 0xfc, 0x1f,
0x00, 0x00, 0xff, 0xff, 0x9e, 0xe9, 0xb3, 0x0a, 0x1f, 0x15, 0x00, 0x00,
}
// Reference imports to suppress errors if they are not otherwise used.
@ -953,6 +1073,8 @@ const _ = grpc.SupportPackageIsVersion4
type QueryClient interface {
// Params queries params of the distribution module.
Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error)
// ValidatorDistributionInfo queries validator commision and self-delegation rewards for validator
ValidatorDistributionInfo(ctx context.Context, in *QueryValidatorDistributionInfoRequest, opts ...grpc.CallOption) (*QueryValidatorDistributionInfoResponse, error)
// ValidatorOutstandingRewards queries rewards of a validator address.
ValidatorOutstandingRewards(ctx context.Context, in *QueryValidatorOutstandingRewardsRequest, opts ...grpc.CallOption) (*QueryValidatorOutstandingRewardsResponse, error)
// ValidatorCommission queries accumulated commission for a validator.
@ -989,6 +1111,15 @@ func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts .
return out, nil
}
func (c *queryClient) ValidatorDistributionInfo(ctx context.Context, in *QueryValidatorDistributionInfoRequest, opts ...grpc.CallOption) (*QueryValidatorDistributionInfoResponse, error) {
out := new(QueryValidatorDistributionInfoResponse)
err := c.cc.Invoke(ctx, "/cosmos.distribution.v1beta1.Query/ValidatorDistributionInfo", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *queryClient) ValidatorOutstandingRewards(ctx context.Context, in *QueryValidatorOutstandingRewardsRequest, opts ...grpc.CallOption) (*QueryValidatorOutstandingRewardsResponse, error) {
out := new(QueryValidatorOutstandingRewardsResponse)
err := c.cc.Invoke(ctx, "/cosmos.distribution.v1beta1.Query/ValidatorOutstandingRewards", in, out, opts...)
@ -1065,6 +1196,8 @@ func (c *queryClient) CommunityPool(ctx context.Context, in *QueryCommunityPoolR
type QueryServer interface {
// Params queries params of the distribution module.
Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error)
// ValidatorDistributionInfo queries validator commision and self-delegation rewards for validator
ValidatorDistributionInfo(context.Context, *QueryValidatorDistributionInfoRequest) (*QueryValidatorDistributionInfoResponse, error)
// ValidatorOutstandingRewards queries rewards of a validator address.
ValidatorOutstandingRewards(context.Context, *QueryValidatorOutstandingRewardsRequest) (*QueryValidatorOutstandingRewardsResponse, error)
// ValidatorCommission queries accumulated commission for a validator.
@ -1091,6 +1224,9 @@ type UnimplementedQueryServer struct {
func (*UnimplementedQueryServer) Params(ctx context.Context, req *QueryParamsRequest) (*QueryParamsResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Params not implemented")
}
func (*UnimplementedQueryServer) ValidatorDistributionInfo(ctx context.Context, req *QueryValidatorDistributionInfoRequest) (*QueryValidatorDistributionInfoResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method ValidatorDistributionInfo not implemented")
}
func (*UnimplementedQueryServer) ValidatorOutstandingRewards(ctx context.Context, req *QueryValidatorOutstandingRewardsRequest) (*QueryValidatorOutstandingRewardsResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method ValidatorOutstandingRewards not implemented")
}
@ -1138,6 +1274,24 @@ func _Query_Params_Handler(srv interface{}, ctx context.Context, dec func(interf
return interceptor(ctx, in, info, handler)
}
func _Query_ValidatorDistributionInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(QueryValidatorDistributionInfoRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(QueryServer).ValidatorDistributionInfo(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/cosmos.distribution.v1beta1.Query/ValidatorDistributionInfo",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(QueryServer).ValidatorDistributionInfo(ctx, req.(*QueryValidatorDistributionInfoRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Query_ValidatorOutstandingRewards_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(QueryValidatorOutstandingRewardsRequest)
if err := dec(in); err != nil {
@ -1290,6 +1444,10 @@ var _Query_serviceDesc = grpc.ServiceDesc{
MethodName: "Params",
Handler: _Query_Params_Handler,
},
{
MethodName: "ValidatorDistributionInfo",
Handler: _Query_ValidatorDistributionInfo_Handler,
},
{
MethodName: "ValidatorOutstandingRewards",
Handler: _Query_ValidatorOutstandingRewards_Handler,
@ -1383,6 +1541,94 @@ func (m *QueryParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
return len(dAtA) - i, nil
}
func (m *QueryValidatorDistributionInfoRequest) 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 *QueryValidatorDistributionInfoRequest) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *QueryValidatorDistributionInfoRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if len(m.ValidatorAddress) > 0 {
i -= len(m.ValidatorAddress)
copy(dAtA[i:], m.ValidatorAddress)
i = encodeVarintQuery(dAtA, i, uint64(len(m.ValidatorAddress)))
i--
dAtA[i] = 0xa
}
return len(dAtA) - i, nil
}
func (m *QueryValidatorDistributionInfoResponse) 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 *QueryValidatorDistributionInfoResponse) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *QueryValidatorDistributionInfoResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if len(m.Commission) > 0 {
for iNdEx := len(m.Commission) - 1; iNdEx >= 0; iNdEx-- {
{
size, err := m.Commission[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.SelfBondRewards) > 0 {
for iNdEx := len(m.SelfBondRewards) - 1; iNdEx >= 0; iNdEx-- {
{
size, err := m.SelfBondRewards[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.OperatorAddress) > 0 {
i -= len(m.OperatorAddress)
copy(dAtA[i:], m.OperatorAddress)
i = encodeVarintQuery(dAtA, i, uint64(len(m.OperatorAddress)))
i--
dAtA[i] = 0xa
}
return len(dAtA) - i, nil
}
func (m *QueryValidatorOutstandingRewardsRequest) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
@ -1978,6 +2224,44 @@ func (m *QueryParamsResponse) Size() (n int) {
return n
}
func (m *QueryValidatorDistributionInfoRequest) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
l = len(m.ValidatorAddress)
if l > 0 {
n += 1 + l + sovQuery(uint64(l))
}
return n
}
func (m *QueryValidatorDistributionInfoResponse) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
l = len(m.OperatorAddress)
if l > 0 {
n += 1 + l + sovQuery(uint64(l))
}
if len(m.SelfBondRewards) > 0 {
for _, e := range m.SelfBondRewards {
l = e.Size()
n += 1 + l + sovQuery(uint64(l))
}
}
if len(m.Commission) > 0 {
for _, e := range m.Commission {
l = e.Size()
n += 1 + l + sovQuery(uint64(l))
}
}
return n
}
func (m *QueryValidatorOutstandingRewardsRequest) Size() (n int) {
if m == nil {
return 0
@ -2351,6 +2635,238 @@ func (m *QueryParamsResponse) Unmarshal(dAtA []byte) error {
}
return nil
}
func (m *QueryValidatorDistributionInfoRequest) 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: QueryValidatorDistributionInfoRequest: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: QueryValidatorDistributionInfoRequest: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field ValidatorAddress", 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.ValidatorAddress = 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 *QueryValidatorDistributionInfoResponse) 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: QueryValidatorDistributionInfoResponse: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: QueryValidatorDistributionInfoResponse: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field OperatorAddress", 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.OperatorAddress = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field SelfBondRewards", 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.SelfBondRewards = append(m.SelfBondRewards, types.DecCoin{})
if err := m.SelfBondRewards[len(m.SelfBondRewards)-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 Commission", 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.Commission = append(m.Commission, types.DecCoin{})
if err := m.Commission[len(m.Commission)-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 *QueryValidatorOutstandingRewardsRequest) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0

View File

@ -51,6 +51,60 @@ func local_request_Query_Params_0(ctx context.Context, marshaler runtime.Marshal
}
func request_Query_ValidatorDistributionInfo_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq QueryValidatorDistributionInfoRequest
var metadata runtime.ServerMetadata
var (
val string
ok bool
err error
_ = err
)
val, ok = pathParams["validator_address"]
if !ok {
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "validator_address")
}
protoReq.ValidatorAddress, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "validator_address", err)
}
msg, err := client.ValidatorDistributionInfo(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
return msg, metadata, err
}
func local_request_Query_ValidatorDistributionInfo_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq QueryValidatorDistributionInfoRequest
var metadata runtime.ServerMetadata
var (
val string
ok bool
err error
_ = err
)
val, ok = pathParams["validator_address"]
if !ok {
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "validator_address")
}
protoReq.ValidatorAddress, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "validator_address", err)
}
msg, err := server.ValidatorDistributionInfo(ctx, &protoReq)
return msg, metadata, err
}
func request_Query_ValidatorOutstandingRewards_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq QueryValidatorOutstandingRewardsRequest
var metadata runtime.ServerMetadata
@ -516,6 +570,29 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv
})
mux.Handle("GET", pattern_Query_ValidatorDistributionInfo_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_ValidatorDistributionInfo_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_ValidatorDistributionInfo_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
mux.Handle("GET", pattern_Query_ValidatorOutstandingRewards_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
@ -761,6 +838,26 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie
})
mux.Handle("GET", pattern_Query_ValidatorDistributionInfo_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_ValidatorDistributionInfo_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_ValidatorDistributionInfo_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
mux.Handle("GET", pattern_Query_ValidatorOutstandingRewards_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
@ -927,6 +1024,8 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie
var (
pattern_Query_Params_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"cosmos", "distribution", "v1beta1", "params"}, "", runtime.AssumeColonVerbOpt(false)))
pattern_Query_ValidatorDistributionInfo_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"cosmos", "distribution", "v1beta1", "validators", "validator_address"}, "", runtime.AssumeColonVerbOpt(false)))
pattern_Query_ValidatorOutstandingRewards_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5}, []string{"cosmos", "distribution", "v1beta1", "validators", "validator_address", "outstanding_rewards"}, "", runtime.AssumeColonVerbOpt(false)))
pattern_Query_ValidatorCommission_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5}, []string{"cosmos", "distribution", "v1beta1", "validators", "validator_address", "commission"}, "", runtime.AssumeColonVerbOpt(false)))
@ -947,6 +1046,8 @@ var (
var (
forward_Query_Params_0 = runtime.ForwardResponseMessage
forward_Query_ValidatorDistributionInfo_0 = runtime.ForwardResponseMessage
forward_Query_ValidatorOutstandingRewards_0 = runtime.ForwardResponseMessage
forward_Query_ValidatorCommission_0 = runtime.ForwardResponseMessage