Skip to content

Commit

Permalink
feat: Add Supply Offsets to bank module (#119)
Browse files Browse the repository at this point in the history
  • Loading branch information
czarcas7ic committed Nov 6, 2023
1 parent b0b8bb1 commit 4e3a014
Show file tree
Hide file tree
Showing 15 changed files with 4,337 additions and 529 deletions.
2,950 changes: 2,546 additions & 404 deletions api/cosmos/bank/v1beta1/query.pulsar.go

Large diffs are not rendered by default.

78 changes: 78 additions & 0 deletions api/cosmos/bank/v1beta1/query_grpc.pb.go

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

93 changes: 93 additions & 0 deletions baseapp/testutil/mock/mocks.go

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

47 changes: 47 additions & 0 deletions proto/cosmos/bank/v1beta1/query.proto
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,16 @@ service Query {
option (google.api.http).get = "/cosmos/bank/v1beta1/supply/by_denom";
}

// TotalSupplyWithoutOffset queries the total supply of all coins.
rpc TotalSupplyWithoutOffset(QueryTotalSupplyWithoutOffsetRequest) returns (QueryTotalSupplyWithoutOffsetResponse) {
option (google.api.http).get = "/cosmos/bank/v1beta1/supply_without_offset";
}

// SupplyOf queries the supply of a single coin.
rpc SupplyOfWithoutOffset(QuerySupplyOfWithoutOffsetRequest) returns (QuerySupplyOfWithoutOffsetResponse) {
option (google.api.http).get = "/cosmos/bank/v1beta1/supply_without_offset/{denom}";
}

// Params queries the parameters of x/bank module.
rpc Params(QueryParamsRequest) returns (QueryParamsResponse) {
option (cosmos.query.v1.module_query_safe) = true;
Expand Down Expand Up @@ -268,6 +278,43 @@ message QuerySupplyOfResponse {
cosmos.base.v1beta1.Coin amount = 1 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true];
}

// QueryTotalSupplyWithoutOffsetRequest is the request type for the Query/TotalSupplyWithoutOffset RPC
// method.
message QueryTotalSupplyWithoutOffsetRequest {
option (gogoproto.equal) = false;
option (gogoproto.goproto_getters) = false;

// pagination defines an optional pagination for the request.
//
// Since: cosmos-sdk 0.43
cosmos.base.query.v1beta1.PageRequest pagination = 1;
}

// QueryTotalSupplyWithoutOffsetResponse is the response type for the Query/TotalSupplyWithoutOffset RPC
// method
message QueryTotalSupplyWithoutOffsetResponse {
// supply is the supply of the coins
repeated cosmos.base.v1beta1.Coin supply = 1
[(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"];

// pagination defines the pagination in the response.
//
// Since: cosmos-sdk 0.43
cosmos.base.query.v1beta1.PageResponse pagination = 2;
}

// QuerySupplyOfWithoutOffsetRequest is the request type for the Query/SupplyOfWithoutOffset RPC method.
message QuerySupplyOfWithoutOffsetRequest {
// denom is the coin denom to query balances for.
string denom = 1;
}

// QuerySupplyOfWithoutOffsetResponse is the response type for the Query/SupplyOfWithoutOffset RPC method.
message QuerySupplyOfWithoutOffsetResponse {
// amount is the supply of the coin.
cosmos.base.v1beta1.Coin amount = 1 [(gogoproto.nullable) = false];
}

// QueryParamsRequest defines the request type for querying x/bank parameters.
message QueryParamsRequest {}

Expand Down
Loading

0 comments on commit 4e3a014

Please sign in to comment.