-
Notifications
You must be signed in to change notification settings - Fork 4.2k
refactor!: move v1beta2 gov types into types dir #10763
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
Changes from all commits
448e30e
7584048
d21a843
17d6c75
324de6e
096d429
4b1e3a8
48eecc7
ee5b895
d43519b
d50c793
95803d9
61052dd
3ba024d
ad8e6ef
38c6c52
bb153d6
b04b9bd
47b177e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -8,7 +8,7 @@ import "google/protobuf/any.proto"; | |
| import "google/protobuf/duration.proto"; | ||
| import "cosmos_proto/cosmos.proto"; | ||
|
|
||
| option go_package = "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta2"; | ||
| option go_package = "github.com/cosmos/cosmos-sdk/x/gov/types"; | ||
|
|
||
| // VoteOption enumerates the valid vote options for a given governance proposal. | ||
| enum VoteOption { | ||
amaury1093 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
@@ -35,7 +35,7 @@ message WeightedVoteOption { | |
| message Deposit { | ||
| uint64 proposal_id = 1; | ||
| string depositor = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; | ||
| repeated cosmos.base.v1beta1.Coin amount = 3; | ||
| repeated cosmos.base.v1beta1.Coin amount = 3 [(gogoproto.nullable) = false]; | ||
| } | ||
|
|
||
| // Proposal defines the core field members of a governance proposal. | ||
|
|
@@ -46,7 +46,7 @@ message Proposal { | |
| TallyResult final_tally_result = 4; | ||
| google.protobuf.Timestamp submit_time = 5 [(gogoproto.stdtime) = true]; | ||
| google.protobuf.Timestamp deposit_end_time = 6 [(gogoproto.stdtime) = true]; | ||
| repeated cosmos.base.v1beta1.Coin total_deposit = 7; | ||
| repeated cosmos.base.v1beta1.Coin total_deposit = 7 [(gogoproto.nullable) = false]; | ||
| google.protobuf.Timestamp voting_start_time = 8 [(gogoproto.stdtime) = true]; | ||
| google.protobuf.Timestamp voting_end_time = 9 [(gogoproto.stdtime) = true]; | ||
| } | ||
|
|
@@ -95,7 +95,7 @@ message Vote { | |
| // DepositParams defines the params for deposits on governance proposals. | ||
| message DepositParams { | ||
| // Minimum deposit for a proposal to enter voting period. | ||
| repeated cosmos.base.v1beta1.Coin min_deposit = 1; | ||
| repeated cosmos.base.v1beta1.Coin min_deposit = 1 [(gogoproto.nullable) = false]; | ||
|
|
||
| // Maximum period for Atom holders to deposit on a proposal. Initial value: 2 | ||
| // months. | ||
|
|
@@ -112,12 +112,12 @@ message VotingParams { | |
| message TallyParams { | ||
| // Minimum percentage of total stake needed to vote for a result to be | ||
| // considered valid. | ||
| bytes quorum = 1; | ||
| string quorum = 1 [(cosmos_proto.scalar) = "cosmos.Dec"]; | ||
amaury1093 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| // Minimum proportion of Yes votes for proposal to pass. Default value: 0.5. | ||
| bytes threshold = 2; | ||
| string threshold = 2 [(cosmos_proto.scalar) = "cosmos.Dec"]; | ||
|
|
||
| // Minimum value of Veto votes to Total votes ratio for proposal to be | ||
| // vetoed. Default value: 1/3. | ||
| bytes veto_threshold = 3; | ||
| string veto_threshold = 3 [(cosmos_proto.scalar) = "cosmos.Dec"]; | ||
| } | ||
|
Comment on lines
112
to
123
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. To reviewers: This is one of the major changes made in this PR
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This might need a migration, we can add one in another PR
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yup. I plan to write up a migration for proposals so I can couple it with this as well |
||
Uh oh!
There was an error while loading. Please reload this page.