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

chore: format proto files #1802

Merged
merged 5 commits into from
May 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
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
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.