Skip to content

Commit 75351e4

Browse files
committed
feat: add pagination to GetRewardsByAvsForDistributionRoot
1 parent 3022a40 commit 75351e4

File tree

8 files changed

+333
-233
lines changed

8 files changed

+333
-233
lines changed

gen/api-ts/eigenlayer/sidecar/v1/rewards/rewards.pb.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,10 +103,12 @@ export type GetAttributableRewardsForDistributionRootResponse = {
103103

104104
export type GetRewardsByAvsForDistributionRootRequest = {
105105
rootIndex?: string
106+
pagination?: EigenlayerSidecarV1CommonTypes.Pagination
106107
}
107108

108109
export type GetRewardsByAvsForDistributionRootResponse = {
109110
rewards?: EigenlayerSidecarV1RewardsCommon.AvsReward[]
111+
nextPage?: EigenlayerSidecarV1CommonTypes.Pagination
110112
}
111113

112114

gen/openapi/api.public.swagger.json

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1594,19 +1594,31 @@
15941594
"GetRewardsByAvsForDistributionRootRequest": {
15951595
"type": "object",
15961596
"properties": {
1597+
"pagination": {
1598+
"$ref": "#/components/schemas/Pagination"
1599+
},
15971600
"rootIndex": {
15981601
"type": "integer",
15991602
"format": "uint64"
16001603
}
1601-
}
1604+
},
1605+
"required": [
1606+
"pagination"
1607+
]
16021608
},
16031609
"GetRewardsByAvsForDistributionRootResponse": {
16041610
"type": "object",
16051611
"properties": {
1612+
"nextPage": {
1613+
"$ref": "#/components/schemas/Pagination"
1614+
},
16061615
"rewards": {
16071616
"$ref": "#/components/schemas/AvsReward"
16081617
}
1609-
}
1618+
},
1619+
"required": [
1620+
"next_page"
1621+
]
16101622
},
16111623
"GetRewardsForDistributionRootRequest": {
16121624
"type": "object",

gen/openapi/api.swagger.json

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -808,10 +808,16 @@
808808
"schema": {
809809
"type": "object",
810810
"properties": {
811+
"nextPage": {
812+
"$ref": "#/components/schemas/Pagination"
813+
},
811814
"rewards": {
812815
"$ref": "#/components/schemas/AvsReward"
813816
}
814-
}
817+
},
818+
"required": [
819+
"next_page"
820+
]
815821
}
816822
}
817823
}
@@ -2708,19 +2714,31 @@
27082714
"GetRewardsByAvsForDistributionRootRequest": {
27092715
"type": "object",
27102716
"properties": {
2717+
"pagination": {
2718+
"$ref": "#/components/schemas/Pagination"
2719+
},
27112720
"rootIndex": {
27122721
"type": "integer",
27132722
"format": "uint64"
27142723
}
2715-
}
2724+
},
2725+
"required": [
2726+
"pagination"
2727+
]
27162728
},
27172729
"GetRewardsByAvsForDistributionRootResponse": {
27182730
"type": "object",
27192731
"properties": {
2732+
"nextPage": {
2733+
"$ref": "#/components/schemas/Pagination"
2734+
},
27202735
"rewards": {
27212736
"$ref": "#/components/schemas/AvsReward"
27222737
}
2723-
}
2738+
},
2739+
"required": [
2740+
"next_page"
2741+
]
27242742
},
27252743
"GetRewardsForDistributionRootRequest": {
27262744
"type": "object",

gen/openapiv2/apidocs.swagger.json

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -751,6 +751,20 @@
751751
"required": true,
752752
"type": "string",
753753
"format": "uint64"
754+
},
755+
{
756+
"name": "pagination.pageNumber",
757+
"in": "query",
758+
"required": false,
759+
"type": "integer",
760+
"format": "int64"
761+
},
762+
{
763+
"name": "pagination.pageSize",
764+
"in": "query",
765+
"required": false,
766+
"type": "integer",
767+
"format": "int64"
754768
}
755769
],
756770
"tags": [
@@ -2901,6 +2915,9 @@
29012915
"type": "object",
29022916
"$ref": "#/definitions/rewardsAvsReward"
29032917
}
2918+
},
2919+
"nextPage": {
2920+
"$ref": "#/definitions/commonPagination"
29042921
}
29052922
}
29062923
},

gen/protos/eigenlayer/sidecar/v1/rewards/rewards.pb.go

Lines changed: 255 additions & 228 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

gen/protos/eigenlayer/sidecar/v1/rewards/rpc.gw.client.go

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

gen/protos/eigenlayer/sidecar/v1/rewards/rpc.pb.gw.go

Lines changed: 18 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

protos/eigenlayer/sidecar/v1/rewards/rewards.proto

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,9 +95,11 @@ message GetAttributableRewardsForDistributionRootResponse {
9595

9696
message GetRewardsByAvsForDistributionRootRequest {
9797
uint64 root_index = 1;
98+
common.Pagination pagination = 2;
9899
}
99100
message GetRewardsByAvsForDistributionRootResponse {
100101
repeated AvsReward rewards = 1;
102+
common.Pagination next_page = 2;
101103
}
102104

103105

0 commit comments

Comments
 (0)