Skip to content

Commit

Permalink
feat: add funder address for funding queries
Browse files Browse the repository at this point in the history
  • Loading branch information
shifty11 committed Oct 24, 2023
1 parent 92bf81b commit e96b42d
Show file tree
Hide file tree
Showing 4 changed files with 137 additions and 72 deletions.
9 changes: 9 additions & 0 deletions docs/swagger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7789,6 +7789,9 @@ paths:
items:
type: object
properties:
funder_address:
type: string
title: funder_address
pool_id:
type: string
format: uint64
Expand Down Expand Up @@ -8397,6 +8400,9 @@ paths:
items:
type: object
properties:
funder_address:
type: string
title: funder_address
pool_id:
type: string
format: uint64
Expand Down Expand Up @@ -8720,6 +8726,9 @@ paths:
items:
type: object
properties:
funder_address:
type: string
title: funder_address
pool_id:
type: string
format: uint64
Expand Down
10 changes: 6 additions & 4 deletions proto/kyve/query/v1beta1/funders.proto
Original file line number Diff line number Diff line change
Expand Up @@ -64,14 +64,16 @@ message FundingStats {

// Funding ...
message Funding {
// funder_address
string funder_address = 1;
// pool_id ...
uint64 pool_id = 1;
uint64 pool_id = 2;
// amount ...
uint64 amount = 2;
uint64 amount = 3;
// amount_per_bundle ...
uint64 amount_per_bundle = 3;
uint64 amount_per_bundle = 4;
// total_funded ...
uint64 total_funded = 4;
uint64 total_funded = 5;
}

// ========
Expand Down
1 change: 1 addition & 0 deletions x/query/keeper/grpc_query_fundings.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ func (k Keeper) parseFundings(fundings []fundersTypes.Funding, withInactiveFundi
for _, funding := range fundings {
if funding.Amount > 0 || withInactiveFundings {
fundingsData = append(fundingsData, types.Funding{
FunderAddress: funding.FunderAddress,
PoolId: funding.PoolId,
Amount: funding.Amount,
AmountPerBundle: funding.AmountPerBundle,
Expand Down
189 changes: 121 additions & 68 deletions x/query/types/funders.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit e96b42d

Please sign in to comment.