Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(x/ecocredit): query all credit holders #1416

Merged
merged 8 commits into from
Aug 30, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
feat(x/ecocredit): query all balances
  • Loading branch information
tyler authored and tyler committed Aug 29, 2022
commit 5cab99caac59e954f34e745c0399acb8e6e90a04
741 changes: 371 additions & 370 deletions api/regen/ecocredit/v1/query.pulsar.go

Large diffs are not rendered by default.

1,379 changes: 1,352 additions & 27 deletions api/regen/ecocredit/v1/types.pulsar.go

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion proto/regen/ecocredit/v1/query.proto
Original file line number Diff line number Diff line change
Expand Up @@ -517,7 +517,7 @@ message QueryAllBalancesResponse {

// balances are a list of balances from different credit batches that the
// account holds.
repeated BatchBalanceInfo balances = 1;
repeated CreditBalances balances = 1;

// pagination defines the pagination in the response.
cosmos.base.query.v1beta1.PageResponse pagination = 2;
Expand Down
26 changes: 26 additions & 0 deletions proto/regen/ecocredit/v1/types.proto
Original file line number Diff line number Diff line change
Expand Up @@ -117,3 +117,29 @@ message CreditTypeProposal {
// passes.
CreditType credit_type = 3;
}

// CreditBalances represents a collection of credits a given address owns.
message CreditBalances {

// address is the address of the holder of the credits.
string address = 1;

// balances are the
CreditBalance balances = 2;
}

// CreditBalance represents the total added ecocredit balances across multiple batch denoms.
message CreditBalance {

// batch_denoms are the batch denoms of the ecocredits owned.
repeated string batch_denoms = 1;

// tradable_amount is the tradable amount of ecocredits.
string tradable_amount = 2;

// retired_amount is the retired amount of ecocredits.
string retired_amount = 3;

// escrowed_amount is the escrowed amount of ecocredits.
string escrowed_amount = 4;
}
264 changes: 132 additions & 132 deletions x/ecocredit/core/query.pb.go

Large diffs are not rendered by default.

Loading