diff --git a/proto/umee/ugov/v1/query.proto b/proto/umee/ugov/v1/query.proto index 21001dfe4f..a99cfaaff6 100644 --- a/proto/umee/ugov/v1/query.proto +++ b/proto/umee/ugov/v1/query.proto @@ -7,7 +7,7 @@ import "gogoproto/gogo.proto"; import "google/api/annotations.proto"; import "google/protobuf/timestamp.proto"; import "cosmos/base/query/v1beta1/pagination.proto"; -import "amino/amino.proto"; +import "cosmos/bank/v1beta1/query.proto"; import "umee/ugov/v1/ugov.proto"; @@ -37,16 +37,16 @@ service Query { option (google.api.http).get = "/umee/ugov/v1/inflation_cycle_end"; } - // Token Balances queries for all account addresses that own a particular token + // DenomOwners queries for all account addresses that own a particular token // denomination. - rpc TokenBalances(QueryTokenBalances) returns (QueryTokenBalancesResponse){ - option (google.api.http).get = "/umee/ugov/v1/token_balances"; + rpc DenomOwners(QueryDenomOwners) returns (cosmos.bank.v1beta1.QueryDenomOwnersResponse){ + option (google.api.http).get = "/umee/ugov/v1/denom_owners"; } } -// which queries for a paginated set of all account holders of a particular +// QueryDenomOwners which queries for a paginated set of all account holders of a particular // denomination. -message QueryTokenBalances{ +message QueryDenomOwners{ // denom defines the coin denomination to query all account holders for. string denom = 1; int64 height = 2; @@ -54,25 +54,6 @@ message QueryTokenBalances{ cosmos.base.query.v1beta1.PageRequest pagination = 3; } -// QueryDenomOwnersResponse defines the RPC response of a TokenBalances RPC query. -message QueryTokenBalancesResponse { - repeated TokenBalance token_balances = 1; - // pagination defines the pagination in the response. - cosmos.base.query.v1beta1.PageResponse pagination = 2; -} - -// TokenBalance defines structure representing an account that owns or holds a -// particular denominated token. It contains the account address and account -// balance of the denominated token. -// -message TokenBalance { - // address defines the address that owns a particular denomination. - string address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - - // balance is the balance of the denominated coin for an account. - cosmos.base.v1beta1.Coin balance = 2 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; -} - // QueryMinGasPrice is a request type. message QueryMinGasPrice {} diff --git a/x/ugov/client/cli/query.go b/x/ugov/client/cli/query.go index 37c4e865c3..1987922d92 100644 --- a/x/ugov/client/cli/query.go +++ b/x/ugov/client/cli/query.go @@ -25,7 +25,7 @@ func GetQueryCmd() *cobra.Command { QueryInflationParams(), QueryInflationCyleEnd(), QueryEmergencyGroup(), - QueryTokenBalances(), + QueryDenomOwners(), ) return cmd @@ -123,10 +123,10 @@ func QueryInflationCyleEnd() *cobra.Command { return cmd } -// QueryTokenBalances creates the Query/TokenBalances CLI. -func QueryTokenBalances() *cobra.Command { +// QueryDenomOwners creates the Query/DenomOwners CLI. +func QueryDenomOwners() *cobra.Command { cmd := &cobra.Command{ - Use: "token-balances [denom]", + Use: "denom-owners [denom]", Args: cobra.ExactArgs(1), Short: "Queries for all account addresses that own a particular token denomination.", RunE: func(cmd *cobra.Command, args []string) error { @@ -139,7 +139,7 @@ func QueryTokenBalances() *cobra.Command { return err } queryClient := ugov.NewQueryClient(clientCtx) - resp, err := queryClient.TokenBalances(cmd.Context(), &ugov.QueryTokenBalances{ + resp, err := queryClient.DenomOwners(cmd.Context(), &ugov.QueryDenomOwners{ Denom: args[0], Pagination: pageReq, }) @@ -148,7 +148,7 @@ func QueryTokenBalances() *cobra.Command { } flags.AddQueryFlagsToCmd(cmd) - flags.AddPaginationFlagsToCmd(cmd, "token-balances") + flags.AddPaginationFlagsToCmd(cmd, "denom-owners") return cmd } diff --git a/x/ugov/keeper/query_server.go b/x/ugov/keeper/query_server.go index a8f319b3ed..865c653415 100644 --- a/x/ugov/keeper/query_server.go +++ b/x/ugov/keeper/query_server.go @@ -52,28 +52,15 @@ func (q Querier) InflationCycleEnd(ctx context.Context, _ *ugov.QueryInflationCy return &ugov.QueryInflationCycleEndResponse{End: &cycleEndTime}, nil } -// TokenBalances implements ugov.QueryServer. -func (q Querier) TokenBalances(ctx context.Context, req *ugov.QueryTokenBalances) (*ugov.QueryTokenBalancesResponse, +// DenomOwners implements ugov.QueryServer. +func (q Querier) DenomOwners(ctx context.Context, req *ugov.QueryDenomOwners) (*banktypes.QueryDenomOwnersResponse, error) { sdkCtx := sdk.UnwrapSDKContext(ctx) if req.Height != 0 { sdkCtx = sdkCtx.WithBlockHeight(req.Height) } - resp, err := q.BankKeeper.DenomOwners(sdk.WrapSDKContext(sdkCtx), &banktypes.QueryDenomOwnersRequest{ + return q.BankKeeper.DenomOwners(sdk.WrapSDKContext(sdkCtx), &banktypes.QueryDenomOwnersRequest{ Denom: req.Denom, Pagination: req.Pagination, }) - if err != nil { - return nil, err - } - - tb := make([]*ugov.TokenBalance, 0) - for _, v := range resp.DenomOwners { - tb = append(tb, &ugov.TokenBalance{ - Address: v.Address, - Balance: v.Balance, - }) - } - - return &ugov.QueryTokenBalancesResponse{Pagination: resp.Pagination, TokenBalances: tb}, nil } diff --git a/x/ugov/query.pb.go b/x/ugov/query.pb.go index c7f861de2a..e77e679b08 100644 --- a/x/ugov/query.pb.go +++ b/x/ugov/query.pb.go @@ -9,7 +9,7 @@ import ( _ "github.com/cosmos/cosmos-proto" types "github.com/cosmos/cosmos-sdk/types" query "github.com/cosmos/cosmos-sdk/types/query" - _ "github.com/cosmos/cosmos-sdk/types/tx/amino" + types1 "github.com/cosmos/cosmos-sdk/x/bank/types" _ "github.com/cosmos/gogoproto/gogoproto" grpc1 "github.com/cosmos/gogoproto/grpc" proto "github.com/cosmos/gogoproto/proto" @@ -37,9 +37,9 @@ var _ = time.Kitchen // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package -// which queries for a paginated set of all account holders of a particular +// QueryDenomOwners which queries for a paginated set of all account holders of a particular // denomination. -type QueryTokenBalances struct { +type QueryDenomOwners struct { // denom defines the coin denomination to query all account holders for. Denom string `protobuf:"bytes,1,opt,name=denom,proto3" json:"denom,omitempty"` Height int64 `protobuf:"varint,2,opt,name=height,proto3" json:"height,omitempty"` @@ -47,18 +47,18 @@ type QueryTokenBalances struct { Pagination *query.PageRequest `protobuf:"bytes,3,opt,name=pagination,proto3" json:"pagination,omitempty"` } -func (m *QueryTokenBalances) Reset() { *m = QueryTokenBalances{} } -func (m *QueryTokenBalances) String() string { return proto.CompactTextString(m) } -func (*QueryTokenBalances) ProtoMessage() {} -func (*QueryTokenBalances) Descriptor() ([]byte, []int) { +func (m *QueryDenomOwners) Reset() { *m = QueryDenomOwners{} } +func (m *QueryDenomOwners) String() string { return proto.CompactTextString(m) } +func (*QueryDenomOwners) ProtoMessage() {} +func (*QueryDenomOwners) Descriptor() ([]byte, []int) { return fileDescriptor_25fa04679024a47d, []int{0} } -func (m *QueryTokenBalances) XXX_Unmarshal(b []byte) error { +func (m *QueryDenomOwners) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *QueryTokenBalances) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *QueryDenomOwners) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_QueryTokenBalances.Marshal(b, m, deterministic) + return xxx_messageInfo_QueryDenomOwners.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -68,100 +68,17 @@ func (m *QueryTokenBalances) XXX_Marshal(b []byte, deterministic bool) ([]byte, return b[:n], nil } } -func (m *QueryTokenBalances) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryTokenBalances.Merge(m, src) +func (m *QueryDenomOwners) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryDenomOwners.Merge(m, src) } -func (m *QueryTokenBalances) XXX_Size() int { +func (m *QueryDenomOwners) XXX_Size() int { return m.Size() } -func (m *QueryTokenBalances) XXX_DiscardUnknown() { - xxx_messageInfo_QueryTokenBalances.DiscardUnknown(m) +func (m *QueryDenomOwners) XXX_DiscardUnknown() { + xxx_messageInfo_QueryDenomOwners.DiscardUnknown(m) } -var xxx_messageInfo_QueryTokenBalances proto.InternalMessageInfo - -// QueryDenomOwnersResponse defines the RPC response of a TokenBalances RPC query. -type QueryTokenBalancesResponse struct { - TokenBalances []*TokenBalance `protobuf:"bytes,1,rep,name=token_balances,json=tokenBalances,proto3" json:"token_balances,omitempty"` - // pagination defines the pagination in the response. - Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` -} - -func (m *QueryTokenBalancesResponse) Reset() { *m = QueryTokenBalancesResponse{} } -func (m *QueryTokenBalancesResponse) String() string { return proto.CompactTextString(m) } -func (*QueryTokenBalancesResponse) ProtoMessage() {} -func (*QueryTokenBalancesResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_25fa04679024a47d, []int{1} -} -func (m *QueryTokenBalancesResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryTokenBalancesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryTokenBalancesResponse.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 *QueryTokenBalancesResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryTokenBalancesResponse.Merge(m, src) -} -func (m *QueryTokenBalancesResponse) XXX_Size() int { - return m.Size() -} -func (m *QueryTokenBalancesResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryTokenBalancesResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryTokenBalancesResponse proto.InternalMessageInfo - -// TokenBalance defines structure representing an account that owns or holds a -// particular denominated token. It contains the account address and account -// balance of the denominated token. -type TokenBalance struct { - // address defines the address that owns a particular denomination. - Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` - // balance is the balance of the denominated coin for an account. - Balance types.Coin `protobuf:"bytes,2,opt,name=balance,proto3" json:"balance"` -} - -func (m *TokenBalance) Reset() { *m = TokenBalance{} } -func (m *TokenBalance) String() string { return proto.CompactTextString(m) } -func (*TokenBalance) ProtoMessage() {} -func (*TokenBalance) Descriptor() ([]byte, []int) { - return fileDescriptor_25fa04679024a47d, []int{2} -} -func (m *TokenBalance) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *TokenBalance) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_TokenBalance.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 *TokenBalance) XXX_Merge(src proto.Message) { - xxx_messageInfo_TokenBalance.Merge(m, src) -} -func (m *TokenBalance) XXX_Size() int { - return m.Size() -} -func (m *TokenBalance) XXX_DiscardUnknown() { - xxx_messageInfo_TokenBalance.DiscardUnknown(m) -} - -var xxx_messageInfo_TokenBalance proto.InternalMessageInfo +var xxx_messageInfo_QueryDenomOwners proto.InternalMessageInfo // QueryMinGasPrice is a request type. type QueryMinGasPrice struct { @@ -171,7 +88,7 @@ func (m *QueryMinGasPrice) Reset() { *m = QueryMinGasPrice{} } func (m *QueryMinGasPrice) String() string { return proto.CompactTextString(m) } func (*QueryMinGasPrice) ProtoMessage() {} func (*QueryMinGasPrice) Descriptor() ([]byte, []int) { - return fileDescriptor_25fa04679024a47d, []int{3} + return fileDescriptor_25fa04679024a47d, []int{1} } func (m *QueryMinGasPrice) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -209,7 +126,7 @@ func (m *QueryMinGasPriceResponse) Reset() { *m = QueryMinGasPriceRespon func (m *QueryMinGasPriceResponse) String() string { return proto.CompactTextString(m) } func (*QueryMinGasPriceResponse) ProtoMessage() {} func (*QueryMinGasPriceResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_25fa04679024a47d, []int{4} + return fileDescriptor_25fa04679024a47d, []int{2} } func (m *QueryMinGasPriceResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -246,7 +163,7 @@ func (m *QueryEmergencyGroup) Reset() { *m = QueryEmergencyGroup{} } func (m *QueryEmergencyGroup) String() string { return proto.CompactTextString(m) } func (*QueryEmergencyGroup) ProtoMessage() {} func (*QueryEmergencyGroup) Descriptor() ([]byte, []int) { - return fileDescriptor_25fa04679024a47d, []int{5} + return fileDescriptor_25fa04679024a47d, []int{3} } func (m *QueryEmergencyGroup) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -284,7 +201,7 @@ func (m *QueryEmergencyGroupResponse) Reset() { *m = QueryEmergencyGroup func (m *QueryEmergencyGroupResponse) String() string { return proto.CompactTextString(m) } func (*QueryEmergencyGroupResponse) ProtoMessage() {} func (*QueryEmergencyGroupResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_25fa04679024a47d, []int{6} + return fileDescriptor_25fa04679024a47d, []int{4} } func (m *QueryEmergencyGroupResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -321,7 +238,7 @@ func (m *QueryInflationParams) Reset() { *m = QueryInflationParams{} } func (m *QueryInflationParams) String() string { return proto.CompactTextString(m) } func (*QueryInflationParams) ProtoMessage() {} func (*QueryInflationParams) Descriptor() ([]byte, []int) { - return fileDescriptor_25fa04679024a47d, []int{7} + return fileDescriptor_25fa04679024a47d, []int{5} } func (m *QueryInflationParams) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -359,7 +276,7 @@ func (m *QueryInflationParamsResponse) Reset() { *m = QueryInflationPara func (m *QueryInflationParamsResponse) String() string { return proto.CompactTextString(m) } func (*QueryInflationParamsResponse) ProtoMessage() {} func (*QueryInflationParamsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_25fa04679024a47d, []int{8} + return fileDescriptor_25fa04679024a47d, []int{6} } func (m *QueryInflationParamsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -396,7 +313,7 @@ func (m *QueryInflationCycleEnd) Reset() { *m = QueryInflationCycleEnd{} func (m *QueryInflationCycleEnd) String() string { return proto.CompactTextString(m) } func (*QueryInflationCycleEnd) ProtoMessage() {} func (*QueryInflationCycleEnd) Descriptor() ([]byte, []int) { - return fileDescriptor_25fa04679024a47d, []int{9} + return fileDescriptor_25fa04679024a47d, []int{7} } func (m *QueryInflationCycleEnd) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -434,7 +351,7 @@ func (m *QueryInflationCycleEndResponse) Reset() { *m = QueryInflationCy func (m *QueryInflationCycleEndResponse) String() string { return proto.CompactTextString(m) } func (*QueryInflationCycleEndResponse) ProtoMessage() {} func (*QueryInflationCycleEndResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_25fa04679024a47d, []int{10} + return fileDescriptor_25fa04679024a47d, []int{8} } func (m *QueryInflationCycleEndResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -464,9 +381,7 @@ func (m *QueryInflationCycleEndResponse) XXX_DiscardUnknown() { var xxx_messageInfo_QueryInflationCycleEndResponse proto.InternalMessageInfo func init() { - proto.RegisterType((*QueryTokenBalances)(nil), "umee.ugov.v1.QueryTokenBalances") - proto.RegisterType((*QueryTokenBalancesResponse)(nil), "umee.ugov.v1.QueryTokenBalancesResponse") - proto.RegisterType((*TokenBalance)(nil), "umee.ugov.v1.TokenBalance") + proto.RegisterType((*QueryDenomOwners)(nil), "umee.ugov.v1.QueryDenomOwners") proto.RegisterType((*QueryMinGasPrice)(nil), "umee.ugov.v1.QueryMinGasPrice") proto.RegisterType((*QueryMinGasPriceResponse)(nil), "umee.ugov.v1.QueryMinGasPriceResponse") proto.RegisterType((*QueryEmergencyGroup)(nil), "umee.ugov.v1.QueryEmergencyGroup") @@ -480,58 +395,53 @@ func init() { func init() { proto.RegisterFile("umee/ugov/v1/query.proto", fileDescriptor_25fa04679024a47d) } var fileDescriptor_25fa04679024a47d = []byte{ - // 813 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x94, 0x4f, 0x4f, 0x3b, 0x45, - 0x18, 0xc7, 0x3b, 0x54, 0xf8, 0xc9, 0x94, 0x3f, 0x32, 0x56, 0x5c, 0x96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x35, 0x70, 0xf3, 0xa4, 0xe5, 0xee, 0x9f, 0xb4, 0xdc, 0x6f, 0x4f, 0x5a, 0xee, - 0xf3, 0xaa, 0xe3, 0x86, 0xe7, 0xfd, 0xb6, 0x61, 0x33, 0x8f, 0x77, 0xd9, 0xa1, 0x24, 0xfc, 0x8a, - 0xf9, 0x17, 0x71, 0xcb, 0xc1, 0xae, 0xf9, 0x35, 0xef, 0xdb, 0x9e, 0xe1, 0x6f, 0xe3, 0xfd, 0x7f, - 0x02, 0x00, 0x00, 0xff, 0xff, 0x49, 0xd6, 0xa4, 0x28, 0xa8, 0x07, 0x00, 0x00, + // 731 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x94, 0x4d, 0x4f, 0x13, 0x5d, + 0x14, 0xc7, 0x7b, 0xe1, 0x81, 0x3c, 0xcf, 0xed, 0x23, 0xe8, 0xb5, 0x62, 0x1d, 0xca, 0xb4, 0x0c, + 0xda, 0x00, 0x91, 0x99, 0x14, 0x13, 0x36, 0xae, 0x28, 0x6f, 0x71, 0x61, 0xc4, 0xd1, 0x85, 0xd1, + 0x45, 0x9d, 0x4e, 0x0f, 0xc3, 0x0d, 0xcc, 0xbd, 0x65, 0x5e, 0x8a, 0xb8, 0x32, 0x26, 0x26, 0xba, + 0x23, 0xfa, 0x41, 0xdc, 0xf8, 0x21, 0xba, 0x24, 0xba, 0x71, 0x85, 0x0a, 0x7e, 0x10, 0x33, 0x77, + 0x5e, 0x98, 0x19, 0x2b, 0xb8, 0xeb, 0x3d, 0xe7, 0x7f, 0xce, 0xff, 0x77, 0xef, 0x39, 0x53, 0x5c, + 0xf6, 0x6d, 0x00, 0xcd, 0xb7, 0x78, 0x4f, 0xeb, 0x35, 0xb4, 0x3d, 0x1f, 0x9c, 0x03, 0xb5, 0xeb, + 0x70, 0x8f, 0x93, 0xff, 0x83, 0x8c, 0x1a, 0x64, 0xd4, 0x5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74, 0x74, 0x22, 0xa3, + 0xef, 0x27, 0x32, 0x3a, 0x3c, 0x95, 0x0b, 0x47, 0xa7, 0x72, 0xe1, 0xeb, 0xa9, 0x5c, 0x78, 0x5a, + 0xb7, 0xa8, 0xb7, 0xed, 0xb7, 0x55, 0x93, 0xdb, 0xa2, 0xc7, 0x02, 0x03, 0x6f, 0x9f, 0x3b, 0x3b, + 0x61, 0xc3, 0xde, 0x92, 0xf6, 0x42, 0x74, 0x6d, 0x8f, 0x8a, 0x4f, 0xe3, 0xce, 0xaf, 0x00, 0x00, + 0x00, 0xff, 0xff, 0x22, 0x6c, 0x4d, 0xc2, 0x83, 0x06, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -554,9 +464,9 @@ type QueryClient interface { InflationParams(ctx context.Context, in *QueryInflationParams, opts ...grpc.CallOption) (*QueryInflationParamsResponse, error) // InflationCycleEnd returns inflation cycle end time InflationCycleEnd(ctx context.Context, in *QueryInflationCycleEnd, opts ...grpc.CallOption) (*QueryInflationCycleEndResponse, error) - // Token Balances queries for all account addresses that own a particular token + // DenomOwners queries for all account addresses that own a particular token // denomination. - TokenBalances(ctx context.Context, in *QueryTokenBalances, opts ...grpc.CallOption) (*QueryTokenBalancesResponse, error) + DenomOwners(ctx context.Context, in *QueryDenomOwners, opts ...grpc.CallOption) (*types1.QueryDenomOwnersResponse, error) } type queryClient struct { @@ -603,9 +513,9 @@ func (c *queryClient) InflationCycleEnd(ctx context.Context, in *QueryInflationC return out, nil } -func (c *queryClient) TokenBalances(ctx context.Context, in *QueryTokenBalances, opts ...grpc.CallOption) (*QueryTokenBalancesResponse, error) { - out := new(QueryTokenBalancesResponse) - err := c.cc.Invoke(ctx, "/umee.ugov.v1.Query/TokenBalances", in, out, opts...) +func (c *queryClient) DenomOwners(ctx context.Context, in *QueryDenomOwners, opts ...grpc.CallOption) (*types1.QueryDenomOwnersResponse, error) { + out := new(types1.QueryDenomOwnersResponse) + err := c.cc.Invoke(ctx, "/umee.ugov.v1.Query/DenomOwners", in, out, opts...) if err != nil { return nil, err } @@ -622,9 +532,9 @@ type QueryServer interface { InflationParams(context.Context, *QueryInflationParams) (*QueryInflationParamsResponse, error) // InflationCycleEnd returns inflation cycle end time InflationCycleEnd(context.Context, *QueryInflationCycleEnd) (*QueryInflationCycleEndResponse, error) - // Token Balances queries for all account addresses that own a particular token + // DenomOwners queries for all account addresses that own a particular token // denomination. - TokenBalances(context.Context, *QueryTokenBalances) (*QueryTokenBalancesResponse, error) + DenomOwners(context.Context, *QueryDenomOwners) (*types1.QueryDenomOwnersResponse, error) } // UnimplementedQueryServer can be embedded to have forward compatible implementations. @@ -643,8 +553,8 @@ func (*UnimplementedQueryServer) InflationParams(ctx context.Context, req *Query func (*UnimplementedQueryServer) InflationCycleEnd(ctx context.Context, req *QueryInflationCycleEnd) (*QueryInflationCycleEndResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method InflationCycleEnd not implemented") } -func (*UnimplementedQueryServer) TokenBalances(ctx context.Context, req *QueryTokenBalances) (*QueryTokenBalancesResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method TokenBalances not implemented") +func (*UnimplementedQueryServer) DenomOwners(ctx context.Context, req *QueryDenomOwners) (*types1.QueryDenomOwnersResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method DenomOwners not implemented") } func RegisterQueryServer(s grpc1.Server, srv QueryServer) { @@ -723,20 +633,20 @@ func _Query_InflationCycleEnd_Handler(srv interface{}, ctx context.Context, dec return interceptor(ctx, in, info, handler) } -func _Query_TokenBalances_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryTokenBalances) +func _Query_DenomOwners_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryDenomOwners) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(QueryServer).TokenBalances(ctx, in) + return srv.(QueryServer).DenomOwners(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/umee.ugov.v1.Query/TokenBalances", + FullMethod: "/umee.ugov.v1.Query/DenomOwners", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).TokenBalances(ctx, req.(*QueryTokenBalances)) + return srv.(QueryServer).DenomOwners(ctx, req.(*QueryDenomOwners)) } return interceptor(ctx, in, info, handler) } @@ -762,15 +672,15 @@ var _Query_serviceDesc = grpc.ServiceDesc{ Handler: _Query_InflationCycleEnd_Handler, }, { - MethodName: "TokenBalances", - Handler: _Query_TokenBalances_Handler, + MethodName: "DenomOwners", + Handler: _Query_DenomOwners_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "umee/ugov/v1/query.proto", } -func (m *QueryTokenBalances) Marshal() (dAtA []byte, err error) { +func (m *QueryDenomOwners) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -780,12 +690,12 @@ func (m *QueryTokenBalances) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *QueryTokenBalances) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryDenomOwners) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryTokenBalances) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryDenomOwners) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -817,95 +727,6 @@ func (m *QueryTokenBalances) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *QueryTokenBalancesResponse) 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 *QueryTokenBalancesResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryTokenBalancesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Pagination != nil { - { - size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if len(m.TokenBalances) > 0 { - for iNdEx := len(m.TokenBalances) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.TokenBalances[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 *TokenBalance) 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 *TokenBalance) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *TokenBalance) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.Balance.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - 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 *QueryMinGasPrice) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -1115,12 +936,12 @@ func (m *QueryInflationCycleEndResponse) MarshalToSizedBuffer(dAtA []byte) (int, var l int _ = l if m.End != nil { - n6, err6 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(*m.End, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(*m.End):]) - if err6 != nil { - return 0, err6 + n4, err4 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(*m.End, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(*m.End):]) + if err4 != nil { + return 0, err4 } - i -= n6 - i = encodeVarintQuery(dAtA, i, uint64(n6)) + i -= n4 + i = encodeVarintQuery(dAtA, i, uint64(n4)) i-- dAtA[i] = 0xa } @@ -1138,7 +959,7 @@ func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { dAtA[offset] = uint8(v) return base } -func (m *QueryTokenBalances) Size() (n int) { +func (m *QueryDenomOwners) Size() (n int) { if m == nil { return 0 } @@ -1158,40 +979,6 @@ func (m *QueryTokenBalances) Size() (n int) { return n } -func (m *QueryTokenBalancesResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.TokenBalances) > 0 { - for _, e := range m.TokenBalances { - l = e.Size() - n += 1 + l + sovQuery(uint64(l)) - } - } - if m.Pagination != nil { - l = m.Pagination.Size() - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *TokenBalance) 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)) - } - l = m.Balance.Size() - n += 1 + l + sovQuery(uint64(l)) - return n -} - func (m *QueryMinGasPrice) Size() (n int) { if m == nil { return 0 @@ -1282,7 +1069,7 @@ func sovQuery(x uint64) (n int) { func sozQuery(x uint64) (n int) { return sovQuery(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } -func (m *QueryTokenBalances) Unmarshal(dAtA []byte) error { +func (m *QueryDenomOwners) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -1305,10 +1092,10 @@ func (m *QueryTokenBalances) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryTokenBalances: wiretype end group for non-group") + return fmt.Errorf("proto: QueryDenomOwners: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryTokenBalances: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryDenomOwners: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -1419,241 +1206,6 @@ func (m *QueryTokenBalances) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryTokenBalancesResponse) 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: QueryTokenBalancesResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryTokenBalancesResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TokenBalances", 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.TokenBalances = append(m.TokenBalances, &TokenBalance{}) - if err := m.TokenBalances[len(m.TokenBalances)-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 Pagination", 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 - } - if m.Pagination == nil { - m.Pagination = &query.PageResponse{} - } - if err := m.Pagination.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 *TokenBalance) 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: TokenBalance: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: TokenBalance: 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 - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Balance", 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 - } - if err := m.Balance.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 *QueryMinGasPrice) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 diff --git a/x/ugov/query.pb.gw.go b/x/ugov/query.pb.gw.go index d3869ca4af..9db24b5e48 100644 --- a/x/ugov/query.pb.gw.go +++ b/x/ugov/query.pb.gw.go @@ -106,37 +106,37 @@ func local_request_Query_InflationCycleEnd_0(ctx context.Context, marshaler runt } var ( - filter_Query_TokenBalances_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} + filter_Query_DenomOwners_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} ) -func request_Query_TokenBalances_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryTokenBalances +func request_Query_DenomOwners_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryDenomOwners 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_TokenBalances_0); err != nil { + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_DenomOwners_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.TokenBalances(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + msg, err := client.DenomOwners(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } -func local_request_Query_TokenBalances_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryTokenBalances +func local_request_Query_DenomOwners_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryDenomOwners 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_TokenBalances_0); err != nil { + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_DenomOwners_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.TokenBalances(ctx, &protoReq) + msg, err := server.DenomOwners(ctx, &protoReq) return msg, metadata, err } @@ -239,7 +239,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv }) - mux.Handle("GET", pattern_Query_TokenBalances_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_Query_DenomOwners_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream @@ -250,7 +250,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_Query_TokenBalances_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_Query_DenomOwners_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 { @@ -258,7 +258,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } - forward_Query_TokenBalances_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_DenomOwners_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -383,7 +383,7 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie }) - mux.Handle("GET", pattern_Query_TokenBalances_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_Query_DenomOwners_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) @@ -392,14 +392,14 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_Query_TokenBalances_0(rctx, inboundMarshaler, client, req, pathParams) + resp, md, err := request_Query_DenomOwners_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_TokenBalances_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_DenomOwners_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -415,7 +415,7 @@ var ( pattern_Query_InflationCycleEnd_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"umee", "ugov", "v1", "inflation_cycle_end"}, "", runtime.AssumeColonVerbOpt(false))) - pattern_Query_TokenBalances_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"umee", "ugov", "v1", "token_balances"}, "", runtime.AssumeColonVerbOpt(false))) + pattern_Query_DenomOwners_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"umee", "ugov", "v1", "denom_owners"}, "", runtime.AssumeColonVerbOpt(false))) ) var ( @@ -427,5 +427,5 @@ var ( forward_Query_InflationCycleEnd_0 = runtime.ForwardResponseMessage - forward_Query_TokenBalances_0 = runtime.ForwardResponseMessage + forward_Query_DenomOwners_0 = runtime.ForwardResponseMessage )