Skip to content

Commit

Permalink
Merge pull request #337 from larry0x/larry/bank-total-supply-query
Browse files Browse the repository at this point in the history
Add query for the total supply of a coin
  • Loading branch information
Expotential108 committed Sep 1, 2022
2 parents 9b93e06 + 553e90e commit e001d9c
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions types/queries.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,20 @@ type QueryRequest struct {
}

type BankQuery struct {
Supply *SupplyQuery `json:"supply,omitempty"`
Balance *BalanceQuery `json:"balance,omitempty"`
AllBalances *AllBalancesQuery `json:"all_balances,omitempty"`
}

type SupplyQuery struct {
Denom string `json:"denom"`
}

// SupplyResponse is the expected response to SupplyQuery
type SupplyResponse struct {
Amount Coin `json:"amount"`
}

type BalanceQuery struct {
Address string `json:"address"`
Denom string `json:"denom"`
Expand Down

0 comments on commit e001d9c

Please sign in to comment.