@@ -11,52 +11,88 @@ option go_package = "github.com/umee-network/umee/v3/x/incentive";
1111// Query defines the gRPC querier service.
1212service Query {
1313 // Params queries the parameters of the x/incentive module.
14- rpc Params (QueryParamsRequest ) returns (QueryParamsResponse ) {
14+ rpc Params (QueryParams ) returns (QueryParamsResponse ) {
1515 option (google.api.http ).get = "/umee/incentive/v1/params" ;
1616 }
1717
18- // IncentivePrograms queries for all incentives programs that have been passed
19- // by governance, including upcoming and completed ones.
20- rpc IncentivePrograms (QueryIncentiveProgramsRequest )
21- returns (QueryIncentiveProgramsResponse ) {
22- option (google.api.http ).get = "/umee/incentive/v1/incentive_programs" ;
18+ // CompletedIncentivePrograms queries for all incentives programs that have been passed
19+ // by governance, and either run to completion or expired immediately due to not being funded.
20+ rpc CompletedIncentivePrograms (QueryCompletedIncentivePrograms )
21+ returns (QueryCompletedIncentiveProgramsResponse ) {
22+ option (google.api.http ).get = "/umee/incentive/v1/incentive_programs/completed" ;
23+ }
24+
25+ // OngoingIncentivePrograms queries for all incentives programs that have been passed
26+ // by governance, funded, and started but not yet completed.
27+ rpc OngoingIncentivePrograms (QueryOngoingIncentivePrograms )
28+ returns (QueryOngoingIncentiveProgramsResponse ) {
29+ option (google.api.http ).get = "/umee/incentive/v1/incentive_programs/ongoing" ;
30+ }
31+
32+ // UpcomingIncentivePrograms queries for all incentives programs that have been passed
33+ // by governance, but not yet started. They may or may not have been funded.
34+ rpc UpcomingIncentivePrograms (QueryUpcomingIncentivePrograms )
35+ returns (QueryUpcomingIncentiveProgramsResponse ) {
36+ option (google.api.http ).get = "/umee/incentive/v1/incentive_programs/upcoming" ;
2337 }
2438
2539 // IncentiveProgram queries a single incentive program by ID.
26- rpc IncentiveProgram (QueryIncentiveProgramRequest )
40+ rpc IncentiveProgram (QueryIncentiveProgram )
2741 returns (QueryIncentiveProgramResponse ) {
2842 option (google.api.http ).get = "/umee/incentive/v1/incentive_program/{id}" ;
2943 }
3044}
3145
32- // QueryParamsRequest defines the request structure for the Params gRPC service
46+ // QueryParams defines the request structure for the Params gRPC service
3347// handler.
34- message QueryParamsRequest {}
48+ message QueryParams {}
3549
3650// QueryParamsResponse defines the response structure for the Params gRPC
3751// service handler.
3852message QueryParamsResponse {
3953 Params params = 1 [(gogoproto.nullable ) = false ];
4054}
4155
42- // QueryIncentiveProgramsRequest defines the request structure for the IncentivePrograms
43- // gRPC service handler.
44- message QueryIncentiveProgramsRequest {
56+ // QueryUpcomingIncentivePrograms defines the request structure for the
57+ // OngoingIncentivePrograms and UpcomingIncentivePrograms gRPC service handlers.
58+ message QueryUpcomingIncentivePrograms {
59+ }
60+
61+ // QueryUpcomingIncentiveProgramsResponse defines the response structure for the
62+ // OngoingIncentivePrograms and UpcomingIncentivePrograms gRPC service handlers.
63+ message QueryUpcomingIncentiveProgramsResponse {
64+ repeated IncentiveProgram programs = 1 [(gogoproto.nullable ) = false ];
65+ }
66+
67+ // QueryOngoingIncentivePrograms defines the request structure for the
68+ // OngoingIncentivePrograms and UpcomingIncentivePrograms gRPC service handlers.
69+ message QueryOngoingIncentivePrograms {
70+ }
71+
72+ // QueryOngoingIncentiveProgramsResponse defines the response structure for the
73+ // OngoingIncentivePrograms and UpcomingIncentivePrograms gRPC service handlers.
74+ message QueryOngoingIncentiveProgramsResponse {
75+ repeated IncentiveProgram programs = 1 [(gogoproto.nullable ) = false ];
76+ }
77+
78+ // QueryCompletedIncentivePrograms defines the request structure for the
79+ // CompletedIncentivePrograms gRPC service handler.
80+ message QueryCompletedIncentivePrograms {
4581 // pagination defines an optional pagination for the request.
4682 cosmos.base.query.v1beta1.PageRequest pagination = 1 ;
4783}
4884
49- // QueryIncentiveProgramsResponse defines the response structure for the
50- // IncentivePrograms gRPC service handler.
51- message QueryIncentiveProgramsResponse {
85+ // QueryCompletedIncentiveProgramsResponse defines the response structure for the
86+ // CompletedIncentivePrograms gRPC service handler.
87+ message QueryCompletedIncentiveProgramsResponse {
5288 repeated IncentiveProgram programs = 1 [(gogoproto.nullable ) = false ];
5389 // pagination defines an optional pagination for the request.
5490 cosmos.base.query.v1beta1.PageRequest pagination = 2 ;
5591}
5692
57- // QueryIncentiveProgramRequest defines the request structure for the IncentiveProgram
93+ // QueryIncentiveProgram defines the request structure for the IncentiveProgram
5894// gRPC service handler.
59- message QueryIncentiveProgramRequest {
95+ message QueryIncentiveProgram {
6096 // ID specifies which program to query for
6197 uint32 id = 1 ;
6298}
0 commit comments