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..ab58e54db7 100644 --- a/proto/umee/uibc/v1/query.proto +++ b/proto/umee/uibc/v1/query.proto @@ -5,6 +5,7 @@ import "google/api/annotations.proto"; import "gogoproto/gogo.proto"; import "cosmos_proto/cosmos.proto"; import "umee/uibc/v1/quota.proto"; +import "google/protobuf/timestamp.proto"; import "cosmos/base/v1beta1/coin.proto"; option go_package = "github.com/umee-network/umee/v6/x/uibc"; @@ -28,6 +29,48 @@ 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"; + } + + // QuotaExpires returns when current ibc quota will end. + rpc QuotaExpires(QueryQuotaExpires) returns (QueryQuotaExpiresResponse) { + option (google.api.http).get = "/umee/uibc/v1/quota_expires"; + } +} + +// QueryAllInflows defines request type for query the inflow quota of registered denoms. +message QueryQuotaExpires {} + +// QueryAllInflowsResponse defines response type of Query/AllInflows +message QueryQuotaExpiresResponse { + google.protobuf.Timestamp end_time = 4 [ + (gogoproto.nullable) = false, + (gogoproto.stdtime) = true, + (gogoproto.jsontag) = "end_time,omitempty", + (gogoproto.moretags) = "yaml:\"end_time\"" + ]; +} + +// 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 sum = 1 [ + (cosmos_proto.scalar) = "cosmos.Dec", + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.nullable) = false + ]; + repeated cosmos.base.v1beta1.DecCoin inflows = 2 [ + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.DecCoin", + (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..06f2d4b690 100644 --- a/x/oracle/keeper/grpc_query.go +++ b/x/oracle/keeper/grpc_query.go @@ -362,3 +362,34 @@ 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) { + 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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f7, 0x6a, 0x65, 0x83, 0xbf, 0x68, 0x30, 0x99, 0xff, - 0xa7, 0x7d, 0x91, 0x07, 0xe7, 0xd4, 0xea, 0x8d, 0xf1, 0x6b, 0x47, 0x3f, 0xb6, 0xca, 0xb7, 0xe5, - 0x2f, 0x02, 0xad, 0x20, 0x5a, 0xbb, 0x74, 0xe3, 0xf9, 0x3f, 0xf5, 0xd2, 0xf3, 0x57, 0x75, 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,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xb9, 0x97, 0x6f, 0xca, 0xb9, 0xdf, 0xde, 0x94, 0x73, 0x9f, 0x19, 0xca, 0x4b, 0x53, + 0x28, 0xb3, 0xe0, 0x92, 0x60, 0xcb, 0xf3, 0xef, 0x73, 0xcd, 0xee, 0x5b, 0xe6, 0x76, 0x4f, 0x98, + 0xbd, 0x40, 0xad, 0xef, 0x67, 0xdf, 0x98, 0x2e, 0xfd, 0x17, 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/client/cli/query.go b/x/uibc/client/cli/query.go index 0aa3a91610..183d3b4f88 100644 --- a/x/uibc/client/cli/query.go +++ b/x/uibc/client/cli/query.go @@ -23,11 +23,64 @@ func GetQueryCmd() *cobra.Command { cmd.AddCommand( QueryParams(), GetOutflows(), + GetInflows(), + GetQuotaExpireTime(), ) return cmd } +// GetQuotaExpireTime returns end time for the current quota period. +func GetQuotaExpireTime() *cobra.Command { + cmd := &cobra.Command{ + Use: "quota-expire-time", + Args: cobra.NoArgs, + Short: "Get the current ibc quota expire time.", + RunE: func(cmd *cobra.Command, args []string) error { + clientCtx, err := client.GetClientQueryContext(cmd) + if err != nil { + return err + } + queryClient := uibc.NewQueryClient(clientCtx) + + resp, err := queryClient.QuotaExpires(cmd.Context(), &uibc.QueryQuotaExpires{}) + return cli.PrintOrErr(resp, err, clientCtx) + }, + } + + flags.AddQueryFlagsToCmd(cmd) + + return cmd +} + +// GetInflows returns total inflow sum, if denom specified it will return quota inflow of the denom. +func GetInflows() *cobra.Command { + cmd := &cobra.Command{ + Use: "inflows [denom]", + Args: cobra.MaximumNArgs(1), + Short: "Get the total ibc inflow sum of registered tokens.", + RunE: func(cmd *cobra.Command, args []string) error { + clientCtx, err := client.GetClientQueryContext(cmd) + if err != nil { + return err + } + queryClient := uibc.NewQueryClient(clientCtx) + + req := &uibc.QueryInflows{} + if len(args) > 0 && len(args[0]) != 0 { + req.Denom = args[0] + } + + resp, err := queryClient.Inflows(cmd.Context(), req) + return cli.PrintOrErr(resp, err, clientCtx) + }, + } + + flags.AddQueryFlagsToCmd(cmd) + + return cmd +} + // QueryParams creates a Cobra command to query for the x/uibc // module parameters. func QueryParams() *cobra.Command { @@ -66,7 +119,7 @@ func GetOutflows() *cobra.Command { queryClient := uibc.NewQueryClient(clientCtx) queryReq := uibc.QueryOutflows{} - if len(args) > 0 { + if len(args) > 0 && len(args[0]) != 0 { queryReq.Denom = args[0] } resp, err := queryClient.Outflows(cmd.Context(), &queryReq) diff --git a/x/uibc/query.pb.go b/x/uibc/query.pb.go index 1cc3e43514..ed3d893948 100644 --- a/x/uibc/query.pb.go +++ b/x/uibc/query.pb.go @@ -12,19 +12,23 @@ import ( _ "github.com/cosmos/gogoproto/gogoproto" grpc1 "github.com/cosmos/gogoproto/grpc" proto "github.com/cosmos/gogoproto/proto" + github_com_cosmos_gogoproto_types "github.com/cosmos/gogoproto/types" _ "google.golang.org/genproto/googleapis/api/annotations" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" + _ "google.golang.org/protobuf/types/known/timestamppb" io "io" math "math" math_bits "math/bits" + time "time" ) // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal var _ = fmt.Errorf var _ = math.Inf +var _ = time.Kitchen // This is a compile-time assertion to ensure that this generated file // is compatible with the proto package it is being compiled against. @@ -32,6 +36,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 QueryQuotaExpires struct { +} + +func (m *QueryQuotaExpires) Reset() { *m = QueryQuotaExpires{} } +func (m *QueryQuotaExpires) String() string { return proto.CompactTextString(m) } +func (*QueryQuotaExpires) ProtoMessage() {} +func (*QueryQuotaExpires) Descriptor() ([]byte, []int) { + return fileDescriptor_2ca7e17b0958935d, []int{0} +} +func (m *QueryQuotaExpires) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryQuotaExpires) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryQuotaExpires.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 *QueryQuotaExpires) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryQuotaExpires.Merge(m, src) +} +func (m *QueryQuotaExpires) XXX_Size() int { + return m.Size() +} +func (m *QueryQuotaExpires) XXX_DiscardUnknown() { + xxx_messageInfo_QueryQuotaExpires.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryQuotaExpires proto.InternalMessageInfo + +// QueryAllInflowsResponse defines response type of Query/AllInflows +type QueryQuotaExpiresResponse struct { + EndTime time.Time `protobuf:"bytes,4,opt,name=end_time,json=endTime,proto3,stdtime" json:"end_time,omitempty" yaml:"end_time"` +} + +func (m *QueryQuotaExpiresResponse) Reset() { *m = QueryQuotaExpiresResponse{} } +func (m *QueryQuotaExpiresResponse) String() string { return proto.CompactTextString(m) } +func (*QueryQuotaExpiresResponse) ProtoMessage() {} +func (*QueryQuotaExpiresResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_2ca7e17b0958935d, []int{1} +} +func (m *QueryQuotaExpiresResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryQuotaExpiresResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryQuotaExpiresResponse.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 *QueryQuotaExpiresResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryQuotaExpiresResponse.Merge(m, src) +} +func (m *QueryQuotaExpiresResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryQuotaExpiresResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryQuotaExpiresResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryQuotaExpiresResponse 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 { + Sum github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,1,opt,name=sum,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"sum"` + Inflows []github_com_cosmos_cosmos_sdk_types.DecCoin `protobuf:"bytes,2,rep,name=inflows,proto3,customtype=github.com/cosmos/cosmos-sdk/types.DecCoin" json:"inflows"` +} + +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 +197,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 +236,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 +274,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 +312,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 +349,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 +387,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 +417,10 @@ func (m *QueryAllOutflowsResponse) XXX_DiscardUnknown() { var xxx_messageInfo_QueryAllOutflowsResponse proto.InternalMessageInfo func init() { + proto.RegisterType((*QueryQuotaExpires)(nil), "umee.uibc.v1.QueryQuotaExpires") + proto.RegisterType((*QueryQuotaExpiresResponse)(nil), "umee.uibc.v1.QueryQuotaExpiresResponse") + 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 +432,53 @@ 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, 0x1b, 0x80, 0x88, 0x41, 0x1c, 0x19, 0xc1, 0x6c, 0xac, 0x74, 0x1e, 0x0b, 0x92, 0x59, 0x85, - 0x98, 0x3e, 0x3a, 0x66, 0x82, 0xd3, 0x79, 0x6f, 0xcc, 0x25, 0xeb, 0xd1, 0x00, 0xc2, 0xc4, 0xe8, - 0xde, 0x36, 0x6a, 0x3c, 0x57, 0x53, 0x3e, 0x63, 0x33, 0x16, 0x0b, 0xef, 0x09, 0xba, 0x59, 0xda, - 0x8e, 0xb8, 0x48, 0x21, 0x11, 0x1c, 0xf7, 0x51, 0x3d, 0xd5, 0x95, 0x96, 0xb3, 0xe7, 0x1c, 0x34, - 0xfa, 0x4d, 0xb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0x24, 0xe6, 0x96, 0x70, 0x84, 0xb6, 0x8a, - 0x0b, 0xba, 0x7d, 0x81, 0x59, 0x2e, 0xba, 0x77, 0x2f, 0x11, 0x0b, 0x16, 0xd1, 0xac, 0x16, 0xde, - 0xa9, 0xb2, 0xf2, 0xd3, 0xe1, 0x05, 0x6a, 0x94, 0x32, 0xc6, 0xe4, 0x02, 0xcf, 0x92, 0xee, 0xee, - 0x5f, 0xae, 0x17, 0x58, 0x4f, 0x63, 0xdb, 0xd8, 0xad, 0x62, 0x59, 0x14, 0x1d, 0xe5, 0xe8, 0xc1, - 0x70, 0xf9, 0x9b, 0xd4, 0x96, 0x2b, 0xe2, 0x9c, 0xae, 0x88, 0xf3, 0x6b, 0x45, 0x9c, 0x0f, 0x6b, - 0x52, 0x3b, 0x5d, 0x93, 0xda, 0xf7, 0x35, 0xa9, 0xbd, 0x2c, 0x3f, 0x2a, 0xe5, 0xd1, 0x4d, 0xb8, - 0x3c, 0x81, 0xd9, 0xb1, 0x31, 0x9c, 0x3f, 0xa0, 0x6f, 0xb5, 0xeb, 0xb8, 0xae, 0xbf, 0x9a, 0xc3, - 0xbf, 0x01, 0x00, 0x00, 0xff, 0xff, 0x95, 0xcb, 0x3d, 0x54, 0xe8, 0x03, 0x00, 0x00, + // 721 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x94, 0xbf, 0x53, 0x13, 0x4d, + 0x18, 0xc7, 0x73, 0xfc, 0x08, 0xbc, 0x1b, 0x98, 0xf7, 0x7d, 0x97, 0x80, 0xe1, 0x08, 0x77, 0xb8, + 0x28, 0x32, 0x2a, 0xb7, 0x93, 0x30, 0x63, 0xe1, 0xd8, 0x18, 0xb1, 0xa0, 0x51, 0xc9, 0x50, 0xd9, + 0x64, 0x2e, 0xc9, 0x12, 0x4e, 0xee, 0x6e, 0xcf, 0xec, 0x5e, 0x20, 0x85, 0x8d, 0x33, 0x16, 0x76, + 0xcc, 0xf8, 0x5f, 0x58, 0xdb, 0xdb, 0x52, 0x32, 0xd8, 0x38, 0x16, 0x41, 0xc1, 0xca, 0xd2, 0xbf, + 0xc0, 0xd9, 0xbd, 0xbd, 0xf3, 0x02, 0x01, 0x29, 0xac, 0xc8, 0xee, 0xf7, 0x7b, 0xdf, 0xcf, 0xb3, + 0xcf, 0xc3, 0x2e, 0x28, 0x84, 0x1e, 0x21, 0x38, 0x74, 0xea, 0x0d, 0xdc, 0x29, 0xe1, 0x97, 0x21, + 0x69, 0x77, 0xad, 0xa0, 0x4d, 0x39, 0x85, 0x13, 0x42, 0xb1, 0x84, 0x62, 0x75, 0x4a, 0x7a, 0xb1, + 0x45, 0x69, 0xcb, 0x25, 0xd8, 0x0e, 0x1c, 0x6c, 0xfb, 0x3e, 0xe5, 0x36, 0x77, 0xa8, 0xcf, 0x22, + 0xaf, 0x9e, 0x6f, 0xd1, 0x16, 0x95, 0x3f, 0xb1, 0xf8, 0xa5, 0x76, 0x67, 0x1b, 0x94, 0x79, 0x94, + 0xd5, 0x22, 0x21, 0x5a, 0x28, 0xe9, 0x2c, 0x96, 0x72, 0x5b, 0x29, 0xa6, 0x02, 0xc9, 0x55, 0x3d, + 0xdc, 0xc2, 0xdc, 0xf1, 0x08, 0xe3, 0xb6, 0x17, 0x28, 0x83, 0x11, 0x05, 0xe1, 0xba, 0xcd, 0x08, + 0xee, 0x94, 0xea, 0x84, 0xdb, 0x25, 0xdc, 0xa0, 0x8e, 0x1f, 0xe9, 0x68, 0x0a, 0xfc, 0xbf, 0x21, + 0x8e, 0xb1, 0x21, 0x42, 0x1f, 0xef, 0x05, 0x4e, 0x9b, 0x30, 0xf4, 0x46, 0x03, 0xb3, 0xe7, 0x76, + 0xab, 0x84, 0x05, 0xd4, 0x67, 0x04, 0x6e, 0x83, 0x71, 0xe2, 0x37, 0x6b, 0x82, 0x54, 0x18, 0x59, + 0xd0, 0x96, 0x73, 0x65, 0xdd, 0x8a, 0xca, 0xb0, 0xe2, 0x32, 0xac, 0xcd, 0xb8, 0x8c, 0x4a, 0xe9, + 0xa0, 0x67, 0x66, 0x7e, 0xf4, 0x4c, 0x18, 0x7f, 0x73, 0x97, 0x7a, 0x0e, 0x27, 0x5e, 0xc0, 0xbb, + 0x3f, 0x7b, 0xe6, 0xbf, 0x5d, 0xdb, 0x73, 0xef, 0xa3, 0x58, 0x43, 0xfb, 0xc7, 0xa6, 0x56, 0x1d, + 0x23, 0x7e, 0x53, 0x04, 0xa0, 0x1b, 0x60, 0x42, 0x96, 0xb1, 0xee, 0x6f, 0xb9, 0x74, 0x97, 0xc1, + 0x3c, 0x18, 0x6d, 0x12, 0x9f, 0x7a, 0x05, 0x6d, 0x41, 0x5b, 0xfe, 0xa7, 0x1a, 0x2d, 0xd0, 0x91, + 0x06, 0xf2, 0x69, 0x5b, 0x52, 0xe8, 0x13, 0x30, 0xcc, 0x42, 0x65, 0xae, 0x3c, 0x10, 0x75, 0x7c, + 0xe9, 0x99, 0x4b, 0x2d, 0x87, 0x6f, 0x87, 0x75, 0xab, 0x41, 0x3d, 0xd5, 0x64, 0xf5, 0x67, 0x85, + 0x35, 0x77, 0x30, 0xef, 0x06, 0x84, 0x59, 0x6b, 0xa4, 0x71, 0xf4, 0x61, 0x05, 0xa8, 0x19, 0xac, + 0x91, 0x46, 0x55, 0x04, 0xc1, 0x17, 0x60, 0xcc, 0x89, 0x10, 0x85, 0xa1, 0x85, 0xe1, 0xe5, 0x5c, + 0xb9, 0x68, 0x29, 0x8b, 0xe8, 0xae, 0xa5, 0xba, 0x2b, 0xfc, 0x8f, 0xa8, 0xe3, 0x57, 0xca, 0x8a, + 0x78, 0xfb, 0x6a, 0x44, 0xf1, 0x4d, 0x35, 0x06, 0xa0, 0x49, 0x90, 0x93, 0x67, 0x7a, 0x66, 0xb7, + 0x6d, 0x8f, 0xa1, 0x75, 0x30, 0x95, 0x5a, 0x26, 0x27, 0x2c, 0x83, 0x6c, 0x20, 0x77, 0xe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0x6b, 0x09, 0x6e, 0x5e, 0xe2, 0xae, 0xc1, 0xe9, 0x7e, 0x9c, + 0xba, 0x52, 0xf0, 0x95, 0x78, 0x4d, 0x7e, 0xbf, 0x67, 0xd0, 0x1c, 0x10, 0x99, 0x36, 0xe8, 0xb7, + 0xfe, 0x60, 0x48, 0xc0, 0x8b, 0x12, 0x3c, 0x0f, 0xe7, 0xf0, 0xf9, 0x87, 0xba, 0x46, 0x22, 0x73, + 0x65, 0xed, 0xe0, 0x9b, 0x91, 0x39, 0x38, 0x31, 0xb4, 0xc3, 0x13, 0x43, 0xfb, 0x7a, 0x62, 0x68, + 0xfb, 0xa7, 0x46, 0xe6, 0xf0, 0xd4, 0xc8, 0x7c, 0x3e, 0x35, 0x32, 0xcf, 0xd3, 0xb7, 0x47, 0x84, + 0xac, 0xf8, 0x84, 0xef, 0xd2, 0xf6, 0x4e, 0x94, 0xd8, 0xb9, 0x87, 0xf7, 0x64, 0x6c, 0x3d, 0x2b, + 0x9f, 0xd8, 0xd5, 0x5f, 0x01, 0x00, 0x00, 0xff, 0xff, 0xaa, 0x0f, 0x0f, 0xc9, 0x8a, 0x06, 0x00, + 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -326,6 +500,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) + // QuotaExpires returns when current ibc quota will end. + QuotaExpires(ctx context.Context, in *QueryQuotaExpires, opts ...grpc.CallOption) (*QueryQuotaExpiresResponse, error) } type queryClient struct { @@ -363,6 +542,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) QuotaExpires(ctx context.Context, in *QueryQuotaExpires, opts ...grpc.CallOption) (*QueryQuotaExpiresResponse, error) { + out := new(QueryQuotaExpiresResponse) + err := c.cc.Invoke(ctx, "/umee.uibc.v1.Query/QuotaExpires", 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 +569,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) + // QuotaExpires returns when current ibc quota will end. + QuotaExpires(context.Context, *QueryQuotaExpires) (*QueryQuotaExpiresResponse, error) } // UnimplementedQueryServer can be embedded to have forward compatible implementations. @@ -387,6 +589,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) QuotaExpires(ctx context.Context, req *QueryQuotaExpires) (*QueryQuotaExpiresResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method QuotaExpires not implemented") +} func RegisterQueryServer(s grpc1.Server, srv QueryServer) { s.RegisterService(&_Query_serviceDesc, srv) @@ -446,6 +654,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_QuotaExpires_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryQuotaExpires) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).QuotaExpires(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/umee.uibc.v1.Query/QuotaExpires", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).QuotaExpires(ctx, req.(*QueryQuotaExpires)) + } + return interceptor(ctx, in, info, handler) +} + var _Query_serviceDesc = grpc.ServiceDesc{ ServiceName: "umee.uibc.v1.Query", HandlerType: (*QueryServer)(nil), @@ -462,11 +706,150 @@ var _Query_serviceDesc = grpc.ServiceDesc{ MethodName: "AllOutflows", Handler: _Query_AllOutflows_Handler, }, + { + MethodName: "Inflows", + Handler: _Query_Inflows_Handler, + }, + { + MethodName: "QuotaExpires", + Handler: _Query_QuotaExpires_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "umee/uibc/v1/query.proto", } +func (m *QueryQuotaExpires) 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 *QueryQuotaExpires) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryQuotaExpires) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *QueryQuotaExpiresResponse) 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 *QueryQuotaExpiresResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryQuotaExpiresResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + n1, err1 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.EndTime, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.EndTime):]) + if err1 != nil { + return 0, err1 + } + i -= n1 + i = encodeVarintQuery(dAtA, i, uint64(n1)) + i-- + dAtA[i] = 0x22 + return len(dAtA) - i, nil +} + +func (m *QueryInflows) 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 *QueryInflows) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryInflows) 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 *QueryInflowsResponse) 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 *QueryInflowsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryInflowsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Inflows) > 0 { + for iNdEx := len(m.Inflows) - 1; iNdEx >= 0; iNdEx-- { + { + size := m.Inflows[iNdEx].Size() + i -= size + if _, err := m.Inflows[iNdEx].MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + { + size := m.Sum.Size() + i -= size + if _, err := m.Sum.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 *QueryParams) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -657,7 +1040,7 @@ func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { dAtA[offset] = uint8(v) return base } -func (m *QueryParams) Size() (n int) { +func (m *QueryQuotaExpires) Size() (n int) { if m == nil { return 0 } @@ -666,18 +1049,18 @@ func (m *QueryParams) Size() (n int) { return n } -func (m *QueryParamsResponse) Size() (n int) { +func (m *QueryQuotaExpiresResponse) Size() (n int) { if m == nil { return 0 } var l int _ = l - l = m.Params.Size() + l = github_com_cosmos_gogoproto_types.SizeOfStdTime(m.EndTime) n += 1 + l + sovQuery(uint64(l)) return n } -func (m *QueryOutflows) Size() (n int) { +func (m *QueryInflows) Size() (n int) { if m == nil { return 0 } @@ -690,17 +1073,67 @@ func (m *QueryOutflows) Size() (n int) { return n } -func (m *QueryOutflowsResponse) Size() (n int) { +func (m *QueryInflowsResponse) Size() (n int) { if m == nil { return 0 } var l int _ = l - l = m.Amount.Size() + l = m.Sum.Size() n += 1 + l + sovQuery(uint64(l)) - return n -} - + if len(m.Inflows) > 0 { + for _, e := range m.Inflows { + l = e.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) { + 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 *QueryOutflowsResponse) 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 *QueryAllOutflows) Size() (n int) { if m == nil { return 0 @@ -731,6 +1164,339 @@ func sovQuery(x uint64) (n int) { func sozQuery(x uint64) (n int) { return sovQuery(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } +func (m *QueryQuotaExpires) 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: QueryQuotaExpires: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryQuotaExpires: 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) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryQuotaExpiresResponse) 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: QueryQuotaExpiresResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryQuotaExpiresResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field EndTime", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(&m.EndTime, 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 Sum", 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.Sum.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + 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, github_com_cosmos_cosmos_sdk_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 *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..a97ad32e6b 100644 --- a/x/uibc/query.pb.gw.go +++ b/x/uibc/query.pb.gw.go @@ -105,6 +105,60 @@ 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 + +} + +func request_Query_QuotaExpires_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryQuotaExpires + var metadata runtime.ServerMetadata + + msg, err := client.QuotaExpires(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_QuotaExpires_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryQuotaExpires + var metadata runtime.ServerMetadata + + msg, err := server.QuotaExpires(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 +234,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_QuotaExpires_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_QuotaExpires_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_QuotaExpires_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -281,6 +381,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_QuotaExpires_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_QuotaExpires_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_QuotaExpires_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -290,6 +430,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_QuotaExpires_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"umee", "uibc", "v1", "quota_expires"}, "", runtime.AssumeColonVerbOpt(false))) ) var ( @@ -298,4 +442,8 @@ var ( forward_Query_Outflows_0 = runtime.ForwardResponseMessage forward_Query_AllOutflows_0 = runtime.ForwardResponseMessage + + forward_Query_Inflows_0 = runtime.ForwardResponseMessage + + forward_Query_QuotaExpires_0 = runtime.ForwardResponseMessage ) diff --git a/x/uibc/quota/grpc_query.go b/x/uibc/quota/grpc_query.go index 62984e58cc..617f08e15e 100644 --- a/x/uibc/quota/grpc_query.go +++ b/x/uibc/quota/grpc_query.go @@ -57,3 +57,35 @@ func (q Querier) AllOutflows(goCtx context.Context, _ *uibc.QueryAllOutflows) ( } return &uibc.QueryAllOutflowsResponse{Outflows: o}, nil } + +// Inflows returns sum of inflows and registered IBC denoms inflows in the current quota period. +func (q Querier) Inflows(goCtx context.Context, req *uibc.QueryInflows) (*uibc.QueryInflowsResponse, error) { + ctx := sdk.UnwrapSDKContext(goCtx) + var ( + inflows sdk.DecCoins + err error + ) + + if len(req.Denom) != 0 { + inflows = append(inflows, q.Keeper(&ctx).GetTokenInflow(req.Denom)) + } else { + inflows, err = q.Keeper(&ctx).GetAllInflows() + if err != nil { + return nil, err + } + } + return &uibc.QueryInflowsResponse{Sum: q.Keeper(&ctx).GetInflowSum(), Inflows: inflows}, nil +} + +// QuotaExpires returns the current ibc quota expire time. +func (q Querier) QuotaExpires(goCtx context.Context, _ *uibc.QueryQuotaExpires) (*uibc.QueryQuotaExpiresResponse, + error) { + ctx := sdk.UnwrapSDKContext(goCtx) + + quotaExpireTime, err := q.Keeper(&ctx).GetExpire() + if err != nil { + return nil, err + } + + return &uibc.QueryQuotaExpiresResponse{EndTime: *quotaExpireTime}, nil +}