Skip to content

Commit

Permalink
chore: format proto files (celestiaorg#1802)
Browse files Browse the repository at this point in the history
## Overview

Runs `make proto-format`
  • Loading branch information
rach-id committed May 23, 2023
1 parent 7075501 commit 5bee212
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 23 deletions.
2 changes: 1 addition & 1 deletion proto/celestia/mint/v1/genesis.proto
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ option go_package = "github.com/celestiaorg/celestia-app/x/mint/types";
// GenesisState defines the mint module's genesis state.
message GenesisState {
// minter is a space for holding current inflation information.
Minter minter = 1 [(gogoproto.nullable) = false];
Minter minter = 1 [ (gogoproto.nullable) = false ];
}
13 changes: 7 additions & 6 deletions proto/celestia/mint/v1/mint.proto
Original file line number Diff line number Diff line change
Expand Up @@ -13,23 +13,24 @@ message Minter {
// current year. For example if InflationRate=0.1, then 10% of the total
// supply will be minted over the course of the year.
string inflation_rate = 1 [
(cosmos_proto.scalar) = "cosmos.Dec",
(cosmos_proto.scalar) = "cosmos.Dec",
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec",
(gogoproto.nullable) = false
(gogoproto.nullable) = false
];
// AnnualProvisions is the total number of tokens to be minted in the current
// year due to inflation.
string annual_provisions = 2 [
(cosmos_proto.scalar) = "cosmos.Dec",
(cosmos_proto.scalar) = "cosmos.Dec",
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec",
(gogoproto.nullable) = false
(gogoproto.nullable) = false
];

// GenesisTime is the timestamp of the genesis block.
google.protobuf.Timestamp genesis_time = 3 [(gogoproto.stdtime) = true];
google.protobuf.Timestamp genesis_time = 3 [ (gogoproto.stdtime) = true ];

// PreviousBlockTime is the timestamp of the previous block.
google.protobuf.Timestamp previous_block_time = 4 [(gogoproto.stdtime) = true];
google.protobuf.Timestamp previous_block_time = 4
[ (gogoproto.stdtime) = true ];

// BondDenom is the denomination of the token that should be minted.
string bond_denom = 5;
Expand Down
32 changes: 21 additions & 11 deletions proto/celestia/mint/v1/query.proto
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,14 @@ option go_package = "github.com/celestiaorg/celestia-app/x/mint/types";
// Query defines the gRPC querier service.
service Query {
// InflationRate returns the current inflation rate.
rpc InflationRate(QueryInflationRateRequest) returns (QueryInflationRateResponse) {
rpc InflationRate(QueryInflationRateRequest)
returns (QueryInflationRateResponse) {
option (google.api.http).get = "/cosmos/mint/v1beta1/inflation_rate";
}

// AnnualProvisions returns the current annual provisions.
rpc AnnualProvisions(QueryAnnualProvisionsRequest) returns (QueryAnnualProvisionsResponse) {
rpc AnnualProvisions(QueryAnnualProvisionsRequest)
returns (QueryAnnualProvisionsResponse) {
option (google.api.http).get = "/cosmos/mint/v1beta1/annual_provisions";
}

Expand All @@ -26,14 +28,18 @@ service Query {
}
}

// QueryInflationRateRequest is the request type for the Query/InflationRate RPC method.
// QueryInflationRateRequest is the request type for the Query/InflationRate RPC
// method.
message QueryInflationRateRequest {}

// QueryInflationRateResponse is the response type for the Query/InflationRate RPC
// method.
// QueryInflationRateResponse is the response type for the Query/InflationRate
// RPC method.
message QueryInflationRateResponse {
// InflationRate is the current inflation rate.
bytes inflation_rate = 1 [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.nullable) = false];
bytes inflation_rate = 1 [
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec",
(gogoproto.nullable) = false
];
}

// QueryAnnualProvisionsRequest is the request type for the
Expand All @@ -44,15 +50,19 @@ message QueryAnnualProvisionsRequest {}
// Query/AnnualProvisions RPC method.
message QueryAnnualProvisionsResponse {
// AnnualProvisions is the current annual provisions.
bytes annual_provisions = 1
[(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.nullable) = false];
bytes annual_provisions = 1 [
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec",
(gogoproto.nullable) = false
];
}

// QueryGenesisTimeRequest is the request type for the Query/GenesisTime RPC method.
// QueryGenesisTimeRequest is the request type for the Query/GenesisTime RPC
// method.
message QueryGenesisTimeRequest {}

// QueryGenesisTimeResponse is the response type for the Query/GenesisTime RPC method.
// QueryGenesisTimeResponse is the response type for the Query/GenesisTime RPC
// method.
message QueryGenesisTimeResponse {
// GenesisTime is the timestamp associated with the first block.
google.protobuf.Timestamp genesis_time = 1 [(gogoproto.stdtime) = true];
google.protobuf.Timestamp genesis_time = 1 [ (gogoproto.stdtime) = true ];
}
13 changes: 8 additions & 5 deletions x/mint/types/query.pb.go

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

0 comments on commit 5bee212

Please sign in to comment.