diff --git a/proto/umee/oracle/v1/query.proto b/proto/umee/oracle/v1/query.proto index 71fb405ab1..8dd29696a9 100644 --- a/proto/umee/oracle/v1/query.proto +++ b/proto/umee/oracle/v1/query.proto @@ -109,6 +109,35 @@ service Query { option (google.api.http).get = "/umee/oracle/v1/denoms/exg_rates_timestamp"; } + + // MissCounters returns oracle missing votes count of validators. + rpc MissCounters(QueryMissCounters) + returns (QueryMissCountersResponse) { + option (google.api.http).get = + "/umee/oracle/v1/miss_counters"; + } +} + +// QueryMissCounters is the request type for the Query/MissCounters RPC +// method. +message QueryMissCounters { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + string validator = 1; +} + +// QueryMissCountersResponse is response type for the Query/MissCounters RPC method. +message QueryMissCountersResponse { + repeated PriceMissCounter miss_counters = 1 [ + (gogoproto.nullable) = false + ]; +} + +// PriceMissCounter is the validator's oracle price votes missing count. +message PriceMissCounter { + string validator = 1; + // miss_counter defines the oracle miss counter of a validator + uint64 miss_counter = 2; } // QueryExgRatesWithTimestamp is the request type for the Query/ExchangeRatesWithTimestamp RPC diff --git a/proto/umee/uibc/v1/query.proto b/proto/umee/uibc/v1/query.proto index 7076a0486b..5a2c10a6e3 100644 --- a/proto/umee/uibc/v1/query.proto +++ b/proto/umee/uibc/v1/query.proto @@ -28,6 +28,44 @@ service Query { rpc AllOutflows(QueryAllOutflows) returns (QueryAllOutflowsResponse) { option (google.api.http).get = "/umee/uibc/v1/all_outflows"; } + + // Inflows returns registered IBC denoms inflows in the current quota period. + // If denom is not specified, returns sum of all registered inflows. + rpc Inflows(QueryInflows) returns (QueryInflowsResponse) { + option (google.api.http).get = "/umee/uibc/v1/inflows"; + } + + // AllInflows returns inflows for each registered denom in the current quota period. + rpc AllInflows(QueryAllInflows) returns (QueryAllInflowsResponse) { + option (google.api.http).get = "/umee/uibc/v1/all_inflows"; + } +} + +// QueryAllInflows defines request type for query the inflow quota of registered denoms. +message QueryAllInflows { + string denom = 1; +} + +// QueryAllInflowsResponse defines response type of Query/AllInflows +message QueryAllInflowsResponse { + repeated cosmos.base.v1beta1.DecCoin inflows = 1 [ + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.DecCoins", + (gogoproto.nullable) = false + ]; +} + +// QueryInflows defines request type for query the inflow quota of denoms +message QueryInflows { + string denom = 1; +} + +// QueryInflowsResponse defines response type of Query/Inflows +message QueryInflowsResponse { + string amount = 1 [ + (cosmos_proto.scalar) = "cosmos.Dec", + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.nullable) = false + ]; } // QueryParams defines the request structure for the Params gRPC service diff --git a/x/oracle/keeper/grpc_query.go b/x/oracle/keeper/grpc_query.go index 4556e17689..8546709a67 100644 --- a/x/oracle/keeper/grpc_query.go +++ b/x/oracle/keeper/grpc_query.go @@ -362,3 +362,38 @@ func (q querier) ExgRatesWithTimestamp( return &types.QueryExgRatesWithTimestampResponse{ExgRates: exgRates}, nil } + +// MissCounters implements types.QueryServer. +func (q querier) MissCounters(goCtx context.Context, req *types.QueryMissCounters) (*types.QueryMissCountersResponse, + error) { + if req == nil { + return nil, status.Error(codes.InvalidArgument, "empty request") + } + + ctx := sdk.UnwrapSDKContext(goCtx) + + var pfMissCounts []types.PriceMissCounter + if len(req.Validator) != 0 { + valAddr, err := sdk.ValAddressFromBech32(req.Validator) + if err != nil { + return nil, status.Error(codes.InvalidArgument, err.Error()) + } + missCounter := q.GetMissCounter(ctx, valAddr) + pfMissCounts = append(pfMissCounts, types.PriceMissCounter{ + Validator: req.Validator, + MissCounter: missCounter, + }) + } else { + q.IterateMissCounters(ctx, func(val sdk.ValAddress, u uint64) bool { + pfMissCounts = append(pfMissCounts, types.PriceMissCounter{ + Validator: val.String(), + MissCounter: u, + }) + return false + }) + } + + return &types.QueryMissCountersResponse{ + MissCounters: pfMissCounts, + }, nil +} diff --git a/x/oracle/types/query.pb.go b/x/oracle/types/query.pb.go index 3a6138d90d..85b00de459 100644 --- a/x/oracle/types/query.pb.go +++ b/x/oracle/types/query.pb.go @@ -31,6 +31,123 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package +// QueryMissCounters is the request type for the Query/MissCounters RPC +// method. +type QueryMissCounters struct { + Validator string `protobuf:"bytes,1,opt,name=validator,proto3" json:"validator,omitempty"` +} + +func (m *QueryMissCounters) Reset() { *m = QueryMissCounters{} } +func (m *QueryMissCounters) String() string { return proto.CompactTextString(m) } +func (*QueryMissCounters) ProtoMessage() {} +func (*QueryMissCounters) Descriptor() ([]byte, []int) { + return fileDescriptor_710e319bc1815d33, []int{0} +} +func (m *QueryMissCounters) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryMissCounters) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryMissCounters.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 *QueryMissCounters) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryMissCounters.Merge(m, src) +} +func (m *QueryMissCounters) XXX_Size() int { + return m.Size() +} +func (m *QueryMissCounters) XXX_DiscardUnknown() { + xxx_messageInfo_QueryMissCounters.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryMissCounters proto.InternalMessageInfo + +// QueryMissCountersResponse is response type for the Query/MissCounters RPC method. +type QueryMissCountersResponse struct { + MissCounters []PriceMissCounter `protobuf:"bytes,1,rep,name=miss_counters,json=missCounters,proto3" json:"miss_counters"` +} + +func (m *QueryMissCountersResponse) Reset() { *m = QueryMissCountersResponse{} } +func (m *QueryMissCountersResponse) String() string { return proto.CompactTextString(m) } +func (*QueryMissCountersResponse) ProtoMessage() {} +func (*QueryMissCountersResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_710e319bc1815d33, []int{1} +} +func (m *QueryMissCountersResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryMissCountersResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryMissCountersResponse.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 *QueryMissCountersResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryMissCountersResponse.Merge(m, src) +} +func (m *QueryMissCountersResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryMissCountersResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryMissCountersResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryMissCountersResponse proto.InternalMessageInfo + +// PriceMissCounter is the validator's oracle price votes missing count. +type PriceMissCounter struct { + Validator string `protobuf:"bytes,1,opt,name=validator,proto3" json:"validator,omitempty"` + // miss_counter defines the oracle miss counter of a validator + MissCounter uint64 `protobuf:"varint,2,opt,name=miss_counter,json=missCounter,proto3" json:"miss_counter,omitempty"` +} + +func (m *PriceMissCounter) Reset() { *m = PriceMissCounter{} } +func (m *PriceMissCounter) String() string { return proto.CompactTextString(m) } +func (*PriceMissCounter) ProtoMessage() {} +func (*PriceMissCounter) Descriptor() ([]byte, []int) { + return fileDescriptor_710e319bc1815d33, []int{2} +} +func (m *PriceMissCounter) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *PriceMissCounter) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_PriceMissCounter.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 *PriceMissCounter) XXX_Merge(src proto.Message) { + xxx_messageInfo_PriceMissCounter.Merge(m, src) +} +func (m *PriceMissCounter) XXX_Size() int { + return m.Size() +} +func (m *PriceMissCounter) XXX_DiscardUnknown() { + xxx_messageInfo_PriceMissCounter.DiscardUnknown(m) +} + +var xxx_messageInfo_PriceMissCounter proto.InternalMessageInfo + // QueryExgRatesWithTimestamp is the request type for the Query/ExchangeRatesWithTimestamp RPC // method. type QueryExgRatesWithTimestamp struct { @@ -42,7 +159,7 @@ func (m *QueryExgRatesWithTimestamp) Reset() { *m = QueryExgRatesWithTim func (m *QueryExgRatesWithTimestamp) String() string { return proto.CompactTextString(m) } func (*QueryExgRatesWithTimestamp) ProtoMessage() {} func (*QueryExgRatesWithTimestamp) Descriptor() ([]byte, []int) { - return fileDescriptor_710e319bc1815d33, []int{0} + return fileDescriptor_710e319bc1815d33, []int{3} } func (m *QueryExgRatesWithTimestamp) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -83,7 +200,7 @@ func (m *QueryExgRatesWithTimestampResponse) Reset() { *m = QueryExgRate func (m *QueryExgRatesWithTimestampResponse) String() string { return proto.CompactTextString(m) } func (*QueryExgRatesWithTimestampResponse) ProtoMessage() {} func (*QueryExgRatesWithTimestampResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_710e319bc1815d33, []int{1} + return fileDescriptor_710e319bc1815d33, []int{4} } func (m *QueryExgRatesWithTimestampResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -123,7 +240,7 @@ func (m *QueryExchangeRates) Reset() { *m = QueryExchangeRates{} } func (m *QueryExchangeRates) String() string { return proto.CompactTextString(m) } func (*QueryExchangeRates) ProtoMessage() {} func (*QueryExchangeRates) Descriptor() ([]byte, []int) { - return fileDescriptor_710e319bc1815d33, []int{2} + return fileDescriptor_710e319bc1815d33, []int{5} } func (m *QueryExchangeRates) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -164,7 +281,7 @@ func (m *QueryExchangeRatesResponse) Reset() { *m = QueryExchangeRatesRe func (m *QueryExchangeRatesResponse) String() string { return proto.CompactTextString(m) } func (*QueryExchangeRatesResponse) ProtoMessage() {} func (*QueryExchangeRatesResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_710e319bc1815d33, []int{3} + return fileDescriptor_710e319bc1815d33, []int{6} } func (m *QueryExchangeRatesResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -202,7 +319,7 @@ func (m *QueryActiveExchangeRates) Reset() { *m = QueryActiveExchangeRat func (m *QueryActiveExchangeRates) String() string { return proto.CompactTextString(m) } func (*QueryActiveExchangeRates) ProtoMessage() {} func (*QueryActiveExchangeRates) Descriptor() ([]byte, []int) { - return fileDescriptor_710e319bc1815d33, []int{4} + return fileDescriptor_710e319bc1815d33, []int{7} } func (m *QueryActiveExchangeRates) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -243,7 +360,7 @@ func (m *QueryActiveExchangeRatesResponse) Reset() { *m = QueryActiveExc func (m *QueryActiveExchangeRatesResponse) String() string { return proto.CompactTextString(m) } func (*QueryActiveExchangeRatesResponse) ProtoMessage() {} func (*QueryActiveExchangeRatesResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_710e319bc1815d33, []int{5} + return fileDescriptor_710e319bc1815d33, []int{8} } func (m *QueryActiveExchangeRatesResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -283,7 +400,7 @@ func (m *QueryFeederDelegation) Reset() { *m = QueryFeederDelegation{} } func (m *QueryFeederDelegation) String() string { return proto.CompactTextString(m) } func (*QueryFeederDelegation) ProtoMessage() {} func (*QueryFeederDelegation) Descriptor() ([]byte, []int) { - return fileDescriptor_710e319bc1815d33, []int{6} + return fileDescriptor_710e319bc1815d33, []int{9} } func (m *QueryFeederDelegation) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -323,7 +440,7 @@ func (m *QueryFeederDelegationResponse) Reset() { *m = QueryFeederDelega func (m *QueryFeederDelegationResponse) String() string { return proto.CompactTextString(m) } func (*QueryFeederDelegationResponse) ProtoMessage() {} func (*QueryFeederDelegationResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_710e319bc1815d33, []int{7} + return fileDescriptor_710e319bc1815d33, []int{10} } func (m *QueryFeederDelegationResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -363,7 +480,7 @@ func (m *QueryMissCounter) Reset() { *m = QueryMissCounter{} } func (m *QueryMissCounter) String() string { return proto.CompactTextString(m) } func (*QueryMissCounter) ProtoMessage() {} func (*QueryMissCounter) Descriptor() ([]byte, []int) { - return fileDescriptor_710e319bc1815d33, []int{8} + return fileDescriptor_710e319bc1815d33, []int{11} } func (m *QueryMissCounter) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -403,7 +520,7 @@ func (m *QueryMissCounterResponse) Reset() { *m = QueryMissCounterRespon func (m *QueryMissCounterResponse) String() string { return proto.CompactTextString(m) } func (*QueryMissCounterResponse) ProtoMessage() {} func (*QueryMissCounterResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_710e319bc1815d33, []int{9} + return fileDescriptor_710e319bc1815d33, []int{12} } func (m *QueryMissCounterResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -441,7 +558,7 @@ func (m *QuerySlashWindow) Reset() { *m = QuerySlashWindow{} } func (m *QuerySlashWindow) String() string { return proto.CompactTextString(m) } func (*QuerySlashWindow) ProtoMessage() {} func (*QuerySlashWindow) Descriptor() ([]byte, []int) { - return fileDescriptor_710e319bc1815d33, []int{10} + return fileDescriptor_710e319bc1815d33, []int{13} } func (m *QuerySlashWindow) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -482,7 +599,7 @@ func (m *QuerySlashWindowResponse) Reset() { *m = QuerySlashWindowRespon func (m *QuerySlashWindowResponse) String() string { return proto.CompactTextString(m) } func (*QuerySlashWindowResponse) ProtoMessage() {} func (*QuerySlashWindowResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_710e319bc1815d33, []int{11} + return fileDescriptor_710e319bc1815d33, []int{14} } func (m *QuerySlashWindowResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -522,7 +639,7 @@ func (m *QueryAggregatePrevote) Reset() { *m = QueryAggregatePrevote{} } func (m *QueryAggregatePrevote) String() string { return proto.CompactTextString(m) } func (*QueryAggregatePrevote) ProtoMessage() {} func (*QueryAggregatePrevote) Descriptor() ([]byte, []int) { - return fileDescriptor_710e319bc1815d33, []int{12} + return fileDescriptor_710e319bc1815d33, []int{15} } func (m *QueryAggregatePrevote) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -563,7 +680,7 @@ func (m *QueryAggregatePrevoteResponse) Reset() { *m = QueryAggregatePre func (m *QueryAggregatePrevoteResponse) String() string { return proto.CompactTextString(m) } func (*QueryAggregatePrevoteResponse) ProtoMessage() {} func (*QueryAggregatePrevoteResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_710e319bc1815d33, []int{13} + return fileDescriptor_710e319bc1815d33, []int{16} } func (m *QueryAggregatePrevoteResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -601,7 +718,7 @@ func (m *QueryAggregatePrevotes) Reset() { *m = QueryAggregatePrevotes{} func (m *QueryAggregatePrevotes) String() string { return proto.CompactTextString(m) } func (*QueryAggregatePrevotes) ProtoMessage() {} func (*QueryAggregatePrevotes) Descriptor() ([]byte, []int) { - return fileDescriptor_710e319bc1815d33, []int{14} + return fileDescriptor_710e319bc1815d33, []int{17} } func (m *QueryAggregatePrevotes) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -642,7 +759,7 @@ func (m *QueryAggregatePrevotesResponse) Reset() { *m = QueryAggregatePr func (m *QueryAggregatePrevotesResponse) String() string { return proto.CompactTextString(m) } func (*QueryAggregatePrevotesResponse) ProtoMessage() {} func (*QueryAggregatePrevotesResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_710e319bc1815d33, []int{15} + return fileDescriptor_710e319bc1815d33, []int{18} } func (m *QueryAggregatePrevotesResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -682,7 +799,7 @@ func (m *QueryAggregateVote) Reset() { *m = QueryAggregateVote{} } func (m *QueryAggregateVote) String() string { return proto.CompactTextString(m) } func (*QueryAggregateVote) ProtoMessage() {} func (*QueryAggregateVote) Descriptor() ([]byte, []int) { - return fileDescriptor_710e319bc1815d33, []int{16} + return fileDescriptor_710e319bc1815d33, []int{19} } func (m *QueryAggregateVote) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -723,7 +840,7 @@ func (m *QueryAggregateVoteResponse) Reset() { *m = QueryAggregateVoteRe func (m *QueryAggregateVoteResponse) String() string { return proto.CompactTextString(m) } func (*QueryAggregateVoteResponse) ProtoMessage() {} func (*QueryAggregateVoteResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_710e319bc1815d33, []int{17} + return fileDescriptor_710e319bc1815d33, []int{20} } func (m *QueryAggregateVoteResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -761,7 +878,7 @@ func (m *QueryAggregateVotes) Reset() { *m = QueryAggregateVotes{} } func (m *QueryAggregateVotes) String() string { return proto.CompactTextString(m) } func (*QueryAggregateVotes) ProtoMessage() {} func (*QueryAggregateVotes) Descriptor() ([]byte, []int) { - return fileDescriptor_710e319bc1815d33, []int{18} + return fileDescriptor_710e319bc1815d33, []int{21} } func (m *QueryAggregateVotes) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -802,7 +919,7 @@ func (m *QueryAggregateVotesResponse) Reset() { *m = QueryAggregateVotes func (m *QueryAggregateVotesResponse) String() string { return proto.CompactTextString(m) } func (*QueryAggregateVotesResponse) ProtoMessage() {} func (*QueryAggregateVotesResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_710e319bc1815d33, []int{19} + return fileDescriptor_710e319bc1815d33, []int{22} } func (m *QueryAggregateVotesResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -839,7 +956,7 @@ func (m *QueryParams) Reset() { *m = QueryParams{} } func (m *QueryParams) String() string { return proto.CompactTextString(m) } func (*QueryParams) ProtoMessage() {} func (*QueryParams) Descriptor() ([]byte, []int) { - return fileDescriptor_710e319bc1815d33, []int{20} + return fileDescriptor_710e319bc1815d33, []int{23} } func (m *QueryParams) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -878,7 +995,7 @@ func (m *QueryParamsResponse) Reset() { *m = QueryParamsResponse{} } func (m *QueryParamsResponse) String() string { return proto.CompactTextString(m) } func (*QueryParamsResponse) ProtoMessage() {} func (*QueryParamsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_710e319bc1815d33, []int{21} + return fileDescriptor_710e319bc1815d33, []int{24} } func (m *QueryParamsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -920,7 +1037,7 @@ func (m *QueryMedians) Reset() { *m = QueryMedians{} } func (m *QueryMedians) String() string { return proto.CompactTextString(m) } func (*QueryMedians) ProtoMessage() {} func (*QueryMedians) Descriptor() ([]byte, []int) { - return fileDescriptor_710e319bc1815d33, []int{22} + return fileDescriptor_710e319bc1815d33, []int{25} } func (m *QueryMedians) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -960,7 +1077,7 @@ func (m *QueryMediansResponse) Reset() { *m = QueryMediansResponse{} } func (m *QueryMediansResponse) String() string { return proto.CompactTextString(m) } func (*QueryMediansResponse) ProtoMessage() {} func (*QueryMediansResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_710e319bc1815d33, []int{23} + return fileDescriptor_710e319bc1815d33, []int{26} } func (m *QueryMediansResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -999,7 +1116,7 @@ func (m *QueryMedianDeviations) Reset() { *m = QueryMedianDeviations{} } func (m *QueryMedianDeviations) String() string { return proto.CompactTextString(m) } func (*QueryMedianDeviations) ProtoMessage() {} func (*QueryMedianDeviations) Descriptor() ([]byte, []int) { - return fileDescriptor_710e319bc1815d33, []int{24} + return fileDescriptor_710e319bc1815d33, []int{27} } func (m *QueryMedianDeviations) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1039,7 +1156,7 @@ func (m *QueryMedianDeviationsResponse) Reset() { *m = QueryMedianDeviat func (m *QueryMedianDeviationsResponse) String() string { return proto.CompactTextString(m) } func (*QueryMedianDeviationsResponse) ProtoMessage() {} func (*QueryMedianDeviationsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_710e319bc1815d33, []int{25} + return fileDescriptor_710e319bc1815d33, []int{28} } func (m *QueryMedianDeviationsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1077,7 +1194,7 @@ func (m *QueryAvgPrice) Reset() { *m = QueryAvgPrice{} } func (m *QueryAvgPrice) String() string { return proto.CompactTextString(m) } func (*QueryAvgPrice) ProtoMessage() {} func (*QueryAvgPrice) Descriptor() ([]byte, []int) { - return fileDescriptor_710e319bc1815d33, []int{26} + return fileDescriptor_710e319bc1815d33, []int{29} } func (m *QueryAvgPrice) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1115,7 +1232,7 @@ func (m *QueryAvgPriceResponse) Reset() { *m = QueryAvgPriceResponse{} } func (m *QueryAvgPriceResponse) String() string { return proto.CompactTextString(m) } func (*QueryAvgPriceResponse) ProtoMessage() {} func (*QueryAvgPriceResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_710e319bc1815d33, []int{27} + return fileDescriptor_710e319bc1815d33, []int{30} } func (m *QueryAvgPriceResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1145,6 +1262,9 @@ func (m *QueryAvgPriceResponse) XXX_DiscardUnknown() { var xxx_messageInfo_QueryAvgPriceResponse proto.InternalMessageInfo func init() { + proto.RegisterType((*QueryMissCounters)(nil), "umee.oracle.v1.QueryMissCounters") + proto.RegisterType((*QueryMissCountersResponse)(nil), "umee.oracle.v1.QueryMissCountersResponse") + proto.RegisterType((*PriceMissCounter)(nil), "umee.oracle.v1.PriceMissCounter") proto.RegisterType((*QueryExgRatesWithTimestamp)(nil), "umee.oracle.v1.QueryExgRatesWithTimestamp") proto.RegisterType((*QueryExgRatesWithTimestampResponse)(nil), "umee.oracle.v1.QueryExgRatesWithTimestampResponse") proto.RegisterType((*QueryExchangeRates)(nil), "umee.oracle.v1.QueryExchangeRates") @@ -1178,89 +1298,95 @@ func init() { func init() { proto.RegisterFile("umee/oracle/v1/query.proto", fileDescriptor_710e319bc1815d33) } var fileDescriptor_710e319bc1815d33 = []byte{ - // 1311 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x98, 0xcf, 0x8f, 0x14, 0x45, - 0x14, 0xc7, 0xa7, 0x91, 0x5f, 0xfb, 0x86, 0x19, 0x86, 0x82, 0x25, 0x9b, 0x66, 0x99, 0x5d, 0x0a, - 0x16, 0x56, 0x60, 0xbb, 0x61, 0x58, 0xd4, 0x10, 0x88, 0xb2, 0x3f, 0xd4, 0x44, 0x48, 0x70, 0x30, - 0x60, 0xbc, 0x4c, 0x6a, 0x67, 0xca, 0x9e, 0x86, 0xed, 0xee, 0xb1, 0xab, 0x77, 0x76, 0x09, 0x21, - 0x18, 0xbd, 0x78, 0x34, 0x21, 0xe1, 0x68, 0x88, 0x9a, 0x98, 0xe8, 0xc1, 0x7f, 0x83, 0x23, 0x89, - 0x31, 0x31, 0x1e, 0x50, 0xc1, 0x83, 0x7f, 0x86, 0xe9, 0xaa, 0xea, 0x9a, 0xfe, 0x39, 0x33, 0xbb, - 0x27, 0x98, 0xf7, 0x5e, 0xbd, 0xef, 0xa7, 0xde, 0x74, 0xd5, 0xb7, 0x77, 0x40, 0xdf, 0x70, 0x28, - 0x35, 0x3d, 0x9f, 0xb4, 0xd7, 0xa9, 0xd9, 0xbf, 0x68, 0x7e, 0xb1, 0x41, 0xfd, 0x07, 0x46, 0xcf, - 0xf7, 0x02, 0x0f, 0x55, 0xc3, 0x9c, 0x21, 0x72, 0x46, 0xff, 0xa2, 0x7e, 0xc4, 0xf2, 0x2c, 0x8f, - 0xa7, 0xcc, 0xf0, 0x7f, 0xa2, 0x4a, 0x9f, 0xb6, 0x3c, 0xcf, 0x5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x75, 0xed, - 0xc5, 0xab, 0xba, 0xf6, 0xf7, 0xab, 0xba, 0xf6, 0xed, 0xeb, 0x7a, 0xe9, 0xc5, 0xeb, 0x7a, 0xe9, - 0x8f, 0xd7, 0xf5, 0xd2, 0x67, 0x46, 0xec, 0x75, 0x25, 0xec, 0xb9, 0xe0, 0xd2, 0x60, 0xd3, 0xf3, - 0xef, 0x0b, 0x81, 0xfe, 0x5b, 0xe6, 0x56, 0xa4, 0xc2, 0x5f, 0x5d, 0xd6, 0xf6, 0xf2, 0x5f, 0x38, - 0x2e, 0xfd, 0x1f, 0x00, 0x00, 0xff, 0xff, 0x2f, 0x1b, 0x92, 0x89, 0x9e, 0x11, 0x00, 0x00, + // 1398 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x98, 0xcd, 0x6f, 0x13, 0xc7, + 0x1b, 0xc7, 0xbd, 0xfc, 0x78, 0xcb, 0xe3, 0xd8, 0x38, 0x03, 0x41, 0xf9, 0x2d, 0xc1, 0x4e, 0x06, + 0x02, 0xe1, 0x25, 0xbb, 0x60, 0x42, 0x5b, 0x51, 0x50, 0x4b, 0x5e, 0xda, 0x4a, 0x80, 0x94, 0x9a, + 0x0a, 0xaa, 0x5e, 0xac, 0x8d, 0x3d, 0x5d, 0x2f, 0xc4, 0xbb, 0xee, 0xce, 0xc6, 0x09, 0x42, 0x88, + 0xaa, 0x5c, 0x7a, 0xac, 0x84, 0xc4, 0xb1, 0x42, 0x6d, 0xa5, 0x4a, 0xed, 0xa1, 0xff, 0x06, 0x47, + 0xa4, 0x5e, 0xaa, 0x56, 0xa2, 0x2d, 0xf4, 0xd0, 0x3f, 0xa3, 0xda, 0x99, 0xf1, 0x78, 0xf6, 0xcd, + 0x76, 0x72, 0x02, 0xcf, 0xf3, 0xcc, 0xf7, 0xf9, 0xcc, 0xb3, 0x33, 0xf3, 0xdd, 0x2c, 0xe8, 0x9b, +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0x00, 0x00, 0xff, 0xff, 0xad, 0x9f, + 0x87, 0x1c, 0x20, 0x13, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1307,6 +1433,8 @@ type QueryClient interface { // ExgRatesWithTimestamp returns exchange rates of all denoms with timestamp, // or, if specified, returns a single denom ExgRatesWithTimestamp(ctx context.Context, in *QueryExgRatesWithTimestamp, opts ...grpc.CallOption) (*QueryExgRatesWithTimestampResponse, error) + // MissCounters returns oracle missing votes count of validators. + MissCounters(ctx context.Context, in *QueryMissCounters, opts ...grpc.CallOption) (*QueryMissCountersResponse, error) } type queryClient struct { @@ -1443,6 +1571,15 @@ func (c *queryClient) ExgRatesWithTimestamp(ctx context.Context, in *QueryExgRat return out, nil } +func (c *queryClient) MissCounters(ctx context.Context, in *QueryMissCounters, opts ...grpc.CallOption) (*QueryMissCountersResponse, error) { + out := new(QueryMissCountersResponse) + err := c.cc.Invoke(ctx, "/umee.oracle.v1.Query/MissCounters", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // QueryServer is the server API for Query service. type QueryServer interface { // ExchangeRates returns exchange rates of all denoms, @@ -1477,6 +1614,8 @@ type QueryServer interface { // ExgRatesWithTimestamp returns exchange rates of all denoms with timestamp, // or, if specified, returns a single denom ExgRatesWithTimestamp(context.Context, *QueryExgRatesWithTimestamp) (*QueryExgRatesWithTimestampResponse, error) + // MissCounters returns oracle missing votes count of validators. + MissCounters(context.Context, *QueryMissCounters) (*QueryMissCountersResponse, error) } // UnimplementedQueryServer can be embedded to have forward compatible implementations. @@ -1525,6 +1664,9 @@ func (*UnimplementedQueryServer) AvgPrice(ctx context.Context, req *QueryAvgPric func (*UnimplementedQueryServer) ExgRatesWithTimestamp(ctx context.Context, req *QueryExgRatesWithTimestamp) (*QueryExgRatesWithTimestampResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ExgRatesWithTimestamp not implemented") } +func (*UnimplementedQueryServer) MissCounters(ctx context.Context, req *QueryMissCounters) (*QueryMissCountersResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method MissCounters not implemented") +} func RegisterQueryServer(s grpc1.Server, srv QueryServer) { s.RegisterService(&_Query_serviceDesc, srv) @@ -1782,6 +1924,24 @@ func _Query_ExgRatesWithTimestamp_Handler(srv interface{}, ctx context.Context, return interceptor(ctx, in, info, handler) } +func _Query_MissCounters_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryMissCounters) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).MissCounters(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/umee.oracle.v1.Query/MissCounters", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).MissCounters(ctx, req.(*QueryMissCounters)) + } + return interceptor(ctx, in, info, handler) +} + var _Query_serviceDesc = grpc.ServiceDesc{ ServiceName: "umee.oracle.v1.Query", HandlerType: (*QueryServer)(nil), @@ -1842,11 +2002,117 @@ var _Query_serviceDesc = grpc.ServiceDesc{ MethodName: "ExgRatesWithTimestamp", Handler: _Query_ExgRatesWithTimestamp_Handler, }, + { + MethodName: "MissCounters", + Handler: _Query_MissCounters_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "umee/oracle/v1/query.proto", } +func (m *QueryMissCounters) 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 *QueryMissCounters) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryMissCounters) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Validator) > 0 { + i -= len(m.Validator) + copy(dAtA[i:], m.Validator) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Validator))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryMissCountersResponse) 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 *QueryMissCountersResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryMissCountersResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.MissCounters) > 0 { + for iNdEx := len(m.MissCounters) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.MissCounters[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 *PriceMissCounter) 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 *PriceMissCounter) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *PriceMissCounter) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.MissCounter != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.MissCounter)) + i-- + dAtA[i] = 0x10 + } + if len(m.Validator) > 0 { + i -= len(m.Validator) + copy(dAtA[i:], m.Validator) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Validator))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + func (m *QueryExgRatesWithTimestamp) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -2720,27 +2986,27 @@ func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { dAtA[offset] = uint8(v) return base } -func (m *QueryExgRatesWithTimestamp) Size() (n int) { +func (m *QueryMissCounters) Size() (n int) { if m == nil { return 0 } var l int _ = l - l = len(m.Denom) + l = len(m.Validator) if l > 0 { n += 1 + l + sovQuery(uint64(l)) } return n } -func (m *QueryExgRatesWithTimestampResponse) Size() (n int) { +func (m *QueryMissCountersResponse) Size() (n int) { if m == nil { return 0 } var l int _ = l - if len(m.ExgRates) > 0 { - for _, e := range m.ExgRates { + if len(m.MissCounters) > 0 { + for _, e := range m.MissCounters { l = e.Size() n += 1 + l + sovQuery(uint64(l)) } @@ -2748,50 +3014,94 @@ func (m *QueryExgRatesWithTimestampResponse) Size() (n int) { return n } -func (m *QueryExchangeRates) Size() (n int) { +func (m *PriceMissCounter) Size() (n int) { if m == nil { return 0 } var l int _ = l - l = len(m.Denom) + l = len(m.Validator) if l > 0 { n += 1 + l + sovQuery(uint64(l)) } + if m.MissCounter != 0 { + n += 1 + sovQuery(uint64(m.MissCounter)) + } return n } -func (m *QueryExchangeRatesResponse) Size() (n int) { +func (m *QueryExgRatesWithTimestamp) Size() (n int) { if m == nil { return 0 } var l int _ = l - if len(m.ExchangeRates) > 0 { - for _, e := range m.ExchangeRates { - l = e.Size() - n += 1 + l + sovQuery(uint64(l)) - } + l = len(m.Denom) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) } return n } -func (m *QueryActiveExchangeRates) Size() (n int) { +func (m *QueryExgRatesWithTimestampResponse) Size() (n int) { if m == nil { return 0 } var l int _ = l + if len(m.ExgRates) > 0 { + for _, e := range m.ExgRates { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } return n } -func (m *QueryActiveExchangeRatesResponse) Size() (n int) { +func (m *QueryExchangeRates) Size() (n int) { if m == nil { return 0 } var l int _ = l - if len(m.ActiveRates) > 0 { + l = len(m.Denom) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryExchangeRatesResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.ExchangeRates) > 0 { + for _, e := range m.ExchangeRates { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + return n +} + +func (m *QueryActiveExchangeRates) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *QueryActiveExchangeRatesResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.ActiveRates) > 0 { for _, s := range m.ActiveRates { l = len(s) n += 1 + l + sovQuery(uint64(l)) @@ -3077,6 +3387,273 @@ func sovQuery(x uint64) (n int) { func sozQuery(x uint64) (n int) { return sovQuery(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } +func (m *QueryMissCounters) 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: QueryMissCounters: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryMissCounters: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Validator", 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.Validator = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryMissCountersResponse) 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: QueryMissCountersResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryMissCountersResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MissCounters", 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.MissCounters = append(m.MissCounters, PriceMissCounter{}) + if err := m.MissCounters[len(m.MissCounters)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *PriceMissCounter) 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: PriceMissCounter: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: PriceMissCounter: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Validator", 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.Validator = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field MissCounter", wireType) + } + m.MissCounter = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.MissCounter |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + 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 *QueryExgRatesWithTimestamp) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 diff --git a/x/oracle/types/query.pb.gw.go b/x/oracle/types/query.pb.gw.go index a49c0fbe18..8902683173 100644 --- a/x/oracle/types/query.pb.gw.go +++ b/x/oracle/types/query.pb.gw.go @@ -555,6 +555,42 @@ func local_request_Query_ExgRatesWithTimestamp_0(ctx context.Context, marshaler } +var ( + filter_Query_MissCounters_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_Query_MissCounters_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryMissCounters + 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_MissCounters_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.MissCounters(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_MissCounters_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryMissCounters + 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_MissCounters_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.MissCounters(ctx, &protoReq) + return msg, metadata, err + +} + // RegisterQueryHandlerServer registers the http handlers for service Query to "mux". // UnaryRPC :call QueryServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. @@ -883,6 +919,29 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv }) + mux.Handle("GET", pattern_Query_MissCounters_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_MissCounters_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_MissCounters_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -1204,6 +1263,26 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie }) + mux.Handle("GET", pattern_Query_MissCounters_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_MissCounters_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_MissCounters_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -1235,6 +1314,8 @@ var ( pattern_Query_AvgPrice_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"umee", "historacle", "v1", "avg_price", "denom"}, "", runtime.AssumeColonVerbOpt(false))) pattern_Query_ExgRatesWithTimestamp_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"umee", "oracle", "v1", "denoms", "exg_rates_timestamp"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_MissCounters_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"umee", "oracle", "v1", "miss_counters"}, "", runtime.AssumeColonVerbOpt(false))) ) var ( @@ -1265,4 +1346,6 @@ var ( forward_Query_AvgPrice_0 = runtime.ForwardResponseMessage forward_Query_ExgRatesWithTimestamp_0 = runtime.ForwardResponseMessage + + forward_Query_MissCounters_0 = runtime.ForwardResponseMessage ) diff --git a/x/uibc/query.pb.go b/x/uibc/query.pb.go index 1cc3e43514..45f075e207 100644 --- a/x/uibc/query.pb.go +++ b/x/uibc/query.pb.go @@ -32,6 +32,158 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package +// QueryAllInflows defines request type for query the inflow quota of registered denoms. +type QueryAllInflows struct { + Denom string `protobuf:"bytes,1,opt,name=denom,proto3" json:"denom,omitempty"` +} + +func (m *QueryAllInflows) Reset() { *m = QueryAllInflows{} } +func (m *QueryAllInflows) String() string { return proto.CompactTextString(m) } +func (*QueryAllInflows) ProtoMessage() {} +func (*QueryAllInflows) Descriptor() ([]byte, []int) { + return fileDescriptor_2ca7e17b0958935d, []int{0} +} +func (m *QueryAllInflows) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryAllInflows) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryAllInflows.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 *QueryAllInflows) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryAllInflows.Merge(m, src) +} +func (m *QueryAllInflows) XXX_Size() int { + return m.Size() +} +func (m *QueryAllInflows) XXX_DiscardUnknown() { + xxx_messageInfo_QueryAllInflows.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryAllInflows proto.InternalMessageInfo + +// QueryAllInflowsResponse defines response type of Query/AllInflows +type QueryAllInflowsResponse struct { + Inflows github_com_cosmos_cosmos_sdk_types.DecCoins `protobuf:"bytes,1,rep,name=inflows,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.DecCoins" json:"inflows"` +} + +func (m *QueryAllInflowsResponse) Reset() { *m = QueryAllInflowsResponse{} } +func (m *QueryAllInflowsResponse) String() string { return proto.CompactTextString(m) } +func (*QueryAllInflowsResponse) ProtoMessage() {} +func (*QueryAllInflowsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_2ca7e17b0958935d, []int{1} +} +func (m *QueryAllInflowsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryAllInflowsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryAllInflowsResponse.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 *QueryAllInflowsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryAllInflowsResponse.Merge(m, src) +} +func (m *QueryAllInflowsResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryAllInflowsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryAllInflowsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryAllInflowsResponse proto.InternalMessageInfo + +// QueryInflows defines request type for query the inflow quota of denoms +type QueryInflows struct { + Denom string `protobuf:"bytes,1,opt,name=denom,proto3" json:"denom,omitempty"` +} + +func (m *QueryInflows) Reset() { *m = QueryInflows{} } +func (m *QueryInflows) String() string { return proto.CompactTextString(m) } +func (*QueryInflows) ProtoMessage() {} +func (*QueryInflows) Descriptor() ([]byte, []int) { + return fileDescriptor_2ca7e17b0958935d, []int{2} +} +func (m *QueryInflows) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryInflows) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryInflows.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 *QueryInflows) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryInflows.Merge(m, src) +} +func (m *QueryInflows) XXX_Size() int { + return m.Size() +} +func (m *QueryInflows) XXX_DiscardUnknown() { + xxx_messageInfo_QueryInflows.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryInflows proto.InternalMessageInfo + +// QueryInflowsResponse defines response type of Query/Inflows +type QueryInflowsResponse struct { + Amount github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,1,opt,name=amount,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"amount"` +} + +func (m *QueryInflowsResponse) Reset() { *m = QueryInflowsResponse{} } +func (m *QueryInflowsResponse) String() string { return proto.CompactTextString(m) } +func (*QueryInflowsResponse) ProtoMessage() {} +func (*QueryInflowsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_2ca7e17b0958935d, []int{3} +} +func (m *QueryInflowsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryInflowsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryInflowsResponse.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 *QueryInflowsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryInflowsResponse.Merge(m, src) +} +func (m *QueryInflowsResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryInflowsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryInflowsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryInflowsResponse proto.InternalMessageInfo + // QueryParams defines the request structure for the Params gRPC service // handler. type QueryParams struct { @@ -41,7 +193,7 @@ func (m *QueryParams) Reset() { *m = QueryParams{} } func (m *QueryParams) String() string { return proto.CompactTextString(m) } func (*QueryParams) ProtoMessage() {} func (*QueryParams) Descriptor() ([]byte, []int) { - return fileDescriptor_2ca7e17b0958935d, []int{0} + return fileDescriptor_2ca7e17b0958935d, []int{4} } func (m *QueryParams) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -80,7 +232,7 @@ func (m *QueryParamsResponse) Reset() { *m = QueryParamsResponse{} } func (m *QueryParamsResponse) String() string { return proto.CompactTextString(m) } func (*QueryParamsResponse) ProtoMessage() {} func (*QueryParamsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_2ca7e17b0958935d, []int{1} + return fileDescriptor_2ca7e17b0958935d, []int{5} } func (m *QueryParamsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -118,7 +270,7 @@ func (m *QueryOutflows) Reset() { *m = QueryOutflows{} } func (m *QueryOutflows) String() string { return proto.CompactTextString(m) } func (*QueryOutflows) ProtoMessage() {} func (*QueryOutflows) Descriptor() ([]byte, []int) { - return fileDescriptor_2ca7e17b0958935d, []int{2} + return fileDescriptor_2ca7e17b0958935d, []int{6} } func (m *QueryOutflows) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -156,7 +308,7 @@ func (m *QueryOutflowsResponse) Reset() { *m = QueryOutflowsResponse{} } func (m *QueryOutflowsResponse) String() string { return proto.CompactTextString(m) } func (*QueryOutflowsResponse) ProtoMessage() {} func (*QueryOutflowsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_2ca7e17b0958935d, []int{3} + return fileDescriptor_2ca7e17b0958935d, []int{7} } func (m *QueryOutflowsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -193,7 +345,7 @@ func (m *QueryAllOutflows) Reset() { *m = QueryAllOutflows{} } func (m *QueryAllOutflows) String() string { return proto.CompactTextString(m) } func (*QueryAllOutflows) ProtoMessage() {} func (*QueryAllOutflows) Descriptor() ([]byte, []int) { - return fileDescriptor_2ca7e17b0958935d, []int{4} + return fileDescriptor_2ca7e17b0958935d, []int{8} } func (m *QueryAllOutflows) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -231,7 +383,7 @@ func (m *QueryAllOutflowsResponse) Reset() { *m = QueryAllOutflowsRespon func (m *QueryAllOutflowsResponse) String() string { return proto.CompactTextString(m) } func (*QueryAllOutflowsResponse) ProtoMessage() {} func (*QueryAllOutflowsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_2ca7e17b0958935d, []int{5} + return fileDescriptor_2ca7e17b0958935d, []int{9} } func (m *QueryAllOutflowsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -261,6 +413,10 @@ func (m *QueryAllOutflowsResponse) XXX_DiscardUnknown() { var xxx_messageInfo_QueryAllOutflowsResponse proto.InternalMessageInfo func init() { + proto.RegisterType((*QueryAllInflows)(nil), "umee.uibc.v1.QueryAllInflows") + proto.RegisterType((*QueryAllInflowsResponse)(nil), "umee.uibc.v1.QueryAllInflowsResponse") + proto.RegisterType((*QueryInflows)(nil), "umee.uibc.v1.QueryInflows") + proto.RegisterType((*QueryInflowsResponse)(nil), "umee.uibc.v1.QueryInflowsResponse") proto.RegisterType((*QueryParams)(nil), "umee.uibc.v1.QueryParams") proto.RegisterType((*QueryParamsResponse)(nil), "umee.uibc.v1.QueryParamsResponse") proto.RegisterType((*QueryOutflows)(nil), "umee.uibc.v1.QueryOutflows") @@ -272,39 +428,45 @@ func init() { func init() { proto.RegisterFile("umee/uibc/v1/query.proto", fileDescriptor_2ca7e17b0958935d) } var fileDescriptor_2ca7e17b0958935d = []byte{ - // 510 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x93, 0x4f, 0x6f, 0xd3, 0x30, - 0x18, 0xc6, 0x9b, 0xc1, 0xaa, 0xe1, 0x32, 0x09, 0x99, 0x32, 0x75, 0xa1, 0x72, 0x47, 0x10, 0xd3, - 0x24, 0xd4, 0x58, 0xed, 0x24, 0x4e, 0x5c, 0x28, 0xbd, 0x70, 0x02, 0x2a, 0x4e, 0x5c, 0x26, 0x37, - 0x35, 0x25, 0x5a, 0x92, 0x37, 0xd4, 0x4e, 0x47, 0xaf, 0xdc, 0xb8, 0x21, 0xf1, 0x2d, 0x38, 0xf3, - 0x21, 0x7a, 0x9c, 0x40, 0x42, 0x88, 0xc3, 0x80, 0x96, 0x0f, 0x82, 0xfc, 0x27, 0x51, 0x32, 0x8d, - 0x89, 0x53, 0xed, 0xf7, 0x79, 0xfb, 0xfc, 0x5e, 0x3f, 0x76, 0x50, 0x2b, 0x8b, 0x39, 0xa7, 0x59, - 0x38, 0x0e, 0xe8, 0xbc, 0x47, 0xdf, 0x64, 0x7c, 0xb6, 0xf0, 0xd3, 0x19, 0x48, 0xc0, 0xd7, 0x95, - 0xe2, 0x2b, 0xc5, 0x9f, 0xf7, 0xdc, 0xf6, 0x14, 0x60, 0x1a, 0x71, 0xca, 0xd2, 0x90, 0xb2, 0x24, - 0x01, 0xc9, 0x64, 0x08, 0x89, 0x30, 0xbd, 0x6e, 0x73, 0x0a, 0x53, 0xd0, 0x4b, 0xaa, 0x56, 0xb6, - 0xba, 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 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x94, 0x31, 0x6f, 0xd3, 0x40, + 0x14, 0xc7, 0x63, 0x68, 0xd3, 0xf2, 0xd2, 0x0a, 0x74, 0xa4, 0x6d, 0xe2, 0xa6, 0x4e, 0x6b, 0x68, + 0xa9, 0x84, 0xe2, 0x53, 0x52, 0x89, 0x89, 0x85, 0x90, 0xa5, 0x13, 0x10, 0x31, 0xb1, 0x54, 0x8e, + 0x73, 0xa4, 0x56, 0x6c, 0x5f, 0xc8, 0xd9, 0x29, 0x59, 0x19, 0x90, 0xd8, 0x90, 0xf8, 0x16, 0xcc, + 0x48, 0x7c, 0x85, 0x8c, 0x15, 0x2c, 0x88, 0xa1, 0x40, 0xc2, 0x07, 0x41, 0xbe, 0x3b, 0x5b, 0x76, + 0x48, 0xad, 0x2e, 0x9d, 0xe2, 0x7b, 0xff, 0x97, 0xf7, 0xfb, 0xbf, 0xbb, 0x7b, 0x07, 0xa5, 0xc0, + 0x25, 0x04, 0x07, 0x76, 0xc7, 0xc2, 0xa3, 0x3a, 0x7e, 0x13, 0x90, 0xe1, 0xd8, 0x18, 0x0c, 0xa9, + 0x4f, 0xd1, 0x5a, 0xa8, 0x18, 0xa1, 0x62, 0x8c, 0xea, 0x6a, 0xa5, 0x47, 0x69, 0xcf, 0x21, 0xd8, + 0x1c, 0xd8, 0xd8, 0xf4, 0x3c, 0xea, 0x9b, 0xbe, 0x4d, 0x3d, 0x26, 0x72, 0xd5, 0x62, 0x8f, 0xf6, + 0x28, 0xff, 0xc4, 0xe1, 0x97, 0x8c, 0x96, 0x2d, 0xca, 0x5c, 0xca, 0x4e, 0x84, 0x20, 0x16, 0x52, + 0x9a, 0xc7, 0x52, 0xdf, 0x94, 0x8a, 0x26, 0xf2, 0x70, 0xc7, 0x64, 0x04, 0x8f, 0xea, 0x1d, 0xe2, + 0x9b, 0x75, 0x6c, 0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 0x54, 0x53, 0xce, 0xa7, 0x9a, 0xf2, 0x7b, 0xaa, 0x29, 0x1f, 0x67, 0x5a, 0xee, 0x7c, 0xa6, 0xe5, + 0x7e, 0xcc, 0xb4, 0xdc, 0xab, 0xe4, 0xd4, 0x84, 0x25, 0x6a, 0x1e, 0xf1, 0xcf, 0xe8, 0xb0, 0x2f, + 0xea, 0x8d, 0x1e, 0xe1, 0xb7, 0xbc, 0x68, 0x27, 0xcf, 0x1f, 0xd7, 0xa3, 0x7f, 0x01, 0x00, 0x00, + 0xff, 0xff, 0xfe, 0x3d, 0x2e, 0x90, 0x0f, 0x06, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -326,6 +488,11 @@ type QueryClient interface { Outflows(ctx context.Context, in *QueryOutflows, opts ...grpc.CallOption) (*QueryOutflowsResponse, error) // AllOutflow returns outflows for each denom in the current quota period. AllOutflows(ctx context.Context, in *QueryAllOutflows, opts ...grpc.CallOption) (*QueryAllOutflowsResponse, error) + // Inflows returns registered IBC denoms inflows in the current quota period. + // If denom is not specified, returns sum of all registered inflows. + Inflows(ctx context.Context, in *QueryInflows, opts ...grpc.CallOption) (*QueryInflowsResponse, error) + // AllInflows returns inflows for each registered denom in the current quota period. + AllInflows(ctx context.Context, in *QueryAllInflows, opts ...grpc.CallOption) (*QueryAllInflowsResponse, error) } type queryClient struct { @@ -363,6 +530,24 @@ func (c *queryClient) AllOutflows(ctx context.Context, in *QueryAllOutflows, opt return out, nil } +func (c *queryClient) Inflows(ctx context.Context, in *QueryInflows, opts ...grpc.CallOption) (*QueryInflowsResponse, error) { + out := new(QueryInflowsResponse) + err := c.cc.Invoke(ctx, "/umee.uibc.v1.Query/Inflows", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) AllInflows(ctx context.Context, in *QueryAllInflows, opts ...grpc.CallOption) (*QueryAllInflowsResponse, error) { + out := new(QueryAllInflowsResponse) + err := c.cc.Invoke(ctx, "/umee.uibc.v1.Query/AllInflows", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // QueryServer is the server API for Query service. type QueryServer interface { // Params queries the parameters of the x/uibc module. @@ -372,6 +557,11 @@ type QueryServer interface { Outflows(context.Context, *QueryOutflows) (*QueryOutflowsResponse, error) // AllOutflow returns outflows for each denom in the current quota period. AllOutflows(context.Context, *QueryAllOutflows) (*QueryAllOutflowsResponse, error) + // Inflows returns registered IBC denoms inflows in the current quota period. + // If denom is not specified, returns sum of all registered inflows. + Inflows(context.Context, *QueryInflows) (*QueryInflowsResponse, error) + // AllInflows returns inflows for each registered denom in the current quota period. + AllInflows(context.Context, *QueryAllInflows) (*QueryAllInflowsResponse, error) } // UnimplementedQueryServer can be embedded to have forward compatible implementations. @@ -387,6 +577,12 @@ func (*UnimplementedQueryServer) Outflows(ctx context.Context, req *QueryOutflow func (*UnimplementedQueryServer) AllOutflows(ctx context.Context, req *QueryAllOutflows) (*QueryAllOutflowsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method AllOutflows not implemented") } +func (*UnimplementedQueryServer) Inflows(ctx context.Context, req *QueryInflows) (*QueryInflowsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Inflows not implemented") +} +func (*UnimplementedQueryServer) AllInflows(ctx context.Context, req *QueryAllInflows) (*QueryAllInflowsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method AllInflows not implemented") +} func RegisterQueryServer(s grpc1.Server, srv QueryServer) { s.RegisterService(&_Query_serviceDesc, srv) @@ -446,6 +642,42 @@ func _Query_AllOutflows_Handler(srv interface{}, ctx context.Context, dec func(i return interceptor(ctx, in, info, handler) } +func _Query_Inflows_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryInflows) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).Inflows(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/umee.uibc.v1.Query/Inflows", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).Inflows(ctx, req.(*QueryInflows)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_AllInflows_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryAllInflows) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).AllInflows(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/umee.uibc.v1.Query/AllInflows", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).AllInflows(ctx, req.(*QueryAllInflows)) + } + return interceptor(ctx, in, info, handler) +} + var _Query_serviceDesc = grpc.ServiceDesc{ ServiceName: "umee.uibc.v1.Query", HandlerType: (*QueryServer)(nil), @@ -462,12 +694,20 @@ var _Query_serviceDesc = grpc.ServiceDesc{ MethodName: "AllOutflows", Handler: _Query_AllOutflows_Handler, }, + { + MethodName: "Inflows", + Handler: _Query_Inflows_Handler, + }, + { + MethodName: "AllInflows", + Handler: _Query_AllInflows_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "umee/uibc/v1/query.proto", } -func (m *QueryParams) Marshal() (dAtA []byte, err error) { +func (m *QueryAllInflows) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -477,20 +717,27 @@ func (m *QueryParams) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *QueryParams) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryAllInflows) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryParams) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryAllInflows) 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 *QueryParamsResponse) Marshal() (dAtA []byte, err error) { +func (m *QueryAllInflowsResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -500,30 +747,34 @@ func (m *QueryParamsResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *QueryParamsResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryAllInflowsResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryAllInflowsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - { - size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err + if len(m.Inflows) > 0 { + for iNdEx := len(m.Inflows) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Inflows[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) } - i-- - dAtA[i] = 0xa return len(dAtA) - i, nil } -func (m *QueryOutflows) Marshal() (dAtA []byte, err error) { +func (m *QueryInflows) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -533,12 +784,12 @@ func (m *QueryOutflows) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *QueryOutflows) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryInflows) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryOutflows) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryInflows) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -553,7 +804,7 @@ func (m *QueryOutflows) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *QueryOutflowsResponse) Marshal() (dAtA []byte, err error) { +func (m *QueryInflowsResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -563,12 +814,12 @@ func (m *QueryOutflowsResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *QueryOutflowsResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryInflowsResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryOutflowsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryInflowsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -586,7 +837,7 @@ func (m *QueryOutflowsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *QueryAllOutflows) Marshal() (dAtA []byte, err error) { +func (m *QueryParams) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -596,12 +847,12 @@ func (m *QueryAllOutflows) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *QueryAllOutflows) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryParams) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryAllOutflows) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryParams) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -609,7 +860,7 @@ func (m *QueryAllOutflows) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *QueryAllOutflowsResponse) Marshal() (dAtA []byte, err error) { +func (m *QueryParamsResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -619,62 +870,233 @@ func (m *QueryAllOutflowsResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *QueryAllOutflowsResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryParamsResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryAllOutflowsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if len(m.Outflows) > 0 { - for iNdEx := len(m.Outflows) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Outflows[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa + { + size, err := m.Params.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 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++ +func (m *QueryOutflows) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } - dAtA[offset] = uint8(v) - return base + return dAtA[:n], nil } -func (m *QueryParams) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n + +func (m *QueryOutflows) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryParamsResponse) Size() (n int) { - if m == nil { - return 0 - } +func (m *QueryOutflows) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - l = m.Params.Size() - n += 1 + l + sovQuery(uint64(l)) - return n + 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 *QueryOutflowsResponse) 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 *QueryOutflowsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryOutflowsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size := m.Amount.Size() + i -= size + if _, err := m.Amount.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *QueryAllOutflows) 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 *QueryAllOutflows) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryAllOutflows) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *QueryAllOutflowsResponse) 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 *QueryAllOutflowsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryAllOutflowsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Outflows) > 0 { + for iNdEx := len(m.Outflows) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Outflows[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 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 *QueryAllInflows) 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 *QueryAllInflowsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Inflows) > 0 { + for _, e := range m.Inflows { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + return n +} + +func (m *QueryInflows) 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 *QueryInflowsResponse) 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 (m *QueryParams) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *QueryParamsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Params.Size() + n += 1 + l + sovQuery(uint64(l)) + return n } func (m *QueryOutflows) Size() (n int) { @@ -731,6 +1153,338 @@ func sovQuery(x uint64) (n int) { func sozQuery(x uint64) (n int) { return sovQuery(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } +func (m *QueryAllInflows) 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: QueryAllInflows: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryAllInflows: 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) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryAllInflowsResponse) 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: QueryAllInflowsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryAllInflowsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Inflows", 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.Inflows = append(m.Inflows, types.DecCoin{}) + if err := m.Inflows[len(m.Inflows)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryInflows) 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: QueryInflows: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryInflows: 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) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryInflowsResponse) 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: QueryInflowsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryInflowsResponse: 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) + } + 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 + } + 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) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func (m *QueryParams) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 diff --git a/x/uibc/query.pb.gw.go b/x/uibc/query.pb.gw.go index d9c09fa8d9..6b0b2fa0a5 100644 --- a/x/uibc/query.pb.gw.go +++ b/x/uibc/query.pb.gw.go @@ -105,6 +105,78 @@ func local_request_Query_AllOutflows_0(ctx context.Context, marshaler runtime.Ma } +var ( + filter_Query_Inflows_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_Query_Inflows_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryInflows + 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_Inflows_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.Inflows(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_Inflows_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryInflows + 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_Inflows_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.Inflows(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_Query_AllInflows_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_Query_AllInflows_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryAllInflows + 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_AllInflows_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.AllInflows(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_AllInflows_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryAllInflows + 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_AllInflows_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.AllInflows(ctx, &protoReq) + return msg, metadata, err + +} + // RegisterQueryHandlerServer registers the http handlers for service Query to "mux". // UnaryRPC :call QueryServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. @@ -180,6 +252,52 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv }) + mux.Handle("GET", pattern_Query_Inflows_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_Inflows_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_Inflows_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_AllInflows_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_AllInflows_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_AllInflows_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -281,6 +399,46 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie }) + mux.Handle("GET", pattern_Query_Inflows_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_Inflows_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_Inflows_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_AllInflows_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_AllInflows_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_AllInflows_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -290,6 +448,10 @@ var ( pattern_Query_Outflows_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"umee", "uibc", "v1", "outflows"}, "", runtime.AssumeColonVerbOpt(false))) pattern_Query_AllOutflows_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"umee", "uibc", "v1", "all_outflows"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_Inflows_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"umee", "uibc", "v1", "inflows"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_AllInflows_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"umee", "uibc", "v1", "all_inflows"}, "", runtime.AssumeColonVerbOpt(false))) ) var ( @@ -298,4 +460,8 @@ var ( forward_Query_Outflows_0 = runtime.ForwardResponseMessage forward_Query_AllOutflows_0 = runtime.ForwardResponseMessage + + forward_Query_Inflows_0 = runtime.ForwardResponseMessage + + forward_Query_AllInflows_0 = runtime.ForwardResponseMessage ) diff --git a/x/uibc/quota/grpc_query.go b/x/uibc/quota/grpc_query.go index 62984e58cc..6c8f402ef3 100644 --- a/x/uibc/quota/grpc_query.go +++ b/x/uibc/quota/grpc_query.go @@ -57,3 +57,37 @@ func (q Querier) AllOutflows(goCtx context.Context, _ *uibc.QueryAllOutflows) ( } return &uibc.QueryAllOutflowsResponse{Outflows: o}, nil } + +// AllInflows implements uibc.QueryServer. +func (q Querier) AllInflows(goCtx context.Context, req *uibc.QueryAllInflows) (*uibc.QueryAllInflowsResponse, error) { + ctx := sdk.UnwrapSDKContext(goCtx) + var ( + inflows []sdk.DecCoin + err error + ) + + if len(req.Denom) != 0 { + tokenInflow := q.Keeper(&ctx).GetTokenInflow(req.Denom) + inflows = append(inflows, tokenInflow) + } else { + inflows, err = q.Keeper(&ctx).GetAllInflows() + if err != nil { + return nil, err + } + } + + return &uibc.QueryAllInflowsResponse{Inflows: inflows}, nil +} + +// Inflows implements uibc.QueryServer. +func (q Querier) Inflows(goCtx context.Context, req *uibc.QueryInflows) (*uibc.QueryInflowsResponse, error) { + ctx := sdk.UnwrapSDKContext(goCtx) + var amount sdk.Dec + if len(req.Denom) != 0 { + tokenInflow := q.Keeper(&ctx).GetTokenInflow(req.Denom) + amount = tokenInflow.Amount + } else { + amount = q.Keeper(&ctx).GetInflowSum() + } + return &uibc.QueryInflowsResponse{Amount: amount}, nil +}