2020-06-05 11:10:04 -07:00
|
|
|
// Code generated by protoc-gen-gogo. DO NOT EDIT.
|
2020-08-11 04:49:45 -07:00
|
|
|
// source: cosmos/bank/v1beta1/query.proto
|
2020-06-05 11:10:04 -07:00
|
|
|
|
|
|
|
package types
|
|
|
|
|
|
|
|
import (
|
|
|
|
context "context"
|
|
|
|
fmt "fmt"
|
|
|
|
github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types"
|
|
|
|
types "github.com/cosmos/cosmos-sdk/types"
|
2020-06-20 16:44:04 -07:00
|
|
|
query "github.com/cosmos/cosmos-sdk/types/query"
|
2020-06-05 11:10:04 -07:00
|
|
|
_ "github.com/gogo/protobuf/gogoproto"
|
|
|
|
grpc1 "github.com/gogo/protobuf/grpc"
|
|
|
|
proto "github.com/gogo/protobuf/proto"
|
|
|
|
grpc "google.golang.org/grpc"
|
|
|
|
codes "google.golang.org/grpc/codes"
|
|
|
|
status "google.golang.org/grpc/status"
|
|
|
|
io "io"
|
|
|
|
math "math"
|
|
|
|
math_bits "math/bits"
|
|
|
|
)
|
|
|
|
|
|
|
|
// Reference imports to suppress errors if they are not otherwise used.
|
|
|
|
var _ = proto.Marshal
|
|
|
|
var _ = fmt.Errorf
|
|
|
|
var _ = math.Inf
|
|
|
|
|
|
|
|
// This is a compile-time assertion to ensure that this generated file
|
|
|
|
// is compatible with the proto package it is being compiled against.
|
|
|
|
// A compilation error at this line likely means your copy of the
|
|
|
|
// proto package needs to be updated.
|
|
|
|
const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
|
|
|
|
|
2020-08-10 01:12:59 -07:00
|
|
|
// QueryBalanceRequest is the request type for the Query/Balance RPC method.
|
2020-06-05 11:10:04 -07:00
|
|
|
type QueryBalanceRequest struct {
|
2020-08-10 01:12:59 -07:00
|
|
|
// address is the address to query balances for.
|
2020-06-05 11:10:04 -07:00
|
|
|
Address github_com_cosmos_cosmos_sdk_types.AccAddress `protobuf:"bytes,1,opt,name=address,proto3,casttype=github.com/cosmos/cosmos-sdk/types.AccAddress" json:"address,omitempty"`
|
2020-08-10 01:12:59 -07:00
|
|
|
// denom is the coin denom to query balances for.
|
2020-06-05 11:10:04 -07:00
|
|
|
Denom string `protobuf:"bytes,2,opt,name=denom,proto3" json:"denom,omitempty"`
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *QueryBalanceRequest) Reset() { *m = QueryBalanceRequest{} }
|
|
|
|
func (m *QueryBalanceRequest) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*QueryBalanceRequest) ProtoMessage() {}
|
|
|
|
func (*QueryBalanceRequest) Descriptor() ([]byte, []int) {
|
2020-08-11 04:49:45 -07:00
|
|
|
return fileDescriptor_9c6fc1939682df13, []int{0}
|
2020-06-05 11:10:04 -07:00
|
|
|
}
|
|
|
|
func (m *QueryBalanceRequest) XXX_Unmarshal(b []byte) error {
|
|
|
|
return m.Unmarshal(b)
|
|
|
|
}
|
|
|
|
func (m *QueryBalanceRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
|
|
if deterministic {
|
|
|
|
return xxx_messageInfo_QueryBalanceRequest.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 *QueryBalanceRequest) XXX_Merge(src proto.Message) {
|
|
|
|
xxx_messageInfo_QueryBalanceRequest.Merge(m, src)
|
|
|
|
}
|
|
|
|
func (m *QueryBalanceRequest) XXX_Size() int {
|
|
|
|
return m.Size()
|
|
|
|
}
|
|
|
|
func (m *QueryBalanceRequest) XXX_DiscardUnknown() {
|
|
|
|
xxx_messageInfo_QueryBalanceRequest.DiscardUnknown(m)
|
|
|
|
}
|
|
|
|
|
|
|
|
var xxx_messageInfo_QueryBalanceRequest proto.InternalMessageInfo
|
|
|
|
|
|
|
|
func (m *QueryBalanceRequest) GetAddress() github_com_cosmos_cosmos_sdk_types.AccAddress {
|
|
|
|
if m != nil {
|
|
|
|
return m.Address
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *QueryBalanceRequest) GetDenom() string {
|
|
|
|
if m != nil {
|
|
|
|
return m.Denom
|
|
|
|
}
|
|
|
|
return ""
|
|
|
|
}
|
|
|
|
|
2020-08-10 01:12:59 -07:00
|
|
|
// QueryBalanceResponse is the response type for the Query/Balance RPC method.
|
2020-06-05 11:10:04 -07:00
|
|
|
type QueryBalanceResponse struct {
|
2020-08-10 01:12:59 -07:00
|
|
|
// balance is the balance of the coin.
|
2020-06-05 11:10:04 -07:00
|
|
|
Balance *types.Coin `protobuf:"bytes,1,opt,name=balance,proto3" json:"balance,omitempty"`
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *QueryBalanceResponse) Reset() { *m = QueryBalanceResponse{} }
|
|
|
|
func (m *QueryBalanceResponse) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*QueryBalanceResponse) ProtoMessage() {}
|
|
|
|
func (*QueryBalanceResponse) Descriptor() ([]byte, []int) {
|
2020-08-11 04:49:45 -07:00
|
|
|
return fileDescriptor_9c6fc1939682df13, []int{1}
|
2020-06-05 11:10:04 -07:00
|
|
|
}
|
|
|
|
func (m *QueryBalanceResponse) XXX_Unmarshal(b []byte) error {
|
|
|
|
return m.Unmarshal(b)
|
|
|
|
}
|
|
|
|
func (m *QueryBalanceResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
|
|
if deterministic {
|
|
|
|
return xxx_messageInfo_QueryBalanceResponse.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 *QueryBalanceResponse) XXX_Merge(src proto.Message) {
|
|
|
|
xxx_messageInfo_QueryBalanceResponse.Merge(m, src)
|
|
|
|
}
|
|
|
|
func (m *QueryBalanceResponse) XXX_Size() int {
|
|
|
|
return m.Size()
|
|
|
|
}
|
|
|
|
func (m *QueryBalanceResponse) XXX_DiscardUnknown() {
|
|
|
|
xxx_messageInfo_QueryBalanceResponse.DiscardUnknown(m)
|
|
|
|
}
|
|
|
|
|
|
|
|
var xxx_messageInfo_QueryBalanceResponse proto.InternalMessageInfo
|
|
|
|
|
|
|
|
func (m *QueryBalanceResponse) GetBalance() *types.Coin {
|
|
|
|
if m != nil {
|
|
|
|
return m.Balance
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
2020-08-10 01:12:59 -07:00
|
|
|
// QueryBalanceRequest is the request type for the Query/AllBalances RPC method.
|
2020-06-05 11:10:04 -07:00
|
|
|
type QueryAllBalancesRequest struct {
|
2020-08-10 01:12:59 -07:00
|
|
|
// address is the address to query balances for.
|
|
|
|
Address github_com_cosmos_cosmos_sdk_types.AccAddress `protobuf:"bytes,1,opt,name=address,proto3,casttype=github.com/cosmos/cosmos-sdk/types.AccAddress" json:"address,omitempty"`
|
|
|
|
// pagination defines an optional pagination for the request.
|
|
|
|
Pagination *query.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
|
2020-06-05 11:10:04 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
func (m *QueryAllBalancesRequest) Reset() { *m = QueryAllBalancesRequest{} }
|
|
|
|
func (m *QueryAllBalancesRequest) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*QueryAllBalancesRequest) ProtoMessage() {}
|
|
|
|
func (*QueryAllBalancesRequest) Descriptor() ([]byte, []int) {
|
2020-08-11 04:49:45 -07:00
|
|
|
return fileDescriptor_9c6fc1939682df13, []int{2}
|
2020-06-05 11:10:04 -07:00
|
|
|
}
|
|
|
|
func (m *QueryAllBalancesRequest) XXX_Unmarshal(b []byte) error {
|
|
|
|
return m.Unmarshal(b)
|
|
|
|
}
|
|
|
|
func (m *QueryAllBalancesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
|
|
if deterministic {
|
|
|
|
return xxx_messageInfo_QueryAllBalancesRequest.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 *QueryAllBalancesRequest) XXX_Merge(src proto.Message) {
|
|
|
|
xxx_messageInfo_QueryAllBalancesRequest.Merge(m, src)
|
|
|
|
}
|
|
|
|
func (m *QueryAllBalancesRequest) XXX_Size() int {
|
|
|
|
return m.Size()
|
|
|
|
}
|
|
|
|
func (m *QueryAllBalancesRequest) XXX_DiscardUnknown() {
|
|
|
|
xxx_messageInfo_QueryAllBalancesRequest.DiscardUnknown(m)
|
|
|
|
}
|
|
|
|
|
|
|
|
var xxx_messageInfo_QueryAllBalancesRequest proto.InternalMessageInfo
|
|
|
|
|
|
|
|
func (m *QueryAllBalancesRequest) GetAddress() github_com_cosmos_cosmos_sdk_types.AccAddress {
|
|
|
|
if m != nil {
|
|
|
|
return m.Address
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
2020-07-20 09:51:16 -07:00
|
|
|
func (m *QueryAllBalancesRequest) GetPagination() *query.PageRequest {
|
2020-06-20 16:44:04 -07:00
|
|
|
if m != nil {
|
2020-07-20 09:51:16 -07:00
|
|
|
return m.Pagination
|
2020-06-20 16:44:04 -07:00
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
2020-08-10 01:12:59 -07:00
|
|
|
// QueryAllBalancesResponse is the response type for the Query/AllBalances RPC method.
|
2020-06-05 11:10:04 -07:00
|
|
|
type QueryAllBalancesResponse struct {
|
2020-08-10 01:12:59 -07:00
|
|
|
// balances is the balances of all the coins.
|
|
|
|
Balances github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,1,rep,name=balances,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"balances"`
|
|
|
|
// pagination defines the pagination in the response.
|
|
|
|
Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
|
2020-06-05 11:10:04 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
func (m *QueryAllBalancesResponse) Reset() { *m = QueryAllBalancesResponse{} }
|
|
|
|
func (m *QueryAllBalancesResponse) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*QueryAllBalancesResponse) ProtoMessage() {}
|
|
|
|
func (*QueryAllBalancesResponse) Descriptor() ([]byte, []int) {
|
2020-08-11 04:49:45 -07:00
|
|
|
return fileDescriptor_9c6fc1939682df13, []int{3}
|
2020-06-05 11:10:04 -07:00
|
|
|
}
|
|
|
|
func (m *QueryAllBalancesResponse) XXX_Unmarshal(b []byte) error {
|
|
|
|
return m.Unmarshal(b)
|
|
|
|
}
|
|
|
|
func (m *QueryAllBalancesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
|
|
if deterministic {
|
|
|
|
return xxx_messageInfo_QueryAllBalancesResponse.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 *QueryAllBalancesResponse) XXX_Merge(src proto.Message) {
|
|
|
|
xxx_messageInfo_QueryAllBalancesResponse.Merge(m, src)
|
|
|
|
}
|
|
|
|
func (m *QueryAllBalancesResponse) XXX_Size() int {
|
|
|
|
return m.Size()
|
|
|
|
}
|
|
|
|
func (m *QueryAllBalancesResponse) XXX_DiscardUnknown() {
|
|
|
|
xxx_messageInfo_QueryAllBalancesResponse.DiscardUnknown(m)
|
|
|
|
}
|
|
|
|
|
|
|
|
var xxx_messageInfo_QueryAllBalancesResponse proto.InternalMessageInfo
|
|
|
|
|
|
|
|
func (m *QueryAllBalancesResponse) GetBalances() github_com_cosmos_cosmos_sdk_types.Coins {
|
|
|
|
if m != nil {
|
|
|
|
return m.Balances
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
2020-07-20 09:51:16 -07:00
|
|
|
func (m *QueryAllBalancesResponse) GetPagination() *query.PageResponse {
|
2020-06-20 16:44:04 -07:00
|
|
|
if m != nil {
|
2020-07-20 09:51:16 -07:00
|
|
|
return m.Pagination
|
2020-06-20 16:44:04 -07:00
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
2020-08-10 01:12:59 -07:00
|
|
|
// QueryTotalSupplyRequest is the request type for the Query/TotalSupply RPC method.
|
2020-06-05 11:10:04 -07:00
|
|
|
type QueryTotalSupplyRequest struct {
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *QueryTotalSupplyRequest) Reset() { *m = QueryTotalSupplyRequest{} }
|
|
|
|
func (m *QueryTotalSupplyRequest) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*QueryTotalSupplyRequest) ProtoMessage() {}
|
|
|
|
func (*QueryTotalSupplyRequest) Descriptor() ([]byte, []int) {
|
2020-08-11 04:49:45 -07:00
|
|
|
return fileDescriptor_9c6fc1939682df13, []int{4}
|
2020-06-05 11:10:04 -07:00
|
|
|
}
|
|
|
|
func (m *QueryTotalSupplyRequest) XXX_Unmarshal(b []byte) error {
|
|
|
|
return m.Unmarshal(b)
|
|
|
|
}
|
|
|
|
func (m *QueryTotalSupplyRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
|
|
if deterministic {
|
|
|
|
return xxx_messageInfo_QueryTotalSupplyRequest.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 *QueryTotalSupplyRequest) XXX_Merge(src proto.Message) {
|
|
|
|
xxx_messageInfo_QueryTotalSupplyRequest.Merge(m, src)
|
|
|
|
}
|
|
|
|
func (m *QueryTotalSupplyRequest) XXX_Size() int {
|
|
|
|
return m.Size()
|
|
|
|
}
|
|
|
|
func (m *QueryTotalSupplyRequest) XXX_DiscardUnknown() {
|
|
|
|
xxx_messageInfo_QueryTotalSupplyRequest.DiscardUnknown(m)
|
|
|
|
}
|
|
|
|
|
|
|
|
var xxx_messageInfo_QueryTotalSupplyRequest proto.InternalMessageInfo
|
|
|
|
|
2020-06-10 01:02:01 -07:00
|
|
|
// QueryTotalSupplyResponse is the response type for the Query/TotalSupply RPC method
|
2020-06-05 11:10:04 -07:00
|
|
|
type QueryTotalSupplyResponse struct {
|
|
|
|
// supply is the supply of the coins
|
|
|
|
Supply github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,1,rep,name=supply,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"supply"`
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *QueryTotalSupplyResponse) Reset() { *m = QueryTotalSupplyResponse{} }
|
|
|
|
func (m *QueryTotalSupplyResponse) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*QueryTotalSupplyResponse) ProtoMessage() {}
|
|
|
|
func (*QueryTotalSupplyResponse) Descriptor() ([]byte, []int) {
|
2020-08-11 04:49:45 -07:00
|
|
|
return fileDescriptor_9c6fc1939682df13, []int{5}
|
2020-06-05 11:10:04 -07:00
|
|
|
}
|
|
|
|
func (m *QueryTotalSupplyResponse) XXX_Unmarshal(b []byte) error {
|
|
|
|
return m.Unmarshal(b)
|
|
|
|
}
|
|
|
|
func (m *QueryTotalSupplyResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
|
|
if deterministic {
|
|
|
|
return xxx_messageInfo_QueryTotalSupplyResponse.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 *QueryTotalSupplyResponse) XXX_Merge(src proto.Message) {
|
|
|
|
xxx_messageInfo_QueryTotalSupplyResponse.Merge(m, src)
|
|
|
|
}
|
|
|
|
func (m *QueryTotalSupplyResponse) XXX_Size() int {
|
|
|
|
return m.Size()
|
|
|
|
}
|
|
|
|
func (m *QueryTotalSupplyResponse) XXX_DiscardUnknown() {
|
|
|
|
xxx_messageInfo_QueryTotalSupplyResponse.DiscardUnknown(m)
|
|
|
|
}
|
|
|
|
|
|
|
|
var xxx_messageInfo_QueryTotalSupplyResponse proto.InternalMessageInfo
|
|
|
|
|
|
|
|
func (m *QueryTotalSupplyResponse) GetSupply() github_com_cosmos_cosmos_sdk_types.Coins {
|
|
|
|
if m != nil {
|
|
|
|
return m.Supply
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
2020-08-10 01:12:59 -07:00
|
|
|
// QuerySupplyOfRequest is the request type for the Query/SupplyOf RPC method.
|
2020-06-05 11:10:04 -07:00
|
|
|
type QuerySupplyOfRequest struct {
|
2020-08-10 01:12:59 -07:00
|
|
|
// denom is the coin denom to query balances for.
|
2020-06-05 11:10:04 -07:00
|
|
|
Denom string `protobuf:"bytes,1,opt,name=denom,proto3" json:"denom,omitempty"`
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *QuerySupplyOfRequest) Reset() { *m = QuerySupplyOfRequest{} }
|
|
|
|
func (m *QuerySupplyOfRequest) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*QuerySupplyOfRequest) ProtoMessage() {}
|
|
|
|
func (*QuerySupplyOfRequest) Descriptor() ([]byte, []int) {
|
2020-08-11 04:49:45 -07:00
|
|
|
return fileDescriptor_9c6fc1939682df13, []int{6}
|
2020-06-05 11:10:04 -07:00
|
|
|
}
|
|
|
|
func (m *QuerySupplyOfRequest) XXX_Unmarshal(b []byte) error {
|
|
|
|
return m.Unmarshal(b)
|
|
|
|
}
|
|
|
|
func (m *QuerySupplyOfRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
|
|
if deterministic {
|
|
|
|
return xxx_messageInfo_QuerySupplyOfRequest.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 *QuerySupplyOfRequest) XXX_Merge(src proto.Message) {
|
|
|
|
xxx_messageInfo_QuerySupplyOfRequest.Merge(m, src)
|
|
|
|
}
|
|
|
|
func (m *QuerySupplyOfRequest) XXX_Size() int {
|
|
|
|
return m.Size()
|
|
|
|
}
|
|
|
|
func (m *QuerySupplyOfRequest) XXX_DiscardUnknown() {
|
|
|
|
xxx_messageInfo_QuerySupplyOfRequest.DiscardUnknown(m)
|
|
|
|
}
|
|
|
|
|
|
|
|
var xxx_messageInfo_QuerySupplyOfRequest proto.InternalMessageInfo
|
|
|
|
|
|
|
|
func (m *QuerySupplyOfRequest) GetDenom() string {
|
|
|
|
if m != nil {
|
|
|
|
return m.Denom
|
|
|
|
}
|
|
|
|
return ""
|
|
|
|
}
|
|
|
|
|
2020-08-10 01:12:59 -07:00
|
|
|
// QuerySupplyOfResponse is the response type for the Query/SupplyOf RPC method.
|
2020-06-05 11:10:04 -07:00
|
|
|
type QuerySupplyOfResponse struct {
|
2020-08-10 01:12:59 -07:00
|
|
|
// amount is the supply of the coin.
|
2020-08-12 08:48:22 -07:00
|
|
|
Amount types.Coin `protobuf:"bytes,1,opt,name=amount,proto3" json:"amount"`
|
2020-06-05 11:10:04 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
func (m *QuerySupplyOfResponse) Reset() { *m = QuerySupplyOfResponse{} }
|
|
|
|
func (m *QuerySupplyOfResponse) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*QuerySupplyOfResponse) ProtoMessage() {}
|
|
|
|
func (*QuerySupplyOfResponse) Descriptor() ([]byte, []int) {
|
2020-08-11 04:49:45 -07:00
|
|
|
return fileDescriptor_9c6fc1939682df13, []int{7}
|
2020-06-05 11:10:04 -07:00
|
|
|
}
|
|
|
|
func (m *QuerySupplyOfResponse) XXX_Unmarshal(b []byte) error {
|
|
|
|
return m.Unmarshal(b)
|
|
|
|
}
|
|
|
|
func (m *QuerySupplyOfResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
|
|
if deterministic {
|
|
|
|
return xxx_messageInfo_QuerySupplyOfResponse.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 *QuerySupplyOfResponse) XXX_Merge(src proto.Message) {
|
|
|
|
xxx_messageInfo_QuerySupplyOfResponse.Merge(m, src)
|
|
|
|
}
|
|
|
|
func (m *QuerySupplyOfResponse) XXX_Size() int {
|
|
|
|
return m.Size()
|
|
|
|
}
|
|
|
|
func (m *QuerySupplyOfResponse) XXX_DiscardUnknown() {
|
|
|
|
xxx_messageInfo_QuerySupplyOfResponse.DiscardUnknown(m)
|
|
|
|
}
|
|
|
|
|
|
|
|
var xxx_messageInfo_QuerySupplyOfResponse proto.InternalMessageInfo
|
|
|
|
|
2020-08-12 08:48:22 -07:00
|
|
|
func (m *QuerySupplyOfResponse) GetAmount() types.Coin {
|
|
|
|
if m != nil {
|
|
|
|
return m.Amount
|
|
|
|
}
|
|
|
|
return types.Coin{}
|
|
|
|
}
|
|
|
|
|
2020-06-05 11:10:04 -07:00
|
|
|
func init() {
|
2020-08-11 04:49:45 -07:00
|
|
|
proto.RegisterType((*QueryBalanceRequest)(nil), "cosmos.bank.v1beta1.QueryBalanceRequest")
|
|
|
|
proto.RegisterType((*QueryBalanceResponse)(nil), "cosmos.bank.v1beta1.QueryBalanceResponse")
|
|
|
|
proto.RegisterType((*QueryAllBalancesRequest)(nil), "cosmos.bank.v1beta1.QueryAllBalancesRequest")
|
|
|
|
proto.RegisterType((*QueryAllBalancesResponse)(nil), "cosmos.bank.v1beta1.QueryAllBalancesResponse")
|
|
|
|
proto.RegisterType((*QueryTotalSupplyRequest)(nil), "cosmos.bank.v1beta1.QueryTotalSupplyRequest")
|
|
|
|
proto.RegisterType((*QueryTotalSupplyResponse)(nil), "cosmos.bank.v1beta1.QueryTotalSupplyResponse")
|
|
|
|
proto.RegisterType((*QuerySupplyOfRequest)(nil), "cosmos.bank.v1beta1.QuerySupplyOfRequest")
|
|
|
|
proto.RegisterType((*QuerySupplyOfResponse)(nil), "cosmos.bank.v1beta1.QuerySupplyOfResponse")
|
|
|
|
}
|
|
|
|
|
|
|
|
func init() { proto.RegisterFile("cosmos/bank/v1beta1/query.proto", fileDescriptor_9c6fc1939682df13) }
|
|
|
|
|
|
|
|
var fileDescriptor_9c6fc1939682df13 = []byte{
|
2020-08-12 08:48:22 -07:00
|
|
|
// 536 bytes of a gzipped FileDescriptorProto
|
|
|
|
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x54, 0xb1, 0x72, 0xd3, 0x40,
|
|
|
|
0x10, 0x95, 0x08, 0x89, 0xc3, 0x9a, 0xea, 0x62, 0x06, 0x47, 0x85, 0x9c, 0x51, 0x01, 0x4e, 0x26,
|
|
|
|
0x3e, 0x61, 0xa7, 0xa0, 0xb6, 0x32, 0x03, 0x45, 0x0a, 0x82, 0xa0, 0xa2, 0xe2, 0x24, 0x1f, 0x42,
|
|
|
|
0x13, 0x59, 0xa7, 0xf8, 0x24, 0x26, 0xae, 0xf8, 0x05, 0xbe, 0x23, 0x05, 0xdf, 0x91, 0x82, 0x22,
|
|
|
|
0x25, 0x55, 0x60, 0xec, 0xbf, 0xa0, 0x62, 0xa4, 0xbb, 0x13, 0x72, 0x6c, 0x14, 0x37, 0xa9, 0x2c,
|
|
|
|
0x9f, 0xde, 0xbe, 0xdd, 0xf7, 0xf6, 0x9d, 0xa0, 0xe3, 0x33, 0x3e, 0x66, 0xdc, 0xf6, 0x48, 0x7c,
|
|
|
|
0x66, 0x7f, 0xe9, 0x7b, 0x34, 0x25, 0x7d, 0xfb, 0x3c, 0xa3, 0x93, 0x29, 0x4e, 0x26, 0x2c, 0x65,
|
|
|
|
0x68, 0x47, 0x00, 0x70, 0x0e, 0xc0, 0x12, 0x60, 0x1c, 0x94, 0x55, 0x9c, 0x0a, 0x74, 0x59, 0x9b,
|
|
|
|
0x90, 0x20, 0x8c, 0x49, 0x1a, 0xb2, 0x58, 0x10, 0x18, 0xad, 0x80, 0x05, 0xac, 0x78, 0xb4, 0xf3,
|
|
|
|
0x27, 0x79, 0x6a, 0x56, 0x19, 0x54, 0xad, 0xcf, 0x42, 0x59, 0x65, 0x5d, 0xc0, 0xce, 0xdb, 0x9c,
|
|
|
|
0xd7, 0x21, 0x11, 0x89, 0x7d, 0xea, 0xd2, 0xf3, 0x8c, 0xf2, 0x14, 0x9d, 0x40, 0x83, 0x8c, 0x46,
|
|
|
|
0x13, 0xca, 0x79, 0x5b, 0xdf, 0xd3, 0xbb, 0x8f, 0x9d, 0xfe, 0x9f, 0x9b, 0x4e, 0x2f, 0x08, 0xd3,
|
|
|
|
0xcf, 0x99, 0x87, 0x7d, 0x36, 0xb6, 0x25, 0xad, 0xf8, 0xe9, 0xf1, 0xd1, 0x99, 0x9d, 0x4e, 0x13,
|
|
|
|
0xca, 0xf1, 0xd0, 0xf7, 0x87, 0xa2, 0xd0, 0x55, 0x0c, 0xa8, 0x05, 0x9b, 0x23, 0x1a, 0xb3, 0x71,
|
|
|
|
0xfb, 0xc1, 0x9e, 0xde, 0x7d, 0xe4, 0x8a, 0x3f, 0xd6, 0x09, 0xb4, 0x16, 0x3b, 0xf3, 0x84, 0xc5,
|
|
|
|
0x9c, 0xa2, 0x23, 0x68, 0x78, 0xe2, 0xa8, 0x68, 0xdd, 0x1c, 0xec, 0xe2, 0xd2, 0x1a, 0x4e, 0x95,
|
|
|
|
0x35, 0xf8, 0x98, 0x85, 0xb1, 0xab, 0x90, 0xd6, 0x77, 0x1d, 0x9e, 0x16, 0x6c, 0xc3, 0x28, 0x92,
|
|
|
|
0x84, 0xfc, 0x5e, 0xb4, 0xbc, 0x02, 0xf8, 0xe7, 0x7c, 0x21, 0xa8, 0x39, 0x78, 0xb6, 0x30, 0xa0,
|
|
|
|
0x58, 0xaa, 0x1a, 0xf3, 0x94, 0x04, 0xca, 0x54, 0xb7, 0x52, 0x69, 0xfd, 0xd0, 0xa1, 0xbd, 0x3c,
|
|
|
|
0xb0, 0xb4, 0x20, 0x80, 0x6d, 0x29, 0x2c, 0x1f, 0x79, 0xa3, 0xd6, 0x03, 0xe7, 0xc5, 0xd5, 0x4d,
|
|
|
|
0x47, 0xbb, 0xfc, 0xd5, 0xe9, 0xae, 0xa1, 0x28, 0x2f, 0xe0, 0x6e, 0x49, 0x8e, 0x5e, 0xaf, 0x50,
|
|
|
|
0xf3, 0xfc, 0x4e, 0x35, 0x62, 0xca, 0x05, 0x39, 0xbb, 0xd2, 0xfe, 0xf7, 0x2c, 0x25, 0xd1, 0xbb,
|
|
|
|
0x2c, 0x49, 0xa2, 0xa9, 0x54, 0x6d, 0x7d, 0x95, 0x42, 0x17, 0x5e, 0x49, 0xa1, 0x3e, 0x6c, 0xf1,
|
|
|
|
0xe2, 0xe4, 0x3e, 0x64, 0x4a, 0x6a, 0xeb, 0x50, 0x06, 0x4d, 0xf4, 0x7e, 0xf3, 0x49, 0xe5, 0xa2,
|
|
|
|
0x8c, 0xa5, 0x5e, 0x8d, 0xe5, 0x29, 0x3c, 0xb9, 0x85, 0x96, 0xb3, 0xbe, 0x84, 0x2d, 0x32, 0x66,
|
|
|
|
0x59, 0x9c, 0xde, 0x19, 0x4b, 0xe7, 0x61, 0x3e, 0xab, 0x2b, 0xe1, 0x83, 0xcb, 0x0d, 0xd8, 0x2c,
|
|
|
|
0x28, 0xd1, 0x47, 0x68, 0xc8, 0x5d, 0xa3, 0x2e, 0x5e, 0x71, 0xdf, 0xf1, 0x8a, 0xab, 0x68, 0xec,
|
|
|
|
0xaf, 0x81, 0x14, 0x23, 0x5a, 0x1a, 0x8a, 0xa0, 0x59, 0x09, 0x14, 0x3a, 0xfc, 0x7f, 0xed, 0xf2,
|
|
|
|
0x45, 0x31, 0x7a, 0x6b, 0xa2, 0xab, 0xdd, 0x2a, 0x5b, 0xad, 0xeb, 0xb6, 0x9c, 0x8b, 0xba, 0x6e,
|
|
|
|
0x2b, 0xa2, 0x62, 0x69, 0xc8, 0x87, 0x6d, 0xb5, 0x14, 0x54, 0x63, 0xca, 0xad, 0x35, 0x1b, 0x07,
|
|
|
|
0xeb, 0x40, 0x55, 0x13, 0xe7, 0xf8, 0x6a, 0x66, 0xea, 0xd7, 0x33, 0x53, 0xff, 0x3d, 0x33, 0xf5,
|
|
|
|
0x6f, 0x73, 0x53, 0xbb, 0x9e, 0x9b, 0xda, 0xcf, 0xb9, 0xa9, 0x7d, 0xd8, 0xaf, 0x0d, 0xde, 0x85,
|
|
|
|
0xf8, 0xb2, 0x17, 0xf9, 0xf3, 0xb6, 0x8a, 0x6f, 0xeb, 0xd1, 0xdf, 0x00, 0x00, 0x00, 0xff, 0xff,
|
|
|
|
0x68, 0x7f, 0xc7, 0xdd, 0xf5, 0x05, 0x00, 0x00,
|
2020-06-05 11:10:04 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
// Reference imports to suppress errors if they are not otherwise used.
|
|
|
|
var _ context.Context
|
|
|
|
var _ grpc.ClientConn
|
|
|
|
|
|
|
|
// This is a compile-time assertion to ensure that this generated file
|
|
|
|
// is compatible with the grpc package it is being compiled against.
|
|
|
|
const _ = grpc.SupportPackageIsVersion4
|
|
|
|
|
|
|
|
// QueryClient is the client API for Query service.
|
|
|
|
//
|
|
|
|
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
|
|
|
|
type QueryClient interface {
|
2020-08-10 01:12:59 -07:00
|
|
|
// Balance queries the balance of a single coin for a single account.
|
2020-06-05 11:10:04 -07:00
|
|
|
Balance(ctx context.Context, in *QueryBalanceRequest, opts ...grpc.CallOption) (*QueryBalanceResponse, error)
|
2020-08-10 01:12:59 -07:00
|
|
|
// AllBalances queries the balance of all coins for a single account.
|
2020-06-05 11:10:04 -07:00
|
|
|
AllBalances(ctx context.Context, in *QueryAllBalancesRequest, opts ...grpc.CallOption) (*QueryAllBalancesResponse, error)
|
2020-08-10 01:12:59 -07:00
|
|
|
// TotalSupply queries the total supply of all coins.
|
2020-06-05 11:10:04 -07:00
|
|
|
TotalSupply(ctx context.Context, in *QueryTotalSupplyRequest, opts ...grpc.CallOption) (*QueryTotalSupplyResponse, error)
|
2020-08-10 01:12:59 -07:00
|
|
|
// SupplyOf queries the supply of a single coin.
|
2020-06-05 11:10:04 -07:00
|
|
|
SupplyOf(ctx context.Context, in *QuerySupplyOfRequest, opts ...grpc.CallOption) (*QuerySupplyOfResponse, error)
|
|
|
|
}
|
|
|
|
|
|
|
|
type queryClient struct {
|
|
|
|
cc grpc1.ClientConn
|
|
|
|
}
|
|
|
|
|
|
|
|
func NewQueryClient(cc grpc1.ClientConn) QueryClient {
|
|
|
|
return &queryClient{cc}
|
|
|
|
}
|
|
|
|
|
|
|
|
func (c *queryClient) Balance(ctx context.Context, in *QueryBalanceRequest, opts ...grpc.CallOption) (*QueryBalanceResponse, error) {
|
|
|
|
out := new(QueryBalanceResponse)
|
2020-08-11 04:49:45 -07:00
|
|
|
err := c.cc.Invoke(ctx, "/cosmos.bank.v1beta1.Query/Balance", in, out, opts...)
|
2020-06-05 11:10:04 -07:00
|
|
|
if err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
return out, nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (c *queryClient) AllBalances(ctx context.Context, in *QueryAllBalancesRequest, opts ...grpc.CallOption) (*QueryAllBalancesResponse, error) {
|
|
|
|
out := new(QueryAllBalancesResponse)
|
2020-08-11 04:49:45 -07:00
|
|
|
err := c.cc.Invoke(ctx, "/cosmos.bank.v1beta1.Query/AllBalances", in, out, opts...)
|
2020-06-05 11:10:04 -07:00
|
|
|
if err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
return out, nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (c *queryClient) TotalSupply(ctx context.Context, in *QueryTotalSupplyRequest, opts ...grpc.CallOption) (*QueryTotalSupplyResponse, error) {
|
|
|
|
out := new(QueryTotalSupplyResponse)
|
2020-08-11 04:49:45 -07:00
|
|
|
err := c.cc.Invoke(ctx, "/cosmos.bank.v1beta1.Query/TotalSupply", in, out, opts...)
|
2020-06-05 11:10:04 -07:00
|
|
|
if err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
return out, nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (c *queryClient) SupplyOf(ctx context.Context, in *QuerySupplyOfRequest, opts ...grpc.CallOption) (*QuerySupplyOfResponse, error) {
|
|
|
|
out := new(QuerySupplyOfResponse)
|
2020-08-11 04:49:45 -07:00
|
|
|
err := c.cc.Invoke(ctx, "/cosmos.bank.v1beta1.Query/SupplyOf", in, out, opts...)
|
2020-06-05 11:10:04 -07:00
|
|
|
if err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
return out, nil
|
|
|
|
}
|
|
|
|
|
|
|
|
// QueryServer is the server API for Query service.
|
|
|
|
type QueryServer interface {
|
2020-08-10 01:12:59 -07:00
|
|
|
// Balance queries the balance of a single coin for a single account.
|
2020-06-05 11:10:04 -07:00
|
|
|
Balance(context.Context, *QueryBalanceRequest) (*QueryBalanceResponse, error)
|
2020-08-10 01:12:59 -07:00
|
|
|
// AllBalances queries the balance of all coins for a single account.
|
2020-06-05 11:10:04 -07:00
|
|
|
AllBalances(context.Context, *QueryAllBalancesRequest) (*QueryAllBalancesResponse, error)
|
2020-08-10 01:12:59 -07:00
|
|
|
// TotalSupply queries the total supply of all coins.
|
2020-06-05 11:10:04 -07:00
|
|
|
TotalSupply(context.Context, *QueryTotalSupplyRequest) (*QueryTotalSupplyResponse, error)
|
2020-08-10 01:12:59 -07:00
|
|
|
// SupplyOf queries the supply of a single coin.
|
2020-06-05 11:10:04 -07:00
|
|
|
SupplyOf(context.Context, *QuerySupplyOfRequest) (*QuerySupplyOfResponse, error)
|
|
|
|
}
|
|
|
|
|
|
|
|
// UnimplementedQueryServer can be embedded to have forward compatible implementations.
|
|
|
|
type UnimplementedQueryServer struct {
|
|
|
|
}
|
|
|
|
|
|
|
|
func (*UnimplementedQueryServer) Balance(ctx context.Context, req *QueryBalanceRequest) (*QueryBalanceResponse, error) {
|
|
|
|
return nil, status.Errorf(codes.Unimplemented, "method Balance not implemented")
|
|
|
|
}
|
|
|
|
func (*UnimplementedQueryServer) AllBalances(ctx context.Context, req *QueryAllBalancesRequest) (*QueryAllBalancesResponse, error) {
|
|
|
|
return nil, status.Errorf(codes.Unimplemented, "method AllBalances not implemented")
|
|
|
|
}
|
|
|
|
func (*UnimplementedQueryServer) TotalSupply(ctx context.Context, req *QueryTotalSupplyRequest) (*QueryTotalSupplyResponse, error) {
|
|
|
|
return nil, status.Errorf(codes.Unimplemented, "method TotalSupply not implemented")
|
|
|
|
}
|
|
|
|
func (*UnimplementedQueryServer) SupplyOf(ctx context.Context, req *QuerySupplyOfRequest) (*QuerySupplyOfResponse, error) {
|
|
|
|
return nil, status.Errorf(codes.Unimplemented, "method SupplyOf not implemented")
|
|
|
|
}
|
|
|
|
|
|
|
|
func RegisterQueryServer(s grpc1.Server, srv QueryServer) {
|
|
|
|
s.RegisterService(&_Query_serviceDesc, srv)
|
|
|
|
}
|
|
|
|
|
|
|
|
func _Query_Balance_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
|
|
in := new(QueryBalanceRequest)
|
|
|
|
if err := dec(in); err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
if interceptor == nil {
|
|
|
|
return srv.(QueryServer).Balance(ctx, in)
|
|
|
|
}
|
|
|
|
info := &grpc.UnaryServerInfo{
|
|
|
|
Server: srv,
|
2020-08-11 04:49:45 -07:00
|
|
|
FullMethod: "/cosmos.bank.v1beta1.Query/Balance",
|
2020-06-05 11:10:04 -07:00
|
|
|
}
|
|
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
|
|
return srv.(QueryServer).Balance(ctx, req.(*QueryBalanceRequest))
|
|
|
|
}
|
|
|
|
return interceptor(ctx, in, info, handler)
|
|
|
|
}
|
|
|
|
|
|
|
|
func _Query_AllBalances_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
|
|
in := new(QueryAllBalancesRequest)
|
|
|
|
if err := dec(in); err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
if interceptor == nil {
|
|
|
|
return srv.(QueryServer).AllBalances(ctx, in)
|
|
|
|
}
|
|
|
|
info := &grpc.UnaryServerInfo{
|
|
|
|
Server: srv,
|
2020-08-11 04:49:45 -07:00
|
|
|
FullMethod: "/cosmos.bank.v1beta1.Query/AllBalances",
|
2020-06-05 11:10:04 -07:00
|
|
|
}
|
|
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
|
|
return srv.(QueryServer).AllBalances(ctx, req.(*QueryAllBalancesRequest))
|
|
|
|
}
|
|
|
|
return interceptor(ctx, in, info, handler)
|
|
|
|
}
|
|
|
|
|
|
|
|
func _Query_TotalSupply_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
|
|
in := new(QueryTotalSupplyRequest)
|
|
|
|
if err := dec(in); err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
if interceptor == nil {
|
|
|
|
return srv.(QueryServer).TotalSupply(ctx, in)
|
|
|
|
}
|
|
|
|
info := &grpc.UnaryServerInfo{
|
|
|
|
Server: srv,
|
2020-08-11 04:49:45 -07:00
|
|
|
FullMethod: "/cosmos.bank.v1beta1.Query/TotalSupply",
|
2020-06-05 11:10:04 -07:00
|
|
|
}
|
|
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
|
|
return srv.(QueryServer).TotalSupply(ctx, req.(*QueryTotalSupplyRequest))
|
|
|
|
}
|
|
|
|
return interceptor(ctx, in, info, handler)
|
|
|
|
}
|
|
|
|
|
|
|
|
func _Query_SupplyOf_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
|
|
in := new(QuerySupplyOfRequest)
|
|
|
|
if err := dec(in); err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
if interceptor == nil {
|
|
|
|
return srv.(QueryServer).SupplyOf(ctx, in)
|
|
|
|
}
|
|
|
|
info := &grpc.UnaryServerInfo{
|
|
|
|
Server: srv,
|
2020-08-11 04:49:45 -07:00
|
|
|
FullMethod: "/cosmos.bank.v1beta1.Query/SupplyOf",
|
2020-06-05 11:10:04 -07:00
|
|
|
}
|
|
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
|
|
return srv.(QueryServer).SupplyOf(ctx, req.(*QuerySupplyOfRequest))
|
|
|
|
}
|
|
|
|
return interceptor(ctx, in, info, handler)
|
|
|
|
}
|
|
|
|
|
|
|
|
var _Query_serviceDesc = grpc.ServiceDesc{
|
2020-08-11 04:49:45 -07:00
|
|
|
ServiceName: "cosmos.bank.v1beta1.Query",
|
2020-06-05 11:10:04 -07:00
|
|
|
HandlerType: (*QueryServer)(nil),
|
|
|
|
Methods: []grpc.MethodDesc{
|
|
|
|
{
|
|
|
|
MethodName: "Balance",
|
|
|
|
Handler: _Query_Balance_Handler,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
MethodName: "AllBalances",
|
|
|
|
Handler: _Query_AllBalances_Handler,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
MethodName: "TotalSupply",
|
|
|
|
Handler: _Query_TotalSupply_Handler,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
MethodName: "SupplyOf",
|
|
|
|
Handler: _Query_SupplyOf_Handler,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
Streams: []grpc.StreamDesc{},
|
2020-08-11 04:49:45 -07:00
|
|
|
Metadata: "cosmos/bank/v1beta1/query.proto",
|
2020-06-05 11:10:04 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
func (m *QueryBalanceRequest) 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 *QueryBalanceRequest) MarshalTo(dAtA []byte) (int, error) {
|
|
|
|
size := m.Size()
|
|
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *QueryBalanceRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|
|
|
i := len(dAtA)
|
|
|
|
_ = i
|
|
|
|
var l int
|
|
|
|
_ = l
|
|
|
|
if len(m.Denom) > 0 {
|
|
|
|
i -= len(m.Denom)
|
|
|
|
copy(dAtA[i:], m.Denom)
|
|
|
|
i = encodeVarintQuery(dAtA, i, uint64(len(m.Denom)))
|
|
|
|
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 *QueryBalanceResponse) 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 *QueryBalanceResponse) MarshalTo(dAtA []byte) (int, error) {
|
|
|
|
size := m.Size()
|
|
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *QueryBalanceResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|
|
|
i := len(dAtA)
|
|
|
|
_ = i
|
|
|
|
var l int
|
|
|
|
_ = l
|
|
|
|
if m.Balance != nil {
|
|
|
|
{
|
|
|
|
size, err := m.Balance.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 *QueryAllBalancesRequest) 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 *QueryAllBalancesRequest) MarshalTo(dAtA []byte) (int, error) {
|
|
|
|
size := m.Size()
|
|
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *QueryAllBalancesRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|
|
|
i := len(dAtA)
|
|
|
|
_ = i
|
|
|
|
var l int
|
|
|
|
_ = l
|
2020-07-20 09:51:16 -07:00
|
|
|
if m.Pagination != nil {
|
2020-06-20 16:44:04 -07:00
|
|
|
{
|
2020-07-20 09:51:16 -07:00
|
|
|
size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i])
|
2020-06-20 16:44:04 -07:00
|
|
|
if err != nil {
|
|
|
|
return 0, err
|
|
|
|
}
|
|
|
|
i -= size
|
|
|
|
i = encodeVarintQuery(dAtA, i, uint64(size))
|
|
|
|
}
|
|
|
|
i--
|
|
|
|
dAtA[i] = 0x12
|
|
|
|
}
|
2020-06-05 11:10:04 -07:00
|
|
|
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 *QueryAllBalancesResponse) 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 *QueryAllBalancesResponse) MarshalTo(dAtA []byte) (int, error) {
|
|
|
|
size := m.Size()
|
|
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *QueryAllBalancesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|
|
|
i := len(dAtA)
|
|
|
|
_ = i
|
|
|
|
var l int
|
|
|
|
_ = l
|
2020-07-20 09:51:16 -07:00
|
|
|
if m.Pagination != nil {
|
2020-06-20 16:44:04 -07:00
|
|
|
{
|
2020-07-20 09:51:16 -07:00
|
|
|
size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i])
|
2020-06-20 16:44:04 -07:00
|
|
|
if err != nil {
|
|
|
|
return 0, err
|
|
|
|
}
|
|
|
|
i -= size
|
|
|
|
i = encodeVarintQuery(dAtA, i, uint64(size))
|
|
|
|
}
|
|
|
|
i--
|
|
|
|
dAtA[i] = 0x12
|
|
|
|
}
|
2020-06-05 11:10:04 -07:00
|
|
|
if len(m.Balances) > 0 {
|
|
|
|
for iNdEx := len(m.Balances) - 1; iNdEx >= 0; iNdEx-- {
|
|
|
|
{
|
|
|
|
size, err := m.Balances[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 *QueryTotalSupplyRequest) 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 *QueryTotalSupplyRequest) MarshalTo(dAtA []byte) (int, error) {
|
|
|
|
size := m.Size()
|
|
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *QueryTotalSupplyRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|
|
|
i := len(dAtA)
|
|
|
|
_ = i
|
|
|
|
var l int
|
|
|
|
_ = l
|
|
|
|
return len(dAtA) - i, nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *QueryTotalSupplyResponse) 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 *QueryTotalSupplyResponse) MarshalTo(dAtA []byte) (int, error) {
|
|
|
|
size := m.Size()
|
|
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *QueryTotalSupplyResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|
|
|
i := len(dAtA)
|
|
|
|
_ = i
|
|
|
|
var l int
|
|
|
|
_ = l
|
|
|
|
if len(m.Supply) > 0 {
|
|
|
|
for iNdEx := len(m.Supply) - 1; iNdEx >= 0; iNdEx-- {
|
|
|
|
{
|
|
|
|
size, err := m.Supply[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 *QuerySupplyOfRequest) 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 *QuerySupplyOfRequest) MarshalTo(dAtA []byte) (int, error) {
|
|
|
|
size := m.Size()
|
|
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *QuerySupplyOfRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|
|
|
i := len(dAtA)
|
|
|
|
_ = i
|
|
|
|
var l int
|
|
|
|
_ = l
|
|
|
|
if len(m.Denom) > 0 {
|
|
|
|
i -= len(m.Denom)
|
|
|
|
copy(dAtA[i:], m.Denom)
|
|
|
|
i = encodeVarintQuery(dAtA, i, uint64(len(m.Denom)))
|
|
|
|
i--
|
|
|
|
dAtA[i] = 0xa
|
|
|
|
}
|
|
|
|
return len(dAtA) - i, nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *QuerySupplyOfResponse) 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 *QuerySupplyOfResponse) MarshalTo(dAtA []byte) (int, error) {
|
|
|
|
size := m.Size()
|
|
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *QuerySupplyOfResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|
|
|
i := len(dAtA)
|
|
|
|
_ = i
|
|
|
|
var l int
|
|
|
|
_ = l
|
|
|
|
{
|
2020-08-12 08:48:22 -07:00
|
|
|
size, err := m.Amount.MarshalToSizedBuffer(dAtA[:i])
|
|
|
|
if err != nil {
|
2020-06-05 11:10:04 -07:00
|
|
|
return 0, err
|
|
|
|
}
|
2020-08-12 08:48:22 -07:00
|
|
|
i -= size
|
2020-06-05 11:10:04 -07:00
|
|
|
i = encodeVarintQuery(dAtA, i, uint64(size))
|
|
|
|
}
|
|
|
|
i--
|
|
|
|
dAtA[i] = 0xa
|
|
|
|
return len(dAtA) - i, nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func encodeVarintQuery(dAtA []byte, offset int, v uint64) int {
|
|
|
|
offset -= sovQuery(v)
|
|
|
|
base := offset
|
|
|
|
for v >= 1<<7 {
|
|
|
|
dAtA[offset] = uint8(v&0x7f | 0x80)
|
|
|
|
v >>= 7
|
|
|
|
offset++
|
|
|
|
}
|
|
|
|
dAtA[offset] = uint8(v)
|
|
|
|
return base
|
|
|
|
}
|
|
|
|
func (m *QueryBalanceRequest) 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 = len(m.Denom)
|
|
|
|
if l > 0 {
|
|
|
|
n += 1 + l + sovQuery(uint64(l))
|
|
|
|
}
|
|
|
|
return n
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *QueryBalanceResponse) Size() (n int) {
|
|
|
|
if m == nil {
|
|
|
|
return 0
|
|
|
|
}
|
|
|
|
var l int
|
|
|
|
_ = l
|
|
|
|
if m.Balance != nil {
|
|
|
|
l = m.Balance.Size()
|
|
|
|
n += 1 + l + sovQuery(uint64(l))
|
|
|
|
}
|
|
|
|
return n
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *QueryAllBalancesRequest) 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))
|
|
|
|
}
|
2020-07-20 09:51:16 -07:00
|
|
|
if m.Pagination != nil {
|
|
|
|
l = m.Pagination.Size()
|
2020-06-20 16:44:04 -07:00
|
|
|
n += 1 + l + sovQuery(uint64(l))
|
|
|
|
}
|
2020-06-05 11:10:04 -07:00
|
|
|
return n
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *QueryAllBalancesResponse) Size() (n int) {
|
|
|
|
if m == nil {
|
|
|
|
return 0
|
|
|
|
}
|
|
|
|
var l int
|
|
|
|
_ = l
|
|
|
|
if len(m.Balances) > 0 {
|
|
|
|
for _, e := range m.Balances {
|
|
|
|
l = e.Size()
|
|
|
|
n += 1 + l + sovQuery(uint64(l))
|
|
|
|
}
|
|
|
|
}
|
2020-07-20 09:51:16 -07:00
|
|
|
if m.Pagination != nil {
|
|
|
|
l = m.Pagination.Size()
|
2020-06-20 16:44:04 -07:00
|
|
|
n += 1 + l + sovQuery(uint64(l))
|
|
|
|
}
|
2020-06-05 11:10:04 -07:00
|
|
|
return n
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *QueryTotalSupplyRequest) Size() (n int) {
|
|
|
|
if m == nil {
|
|
|
|
return 0
|
|
|
|
}
|
|
|
|
var l int
|
|
|
|
_ = l
|
|
|
|
return n
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *QueryTotalSupplyResponse) Size() (n int) {
|
|
|
|
if m == nil {
|
|
|
|
return 0
|
|
|
|
}
|
|
|
|
var l int
|
|
|
|
_ = l
|
|
|
|
if len(m.Supply) > 0 {
|
|
|
|
for _, e := range m.Supply {
|
|
|
|
l = e.Size()
|
|
|
|
n += 1 + l + sovQuery(uint64(l))
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return n
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *QuerySupplyOfRequest) Size() (n int) {
|
|
|
|
if m == nil {
|
|
|
|
return 0
|
|
|
|
}
|
|
|
|
var l int
|
|
|
|
_ = l
|
|
|
|
l = len(m.Denom)
|
|
|
|
if l > 0 {
|
|
|
|
n += 1 + l + sovQuery(uint64(l))
|
|
|
|
}
|
|
|
|
return n
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *QuerySupplyOfResponse) Size() (n int) {
|
|
|
|
if m == nil {
|
|
|
|
return 0
|
|
|
|
}
|
|
|
|
var l int
|
|
|
|
_ = l
|
|
|
|
l = m.Amount.Size()
|
|
|
|
n += 1 + l + sovQuery(uint64(l))
|
|
|
|
return n
|
|
|
|
}
|
|
|
|
|
|
|
|
func sovQuery(x uint64) (n int) {
|
|
|
|
return (math_bits.Len64(x|1) + 6) / 7
|
|
|
|
}
|
|
|
|
func sozQuery(x uint64) (n int) {
|
|
|
|
return sovQuery(uint64((x << 1) ^ uint64((int64(x) >> 63))))
|
|
|
|
}
|
|
|
|
func (m *QueryBalanceRequest) 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: QueryBalanceRequest: wiretype end group for non-group")
|
|
|
|
}
|
|
|
|
if fieldNum <= 0 {
|
|
|
|
return fmt.Errorf("proto: QueryBalanceRequest: 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 byteLen int
|
|
|
|
for shift := uint(0); ; shift += 7 {
|
|
|
|
if shift >= 64 {
|
|
|
|
return ErrIntOverflowQuery
|
|
|
|
}
|
|
|
|
if iNdEx >= l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
b := dAtA[iNdEx]
|
|
|
|
iNdEx++
|
|
|
|
byteLen |= int(b&0x7F) << shift
|
|
|
|
if b < 0x80 {
|
|
|
|
break
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if byteLen < 0 {
|
|
|
|
return ErrInvalidLengthQuery
|
|
|
|
}
|
|
|
|
postIndex := iNdEx + byteLen
|
|
|
|
if postIndex < 0 {
|
|
|
|
return ErrInvalidLengthQuery
|
|
|
|
}
|
|
|
|
if postIndex > l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
m.Address = append(m.Address[:0], dAtA[iNdEx:postIndex]...)
|
|
|
|
if m.Address == nil {
|
|
|
|
m.Address = []byte{}
|
|
|
|
}
|
|
|
|
iNdEx = postIndex
|
|
|
|
case 2:
|
|
|
|
if wireType != 2 {
|
|
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Denom", 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.Denom = string(dAtA[iNdEx:postIndex])
|
|
|
|
iNdEx = postIndex
|
|
|
|
default:
|
|
|
|
iNdEx = preIndex
|
|
|
|
skippy, err := skipQuery(dAtA[iNdEx:])
|
|
|
|
if err != nil {
|
|
|
|
return err
|
|
|
|
}
|
|
|
|
if skippy < 0 {
|
|
|
|
return ErrInvalidLengthQuery
|
|
|
|
}
|
|
|
|
if (iNdEx + skippy) < 0 {
|
|
|
|
return ErrInvalidLengthQuery
|
|
|
|
}
|
|
|
|
if (iNdEx + skippy) > l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
iNdEx += skippy
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if iNdEx > l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
func (m *QueryBalanceResponse) 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: QueryBalanceResponse: wiretype end group for non-group")
|
|
|
|
}
|
|
|
|
if fieldNum <= 0 {
|
|
|
|
return fmt.Errorf("proto: QueryBalanceResponse: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
|
|
}
|
|
|
|
switch fieldNum {
|
|
|
|
case 1:
|
|
|
|
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 m.Balance == nil {
|
|
|
|
m.Balance = &types.Coin{}
|
|
|
|
}
|
|
|
|
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 {
|
|
|
|
return ErrInvalidLengthQuery
|
|
|
|
}
|
|
|
|
if (iNdEx + skippy) < 0 {
|
|
|
|
return ErrInvalidLengthQuery
|
|
|
|
}
|
|
|
|
if (iNdEx + skippy) > l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
iNdEx += skippy
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if iNdEx > l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
func (m *QueryAllBalancesRequest) 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: QueryAllBalancesRequest: wiretype end group for non-group")
|
|
|
|
}
|
|
|
|
if fieldNum <= 0 {
|
|
|
|
return fmt.Errorf("proto: QueryAllBalancesRequest: 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 byteLen int
|
|
|
|
for shift := uint(0); ; shift += 7 {
|
|
|
|
if shift >= 64 {
|
|
|
|
return ErrIntOverflowQuery
|
|
|
|
}
|
|
|
|
if iNdEx >= l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
b := dAtA[iNdEx]
|
|
|
|
iNdEx++
|
|
|
|
byteLen |= int(b&0x7F) << shift
|
|
|
|
if b < 0x80 {
|
|
|
|
break
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if byteLen < 0 {
|
|
|
|
return ErrInvalidLengthQuery
|
|
|
|
}
|
|
|
|
postIndex := iNdEx + byteLen
|
|
|
|
if postIndex < 0 {
|
|
|
|
return ErrInvalidLengthQuery
|
|
|
|
}
|
|
|
|
if postIndex > l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
m.Address = append(m.Address[:0], dAtA[iNdEx:postIndex]...)
|
|
|
|
if m.Address == nil {
|
|
|
|
m.Address = []byte{}
|
|
|
|
}
|
|
|
|
iNdEx = postIndex
|
2020-06-20 16:44:04 -07:00
|
|
|
case 2:
|
|
|
|
if wireType != 2 {
|
2020-07-20 09:51:16 -07:00
|
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType)
|
2020-06-20 16:44:04 -07:00
|
|
|
}
|
|
|
|
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
|
|
|
|
}
|
2020-07-20 09:51:16 -07:00
|
|
|
if m.Pagination == nil {
|
|
|
|
m.Pagination = &query.PageRequest{}
|
2020-06-20 16:44:04 -07:00
|
|
|
}
|
2020-07-20 09:51:16 -07:00
|
|
|
if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
2020-06-20 16:44:04 -07:00
|
|
|
return err
|
|
|
|
}
|
|
|
|
iNdEx = postIndex
|
2020-06-05 11:10:04 -07:00
|
|
|
default:
|
|
|
|
iNdEx = preIndex
|
|
|
|
skippy, err := skipQuery(dAtA[iNdEx:])
|
|
|
|
if err != nil {
|
|
|
|
return err
|
|
|
|
}
|
|
|
|
if skippy < 0 {
|
|
|
|
return ErrInvalidLengthQuery
|
|
|
|
}
|
|
|
|
if (iNdEx + skippy) < 0 {
|
|
|
|
return ErrInvalidLengthQuery
|
|
|
|
}
|
|
|
|
if (iNdEx + skippy) > l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
iNdEx += skippy
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if iNdEx > l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
func (m *QueryAllBalancesResponse) 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: QueryAllBalancesResponse: wiretype end group for non-group")
|
|
|
|
}
|
|
|
|
if fieldNum <= 0 {
|
|
|
|
return fmt.Errorf("proto: QueryAllBalancesResponse: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
|
|
}
|
|
|
|
switch fieldNum {
|
|
|
|
case 1:
|
|
|
|
if wireType != 2 {
|
|
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Balances", 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.Balances = append(m.Balances, types.Coin{})
|
|
|
|
if err := m.Balances[len(m.Balances)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
|
|
|
return err
|
|
|
|
}
|
|
|
|
iNdEx = postIndex
|
2020-06-20 16:44:04 -07:00
|
|
|
case 2:
|
|
|
|
if wireType != 2 {
|
2020-07-20 09:51:16 -07:00
|
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType)
|
2020-06-20 16:44:04 -07:00
|
|
|
}
|
|
|
|
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
|
|
|
|
}
|
2020-07-20 09:51:16 -07:00
|
|
|
if m.Pagination == nil {
|
|
|
|
m.Pagination = &query.PageResponse{}
|
2020-06-20 16:44:04 -07:00
|
|
|
}
|
2020-07-20 09:51:16 -07:00
|
|
|
if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
2020-06-20 16:44:04 -07:00
|
|
|
return err
|
|
|
|
}
|
|
|
|
iNdEx = postIndex
|
2020-06-05 11:10:04 -07:00
|
|
|
default:
|
|
|
|
iNdEx = preIndex
|
|
|
|
skippy, err := skipQuery(dAtA[iNdEx:])
|
|
|
|
if err != nil {
|
|
|
|
return err
|
|
|
|
}
|
|
|
|
if skippy < 0 {
|
|
|
|
return ErrInvalidLengthQuery
|
|
|
|
}
|
|
|
|
if (iNdEx + skippy) < 0 {
|
|
|
|
return ErrInvalidLengthQuery
|
|
|
|
}
|
|
|
|
if (iNdEx + skippy) > l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
iNdEx += skippy
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if iNdEx > l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
func (m *QueryTotalSupplyRequest) 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: QueryTotalSupplyRequest: wiretype end group for non-group")
|
|
|
|
}
|
|
|
|
if fieldNum <= 0 {
|
|
|
|
return fmt.Errorf("proto: QueryTotalSupplyRequest: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
|
|
}
|
|
|
|
switch fieldNum {
|
|
|
|
default:
|
|
|
|
iNdEx = preIndex
|
|
|
|
skippy, err := skipQuery(dAtA[iNdEx:])
|
|
|
|
if err != nil {
|
|
|
|
return err
|
|
|
|
}
|
|
|
|
if skippy < 0 {
|
|
|
|
return ErrInvalidLengthQuery
|
|
|
|
}
|
|
|
|
if (iNdEx + skippy) < 0 {
|
|
|
|
return ErrInvalidLengthQuery
|
|
|
|
}
|
|
|
|
if (iNdEx + skippy) > l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
iNdEx += skippy
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if iNdEx > l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
func (m *QueryTotalSupplyResponse) 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: QueryTotalSupplyResponse: wiretype end group for non-group")
|
|
|
|
}
|
|
|
|
if fieldNum <= 0 {
|
|
|
|
return fmt.Errorf("proto: QueryTotalSupplyResponse: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
|
|
}
|
|
|
|
switch fieldNum {
|
|
|
|
case 1:
|
|
|
|
if wireType != 2 {
|
|
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Supply", 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.Supply = append(m.Supply, types.Coin{})
|
|
|
|
if err := m.Supply[len(m.Supply)-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 {
|
|
|
|
return ErrInvalidLengthQuery
|
|
|
|
}
|
|
|
|
if (iNdEx + skippy) < 0 {
|
|
|
|
return ErrInvalidLengthQuery
|
|
|
|
}
|
|
|
|
if (iNdEx + skippy) > l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
iNdEx += skippy
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if iNdEx > l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
func (m *QuerySupplyOfRequest) 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: QuerySupplyOfRequest: wiretype end group for non-group")
|
|
|
|
}
|
|
|
|
if fieldNum <= 0 {
|
|
|
|
return fmt.Errorf("proto: QuerySupplyOfRequest: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
|
|
}
|
|
|
|
switch fieldNum {
|
|
|
|
case 1:
|
|
|
|
if wireType != 2 {
|
|
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Denom", 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.Denom = string(dAtA[iNdEx:postIndex])
|
|
|
|
iNdEx = postIndex
|
|
|
|
default:
|
|
|
|
iNdEx = preIndex
|
|
|
|
skippy, err := skipQuery(dAtA[iNdEx:])
|
|
|
|
if err != nil {
|
|
|
|
return err
|
|
|
|
}
|
|
|
|
if skippy < 0 {
|
|
|
|
return ErrInvalidLengthQuery
|
|
|
|
}
|
|
|
|
if (iNdEx + skippy) < 0 {
|
|
|
|
return ErrInvalidLengthQuery
|
|
|
|
}
|
|
|
|
if (iNdEx + skippy) > l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
iNdEx += skippy
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if iNdEx > l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
func (m *QuerySupplyOfResponse) 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: QuerySupplyOfResponse: wiretype end group for non-group")
|
|
|
|
}
|
|
|
|
if fieldNum <= 0 {
|
|
|
|
return fmt.Errorf("proto: QuerySupplyOfResponse: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
|
|
}
|
|
|
|
switch fieldNum {
|
|
|
|
case 1:
|
|
|
|
if wireType != 2 {
|
|
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType)
|
|
|
|
}
|
2020-06-30 13:59:21 -07:00
|
|
|
var msglen int
|
2020-06-05 11:10:04 -07:00
|
|
|
for shift := uint(0); ; shift += 7 {
|
|
|
|
if shift >= 64 {
|
|
|
|
return ErrIntOverflowQuery
|
|
|
|
}
|
|
|
|
if iNdEx >= l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
b := dAtA[iNdEx]
|
|
|
|
iNdEx++
|
2020-06-30 13:59:21 -07:00
|
|
|
msglen |= int(b&0x7F) << shift
|
2020-06-05 11:10:04 -07:00
|
|
|
if b < 0x80 {
|
|
|
|
break
|
|
|
|
}
|
|
|
|
}
|
2020-06-30 13:59:21 -07:00
|
|
|
if msglen < 0 {
|
2020-06-05 11:10:04 -07:00
|
|
|
return ErrInvalidLengthQuery
|
|
|
|
}
|
2020-06-30 13:59:21 -07:00
|
|
|
postIndex := iNdEx + msglen
|
2020-06-05 11:10:04 -07:00
|
|
|
if postIndex < 0 {
|
|
|
|
return ErrInvalidLengthQuery
|
|
|
|
}
|
|
|
|
if postIndex > l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
if err := m.Amount.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 {
|
|
|
|
return ErrInvalidLengthQuery
|
|
|
|
}
|
|
|
|
if (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
|
|
|
|
depth := 0
|
|
|
|
for iNdEx < l {
|
|
|
|
var wire uint64
|
|
|
|
for shift := uint(0); ; shift += 7 {
|
|
|
|
if shift >= 64 {
|
|
|
|
return 0, ErrIntOverflowQuery
|
|
|
|
}
|
|
|
|
if iNdEx >= l {
|
|
|
|
return 0, io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
b := dAtA[iNdEx]
|
|
|
|
iNdEx++
|
|
|
|
wire |= (uint64(b) & 0x7F) << shift
|
|
|
|
if b < 0x80 {
|
|
|
|
break
|
|
|
|
}
|
|
|
|
}
|
|
|
|
wireType := int(wire & 0x7)
|
|
|
|
switch wireType {
|
|
|
|
case 0:
|
|
|
|
for shift := uint(0); ; shift += 7 {
|
|
|
|
if shift >= 64 {
|
|
|
|
return 0, ErrIntOverflowQuery
|
|
|
|
}
|
|
|
|
if iNdEx >= l {
|
|
|
|
return 0, io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
iNdEx++
|
|
|
|
if dAtA[iNdEx-1] < 0x80 {
|
|
|
|
break
|
|
|
|
}
|
|
|
|
}
|
|
|
|
case 1:
|
|
|
|
iNdEx += 8
|
|
|
|
case 2:
|
|
|
|
var length int
|
|
|
|
for shift := uint(0); ; shift += 7 {
|
|
|
|
if shift >= 64 {
|
|
|
|
return 0, ErrIntOverflowQuery
|
|
|
|
}
|
|
|
|
if iNdEx >= l {
|
|
|
|
return 0, io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
b := dAtA[iNdEx]
|
|
|
|
iNdEx++
|
|
|
|
length |= (int(b) & 0x7F) << shift
|
|
|
|
if b < 0x80 {
|
|
|
|
break
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if length < 0 {
|
|
|
|
return 0, ErrInvalidLengthQuery
|
|
|
|
}
|
|
|
|
iNdEx += length
|
|
|
|
case 3:
|
|
|
|
depth++
|
|
|
|
case 4:
|
|
|
|
if depth == 0 {
|
|
|
|
return 0, ErrUnexpectedEndOfGroupQuery
|
|
|
|
}
|
|
|
|
depth--
|
|
|
|
case 5:
|
|
|
|
iNdEx += 4
|
|
|
|
default:
|
|
|
|
return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
|
|
|
|
}
|
|
|
|
if iNdEx < 0 {
|
|
|
|
return 0, ErrInvalidLengthQuery
|
|
|
|
}
|
|
|
|
if depth == 0 {
|
|
|
|
return iNdEx, nil
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return 0, io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
|
|
|
|
var (
|
|
|
|
ErrInvalidLengthQuery = fmt.Errorf("proto: negative length found during unmarshaling")
|
|
|
|
ErrIntOverflowQuery = fmt.Errorf("proto: integer overflow")
|
|
|
|
ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group")
|
|
|
|
)
|