github.com/Finschia/finschia-sdk@v0.49.1/proto/cosmos/gov/v1beta1/gov.proto (about) 1 syntax = "proto3"; 2 package cosmos.gov.v1beta1; 3 4 import "cosmos/base/v1beta1/coin.proto"; 5 import "gogoproto/gogo.proto"; 6 import "cosmos_proto/cosmos.proto"; 7 import "google/protobuf/timestamp.proto"; 8 import "google/protobuf/any.proto"; 9 import "google/protobuf/duration.proto"; 10 11 option go_package = "github.com/Finschia/finschia-sdk/x/gov/types"; 12 option (gogoproto.goproto_stringer_all) = false; 13 option (gogoproto.stringer_all) = false; 14 option (gogoproto.goproto_getters_all) = false; 15 16 // VoteOption enumerates the valid vote options for a given governance proposal. 17 enum VoteOption { 18 option (gogoproto.goproto_enum_prefix) = false; 19 20 // VOTE_OPTION_UNSPECIFIED defines a no-op vote option. 21 VOTE_OPTION_UNSPECIFIED = 0 [(gogoproto.enumvalue_customname) = "OptionEmpty"]; 22 // VOTE_OPTION_YES defines a yes vote option. 23 VOTE_OPTION_YES = 1 [(gogoproto.enumvalue_customname) = "OptionYes"]; 24 // VOTE_OPTION_ABSTAIN defines an abstain vote option. 25 VOTE_OPTION_ABSTAIN = 2 [(gogoproto.enumvalue_customname) = "OptionAbstain"]; 26 // VOTE_OPTION_NO defines a no vote option. 27 VOTE_OPTION_NO = 3 [(gogoproto.enumvalue_customname) = "OptionNo"]; 28 // VOTE_OPTION_NO_WITH_VETO defines a no with veto vote option. 29 VOTE_OPTION_NO_WITH_VETO = 4 [(gogoproto.enumvalue_customname) = "OptionNoWithVeto"]; 30 } 31 32 // WeightedVoteOption defines a unit of vote for vote split. 33 // 34 // Since: cosmos-sdk 0.43 35 message WeightedVoteOption { 36 VoteOption option = 1; 37 string weight = 2 [ 38 (gogoproto.customtype) = "github.com/Finschia/finschia-sdk/types.Dec", 39 (gogoproto.nullable) = false, 40 (gogoproto.moretags) = "yaml:\"weight\"" 41 ]; 42 } 43 44 // TextProposal defines a standard text proposal whose changes need to be 45 // manually updated in case of approval. 46 message TextProposal { 47 option (cosmos_proto.implements_interface) = "Content"; 48 49 option (gogoproto.equal) = true; 50 51 string title = 1; 52 string description = 2; 53 } 54 55 // Deposit defines an amount deposited by an account address to an active 56 // proposal. 57 message Deposit { 58 option (gogoproto.goproto_getters) = false; 59 option (gogoproto.equal) = false; 60 61 uint64 proposal_id = 1 [(gogoproto.moretags) = "yaml:\"proposal_id\""]; 62 string depositor = 2; 63 repeated cosmos.base.v1beta1.Coin amount = 3 64 [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/Finschia/finschia-sdk/types.Coins"]; 65 } 66 67 // Proposal defines the core field members of a governance proposal. 68 message Proposal { 69 option (gogoproto.equal) = true; 70 71 uint64 proposal_id = 1 [(gogoproto.jsontag) = "id", (gogoproto.moretags) = "yaml:\"id\""]; 72 google.protobuf.Any content = 2 [(cosmos_proto.accepts_interface) = "Content"]; 73 ProposalStatus status = 3 [(gogoproto.moretags) = "yaml:\"proposal_status\""]; 74 TallyResult final_tally_result = 4 75 [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"final_tally_result\""]; 76 google.protobuf.Timestamp submit_time = 5 77 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"submit_time\""]; 78 google.protobuf.Timestamp deposit_end_time = 6 79 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"deposit_end_time\""]; 80 repeated cosmos.base.v1beta1.Coin total_deposit = 7 [ 81 (gogoproto.nullable) = false, 82 (gogoproto.castrepeated) = "github.com/Finschia/finschia-sdk/types.Coins", 83 (gogoproto.moretags) = "yaml:\"total_deposit\"" 84 ]; 85 google.protobuf.Timestamp voting_start_time = 8 86 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"voting_start_time\""]; 87 google.protobuf.Timestamp voting_end_time = 9 88 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"voting_end_time\""]; 89 } 90 91 // ProposalStatus enumerates the valid statuses of a proposal. 92 enum ProposalStatus { 93 option (gogoproto.goproto_enum_prefix) = false; 94 95 // PROPOSAL_STATUS_UNSPECIFIED defines the default propopsal status. 96 PROPOSAL_STATUS_UNSPECIFIED = 0 [(gogoproto.enumvalue_customname) = "StatusNil"]; 97 // PROPOSAL_STATUS_DEPOSIT_PERIOD defines a proposal status during the deposit 98 // period. 99 PROPOSAL_STATUS_DEPOSIT_PERIOD = 1 [(gogoproto.enumvalue_customname) = "StatusDepositPeriod"]; 100 // PROPOSAL_STATUS_VOTING_PERIOD defines a proposal status during the voting 101 // period. 102 PROPOSAL_STATUS_VOTING_PERIOD = 2 [(gogoproto.enumvalue_customname) = "StatusVotingPeriod"]; 103 // PROPOSAL_STATUS_PASSED defines a proposal status of a proposal that has 104 // passed. 105 PROPOSAL_STATUS_PASSED = 3 [(gogoproto.enumvalue_customname) = "StatusPassed"]; 106 // PROPOSAL_STATUS_REJECTED defines a proposal status of a proposal that has 107 // been rejected. 108 PROPOSAL_STATUS_REJECTED = 4 [(gogoproto.enumvalue_customname) = "StatusRejected"]; 109 // PROPOSAL_STATUS_FAILED defines a proposal status of a proposal that has 110 // failed. 111 PROPOSAL_STATUS_FAILED = 5 [(gogoproto.enumvalue_customname) = "StatusFailed"]; 112 } 113 114 // TallyResult defines a standard tally for a governance proposal. 115 message TallyResult { 116 option (gogoproto.equal) = true; 117 118 string yes = 1 [(gogoproto.customtype) = "github.com/Finschia/finschia-sdk/types.Int", (gogoproto.nullable) = false]; 119 string abstain = 2 [(gogoproto.customtype) = "github.com/Finschia/finschia-sdk/types.Int", (gogoproto.nullable) = false]; 120 string no = 3 [(gogoproto.customtype) = "github.com/Finschia/finschia-sdk/types.Int", (gogoproto.nullable) = false]; 121 string no_with_veto = 4 [ 122 (gogoproto.customtype) = "github.com/Finschia/finschia-sdk/types.Int", 123 (gogoproto.nullable) = false, 124 (gogoproto.moretags) = "yaml:\"no_with_veto\"" 125 ]; 126 } 127 128 // Vote defines a vote on a governance proposal. 129 // A Vote consists of a proposal ID, the voter, and the vote option. 130 message Vote { 131 option (gogoproto.goproto_stringer) = false; 132 option (gogoproto.equal) = false; 133 134 uint64 proposal_id = 1 [(gogoproto.moretags) = "yaml:\"proposal_id\""]; 135 string voter = 2; 136 // Deprecated: Prefer to use `options` instead. This field is set in queries 137 // if and only if `len(options) == 1` and that option has weight 1. In all 138 // other cases, this field will default to VOTE_OPTION_UNSPECIFIED. 139 VoteOption option = 3 [deprecated = true]; 140 // Since: cosmos-sdk 0.43 141 repeated WeightedVoteOption options = 4 [(gogoproto.nullable) = false]; 142 } 143 144 // DepositParams defines the params for deposits on governance proposals. 145 message DepositParams { 146 // Minimum deposit for a proposal to enter voting period. 147 repeated cosmos.base.v1beta1.Coin min_deposit = 1 [ 148 (gogoproto.nullable) = false, 149 (gogoproto.castrepeated) = "github.com/Finschia/finschia-sdk/types.Coins", 150 (gogoproto.moretags) = "yaml:\"min_deposit\"", 151 (gogoproto.jsontag) = "min_deposit,omitempty" 152 ]; 153 154 // Maximum period for Atom holders to deposit on a proposal. Initial value: 2 155 // months. 156 google.protobuf.Duration max_deposit_period = 2 [ 157 (gogoproto.nullable) = false, 158 (gogoproto.stdduration) = true, 159 (gogoproto.jsontag) = "max_deposit_period,omitempty", 160 (gogoproto.moretags) = "yaml:\"max_deposit_period\"" 161 ]; 162 } 163 164 // VotingParams defines the params for voting on governance proposals. 165 message VotingParams { 166 // Length of the voting period. 167 google.protobuf.Duration voting_period = 1 [ 168 (gogoproto.nullable) = false, 169 (gogoproto.stdduration) = true, 170 (gogoproto.jsontag) = "voting_period,omitempty", 171 (gogoproto.moretags) = "yaml:\"voting_period\"" 172 ]; 173 } 174 175 // TallyParams defines the params for tallying votes on governance proposals. 176 message TallyParams { 177 // Minimum percentage of total stake needed to vote for a result to be 178 // considered valid. 179 bytes quorum = 1 [ 180 (gogoproto.customtype) = "github.com/Finschia/finschia-sdk/types.Dec", 181 (gogoproto.nullable) = false, 182 (gogoproto.jsontag) = "quorum,omitempty" 183 ]; 184 185 // Minimum proportion of Yes votes for proposal to pass. Default value: 0.5. 186 bytes threshold = 2 [ 187 (gogoproto.customtype) = "github.com/Finschia/finschia-sdk/types.Dec", 188 (gogoproto.nullable) = false, 189 (gogoproto.jsontag) = "threshold,omitempty" 190 ]; 191 192 // Minimum value of Veto votes to Total votes ratio for proposal to be 193 // vetoed. Default value: 1/3. 194 bytes veto_threshold = 3 [ 195 (gogoproto.customtype) = "github.com/Finschia/finschia-sdk/types.Dec", 196 (gogoproto.nullable) = false, 197 (gogoproto.jsontag) = "veto_threshold,omitempty", 198 (gogoproto.moretags) = "yaml:\"veto_threshold\"" 199 ]; 200 }