Skip to content

Commit

Permalink
format proto
Browse files Browse the repository at this point in the history
  • Loading branch information
beer-1 committed Sep 23, 2024
1 parent 50d3984 commit 11b2230
Show file tree
Hide file tree
Showing 9 changed files with 64 additions and 102 deletions.
2 changes: 1 addition & 1 deletion client/docs/statik/statik.go

Large diffs are not rendered by default.

32 changes: 18 additions & 14 deletions client/docs/swagger-ui/swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49080,7 +49080,7 @@ paths:
type: string
v1_tally_result:
description: >-
v1_result is the original TallyResult from
v1_tally_result is the original TallyResult from
cosmos-sdk,

which contains both staking and vesting power.
Expand Down Expand Up @@ -50084,7 +50084,7 @@ paths:
type: string
v1_tally_result:
description: >-
v1_result is the original TallyResult from
v1_tally_result is the original TallyResult from
cosmos-sdk,

which contains both staking and vesting power.
Expand Down Expand Up @@ -50736,8 +50736,10 @@ paths:
total_vesting_power:
type: string
v1_tally_result:
description: |-
v1_result is the original TallyResult from cosmos-sdk,
description: >-
v1_tally_result is the original TallyResult from
cosmos-sdk,

which contains both staking and vesting power.
type: object
properties:
Expand Down Expand Up @@ -51052,7 +51054,7 @@ paths:
schema:
type: object
properties:
tally:
tally_result:
description: tally defines the requested tally.
type: object
properties:
Expand All @@ -51064,8 +51066,10 @@ paths:
total_vesting_power:
type: string
v1_tally_result:
description: |-
v1_result is the original TallyResult from cosmos-sdk,
description: >-
v1_tally_result is the original TallyResult from
cosmos-sdk,

which contains both staking and vesting power.
type: object
properties:
Expand Down Expand Up @@ -86193,7 +86197,7 @@ definitions:
type: string
v1_tally_result:
description: |-
v1_result is the original TallyResult from cosmos-sdk,
v1_tally_result is the original TallyResult from cosmos-sdk,
which contains both staking and vesting power.
type: object
properties:
Expand Down Expand Up @@ -86501,7 +86505,7 @@ definitions:
type: string
v1_tally_result:
description: |-
v1_result is the original TallyResult from cosmos-sdk,
v1_tally_result is the original TallyResult from cosmos-sdk,
which contains both staking and vesting power.
type: object
properties:
Expand Down Expand Up @@ -87006,7 +87010,7 @@ definitions:
type: string
v1_tally_result:
description: |-
v1_result is the original TallyResult from cosmos-sdk,
v1_tally_result is the original TallyResult from cosmos-sdk,
which contains both staking and vesting power.
type: object
properties:
Expand Down Expand Up @@ -87322,7 +87326,7 @@ definitions:
type: string
v1_tally_result:
description: |-
v1_result is the original TallyResult from cosmos-sdk,
v1_tally_result is the original TallyResult from cosmos-sdk,
which contains both staking and vesting power.
type: object
properties:
Expand Down Expand Up @@ -87437,7 +87441,7 @@ definitions:
initia.gov.v1.QueryTallyResultResponse:
type: object
properties:
tally:
tally_result:
description: tally defines the requested tally.
type: object
properties:
Expand All @@ -87450,7 +87454,7 @@ definitions:
type: string
v1_tally_result:
description: |-
v1_result is the original TallyResult from cosmos-sdk,
v1_tally_result is the original TallyResult from cosmos-sdk,
which contains both staking and vesting power.
type: object
properties:
Expand Down Expand Up @@ -87483,7 +87487,7 @@ definitions:
type: string
v1_tally_result:
description: |-
v1_result is the original TallyResult from cosmos-sdk,
v1_tally_result is the original TallyResult from cosmos-sdk,
which contains both staking and vesting power.
type: object
properties:
Expand Down
6 changes: 2 additions & 4 deletions proto/ibc/applications/perm/v1/genesis.proto
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ option go_package = "github.com/initia-labs/initia/x/ibc/perm/types";

// GenesisState defines the ibc perm genesis state
message GenesisState {
repeated ChannelState channel_states = 1 [
(gogoproto.moretags) = "yaml:\"channel_states\"",
(gogoproto.nullable) = false
];
repeated ChannelState channel_states = 1
[(gogoproto.moretags) = "yaml:\"channel_states\"", (gogoproto.nullable) = false];
}
2 changes: 1 addition & 1 deletion proto/ibc/applications/perm/v1/query.proto
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ message QueryChannelStatesResponse {
// QueryChannelStateRequest is the request type for the Query/ChannelState RPC method.
message QueryChannelStateRequest {
string channel_id = 1;
string port_id = 2;
string port_id = 2;
}

// QueryChannelStateResponse is the response type for the Query/ChannelState RPC method.
Expand Down
33 changes: 12 additions & 21 deletions proto/ibc/applications/perm/v1/tx.proto
Original file line number Diff line number Diff line change
Expand Up @@ -26,19 +26,16 @@ service Msg {
// the specific ibc channel.
message MsgSetPermissionedRelayers {
option (cosmos.msg.v1.signer) = "authority";
option (amino.name) = "perm/MsgSetPermissionedRelayers";
option (amino.name) = "perm/MsgSetPermissionedRelayers";

option (gogoproto.equal) = false;
option (gogoproto.equal) = false;
option (gogoproto.goproto_getters) = false;

// authority is the address that controls the module
// (defaults to x/gov unless overwritten).
string authority = 1 [
(gogoproto.moretags) = "yaml:\"authority\"",
(cosmos_proto.scalar) = "cosmos.AddressString"
];
string authority = 1 [(gogoproto.moretags) = "yaml:\"authority\"", (cosmos_proto.scalar) = "cosmos.AddressString"];
string channel_id = 2 [(gogoproto.moretags) = "yaml:\"channel_id\""];
string port_id = 3 [(gogoproto.moretags) = "yaml:\"port_id\""];
string port_id = 3 [(gogoproto.moretags) = "yaml:\"port_id\""];
repeated string relayers = 4 [(gogoproto.moretags) = "yaml:\"relayers\""];
}

Expand All @@ -48,19 +45,16 @@ message MsgSetPermissionedRelayersResponse {}
// MsgHaltChannel defines msg to halt the specific ibc channel.
message MsgHaltChannel {
option (cosmos.msg.v1.signer) = "authority";
option (amino.name) = "perm/MsgHaltChannel";
option (amino.name) = "perm/MsgHaltChannel";

option (gogoproto.equal) = false;
option (gogoproto.equal) = false;
option (gogoproto.goproto_getters) = false;

// authority is the address that controls the module
// (defaults to x/gov unless overwritten).
string authority = 1 [
(gogoproto.moretags) = "yaml:\"authority\"",
(cosmos_proto.scalar) = "cosmos.AddressString"
];
string authority = 1 [(gogoproto.moretags) = "yaml:\"authority\"", (cosmos_proto.scalar) = "cosmos.AddressString"];
string channel_id = 2 [(gogoproto.moretags) = "yaml:\"channel_id\""];
string port_id = 3 [(gogoproto.moretags) = "yaml:\"port_id\""];
string port_id = 3 [(gogoproto.moretags) = "yaml:\"port_id\""];
}

// MsgHaltChannelResponse defines the Msg/HaltChannel response type.
Expand All @@ -69,19 +63,16 @@ message MsgHaltChannelResponse {}
// MsgResumeChannel defines msg to resume the specific ibc channel.
message MsgResumeChannel {
option (cosmos.msg.v1.signer) = "authority";
option (amino.name) = "perm/MsgResumeChannel";
option (amino.name) = "perm/MsgResumeChannel";

option (gogoproto.equal) = false;
option (gogoproto.equal) = false;
option (gogoproto.goproto_getters) = false;

// authority is the address that controls the module
// (defaults to x/gov unless overwritten).
string authority = 1 [
(gogoproto.moretags) = "yaml:\"authority\"",
(cosmos_proto.scalar) = "cosmos.AddressString"
];
string authority = 1 [(gogoproto.moretags) = "yaml:\"authority\"", (cosmos_proto.scalar) = "cosmos.AddressString"];
string channel_id = 2 [(gogoproto.moretags) = "yaml:\"channel_id\""];
string port_id = 3 [(gogoproto.moretags) = "yaml:\"port_id\""];
string port_id = 3 [(gogoproto.moretags) = "yaml:\"port_id\""];
}

// MsgResumeChannelResponse defines the Msg/ResumeChannel response type.
Expand Down
10 changes: 5 additions & 5 deletions proto/ibc/applications/perm/v1/types.proto
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ option go_package = "github.com/initia-labs/initia/x/ibc/perm/types";

// ChannelState defines the channel state for the specific port-id:channel-id pair.
message ChannelState {
string port_id = 1;
string channel_id = 2;
HaltState halt_state = 3 [(gogoproto.nullable) = false];
repeated string relayers = 4;
string port_id = 1;
string channel_id = 2;
HaltState halt_state = 3 [(gogoproto.nullable) = false];
repeated string relayers = 4;
}

// HaltState defines the halt state for the specific port-id:channel-id pair.
message HaltState {
bool halted = 1;
bool halted = 1;
string halted_by = 2;
}
72 changes: 22 additions & 50 deletions proto/initia/gov/v1/gov.proto
Original file line number Diff line number Diff line change
Expand Up @@ -15,30 +15,21 @@ option go_package = "github.com/initia-labs/initia/x/gov/types";

// Params defines the parameters for the x/gov module.
message Params {
option (amino.name) = "gov/Params";
option (gogoproto.equal) = true;
option (amino.name) = "gov/Params";
option (gogoproto.equal) = true;
option (gogoproto.goproto_stringer) = false;

// Minimum deposit for a proposal to enter voting period.
repeated cosmos.base.v1beta1.Coin min_deposit = 1 [
(gogoproto.nullable) = false,
(amino.dont_omitempty) = true
];
repeated cosmos.base.v1beta1.Coin min_deposit = 1 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true];

// Maximum period for Atom holders to deposit on a proposal. Initial value: 2
// months.
google.protobuf.Duration max_deposit_period = 2 [
(gogoproto.nullable) = false,
(amino.dont_omitempty) = true,
(gogoproto.stdduration) = true
];
google.protobuf.Duration max_deposit_period = 2
[(gogoproto.nullable) = false, (amino.dont_omitempty) = true, (gogoproto.stdduration) = true];

// Duration of the voting period.
google.protobuf.Duration voting_period = 3 [
(gogoproto.nullable) = false,
(amino.dont_omitempty) = true,
(gogoproto.stdduration) = true
];
google.protobuf.Duration voting_period = 3
[(gogoproto.nullable) = false, (amino.dont_omitempty) = true, (gogoproto.stdduration) = true];

// Minimum percentage of total stake needed to vote for a result to be
// considered valid.
Expand Down Expand Up @@ -68,22 +59,17 @@ message Params {
// Duration of the voting period of an expedited proposal.
//
// Since: cosmos-sdk 0.50
google.protobuf.Duration expedited_voting_period = 10 [
(gogoproto.nullable) = false,
(amino.dont_omitempty) = true,
(gogoproto.stdduration) = true
];
google.protobuf.Duration expedited_voting_period = 10
[(gogoproto.nullable) = false, (amino.dont_omitempty) = true, (gogoproto.stdduration) = true];

// Minimum proportion of Yes votes for proposal to pass. Default value: 0.67.
//
// Since: cosmos-sdk 0.50
string expedited_threshold = 11 [(cosmos_proto.scalar) = "cosmos.Dec"];

// Minimum expedited deposit for a proposal to enter voting period.
repeated cosmos.base.v1beta1.Coin expedited_min_deposit = 12 [
(gogoproto.nullable) = false,
(amino.dont_omitempty) = true
];
repeated cosmos.base.v1beta1.Coin expedited_min_deposit = 12
[(gogoproto.nullable) = false, (amino.dont_omitempty) = true];

// burn deposits if a proposal does not meet quorum
bool burn_vote_quorum = 13;
Expand All @@ -102,34 +88,26 @@ message Params {
string min_deposit_ratio = 16 [(cosmos_proto.scalar) = "cosmos.Dec"];

// Minimum deposit for a emergency proposal to enter voting period.
repeated cosmos.base.v1beta1.Coin emergency_min_deposit = 91 [
(gogoproto.nullable) = false,
(amino.dont_omitempty) = true
];
repeated cosmos.base.v1beta1.Coin emergency_min_deposit = 91
[(gogoproto.nullable) = false, (amino.dont_omitempty) = true];

// Tally interval for emergency proposal.
google.protobuf.Duration emergency_tally_interval = 92 [
(gogoproto.stdduration) = true,
(gogoproto.nullable) = false,
(amino.dont_omitempty) = true
];
google.protobuf.Duration emergency_tally_interval = 92
[(gogoproto.stdduration) = true, (gogoproto.nullable) = false, (amino.dont_omitempty) = true];

// Low threshold functions for emergency and expedited proposal.
// These are Move function identifiers and can only be applied
// for Move execute messages.
repeated string low_threshold_functions = 93;

// Vesting is the vesting contract info for tally.
Vesting vesting = 94 [
(gogoproto.nullable) = true,
(amino.dont_omitempty) = false
];
Vesting vesting = 94 [(gogoproto.nullable) = true, (amino.dont_omitempty) = false];
}

// Vesting defines the vesting contract info for MsgVestingVote.
// At tally time, gov module would check vesting token amount.
message Vesting {
option (gogoproto.equal) = true;
option (gogoproto.equal) = true;
option (gogoproto.goproto_stringer) = false;

// module_addr is the address of the vesting module.
Expand All @@ -143,11 +121,11 @@ message Vesting {
}

message TallyResult {
uint64 tally_height = 1;
uint64 tally_height = 1;
string total_staking_power = 2 [(cosmos_proto.scalar) = "cosmos.Int"];
string total_vesting_power = 3 [(cosmos_proto.scalar) = "cosmos.Int"];

// v1_result is the original TallyResult from cosmos-sdk,
// v1_tally_result is the original TallyResult from cosmos-sdk,
// which contains both staking and vesting power.
cosmos.gov.v1.TallyResult v1_tally_result = 4;
}
Expand All @@ -166,10 +144,7 @@ message Proposal {
// final_tally_result is the final tally result of the proposal. When
// querying a proposal via gRPC, this field is not populated until the
// proposal's voting period has ended.
TallyResult final_tally_result = 4 [
(gogoproto.nullable) = false,
(amino.dont_omitempty) = true
];
TallyResult final_tally_result = 4 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true];

// submit_time is the time of proposal submission.
google.protobuf.Timestamp submit_time = 5 [(gogoproto.stdtime) = true];
Expand All @@ -178,18 +153,15 @@ message Proposal {
google.protobuf.Timestamp deposit_end_time = 6 [(gogoproto.stdtime) = true];

// total_deposit is the total deposit on the proposal.
repeated cosmos.base.v1beta1.Coin total_deposit = 7 [
(gogoproto.nullable) = false,
(amino.dont_omitempty) = true
];
repeated cosmos.base.v1beta1.Coin total_deposit = 7 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true];

// voting_start_time is the starting time to vote on a proposal.
google.protobuf.Timestamp voting_start_time = 8 [(gogoproto.stdtime) = true];

// voting_end_time is the end time of voting on a proposal.
google.protobuf.Timestamp voting_end_time = 9 [(gogoproto.stdtime) = true];

google.protobuf.Timestamp emergency_start_time = 10 [(gogoproto.stdtime) = true];
google.protobuf.Timestamp emergency_start_time = 10 [(gogoproto.stdtime) = true];
google.protobuf.Timestamp emergency_next_tally_time = 11 [(gogoproto.stdtime) = true];

// metadata is any arbitrary metadata attached to the proposal.
Expand Down
7 changes: 2 additions & 5 deletions proto/initia/gov/v1/query.proto
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ message QueryParamsResponse {
// QueryEmergencyProposalsRequest is the request type for the
// Query/EmergencyProposals RPC method
message QueryEmergencyProposalsRequest {
option (gogoproto.goproto_getters) = false;
option (gogoproto.goproto_getters) = false;
option (gogoproto.goproto_stringer) = true;

// pagination defines an optional pagination for the request.
Expand Down Expand Up @@ -113,8 +113,5 @@ message QueryTallyResultRequest {
// QueryTallyResultResponse is the response type for the Query/Tally RPC method.
message QueryTallyResultResponse {
// tally defines the requested tally.
TallyResult tally_result = 1 [
(gogoproto.nullable) = false,
(amino.dont_omitempty) = true
];
TallyResult tally_result = 1 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true];
}
Loading

0 comments on commit 11b2230

Please sign in to comment.