From 38abefceef9b30f9f1103acd78192c4b5ad4b266 Mon Sep 17 00:00:00 2001 From: Adam Hanna Date: Thu, 12 Sep 2024 14:52:59 -0700 Subject: [PATCH] adds min deposit --- Makefile | 27 +- go.mod | 7 +- go.sum | 4 +- proto/atomone/gov/module/v1/module.proto | 7 +- proto/atomone/gov/v1/genesis.proto | 6 +- proto/atomone/gov/v1/gov.proto | 108 ++++---- proto/atomone/gov/v1/query.proto | 29 ++- proto/atomone/gov/v1/tx.proto | 83 +++--- proto/atomone/gov/v1beta1/genesis.proto | 30 ++- proto/atomone/gov/v1beta1/gov.proto | 178 +++++++------ proto/atomone/gov/v1beta1/query.proto | 61 +++-- proto/atomone/gov/v1beta1/tx.proto | 83 +++--- tests/e2e/genesis.go | 2 +- x/gov/abci_test.go | 10 +- x/gov/keeper/deposit.go | 50 +++- x/gov/keeper/deposit_test.go | 79 ++++++ x/gov/keeper/msg_server.go | 15 ++ x/gov/keeper/msg_server_test.go | 26 +- x/gov/simulation/genesis.go | 13 +- x/gov/simulation/operations.go | 12 +- x/gov/simulation/operations_test.go | 6 +- x/gov/types/v1/genesis.pb.go | 20 +- x/gov/types/v1/gov.pb.go | 307 ++++++++++++++++------- x/gov/types/v1/params.go | 11 +- x/gov/types/v1/query.pb.go | 130 +++++++++- x/gov/types/v1/query.pb.gw.go | 80 +----- x/gov/types/v1/tx.pb.go | 131 ++++++++-- x/gov/types/v1beta1/genesis.pb.go | 24 +- x/gov/types/v1beta1/gov.pb.go | 82 +++++- x/gov/types/v1beta1/query.pb.go | 130 +++++++++- x/gov/types/v1beta1/query.pb.gw.go | 80 +----- x/gov/types/v1beta1/tx.pb.go | 96 +++++-- 32 files changed, 1346 insertions(+), 581 deletions(-) diff --git a/Makefile b/Makefile index 2efd683c..2873caa1 100644 --- a/Makefile +++ b/Makefile @@ -223,7 +223,7 @@ docker-build-debug: ### Linting ### ############################################################################### golangci_lint_cmd=golangci-lint -golangci_version=v1.53.3 +golangci_version=v1.56.0 # note: needed to bump from v1.53.3 bc go.tmz.dev/musttag (A dep of golangci-lint) was no longer resolving lint: @echo "--> Running linter" @@ -242,6 +242,31 @@ format: $(golangci_lint_cmd) run --fix .PHONY: format +# Get a list of all directories containing Go files, excluding vendor and other paths +GO_DIRS=$(shell find . -name '*.go' -not -path "./vendor*" -not -path "*.git*" \ + -not -path "./client/docs/statik/statik.go" \ + -not -path "./tests/mocks/*" \ + -not -path "./crypto/keys/secp256k1/*" \ + -not -name "*.pb.go" \ + -not -name "*.pb.gw.go" \ + -not -name "*.pulsar.go" | xargs -n1 dirname | sort -u) + +format-batch: + @go install mvdan.cc/gofumpt@latest + @go install github.com/golangci/golangci-lint/cmd/golangci-lint@$(golangci_version) + + # Run gofumpt in a loop over each directory + @for dir in $(GO_DIRS); do \ + echo "Running gofumpt on $$dir"; \ + find $$dir -name '*.go' -type f -print0 | xargs -0 gofumpt -w -l; \ + done + + # Run golangci-lint separately for each directory + @for dir in $(GO_DIRS); do \ + $(golangci_lint_cmd) run --fix $$dir || exit 1; \ + done +.PHONY: format-batch + ############################################################################### ### Localnet ### ############################################################################### diff --git a/go.mod b/go.mod index 3b02fe1f..1ae1c66a 100644 --- a/go.mod +++ b/go.mod @@ -10,6 +10,7 @@ require ( cosmossdk.io/math v1.3.0 cosmossdk.io/simapp v0.0.0-20230602123434-616841b9704d cosmossdk.io/tools/rosetta v0.2.1 + github.com/chzyer/readline v1.5.1 github.com/cometbft/cometbft v0.37.4 github.com/cometbft/cometbft-db v0.10.0 github.com/cosmos/cosmos-proto v1.0.0-beta.4 @@ -19,6 +20,7 @@ require ( github.com/golang/mock v1.6.0 github.com/google/gofuzz v1.2.0 github.com/gorilla/mux v1.8.1 + github.com/manifoldco/promptui v0.9.0 github.com/ory/dockertest/v3 v3.10.0 github.com/rakyll/statik v0.1.7 github.com/spf13/cast v1.6.0 @@ -66,7 +68,6 @@ require ( github.com/cenkalti/backoff/v4 v4.1.3 // indirect github.com/cespare/xxhash v1.1.0 // indirect github.com/cespare/xxhash/v2 v2.2.0 // indirect - github.com/chzyer/readline v1.5.1 // indirect github.com/cockroachdb/apd/v2 v2.0.2 // indirect github.com/cockroachdb/errors v1.10.0 // indirect github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b // indirect @@ -145,7 +146,6 @@ require ( github.com/libp2p/go-buffer-pool v0.1.0 // indirect github.com/linxGnu/grocksdb v1.8.11 // indirect github.com/magiconair/properties v1.8.7 // indirect - github.com/manifoldco/promptui v0.9.0 // indirect github.com/mattn/go-colorable v0.1.13 // indirect github.com/mattn/go-isatty v0.0.20 // indirect github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect @@ -221,4 +221,7 @@ replace ( // following versions might cause unexpected behavior github.com/syndtr/goleveldb => github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 + + // replace broken cosmos-sdk dep + nhooyr.io/websocket => github.com/coder/websocket v1.8.6 ) diff --git a/go.sum b/go.sum index d572dae2..1b51101a 100644 --- a/go.sum +++ b/go.sum @@ -371,6 +371,8 @@ github.com/cockroachdb/pebble v1.0.0/go.mod h1:bynZ3gvVyhlvjLI7PT6dmZ7g76xzJ7Hpx github.com/cockroachdb/redact v1.1.5 h1:u1PMllDkdFfPWaNGMyLD1+so+aq3uUItthCFqzwPJ30= github.com/cockroachdb/redact v1.1.5/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg= github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= +github.com/coder/websocket v1.8.6 h1:OmNKdwUvLj7VvHnl5o8skaVghSPLjWdHGCnFbkWqs9w= +github.com/coder/websocket v1.8.6/go.mod h1:B70DZP8IakI65RVQ51MsWP/8jndNma26DVA/nFSCgW0= github.com/coinbase/kryptology v1.8.0/go.mod h1:RYXOAPdzOGUe3qlSFkMGn58i3xUA8hmxYHksuq+8ciI= github.com/coinbase/rosetta-sdk-go v0.7.9 h1:lqllBjMnazTjIqYrOGv8h8jxjg9+hJazIGZr9ZvoCcA= github.com/coinbase/rosetta-sdk-go v0.7.9/go.mod h1:0/knutI7XGVqXmmH4OQD8OckFrbQ8yMsUZTG7FXCR2M= @@ -1953,8 +1955,6 @@ honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.1.3/go.mod h1:NgwopIslSNH47DimFoV78dnkksY2EFtX0ajyb3K/las= -nhooyr.io/websocket v1.8.6 h1:s+C3xAMLwGmlI31Nyn/eAehUlZPwfYZu2JXM621Q5/k= -nhooyr.io/websocket v1.8.6/go.mod h1:B70DZP8IakI65RVQ51MsWP/8jndNma26DVA/nFSCgW0= pgregory.net/rapid v1.1.0 h1:CMa0sjHSru3puNx+J0MIAuiiEV4N0qj8/cMWGBBCsjw= pgregory.net/rapid v1.1.0/go.mod h1:PY5XlDGj0+V1FCq0o192FdRhpKHGTRIWBgqjDBTrq04= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= diff --git a/proto/atomone/gov/module/v1/module.proto b/proto/atomone/gov/module/v1/module.proto index 65d63782..ea133370 100644 --- a/proto/atomone/gov/module/v1/module.proto +++ b/proto/atomone/gov/module/v1/module.proto @@ -7,13 +7,14 @@ import "cosmos/app/v1alpha1/module.proto"; // Module is the config object of the gov module. message Module { option (cosmos.app.v1alpha1.module) = { - go_import: "github.com/atomone-hub/atomone/x/gov" + go_import : "github.com/atomone-hub/atomone/x/gov" }; - // max_metadata_len defines the maximum proposal metadata length. + // max_metadata_len defines the maximum proposal metadata length. // Defaults to 255 if not explicitly set. uint64 max_metadata_len = 1; - // authority defines the custom module authority. If not set, defaults to the governance module. + // authority defines the custom module authority. If not set, defaults to the + // governance module. string authority = 2; } diff --git a/proto/atomone/gov/v1/genesis.proto b/proto/atomone/gov/v1/genesis.proto index b382bdb8..dcdd680c 100644 --- a/proto/atomone/gov/v1/genesis.proto +++ b/proto/atomone/gov/v1/genesis.proto @@ -19,13 +19,13 @@ message GenesisState { repeated Proposal proposals = 4; // Deprecated: Prefer to use `params` instead. // deposit_params defines all the paramaters of related to deposit. - DepositParams deposit_params = 5 [deprecated = true]; + DepositParams deposit_params = 5 [ deprecated = true ]; // Deprecated: Prefer to use `params` instead. // voting_params defines all the paramaters of related to voting. - VotingParams voting_params = 6 [deprecated = true]; + VotingParams voting_params = 6 [ deprecated = true ]; // Deprecated: Prefer to use `params` instead. // tally_params defines all the paramaters of related to tally. - TallyParams tally_params = 7 [deprecated = true]; + TallyParams tally_params = 7 [ deprecated = true ]; // params defines all the paramaters of x/gov module. // // Since: cosmos-sdk 0.47 diff --git a/proto/atomone/gov/v1/gov.proto b/proto/atomone/gov/v1/gov.proto index 6ab8bea4..6cca5d8a 100644 --- a/proto/atomone/gov/v1/gov.proto +++ b/proto/atomone/gov/v1/gov.proto @@ -28,56 +28,60 @@ enum VoteOption { // WeightedVoteOption defines a unit of vote for vote split. message WeightedVoteOption { - // option defines the valid vote options, it must not contain duplicate vote options. + // option defines the valid vote options, it must not contain duplicate vote + // options. VoteOption option = 1; // weight is the vote weight associated with the vote option. - string weight = 2 [(cosmos_proto.scalar) = "cosmos.Dec"]; + string weight = 2 [ (cosmos_proto.scalar) = "cosmos.Dec" ]; } // Deposit defines an amount deposited by an account address to an active // proposal. message Deposit { // proposal_id defines the unique id of the proposal. - uint64 proposal_id = 1; - + uint64 proposal_id = 1; + // depositor defines the deposit addresses from the proposals. - string depositor = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - + string depositor = 2 [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; + // amount to be deposited by depositor. - repeated cosmos.base.v1beta1.Coin amount = 3 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; + repeated cosmos.base.v1beta1.Coin amount = 3 + [ (gogoproto.nullable) = false, (amino.dont_omitempty) = true ]; } // Proposal defines the core field members of a governance proposal. message Proposal { // id defines the unique id of the proposal. - uint64 id = 1; + uint64 id = 1; // messages are the arbitrary messages to be executed if the proposal passes. repeated google.protobuf.Any messages = 2; // status defines the proposal status. - ProposalStatus status = 3; + ProposalStatus status = 3; // 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; - + TallyResult final_tally_result = 4; + // submit_time is the time of proposal submission. - google.protobuf.Timestamp submit_time = 5 [(gogoproto.stdtime) = true]; - + google.protobuf.Timestamp submit_time = 5 [ (gogoproto.stdtime) = true ]; + // deposit_end_time is the end time for deposition. - google.protobuf.Timestamp deposit_end_time = 6 [(gogoproto.stdtime) = true]; - + 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]; - + 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 voting_end_time = 9 [ (gogoproto.stdtime) = true ]; // metadata is any arbitrary metadata attached to the proposal. string metadata = 10; @@ -95,7 +99,7 @@ message Proposal { // Proposer is the address of the proposal sumbitter // // Since: cosmos-sdk 0.47 - string proposer = 13 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + string proposer = 13 [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; } // ProposalStatus enumerates the valid statuses of a proposal. @@ -122,13 +126,13 @@ enum ProposalStatus { // TallyResult defines a standard tally for a governance proposal. message TallyResult { // yes_count is the number of yes votes on a proposal. - string yes_count = 1 [(cosmos_proto.scalar) = "cosmos.Int"]; + string yes_count = 1 [ (cosmos_proto.scalar) = "cosmos.Int" ]; // abstain_count is the number of abstain votes on a proposal. - string abstain_count = 2 [(cosmos_proto.scalar) = "cosmos.Int"]; + string abstain_count = 2 [ (cosmos_proto.scalar) = "cosmos.Int" ]; // no_count is the number of no votes on a proposal. - string no_count = 3 [(cosmos_proto.scalar) = "cosmos.Int"]; + string no_count = 3 [ (cosmos_proto.scalar) = "cosmos.Int" ]; // no_with_veto_count is the number of no with veto votes on a proposal. - string no_with_veto_count = 4 [(cosmos_proto.scalar) = "cosmos.Int"]; + string no_with_veto_count = 4 [ (cosmos_proto.scalar) = "cosmos.Int" ]; } // Vote defines a vote on a governance proposal. @@ -138,8 +142,8 @@ message Vote { uint64 proposal_id = 1; // voter is the voter address of the proposal. - string voter = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - + string voter = 2 [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; + reserved 3; // options is the weighted vote options. @@ -152,33 +156,37 @@ 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 - [(gogoproto.nullable) = false, (gogoproto.jsontag) = "min_deposit,omitempty"]; + repeated cosmos.base.v1beta1.Coin min_deposit = 1 [ + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "min_deposit,omitempty" + ]; // Maximum period for Atom holders to deposit on a proposal. Initial value: 2 // months. - google.protobuf.Duration max_deposit_period = 2 - [(gogoproto.stdduration) = true, (gogoproto.jsontag) = "max_deposit_period,omitempty"]; + google.protobuf.Duration max_deposit_period = 2 [ + (gogoproto.stdduration) = true, + (gogoproto.jsontag) = "max_deposit_period,omitempty" + ]; } // VotingParams defines the params for voting on governance proposals. message VotingParams { // Duration of the voting period. - google.protobuf.Duration voting_period = 1 [(gogoproto.stdduration) = true]; + google.protobuf.Duration voting_period = 1 [ (gogoproto.stdduration) = true ]; } // TallyParams defines the params for tallying votes on governance proposals. message TallyParams { // Minimum percentage of total stake needed to vote for a result to be // considered valid. - string quorum = 1 [(cosmos_proto.scalar) = "cosmos.Dec"]; + string quorum = 1 [ (cosmos_proto.scalar) = "cosmos.Dec" ]; // Minimum proportion of Yes votes for proposal to pass. Default value: 0.5. - string threshold = 2 [(cosmos_proto.scalar) = "cosmos.Dec"]; + 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. - string veto_threshold = 3 [(cosmos_proto.scalar) = "cosmos.Dec"]; + string veto_threshold = 3 [ (cosmos_proto.scalar) = "cosmos.Dec" ]; } // Params defines the parameters for the x/gov module. @@ -186,35 +194,47 @@ message TallyParams { // Since: cosmos-sdk 0.47 message Params { // 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.stdduration) = true]; + google.protobuf.Duration max_deposit_period = 2 + [ (gogoproto.stdduration) = true ]; // Duration of the voting period. - google.protobuf.Duration voting_period = 3 [(gogoproto.stdduration) = true]; + google.protobuf.Duration voting_period = 3 [ (gogoproto.stdduration) = true ]; // Minimum percentage of total stake needed to vote for a result to be // considered valid. - string quorum = 4 [(cosmos_proto.scalar) = "cosmos.Dec"]; + string quorum = 4 [ (cosmos_proto.scalar) = "cosmos.Dec" ]; // Minimum proportion of Yes votes for proposal to pass. Default value: 0.5. - string threshold = 5 [(cosmos_proto.scalar) = "cosmos.Dec"]; + string threshold = 5 [ (cosmos_proto.scalar) = "cosmos.Dec" ]; // Minimum value of Veto votes to Total votes ratio for proposal to be // vetoed. Default value: 1/3. - string veto_threshold = 6 [(cosmos_proto.scalar) = "cosmos.Dec"]; + string veto_threshold = 6 [ (cosmos_proto.scalar) = "cosmos.Dec" ]; - // The ratio representing the proportion of the deposit value that must be paid at proposal submission. - string min_initial_deposit_ratio = 7 [(cosmos_proto.scalar) = "cosmos.Dec"]; + // The ratio representing the proportion of the deposit value that must be + // paid at proposal submission. + string min_initial_deposit_ratio = 7 [ (cosmos_proto.scalar) = "cosmos.Dec" ]; // burn deposits if a proposal does not meet quorum bool burn_vote_quorum = 13; // burn deposits if the proposal does not enter voting period bool burn_proposal_deposit_prevote = 14; - + // burn deposits if quorum with vote type no_veto is met bool burn_vote_veto = 15; + + // The ratio representing the proportion of the deposit value minimum that + // must be met when making a deposit. Default value: 0.01. Meaning that for a + // chain with a min_deposit of 100stake, a deposit of 1stake would be + // required. + // + // Since: cosmos-sdk 0.50 + // NOTE: backported from v50 (https://github.com/cosmos/cosmos-sdk/pull/18146) + string min_deposit_ratio = 16 [ (cosmos_proto.scalar) = "cosmos.Dec" ]; } diff --git a/proto/atomone/gov/v1/query.proto b/proto/atomone/gov/v1/query.proto index 9052a450..640184d2 100644 --- a/proto/atomone/gov/v1/query.proto +++ b/proto/atomone/gov/v1/query.proto @@ -24,12 +24,14 @@ service Query { // Vote queries voted information based on proposalID, voterAddr. rpc Vote(QueryVoteRequest) returns (QueryVoteResponse) { - option (google.api.http).get = "/atomone/gov/v1/proposals/{proposal_id}/votes/{voter}"; + option (google.api.http).get = + "/atomone/gov/v1/proposals/{proposal_id}/votes/{voter}"; } // Votes queries votes of a given proposal. rpc Votes(QueryVotesRequest) returns (QueryVotesResponse) { - option (google.api.http).get = "/atomone/gov/v1/proposals/{proposal_id}/votes"; + option (google.api.http).get = + "/atomone/gov/v1/proposals/{proposal_id}/votes"; } // Params queries all parameters of the gov module. @@ -39,17 +41,20 @@ service Query { // Deposit queries single deposit information based proposalID, depositAddr. rpc Deposit(QueryDepositRequest) returns (QueryDepositResponse) { - option (google.api.http).get = "/atomone/gov/v1/proposals/{proposal_id}/deposits/{depositor}"; + option (google.api.http).get = + "/atomone/gov/v1/proposals/{proposal_id}/deposits/{depositor}"; } // Deposits queries all deposits of a single proposal. rpc Deposits(QueryDepositsRequest) returns (QueryDepositsResponse) { - option (google.api.http).get = "/atomone/gov/v1/proposals/{proposal_id}/deposits"; + option (google.api.http).get = + "/atomone/gov/v1/proposals/{proposal_id}/deposits"; } // TallyResult queries the tally of a proposal vote. rpc TallyResult(QueryTallyResultRequest) returns (QueryTallyResultResponse) { - option (google.api.http).get = "/atomone/gov/v1/proposals/{proposal_id}/tally"; + option (google.api.http).get = + "/atomone/gov/v1/proposals/{proposal_id}/tally"; } } @@ -71,10 +76,10 @@ message QueryProposalsRequest { ProposalStatus proposal_status = 1; // voter defines the voter address for the proposals. - string voter = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + string voter = 2 [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; // depositor defines the deposit addresses from the proposals. - string depositor = 3 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + string depositor = 3 [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; // pagination defines an optional pagination for the request. cosmos.base.query.v1beta1.PageRequest pagination = 4; @@ -96,7 +101,7 @@ message QueryVoteRequest { uint64 proposal_id = 1; // voter defines the voter address for the proposals. - string voter = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + string voter = 2 [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; } // QueryVoteResponse is the response type for the Query/Vote RPC method. @@ -134,13 +139,13 @@ message QueryParamsRequest { message QueryParamsResponse { // Deprecated: Prefer to use `params` instead. // voting_params defines the parameters related to voting. - VotingParams voting_params = 1 [deprecated = true]; + VotingParams voting_params = 1 [ deprecated = true ]; // Deprecated: Prefer to use `params` instead. // deposit_params defines the parameters related to deposit. - DepositParams deposit_params = 2 [deprecated = true]; + DepositParams deposit_params = 2 [ deprecated = true ]; // Deprecated: Prefer to use `params` instead. // tally_params defines the parameters related to tally. - TallyParams tally_params = 3 [deprecated = true]; + TallyParams tally_params = 3 [ deprecated = true ]; // params defines all the paramaters of x/gov module. // // Since: cosmos-sdk 0.47 @@ -153,7 +158,7 @@ message QueryDepositRequest { uint64 proposal_id = 1; // depositor defines the deposit addresses from the proposals. - string depositor = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + string depositor = 2 [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; } // QueryDepositResponse is the response type for the Query/Deposit RPC method. diff --git a/proto/atomone/gov/v1/tx.proto b/proto/atomone/gov/v1/tx.proto index da89a6a3..9d8b8e36 100644 --- a/proto/atomone/gov/v1/tx.proto +++ b/proto/atomone/gov/v1/tx.proto @@ -21,12 +21,14 @@ service Msg { // ExecLegacyContent defines a Msg to be in included in a MsgSubmitProposal // to execute a legacy content-based proposal. - rpc ExecLegacyContent(MsgExecLegacyContent) returns (MsgExecLegacyContentResponse); + rpc ExecLegacyContent(MsgExecLegacyContent) + returns (MsgExecLegacyContentResponse); // Vote defines a method to add a vote on a specific proposal. rpc Vote(MsgVote) returns (MsgVoteResponse); - // VoteWeighted defines a method to add a weighted vote on a specific proposal. + // VoteWeighted defines a method to add a weighted vote on a specific + // proposal. rpc VoteWeighted(MsgVoteWeighted) returns (MsgVoteWeightedResponse); // Deposit defines a method to add deposit on a specific proposal. @@ -43,17 +45,19 @@ service Msg { // proposal Content. message MsgSubmitProposal { option (cosmos.msg.v1.signer) = "proposer"; - option (amino.name) = "atomone/v1/MsgSubmitProposal"; + option (amino.name) = "atomone/v1/MsgSubmitProposal"; // messages are the arbitrary messages to be executed if proposal passes. - repeated google.protobuf.Any messages = 1; + repeated google.protobuf.Any messages = 1; + + // initial_deposit is the deposit value that must be paid at proposal + // submission. + repeated cosmos.base.v1beta1.Coin initial_deposit = 2 + [ (gogoproto.nullable) = false, (amino.dont_omitempty) = true ]; - // initial_deposit is the deposit value that must be paid at proposal submission. - repeated cosmos.base.v1beta1.Coin initial_deposit = 2 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; - // proposer is the account address of the proposer. - string proposer = 3 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - + string proposer = 3 [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; + // metadata is any arbitrary metadata attached to the proposal. string metadata = 4; @@ -78,10 +82,11 @@ message MsgSubmitProposalResponse { // This ensures backwards compatibility with v1beta1.MsgSubmitProposal. message MsgExecLegacyContent { option (cosmos.msg.v1.signer) = "authority"; - option (amino.name) = "atomone/v1/MsgExecLegacyContent"; + option (amino.name) = "atomone/v1/MsgExecLegacyContent"; // content is the proposal's content. - google.protobuf.Any content = 1 [(cosmos_proto.accepts_interface) = "atomone.gov.v1beta1.Content"]; + google.protobuf.Any content = 1 + [ (cosmos_proto.accepts_interface) = "atomone.gov.v1beta1.Content" ]; // authority must be the gov module address. string authority = 2; } @@ -92,19 +97,20 @@ message MsgExecLegacyContentResponse {} // MsgVote defines a message to cast a vote. message MsgVote { option (cosmos.msg.v1.signer) = "voter"; - option (amino.name) = "atomone/v1/MsgVote"; + option (amino.name) = "atomone/v1/MsgVote"; // proposal_id defines the unique id of the proposal. - uint64 proposal_id = 1 [(gogoproto.jsontag) = "proposal_id", (amino.dont_omitempty) = true]; - + uint64 proposal_id = 1 + [ (gogoproto.jsontag) = "proposal_id", (amino.dont_omitempty) = true ]; + // voter is the voter address for the proposal. - string voter = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - + string voter = 2 [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; + // option defines the vote option. - VoteOption option = 3; - + VoteOption option = 3; + // metadata is any arbitrary metadata attached to the Vote. - string metadata = 4; + string metadata = 4; } // MsgVoteResponse defines the Msg/Vote response type. @@ -113,19 +119,20 @@ message MsgVoteResponse {} // MsgVoteWeighted defines a message to cast a vote. message MsgVoteWeighted { option (cosmos.msg.v1.signer) = "voter"; - option (amino.name) = "atomone/v1/MsgVoteWeighted"; + option (amino.name) = "atomone/v1/MsgVoteWeighted"; // proposal_id defines the unique id of the proposal. - uint64 proposal_id = 1 [(gogoproto.jsontag) = "proposal_id", (amino.dont_omitempty) = true]; - + uint64 proposal_id = 1 + [ (gogoproto.jsontag) = "proposal_id", (amino.dont_omitempty) = true ]; + // voter is the voter address for the proposal. - string voter = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - + string voter = 2 [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; + // options defines the weighted vote options. - repeated WeightedVoteOption options = 3; + repeated WeightedVoteOption options = 3; // metadata is any arbitrary metadata attached to the VoteWeighted. - string metadata = 4; + string metadata = 4; } // MsgVoteWeightedResponse defines the Msg/VoteWeighted response type. @@ -134,16 +141,18 @@ message MsgVoteWeightedResponse {} // MsgDeposit defines a message to submit a deposit to an existing proposal. message MsgDeposit { option (cosmos.msg.v1.signer) = "depositor"; - option (amino.name) = "atomone/v1/MsgDeposit"; + option (amino.name) = "atomone/v1/MsgDeposit"; // proposal_id defines the unique id of the proposal. - uint64 proposal_id = 1 [(gogoproto.jsontag) = "proposal_id", (amino.dont_omitempty) = true]; - + uint64 proposal_id = 1 + [ (gogoproto.jsontag) = "proposal_id", (amino.dont_omitempty) = true ]; + // depositor defines the deposit addresses from the proposals. - string depositor = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - + string depositor = 2 [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; + // amount to be deposited by depositor. - repeated cosmos.base.v1beta1.Coin amount = 3 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; + repeated cosmos.base.v1beta1.Coin amount = 3 + [ (gogoproto.nullable) = false, (amino.dont_omitempty) = true ]; } // MsgDepositResponse defines the Msg/Deposit response type. @@ -154,15 +163,17 @@ message MsgDepositResponse {} // Since: cosmos-sdk 0.47 message MsgUpdateParams { option (cosmos.msg.v1.signer) = "authority"; - option (amino.name) = "atomone/x/gov/v1/MsgUpdateParams"; + option (amino.name) = "atomone/x/gov/v1/MsgUpdateParams"; - // authority is the address that controls the module (defaults to x/gov unless overwritten). - string authority = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + // authority is the address that controls the module (defaults to x/gov unless + // overwritten). + string authority = 1 [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; // params defines the x/gov parameters to update. // // NOTE: All parameters must be supplied. - Params params = 2 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; + Params params = 2 + [ (gogoproto.nullable) = false, (amino.dont_omitempty) = true ]; } // MsgUpdateParamsResponse defines the response structure for executing a diff --git a/proto/atomone/gov/v1beta1/genesis.proto b/proto/atomone/gov/v1beta1/genesis.proto index 59687c53..27f944fb 100644 --- a/proto/atomone/gov/v1beta1/genesis.proto +++ b/proto/atomone/gov/v1beta1/genesis.proto @@ -13,18 +13,30 @@ message GenesisState { // starting_proposal_id is the ID of the starting proposal. uint64 starting_proposal_id = 1; // deposits defines all the deposits present at genesis. - repeated Deposit deposits = 2 - [(gogoproto.castrepeated) = "Deposits", (gogoproto.nullable) = false, (amino.dont_omitempty) = true]; + repeated Deposit deposits = 2 [ + (gogoproto.castrepeated) = "Deposits", + (gogoproto.nullable) = false, + (amino.dont_omitempty) = true + ]; // votes defines all the votes present at genesis. - repeated Vote votes = 3 - [(gogoproto.castrepeated) = "Votes", (gogoproto.nullable) = false, (amino.dont_omitempty) = true]; + repeated Vote votes = 3 [ + (gogoproto.castrepeated) = "Votes", + (gogoproto.nullable) = false, + (amino.dont_omitempty) = true + ]; // proposals defines all the proposals present at genesis. - repeated Proposal proposals = 4 - [(gogoproto.castrepeated) = "Proposals", (gogoproto.nullable) = false, (amino.dont_omitempty) = true]; + repeated Proposal proposals = 4 [ + (gogoproto.castrepeated) = "Proposals", + (gogoproto.nullable) = false, + (amino.dont_omitempty) = true + ]; // params defines all the parameters of related to deposit. - DepositParams deposit_params = 5 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; + DepositParams deposit_params = 5 + [ (gogoproto.nullable) = false, (amino.dont_omitempty) = true ]; // params defines all the parameters of related to voting. - VotingParams voting_params = 6 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; + VotingParams voting_params = 6 + [ (gogoproto.nullable) = false, (amino.dont_omitempty) = true ]; // params defines all the parameters of related to tally. - TallyParams tally_params = 7 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; + TallyParams tally_params = 7 + [ (gogoproto.nullable) = false, (amino.dont_omitempty) = true ]; } diff --git a/proto/atomone/gov/v1beta1/gov.proto b/proto/atomone/gov/v1beta1/gov.proto index bd5e04a4..31283783 100644 --- a/proto/atomone/gov/v1beta1/gov.proto +++ b/proto/atomone/gov/v1beta1/gov.proto @@ -12,37 +12,41 @@ import "amino/amino.proto"; option go_package = "github.com/atomone-hub/atomone/x/gov/types/v1beta1"; option (gogoproto.goproto_stringer_all) = false; -option (gogoproto.stringer_all) = false; -option (gogoproto.goproto_getters_all) = false; +option (gogoproto.stringer_all) = false; +option (gogoproto.goproto_getters_all) = false; // VoteOption enumerates the valid vote options for a given governance proposal. enum VoteOption { option (gogoproto.goproto_enum_prefix) = false; // VOTE_OPTION_UNSPECIFIED defines a no-op vote option. - VOTE_OPTION_UNSPECIFIED = 0 [(gogoproto.enumvalue_customname) = "OptionEmpty"]; + VOTE_OPTION_UNSPECIFIED = 0 + [ (gogoproto.enumvalue_customname) = "OptionEmpty" ]; // VOTE_OPTION_YES defines a yes vote option. - VOTE_OPTION_YES = 1 [(gogoproto.enumvalue_customname) = "OptionYes"]; + VOTE_OPTION_YES = 1 [ (gogoproto.enumvalue_customname) = "OptionYes" ]; // VOTE_OPTION_ABSTAIN defines an abstain vote option. - VOTE_OPTION_ABSTAIN = 2 [(gogoproto.enumvalue_customname) = "OptionAbstain"]; + VOTE_OPTION_ABSTAIN = 2 + [ (gogoproto.enumvalue_customname) = "OptionAbstain" ]; // VOTE_OPTION_NO defines a no vote option. - VOTE_OPTION_NO = 3 [(gogoproto.enumvalue_customname) = "OptionNo"]; + VOTE_OPTION_NO = 3 [ (gogoproto.enumvalue_customname) = "OptionNo" ]; // VOTE_OPTION_NO_WITH_VETO defines a no with veto vote option. - VOTE_OPTION_NO_WITH_VETO = 4 [(gogoproto.enumvalue_customname) = "OptionNoWithVeto"]; + VOTE_OPTION_NO_WITH_VETO = 4 + [ (gogoproto.enumvalue_customname) = "OptionNoWithVeto" ]; } // WeightedVoteOption defines a unit of vote for vote split. // // Since: cosmos-sdk 0.43 message WeightedVoteOption { - // option defines the valid vote options, it must not contain duplicate vote options. + // option defines the valid vote options, it must not contain duplicate vote + // options. VoteOption option = 1; - // weight is the vote weight associated with the vote option. - string weight = 2 [ - (cosmos_proto.scalar) = "cosmos.Dec", + // weight is the vote weight associated with the vote option. + string weight = 2 [ + (cosmos_proto.scalar) = "cosmos.Dec", (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false + (gogoproto.nullable) = false ]; } @@ -50,12 +54,12 @@ message WeightedVoteOption { // manually updated in case of approval. message TextProposal { option (cosmos_proto.implements_interface) = "atomone.gov.v1beta1.Content"; - option (amino.name) = "atomone/TextProposal"; + option (amino.name) = "atomone/TextProposal"; option (gogoproto.equal) = true; // title of the proposal. - string title = 1; + string title = 1; // description associated with the proposal. string description = 2; @@ -65,18 +69,18 @@ message TextProposal { // proposal. message Deposit { option (gogoproto.goproto_getters) = false; - option (gogoproto.equal) = false; + option (gogoproto.equal) = false; // proposal_id defines the unique id of the proposal. - uint64 proposal_id = 1; - + uint64 proposal_id = 1; + // depositor defines the deposit addresses from the proposals. - string depositor = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - + string depositor = 2 [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; + // amount to be deposited by depositor. repeated cosmos.base.v1beta1.Coin amount = 3 [ - (gogoproto.nullable) = false, - (amino.dont_omitempty) = true, + (gogoproto.nullable) = false, + (amino.dont_omitempty) = true, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" ]; } @@ -86,40 +90,54 @@ message Proposal { option (gogoproto.equal) = true; // proposal_id defines the unique id of the proposal. - uint64 proposal_id = 1; + uint64 proposal_id = 1; // content is the proposal's content. - google.protobuf.Any content = 2 [(cosmos_proto.accepts_interface) = "atomone.gov.v1beta1.Content"]; + google.protobuf.Any content = 2 + [ (cosmos_proto.accepts_interface) = "atomone.gov.v1beta1.Content" ]; // status defines the proposal status. - ProposalStatus status = 3; - + ProposalStatus status = 3; + // 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, (gogoproto.nullable) = false, (amino.dont_omitempty) = true]; - + google.protobuf.Timestamp submit_time = 5 [ + (gogoproto.stdtime) = true, + (gogoproto.nullable) = false, + (amino.dont_omitempty) = true + ]; + // deposit_end_time is the end time for deposition. - google.protobuf.Timestamp deposit_end_time = 6 - [(gogoproto.stdtime) = true, (gogoproto.nullable) = false, (amino.dont_omitempty) = true]; - + google.protobuf.Timestamp deposit_end_time = 6 [ + (gogoproto.stdtime) = true, + (gogoproto.nullable) = false, + (amino.dont_omitempty) = 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, + (gogoproto.nullable) = false, + (amino.dont_omitempty) = true, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" ]; // voting_start_time is the starting time to vote on a proposal. - google.protobuf.Timestamp voting_start_time = 8 - [(gogoproto.stdtime) = true, (gogoproto.nullable) = false, (amino.dont_omitempty) = true]; - + google.protobuf.Timestamp voting_start_time = 8 [ + (gogoproto.stdtime) = true, + (gogoproto.nullable) = false, + (amino.dont_omitempty) = true + ]; + // voting_end_time is the end time of voting on a proposal. - google.protobuf.Timestamp voting_end_time = 9 - [(gogoproto.stdtime) = true, (gogoproto.nullable) = false, (amino.dont_omitempty) = true]; + google.protobuf.Timestamp voting_end_time = 9 [ + (gogoproto.stdtime) = true, + (gogoproto.nullable) = false, + (amino.dont_omitempty) = true + ]; } // ProposalStatus enumerates the valid statuses of a proposal. @@ -127,22 +145,28 @@ enum ProposalStatus { option (gogoproto.goproto_enum_prefix) = false; // PROPOSAL_STATUS_UNSPECIFIED defines the default proposal status. - PROPOSAL_STATUS_UNSPECIFIED = 0 [(gogoproto.enumvalue_customname) = "StatusNil"]; + PROPOSAL_STATUS_UNSPECIFIED = 0 + [ (gogoproto.enumvalue_customname) = "StatusNil" ]; // PROPOSAL_STATUS_DEPOSIT_PERIOD defines a proposal status during the deposit // period. - PROPOSAL_STATUS_DEPOSIT_PERIOD = 1 [(gogoproto.enumvalue_customname) = "StatusDepositPeriod"]; + PROPOSAL_STATUS_DEPOSIT_PERIOD = 1 + [ (gogoproto.enumvalue_customname) = "StatusDepositPeriod" ]; // PROPOSAL_STATUS_VOTING_PERIOD defines a proposal status during the voting // period. - PROPOSAL_STATUS_VOTING_PERIOD = 2 [(gogoproto.enumvalue_customname) = "StatusVotingPeriod"]; + PROPOSAL_STATUS_VOTING_PERIOD = 2 + [ (gogoproto.enumvalue_customname) = "StatusVotingPeriod" ]; // PROPOSAL_STATUS_PASSED defines a proposal status of a proposal that has // passed. - PROPOSAL_STATUS_PASSED = 3 [(gogoproto.enumvalue_customname) = "StatusPassed"]; + PROPOSAL_STATUS_PASSED = 3 + [ (gogoproto.enumvalue_customname) = "StatusPassed" ]; // PROPOSAL_STATUS_REJECTED defines a proposal status of a proposal that has // been rejected. - PROPOSAL_STATUS_REJECTED = 4 [(gogoproto.enumvalue_customname) = "StatusRejected"]; + PROPOSAL_STATUS_REJECTED = 4 + [ (gogoproto.enumvalue_customname) = "StatusRejected" ]; // PROPOSAL_STATUS_FAILED defines a proposal status of a proposal that has // failed. - PROPOSAL_STATUS_FAILED = 5 [(gogoproto.enumvalue_customname) = "StatusFailed"]; + PROPOSAL_STATUS_FAILED = 5 + [ (gogoproto.enumvalue_customname) = "StatusFailed" ]; } // TallyResult defines a standard tally for a governance proposal. @@ -151,30 +175,30 @@ message TallyResult { // yes is the number of yes votes on a proposal. string yes = 1 [ - (cosmos_proto.scalar) = "cosmos.Int", + (cosmos_proto.scalar) = "cosmos.Int", (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", - (gogoproto.nullable) = false + (gogoproto.nullable) = false ]; // abstain is the number of abstain votes on a proposal. string abstain = 2 [ - (cosmos_proto.scalar) = "cosmos.Int", + (cosmos_proto.scalar) = "cosmos.Int", (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", - (gogoproto.nullable) = false + (gogoproto.nullable) = false ]; // no is the number of no votes on a proposal. string no = 3 [ - (cosmos_proto.scalar) = "cosmos.Int", + (cosmos_proto.scalar) = "cosmos.Int", (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", - (gogoproto.nullable) = false + (gogoproto.nullable) = false ]; // no_with_veto is the number of no with veto votes on a proposal. string no_with_veto = 4 [ - (cosmos_proto.scalar) = "cosmos.Int", + (cosmos_proto.scalar) = "cosmos.Int", (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", - (gogoproto.nullable) = false + (gogoproto.nullable) = false ]; } @@ -182,47 +206,55 @@ message TallyResult { // A Vote consists of a proposal ID, the voter, and the vote option. message Vote { option (gogoproto.goproto_stringer) = false; - option (gogoproto.equal) = false; + option (gogoproto.equal) = false; // proposal_id defines the unique id of the proposal. - uint64 proposal_id = 1 [(gogoproto.jsontag) = "id", (amino.field_name) = "id", (amino.dont_omitempty) = true]; - + uint64 proposal_id = 1 [ + (gogoproto.jsontag) = "id", + (amino.field_name) = "id", + (amino.dont_omitempty) = true + ]; + // voter is the voter address of the proposal. - string voter = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + string voter = 2 [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; // Deprecated: Prefer to use `options` instead. This field is set in queries // if and only if `len(options) == 1` and that option has weight 1. In all // other cases, this field will default to VOTE_OPTION_UNSPECIFIED. - VoteOption option = 3 [deprecated = true]; - + VoteOption option = 3 [ deprecated = true ]; + // options is the weighted vote options. // // Since: cosmos-sdk 0.43 - repeated WeightedVoteOption options = 4 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; + repeated WeightedVoteOption options = 4 + [ (gogoproto.nullable) = false, (amino.dont_omitempty) = true ]; } // 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 [ - (gogoproto.nullable) = false, + (gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins", - (gogoproto.jsontag) = "min_deposit,omitempty" + (gogoproto.jsontag) = "min_deposit,omitempty" ]; // Maximum period for Atom holders to deposit on a proposal. Initial value: 2 // months. google.protobuf.Duration max_deposit_period = 2 [ - (gogoproto.nullable) = false, + (gogoproto.nullable) = false, (gogoproto.stdduration) = true, - (gogoproto.jsontag) = "max_deposit_period,omitempty" + (gogoproto.jsontag) = "max_deposit_period,omitempty" ]; } // VotingParams defines the params for voting on governance proposals. message VotingParams { // Duration of the voting period. - google.protobuf.Duration voting_period = 1 - [(gogoproto.nullable) = false, (gogoproto.stdduration) = true, (gogoproto.jsontag) = "voting_period,omitempty"]; + google.protobuf.Duration voting_period = 1 [ + (gogoproto.nullable) = false, + (gogoproto.stdduration) = true, + (gogoproto.jsontag) = "voting_period,omitempty" + ]; } // TallyParams defines the params for tallying votes on governance proposals. @@ -231,22 +263,22 @@ message TallyParams { // considered valid. bytes quorum = 1 [ (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false, - (gogoproto.jsontag) = "quorum,omitempty" + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "quorum,omitempty" ]; // Minimum proportion of Yes votes for proposal to pass. Default value: 0.5. bytes threshold = 2 [ (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false, - (gogoproto.jsontag) = "threshold,omitempty" + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "threshold,omitempty" ]; // Minimum value of Veto votes to Total votes ratio for proposal to be // vetoed. Default value: 1/3. bytes veto_threshold = 3 [ (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false, - (gogoproto.jsontag) = "veto_threshold,omitempty" + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "veto_threshold,omitempty" ]; } diff --git a/proto/atomone/gov/v1beta1/query.proto b/proto/atomone/gov/v1beta1/query.proto index d2a11157..3922ce9d 100644 --- a/proto/atomone/gov/v1beta1/query.proto +++ b/proto/atomone/gov/v1beta1/query.proto @@ -14,7 +14,8 @@ option go_package = "github.com/atomone-hub/atomone/x/gov/types/v1beta1"; service Query { // Proposal queries proposal details based on ProposalID. rpc Proposal(QueryProposalRequest) returns (QueryProposalResponse) { - option (google.api.http).get = "/atomone/gov/v1beta1/proposals/{proposal_id}"; + option (google.api.http).get = + "/atomone/gov/v1beta1/proposals/{proposal_id}"; } // Proposals queries all proposals based on given status. @@ -24,12 +25,14 @@ service Query { // Vote queries voted information based on proposalID, voterAddr. rpc Vote(QueryVoteRequest) returns (QueryVoteResponse) { - option (google.api.http).get = "/atomone/gov/v1beta1/proposals/{proposal_id}/votes/{voter}"; + option (google.api.http).get = + "/atomone/gov/v1beta1/proposals/{proposal_id}/votes/{voter}"; } // Votes queries votes of a given proposal. rpc Votes(QueryVotesRequest) returns (QueryVotesResponse) { - option (google.api.http).get = "/atomone/gov/v1beta1/proposals/{proposal_id}/votes"; + option (google.api.http).get = + "/atomone/gov/v1beta1/proposals/{proposal_id}/votes"; } // Params queries all parameters of the gov module. @@ -39,17 +42,20 @@ service Query { // Deposit queries single deposit information based proposalID, depositAddr. rpc Deposit(QueryDepositRequest) returns (QueryDepositResponse) { - option (google.api.http).get = "/atomone/gov/v1beta1/proposals/{proposal_id}/deposits/{depositor}"; + option (google.api.http).get = + "/atomone/gov/v1beta1/proposals/{proposal_id}/deposits/{depositor}"; } // Deposits queries all deposits of a single proposal. rpc Deposits(QueryDepositsRequest) returns (QueryDepositsResponse) { - option (google.api.http).get = "/atomone/gov/v1beta1/proposals/{proposal_id}/deposits"; + option (google.api.http).get = + "/atomone/gov/v1beta1/proposals/{proposal_id}/deposits"; } // TallyResult queries the tally of a proposal vote. rpc TallyResult(QueryTallyResultRequest) returns (QueryTallyResultResponse) { - option (google.api.http).get = "/atomone/gov/v1beta1/proposals/{proposal_id}/tally"; + option (google.api.http).get = + "/atomone/gov/v1beta1/proposals/{proposal_id}/tally"; } } @@ -61,22 +67,23 @@ message QueryProposalRequest { // QueryProposalResponse is the response type for the Query/Proposal RPC method. message QueryProposalResponse { - Proposal proposal = 1 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; + Proposal proposal = 1 + [ (gogoproto.nullable) = false, (amino.dont_omitempty) = true ]; } // QueryProposalsRequest is the request type for the Query/Proposals RPC method. message QueryProposalsRequest { - option (gogoproto.equal) = false; + option (gogoproto.equal) = false; option (gogoproto.goproto_getters) = false; // proposal_status defines the status of the proposals. ProposalStatus proposal_status = 1; // voter defines the voter address for the proposals. - string voter = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + string voter = 2 [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; // depositor defines the deposit addresses from the proposals. - string depositor = 3 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + string depositor = 3 [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; // pagination defines an optional pagination for the request. cosmos.base.query.v1beta1.PageRequest pagination = 4; @@ -86,7 +93,8 @@ message QueryProposalsRequest { // method. message QueryProposalsResponse { // proposals defines all the requested governance proposals. - repeated Proposal proposals = 1 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; + repeated Proposal proposals = 1 + [ (gogoproto.nullable) = false, (amino.dont_omitempty) = true ]; // pagination defines the pagination in the response. cosmos.base.query.v1beta1.PageResponse pagination = 2; @@ -94,20 +102,20 @@ message QueryProposalsResponse { // QueryVoteRequest is the request type for the Query/Vote RPC method. message QueryVoteRequest { - option (gogoproto.equal) = false; + option (gogoproto.equal) = false; option (gogoproto.goproto_getters) = false; // proposal_id defines the unique id of the proposal. uint64 proposal_id = 1; // voter defines the voter address for the proposals. - string voter = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + string voter = 2 [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; } // QueryVoteResponse is the response type for the Query/Vote RPC method. message QueryVoteResponse { // vote defines the queried vote. - Vote vote = 1 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; + Vote vote = 1 [ (gogoproto.nullable) = false, (amino.dont_omitempty) = true ]; } // QueryVotesRequest is the request type for the Query/Votes RPC method. @@ -122,7 +130,8 @@ message QueryVotesRequest { // QueryVotesResponse is the response type for the Query/Votes RPC method. message QueryVotesResponse { // votes defines the queried votes. - repeated Vote votes = 1 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; + repeated Vote votes = 1 + [ (gogoproto.nullable) = false, (amino.dont_omitempty) = true ]; // pagination defines the pagination in the response. cosmos.base.query.v1beta1.PageResponse pagination = 2; @@ -138,29 +147,33 @@ message QueryParamsRequest { // QueryParamsResponse is the response type for the Query/Params RPC method. message QueryParamsResponse { // voting_params defines the parameters related to voting. - VotingParams voting_params = 1 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; + VotingParams voting_params = 1 + [ (gogoproto.nullable) = false, (amino.dont_omitempty) = true ]; // deposit_params defines the parameters related to deposit. - DepositParams deposit_params = 2 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; + DepositParams deposit_params = 2 + [ (gogoproto.nullable) = false, (amino.dont_omitempty) = true ]; // tally_params defines the parameters related to tally. - TallyParams tally_params = 3 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; + TallyParams tally_params = 3 + [ (gogoproto.nullable) = false, (amino.dont_omitempty) = true ]; } // QueryDepositRequest is the request type for the Query/Deposit RPC method. message QueryDepositRequest { option (gogoproto.goproto_getters) = false; - option (gogoproto.equal) = false; + option (gogoproto.equal) = false; // proposal_id defines the unique id of the proposal. uint64 proposal_id = 1; // depositor defines the deposit addresses from the proposals. - string depositor = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + string depositor = 2 [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; } // QueryDepositResponse is the response type for the Query/Deposit RPC method. message QueryDepositResponse { // deposit defines the requested deposit. - Deposit deposit = 1 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; + Deposit deposit = 1 + [ (gogoproto.nullable) = false, (amino.dont_omitempty) = true ]; } // QueryDepositsRequest is the request type for the Query/Deposits RPC method. @@ -175,7 +188,8 @@ message QueryDepositsRequest { // QueryDepositsResponse is the response type for the Query/Deposits RPC method. message QueryDepositsResponse { // deposits defines the requested deposits. - repeated Deposit deposits = 1 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; + repeated Deposit deposits = 1 + [ (gogoproto.nullable) = false, (amino.dont_omitempty) = true ]; // pagination defines the pagination in the response. cosmos.base.query.v1beta1.PageResponse pagination = 2; @@ -190,5 +204,6 @@ message QueryTallyResultRequest { // QueryTallyResultResponse is the response type for the Query/Tally RPC method. message QueryTallyResultResponse { // tally defines the requested tally. - TallyResult tally = 1 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; + TallyResult tally = 1 + [ (gogoproto.nullable) = false, (amino.dont_omitempty) = true ]; } diff --git a/proto/atomone/gov/v1beta1/tx.proto b/proto/atomone/gov/v1beta1/tx.proto index 138f721b..97e4f7f9 100644 --- a/proto/atomone/gov/v1beta1/tx.proto +++ b/proto/atomone/gov/v1beta1/tx.proto @@ -21,7 +21,8 @@ service Msg { // Vote defines a method to add a vote on a specific proposal. rpc Vote(MsgVote) returns (MsgVoteResponse); - // VoteWeighted defines a method to add a weighted vote on a specific proposal. + // VoteWeighted defines a method to add a weighted vote on a specific + // proposal. // // Since: cosmos-sdk 0.43 rpc VoteWeighted(MsgVoteWeighted) returns (MsgVoteWeightedResponse); @@ -34,50 +35,53 @@ service Msg { // proposal Content. message MsgSubmitProposal { option (cosmos.msg.v1.signer) = "proposer"; - option (amino.name) = "atomone/MsgSubmitProposal"; + option (amino.name) = "atomone/MsgSubmitProposal"; - option (gogoproto.equal) = false; + option (gogoproto.equal) = false; option (gogoproto.goproto_stringer) = false; - option (gogoproto.stringer) = false; - option (gogoproto.goproto_getters) = false; + option (gogoproto.stringer) = false; + option (gogoproto.goproto_getters) = false; // content is the proposal's content. - google.protobuf.Any content = 1 [(cosmos_proto.accepts_interface) = "atomone.gov.v1beta1.Content"]; - // initial_deposit is the deposit value that must be paid at proposal submission. + google.protobuf.Any content = 1 + [ (cosmos_proto.accepts_interface) = "atomone.gov.v1beta1.Content" ]; + // initial_deposit is the deposit value that must be paid at proposal + // submission. repeated cosmos.base.v1beta1.Coin initial_deposit = 2 [ - (gogoproto.nullable) = false, - (amino.dont_omitempty) = true, + (gogoproto.nullable) = false, + (amino.dont_omitempty) = true, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" ]; // proposer is the account address of the proposer. - string proposer = 3 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + string proposer = 3 [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; } // MsgSubmitProposalResponse defines the Msg/SubmitProposal response type. message MsgSubmitProposalResponse { // proposal_id defines the unique id of the proposal. - uint64 proposal_id = 1 [(gogoproto.jsontag) = "proposal_id", (amino.dont_omitempty) = true]; + uint64 proposal_id = 1 + [ (gogoproto.jsontag) = "proposal_id", (amino.dont_omitempty) = true ]; } // MsgVote defines a message to cast a vote. message MsgVote { option (cosmos.msg.v1.signer) = "voter"; - option (amino.name) = "atomone/MsgVote"; + option (amino.name) = "atomone/MsgVote"; - option (gogoproto.equal) = false; + option (gogoproto.equal) = false; option (gogoproto.goproto_stringer) = false; - option (gogoproto.stringer) = false; - option (gogoproto.goproto_getters) = false; + option (gogoproto.stringer) = false; + option (gogoproto.goproto_getters) = false; // proposal_id defines the unique id of the proposal. - uint64 proposal_id = 1; + uint64 proposal_id = 1; // voter is the voter address for the proposal. - string voter = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - + string voter = 2 [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; + // option defines the vote option. - VoteOption option = 3; + VoteOption option = 3; } // MsgVoteResponse defines the Msg/Vote response type. @@ -88,21 +92,23 @@ message MsgVoteResponse {} // Since: cosmos-sdk 0.43 message MsgVoteWeighted { option (cosmos.msg.v1.signer) = "voter"; - option (amino.name) = "atomone/MsgVoteWeighted"; + option (amino.name) = "atomone/MsgVoteWeighted"; - option (gogoproto.equal) = false; + option (gogoproto.equal) = false; option (gogoproto.goproto_stringer) = false; - option (gogoproto.stringer) = false; - option (gogoproto.goproto_getters) = false; + option (gogoproto.stringer) = false; + option (gogoproto.goproto_getters) = false; // proposal_id defines the unique id of the proposal. - uint64 proposal_id = 1 [(gogoproto.jsontag) = "proposal_id", (amino.dont_omitempty) = true]; + uint64 proposal_id = 1 + [ (gogoproto.jsontag) = "proposal_id", (amino.dont_omitempty) = true ]; // voter is the voter address for the proposal. - string voter = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - - // options defines the weighted vote options. - repeated WeightedVoteOption options = 3 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; + string voter = 2 [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; + + // options defines the weighted vote options. + repeated WeightedVoteOption options = 3 + [ (gogoproto.nullable) = false, (amino.dont_omitempty) = true ]; } // MsgVoteWeightedResponse defines the Msg/VoteWeighted response type. @@ -113,23 +119,24 @@ message MsgVoteWeightedResponse {} // MsgDeposit defines a message to submit a deposit to an existing proposal. message MsgDeposit { option (cosmos.msg.v1.signer) = "depositor"; - option (amino.name) = "atomone/MsgDeposit"; + option (amino.name) = "atomone/MsgDeposit"; - option (gogoproto.equal) = false; + option (gogoproto.equal) = false; option (gogoproto.goproto_stringer) = false; - option (gogoproto.stringer) = false; - option (gogoproto.goproto_getters) = false; + option (gogoproto.stringer) = false; + option (gogoproto.goproto_getters) = false; // proposal_id defines the unique id of the proposal. - uint64 proposal_id = 1 [(gogoproto.jsontag) = "proposal_id", (amino.dont_omitempty) = true]; - + uint64 proposal_id = 1 + [ (gogoproto.jsontag) = "proposal_id", (amino.dont_omitempty) = true ]; + // depositor defines the deposit addresses from the proposals. - string depositor = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - + string depositor = 2 [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; + // amount to be deposited by depositor. repeated cosmos.base.v1beta1.Coin amount = 3 [ - (gogoproto.nullable) = false, - (amino.dont_omitempty) = true, + (gogoproto.nullable) = false, + (amino.dont_omitempty) = true, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" ]; } diff --git a/tests/e2e/genesis.go b/tests/e2e/genesis.go index 7dd9ad28..556b1efc 100644 --- a/tests/e2e/genesis.go +++ b/tests/e2e/genesis.go @@ -134,7 +134,7 @@ func modifyGenesis(path, moniker, amountStr string, addrAll []sdk.AccAddress, de votingPeriod, quorum.String(), threshold.String(), govv1.DefaultVetoThreshold.String(), sdk.ZeroDec().String(), - false, false, true, + false, false, true, govv1.DefaultMinDepositRatio.String(), ), ) govGenStateBz, err := cdc.MarshalJSON(govGenState) diff --git a/x/gov/abci_test.go b/x/gov/abci_test.go index fd740141..4a54262c 100644 --- a/x/gov/abci_test.go +++ b/x/gov/abci_test.go @@ -42,7 +42,7 @@ func TestTickExpiredDepositPeriod(t *testing.T) { newProposalMsg, err := v1.NewMsgSubmitProposal( []sdk.Msg{mkTestLegacyContent(t)}, - sdk.Coins{sdk.NewInt64Coin(sdk.DefaultBondDenom, 5)}, + sdk.Coins{sdk.NewInt64Coin(sdk.DefaultBondDenom, 100000)}, addrs[0].String(), "", "Proposal", @@ -98,7 +98,7 @@ func TestTickMultipleExpiredDepositPeriod(t *testing.T) { newProposalMsg, err := v1.NewMsgSubmitProposal( []sdk.Msg{mkTestLegacyContent(t)}, - sdk.Coins{sdk.NewInt64Coin(sdk.DefaultBondDenom, 5)}, + sdk.Coins{sdk.NewInt64Coin(sdk.DefaultBondDenom, 100000)}, addrs[0].String(), "", "Proposal", @@ -124,7 +124,7 @@ func TestTickMultipleExpiredDepositPeriod(t *testing.T) { newProposalMsg2, err := v1.NewMsgSubmitProposal( []sdk.Msg{mkTestLegacyContent(t)}, - sdk.Coins{sdk.NewInt64Coin(sdk.DefaultBondDenom, 5)}, + sdk.Coins{sdk.NewInt64Coin(sdk.DefaultBondDenom, 100000)}, addrs[0].String(), "", "Proposal", @@ -185,7 +185,7 @@ func TestTickPassedDepositPeriod(t *testing.T) { newProposalMsg, err := v1.NewMsgSubmitProposal( []sdk.Msg{mkTestLegacyContent(t)}, - sdk.Coins{sdk.NewInt64Coin(sdk.DefaultBondDenom, 5)}, + sdk.Coins{sdk.NewInt64Coin(sdk.DefaultBondDenom, 100000)}, addrs[0].String(), "", "Proposal", @@ -211,7 +211,7 @@ func TestTickPassedDepositPeriod(t *testing.T) { require.False(t, inactiveQueue.Valid()) inactiveQueue.Close() - newDepositMsg := v1.NewMsgDeposit(addrs[1], proposalID, sdk.Coins{sdk.NewInt64Coin(sdk.DefaultBondDenom, 5)}) + newDepositMsg := v1.NewMsgDeposit(addrs[1], proposalID, sdk.Coins{sdk.NewInt64Coin(sdk.DefaultBondDenom, 100000)}) res1, err := govMsgSvr.Deposit(sdk.WrapSDKContext(ctx), newDepositMsg) require.NoError(t, err) diff --git a/x/gov/keeper/deposit.go b/x/gov/keeper/deposit.go index cdaa532c..450487b3 100644 --- a/x/gov/keeper/deposit.go +++ b/x/gov/keeper/deposit.go @@ -2,10 +2,12 @@ package keeper import ( "fmt" + "strings" sdkerrors "cosmossdk.io/errors" sdk "github.com/cosmos/cosmos-sdk/types" + sdkerrors1 "github.com/cosmos/cosmos-sdk/types/errors" "github.com/atomone-hub/atomone/x/gov/types" v1 "github.com/atomone-hub/atomone/x/gov/types/v1" @@ -120,8 +122,50 @@ func (keeper Keeper) AddDeposit(ctx sdk.Context, proposalID uint64, depositorAdd return false, sdkerrors.Wrapf(types.ErrInactiveProposal, "%d", proposalID) } + // Check coins to be deposited match the proposal's deposit params + params := keeper.GetParams(ctx) + + // NOTE: backported from v50 + // v47 does not have expedited proposals so we always use params.MinDeposit + minDepositAmount := params.MinDeposit + minDepositRatio, err := sdk.NewDecFromStr(params.GetMinDepositRatio()) + if err != nil { + return false, err + } + + // If minDepositRatio is set, the deposit must be equal or greater than minDepositAmount*minDepositRatio + // for at least one denom. If minDepositRatio is zero we skip this check. + if !minDepositRatio.IsZero() { + var ( + depositThresholdMet bool + thresholds []string + ) + for _, minDep := range minDepositAmount { + // calculate the threshold for this denom, and hold a list to later return a useful error message + threshold := sdk.NewCoin(minDep.GetDenom(), minDep.Amount.ToLegacyDec().Mul(minDepositRatio).TruncateInt()) + thresholds = append(thresholds, threshold.String()) + + found, deposit := depositAmount.Find(minDep.Denom) + if !found { // if not found, continue, as we know the deposit contains at least 1 valid denom + continue + } + + // Once we know at least one threshold has been met, we can break. The deposit + // might contain other denoms but we don't care. + if deposit.IsGTE(threshold) { + depositThresholdMet = true + break + } + } + + // the threshold must be met with at least one denom, if not, return the list of minimum deposits + if !depositThresholdMet { + return false, sdkerrors.Wrapf(types.ErrMinDepositTooSmall, "received %s but need at least one of the following: %s", depositAmount, strings.Join(thresholds, ",")) + } + } + // update the governance module's account coins pool - err := keeper.bankKeeper.SendCoinsFromAccountToModule(ctx, depositorAddr, types.ModuleName, depositAmount) + err = keeper.bankKeeper.SendCoinsFromAccountToModule(ctx, depositorAddr, types.ModuleName, depositAmount) if err != nil { return false, err } @@ -185,6 +229,10 @@ func (keeper Keeper) RefundAndDeleteDeposits(ctx sdk.Context, proposalID uint64) // required at the time of proposal submission. This threshold amount is determined by // the deposit parameters. Returns nil on success, error otherwise. func (keeper Keeper) validateInitialDeposit(ctx sdk.Context, initialDeposit sdk.Coins) error { + if !initialDeposit.IsValid() || initialDeposit.IsAnyNegative() { + return sdkerrors.Wrapf(sdkerrors1.ErrInvalidCoins, initialDeposit.String()) + } + params := keeper.GetParams(ctx) minInitialDepositRatio, err := sdk.NewDecFromStr(params.MinInitialDepositRatio) if err != nil { diff --git a/x/gov/keeper/deposit_test.go b/x/gov/keeper/deposit_test.go index dfdc54f8..25e578d2 100644 --- a/x/gov/keeper/deposit_test.go +++ b/x/gov/keeper/deposit_test.go @@ -213,3 +213,82 @@ func TestValidateInitialDeposit(t *testing.T) { }) } } + +func TestDepositAmount(t *testing.T) { + testcases := []struct { + name string + deposit sdk.Coins + minDepositRatio string + err string + }{ + { + name: "good amount and denoms", + deposit: sdk.NewCoins(sdk.NewInt64Coin("stake", 10000)), + minDepositRatio: "0.001", + }, + { + name: "good amount and denoms but not enough balance for zcoin", + deposit: sdk.NewCoins(sdk.NewInt64Coin("stake", 10000), sdk.NewInt64Coin("zcoin", 1)), + minDepositRatio: "0.001", + err: "not enough balance", + }, + { + name: "too small amount", + deposit: sdk.NewCoins(sdk.NewInt64Coin("stake", 10)), + minDepositRatio: "0.001", + err: "received 10stake but need at least one of the following: 10000stake,10zcoin: minimum deposit is too small", + }, + { + name: "too small amount with another coin", + deposit: sdk.NewCoins(sdk.NewInt64Coin("zcoin", 1)), + minDepositRatio: "0.001", + err: "received 1zcoin but need at least one of the following: 10000stake,10zcoin: minimum deposit is too small", + }, + { + name: "bad denom", + deposit: sdk.NewCoins(sdk.NewInt64Coin("euro", 10000)), + minDepositRatio: "0.001", + err: "received 10000euro but need at least one of the following: 10000stake,10zcoin: minimum deposit is too small", + }, + { + name: "mix containing bad and good denom", + deposit: sdk.NewCoins(sdk.NewInt64Coin("stake", 10000), sdk.NewInt64Coin("euro", 10000)), + minDepositRatio: "0.001", + err: "not enough balance", + }, + { + name: "minDepositRatio is zero", + deposit: sdk.NewCoins(sdk.NewInt64Coin("stake", 10)), + minDepositRatio: "0.0", + }, + } + + for _, tc := range testcases { + t.Run(tc.name, func(t *testing.T) { + govKeeper, mocks, _, ctx := setupGovKeeper(t) + bankKeeper, stakingKeeper := mocks.bankKeeper, mocks.stakingKeeper + trackMockBalances(bankKeeper) + + testAddrs := simtestutil.AddTestAddrsIncremental(bankKeeper, stakingKeeper, ctx, 2, sdk.NewInt(1000000000000000)) + + params := v1.DefaultParams() + params.MinDepositRatio = tc.minDepositRatio + params.MinDeposit = sdk.NewCoins(params.MinDeposit...).Add(sdk.NewCoin("zcoin", sdk.NewInt(10000))) // coins must be sorted by denom + err := govKeeper.SetParams(ctx, params) + require.NoError(t, err) + + tp := TestProposal + proposal, err := govKeeper.SubmitProposal(ctx, tp, "", "title", "summary", testAddrs[0]) + require.NoError(t, err) + proposalID := proposal.Id + + _, err = govKeeper.AddDeposit(ctx, proposalID, testAddrs[0], tc.deposit) + if tc.err != "" { + require.Error(t, err) + require.Equal(t, tc.err, err.Error()) + } else { + require.NoError(t, err) + } + }) + } +} diff --git a/x/gov/keeper/msg_server.go b/x/gov/keeper/msg_server.go index a6f43c81..e3e6f28a 100644 --- a/x/gov/keeper/msg_server.go +++ b/x/gov/keeper/msg_server.go @@ -7,6 +7,7 @@ import ( "cosmossdk.io/errors" sdk "github.com/cosmos/cosmos-sdk/types" + sdkerrors1 "github.com/cosmos/cosmos-sdk/types/errors" govtypes "github.com/atomone-hub/atomone/x/gov/types" v1 "github.com/atomone-hub/atomone/x/gov/types/v1" @@ -143,6 +144,11 @@ func (k msgServer) Deposit(goCtx context.Context, msg *v1.MsgDeposit) (*v1.MsgDe if err != nil { return nil, err } + + if err := validateDeposit(msg.Amount); err != nil { + return nil, err + } + votingStarted, err := k.Keeper.AddDeposit(ctx, msg.ProposalId, accAddr, msg.Amount) if err != nil { return nil, err @@ -160,6 +166,15 @@ func (k msgServer) Deposit(goCtx context.Context, msg *v1.MsgDeposit) (*v1.MsgDe return &v1.MsgDepositResponse{}, nil } +// validateDeposit validates the deposit amount, do not use for initial deposit. +func validateDeposit(amount sdk.Coins) error { + if !amount.IsValid() || !amount.IsAllPositive() { + return sdkerrors1.ErrInvalidCoins.Wrap(amount.String()) + } + + return nil +} + // UpdateParams implements the MsgServer.UpdateParams method. func (k msgServer) UpdateParams(goCtx context.Context, msg *v1.MsgUpdateParams) (*v1.MsgUpdateParamsResponse, error) { if k.authority != msg.Authority { diff --git a/x/gov/keeper/msg_server_test.go b/x/gov/keeper/msg_server_test.go index 865c26cb..059347dd 100644 --- a/x/gov/keeper/msg_server_test.go +++ b/x/gov/keeper/msg_server_test.go @@ -19,7 +19,7 @@ func (suite *KeeperTestSuite) TestSubmitProposalReq() { addrs := suite.addrs proposer := addrs[0] - coins := sdk.NewCoins(sdk.NewCoin("stake", sdk.NewInt(100))) + coins := sdk.NewCoins(sdk.NewCoin("stake", sdk.NewInt(100000))) initialDeposit := coins minDeposit := suite.govKeeper.GetParams(suite.ctx).MinDeposit bankMsg := &banktypes.MsgSend{ @@ -139,7 +139,7 @@ func (suite *KeeperTestSuite) TestVoteReq() { addrs := suite.addrs proposer := addrs[0] - coins := sdk.NewCoins(sdk.NewCoin("stake", sdk.NewInt(100))) + coins := sdk.NewCoins(sdk.NewCoin("stake", sdk.NewInt(100000))) minDeposit := suite.govKeeper.GetParams(suite.ctx).MinDeposit bankMsg := &banktypes.MsgSend{ FromAddress: govAcct.String(), @@ -258,7 +258,7 @@ func (suite *KeeperTestSuite) TestVoteWeightedReq() { addrs := suite.addrs proposer := addrs[0] - coins := sdk.NewCoins(sdk.NewCoin("stake", sdk.NewInt(100))) + coins := sdk.NewCoins(sdk.NewCoin("stake", sdk.NewInt(100000))) minDeposit := suite.govKeeper.GetParams(suite.ctx).MinDeposit bankMsg := &banktypes.MsgSend{ FromAddress: govAcct.String(), @@ -377,8 +377,8 @@ func (suite *KeeperTestSuite) TestDepositReq() { addrs := suite.addrs proposer := addrs[0] - coins := sdk.NewCoins(sdk.NewCoin("stake", sdk.NewInt(100))) - minDeposit := suite.govKeeper.GetParams(suite.ctx).MinDeposit + coins := sdk.NewCoins(sdk.NewCoin("stake", sdk.NewInt(100000))) + minDeposit := sdk.Coins(suite.govKeeper.GetParams(suite.ctx).MinDeposit) bankMsg := &banktypes.MsgSend{ FromAddress: govAcct.String(), ToAddress: proposer.String(), @@ -426,6 +426,14 @@ func (suite *KeeperTestSuite) TestDepositReq() { expErr: false, options: v1.NewNonSplitVoteOption(v1.OptionYes), }, + "invalid deposited coin ": { + preRun: func() uint64 { + return pId + }, + depositor: proposer, + deposit: minDeposit.Add(sdk.NewCoin("ibc/badcoin", sdk.NewInt(1000))), expErr: true, + options: v1.NewNonSplitVoteOption(v1.OptionYes), + }, } for name, tc := range cases { @@ -447,7 +455,7 @@ func (suite *KeeperTestSuite) TestLegacyMsgSubmitProposal() { addrs := suite.addrs proposer := addrs[0] - coins := sdk.NewCoins(sdk.NewCoin("stake", sdk.NewInt(100))) + coins := sdk.NewCoins(sdk.NewCoin("stake", sdk.NewInt(100000))) initialDeposit := coins minDeposit := suite.govKeeper.GetParams(suite.ctx).MinDeposit @@ -497,7 +505,7 @@ func (suite *KeeperTestSuite) TestLegacyMsgVote() { addrs := suite.addrs proposer := addrs[0] - coins := sdk.NewCoins(sdk.NewCoin("stake", sdk.NewInt(100))) + coins := sdk.NewCoins(sdk.NewCoin("stake", sdk.NewInt(100000))) minDeposit := suite.govKeeper.GetParams(suite.ctx).MinDeposit bankMsg := &banktypes.MsgSend{ FromAddress: govAcct.String(), @@ -606,7 +614,7 @@ func (suite *KeeperTestSuite) TestLegacyVoteWeighted() { addrs := suite.addrs proposer := addrs[0] - coins := sdk.NewCoins(sdk.NewCoin("stake", sdk.NewInt(100))) + coins := sdk.NewCoins(sdk.NewCoin("stake", sdk.NewInt(100000))) minDeposit := suite.govKeeper.GetParams(suite.ctx).MinDeposit bankMsg := &banktypes.MsgSend{ FromAddress: govAcct.String(), @@ -715,7 +723,7 @@ func (suite *KeeperTestSuite) TestLegacyMsgDeposit() { addrs := suite.addrs proposer := addrs[0] - coins := sdk.NewCoins(sdk.NewCoin("stake", sdk.NewInt(100))) + coins := sdk.NewCoins(sdk.NewCoin("stake", sdk.NewInt(100000))) minDeposit := suite.govKeeper.GetParams(suite.ctx).MinDeposit bankMsg := &banktypes.MsgSend{ FromAddress: govAcct.String(), diff --git a/x/gov/simulation/genesis.go b/x/gov/simulation/genesis.go index 82b78f21..7e25d9b1 100644 --- a/x/gov/simulation/genesis.go +++ b/x/gov/simulation/genesis.go @@ -27,6 +27,9 @@ const ( TallyParamsQuorum = "tally_params_quorum" TallyParamsThreshold = "tally_params_threshold" TallyParamsVeto = "tally_params_veto" + + // NOTE: backport from v50 + MinDepositRatio = "min_deposit_ratio" ) // GenDepositParamsDepositPeriod returns randomized DepositParamsDepositPeriod @@ -64,6 +67,11 @@ func GenTallyParamsVeto(r *rand.Rand) math.LegacyDec { return sdk.NewDecWithPrec(int64(simulation.RandIntBetween(r, 250, 334)), 3) } +// GenMinDepositRatio returns randomized DepositMinRatio +func GenMinDepositRatio(r *rand.Rand) math.LegacyDec { + return math.LegacyMustNewDecFromStr("0.01") +} + // RandomizedGenState generates a random GenesisState for gov func RandomizedGenState(simState *module.SimulationState) { startingProposalID := uint64(simState.Rand.Intn(100)) @@ -110,9 +118,12 @@ func RandomizedGenState(simState *module.SimulationState) { func(r *rand.Rand) { veto = GenTallyParamsVeto(r) }, ) + var minDepositRatio math.LegacyDec + simState.AppParams.GetOrGenerate(simState.Cdc, MinDepositRatio, &minDepositRatio, simState.Rand, func(r *rand.Rand) { minDepositRatio = GenMinDepositRatio(r) }) + govGenesis := v1.NewGenesisState( startingProposalID, - v1.NewParams(minDeposit, depositPeriod, votingPeriod, quorum.String(), threshold.String(), veto.String(), minInitialDepositRatio.String(), simState.Rand.Intn(2) == 0, simState.Rand.Intn(2) == 0, simState.Rand.Intn(2) == 0), + v1.NewParams(minDeposit, depositPeriod, votingPeriod, quorum.String(), threshold.String(), veto.String(), minInitialDepositRatio.String(), simState.Rand.Intn(2) == 0, simState.Rand.Intn(2) == 0, simState.Rand.Intn(2) == 0, minDepositRatio.String()), ) bz, err := json.MarshalIndent(&govGenesis, "", " ") diff --git a/x/gov/simulation/operations.go b/x/gov/simulation/operations.go index 83ea5469..9e606f91 100644 --- a/x/gov/simulation/operations.go +++ b/x/gov/simulation/operations.go @@ -452,6 +452,13 @@ func randomDeposit( minDepositAmount := minDeposit[denomIndex].Amount + minDepositRatio, err := sdk.NewDecFromStr(params.GetMinDepositRatio()) + if err != nil { + return nil, false, err + } + + threshold := minDepositAmount.ToLegacyDec().Mul(minDepositRatio).TruncateInt() + minAmount := sdk.ZeroInt() if useMinAmount { minDepositPercent, err := sdk.NewDecFromStr(params.MinInitialDepositRatio) @@ -468,7 +475,10 @@ func randomDeposit( } amount = amount.Add(minAmount) - if amount.GT(spendableBalance) { + // NOTE: backport from v50 + amount = amount.MulRaw(3) // 3x what's required // TODO: this is a hack, we need to be able to calculate the correct amount using params + + if amount.GT(spendableBalance) || amount.LT(threshold) { return nil, true, nil } diff --git a/x/gov/simulation/operations_test.go b/x/gov/simulation/operations_test.go index 2d040054..57161381 100644 --- a/x/gov/simulation/operations_test.go +++ b/x/gov/simulation/operations_test.go @@ -155,7 +155,7 @@ func TestSimulateMsgSubmitProposal(t *testing.T) { require.True(t, operationMsg.OK) require.Equal(t, "cosmos1ghekyjucln7y67ntx7cf27m9dpuxxemn4c8g4r", msg.Proposer) require.NotEqual(t, len(msg.InitialDeposit), 0) - require.Equal(t, "560969stake", msg.InitialDeposit[0].String()) + require.Equal(t, "1682907stake", msg.InitialDeposit[0].String()) require.Equal(t, simulation.TypeMsgSubmitProposal, sdk.MsgTypeURL(&msg)) } @@ -185,7 +185,7 @@ func TestSimulateMsgSubmitLegacyProposal(t *testing.T) { require.True(t, operationMsg.OK) require.Equal(t, "cosmos1p8wcgrjr4pjju90xg6u9cgq55dxwq8j7u4x9a0", msg.Proposer) require.NotEqual(t, len(msg.InitialDeposit), 0) - require.Equal(t, "2686011stake", msg.InitialDeposit[0].String()) + require.Equal(t, "8058033stake", msg.InitialDeposit[0].String()) require.Equal(t, "title-3: ZBSpYuLyYggwexjxusrBqDOTtGTOWeLrQKjLxzIivHSlcxgdXhhuTSkuxKGLwQvuyNhYFmBZHeAerqyNEUzXPFGkqEGqiQWIXnku", msg.Messages[0].GetCachedValue().(*v1.MsgExecLegacyContent).Content.GetCachedValue().(v1beta1.Content).GetTitle()) require.Equal(t, "description-3: NJWzHdBNpAXKJPHWQdrGYcAHSctgVlqwqHoLfHsXUdStwfefwzqLuKEhmMyYLdbZrcPgYqjNHxPexsruwEGStAneKbWkQDDIlCWBLSiAASNhZqNFlPtfqPJoxKsgMdzjWqLWdqKQuJqWPMvwPQWZUtVMOTMYKJbfdlZsjdsomuScvDmbDkgRualsxDvRJuCAmPOXitIbcyWsKGSdrEunFAOdmXnsuyFVgJqEjbklvmwrUlsxjRSfKZxGcpayDdgoFcnVSutxjRgOSFzPwidAjubMncNweqpbxhXGchpZUxuFDOtpnhNUycJICRYqsPhPSCjPTWZFLkstHWJxvdPEAyEIxXgLwbNOjrgzmaujiBABBIXvcXpLrbcEWNNQsbjvgJFgJkflpRohHUutvnaUqoopuKjTDaemDeSdqbnOzcfJpcTuAQtZoiLZOoAIlboFDAeGmSNwkvObPRvRWQgWkGkxwtPauYgdkmypLjbqhlHJIQTntgWjXwZdOyYEdQRRLfMSdnxqppqUofqLbLQDUjwKVKfZJUJQPsWIPwIVaSTrmKskoAhvmZyJgeRpkaTfGgrJzAigcxtfshmiDCFkuiluqtMOkidknnTBtumyJYlIsWLnCQclqdVmikUoMOPdPWwYbJxXyqUVicNxFxyqJTenNblyyKSdlCbiXxUiYUiMw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beH", msg.Messages[0].GetCachedValue().(*v1.MsgExecLegacyContent).Content.GetCachedValue().(v1beta1.Content).GetDescription()) require.Equal(t, "gov", msg.Route()) @@ -234,7 +234,7 @@ func TestSimulateMsgDeposit(t *testing.T) { require.Equal(t, uint64(1), msg.ProposalId) require.Equal(t, "cosmos1ghekyjucln7y67ntx7cf27m9dpuxxemn4c8g4r", msg.Depositor) require.NotEqual(t, len(msg.Amount), 0) - require.Equal(t, "560969stake", msg.Amount[0].String()) + require.Equal(t, "1682907stake", msg.Amount[0].String()) require.Equal(t, "gov", msg.Route()) require.Equal(t, simulation.TypeMsgDeposit, msg.Type()) } diff --git a/x/gov/types/v1/genesis.pb.go b/x/gov/types/v1/genesis.pb.go index a761a4d3..579fa1b3 100644 --- a/x/gov/types/v1/genesis.pb.go +++ b/x/gov/types/v1/genesis.pb.go @@ -5,16 +5,19 @@ package v1 import ( fmt "fmt" - proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" + + proto "github.com/cosmos/gogoproto/proto" ) // Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf +var ( + _ = proto.Marshal + _ = fmt.Errorf + _ = math.Inf +) // This is a compile-time assertion to ensure that this generated file // is compatible with the proto package it is being compiled against. @@ -53,9 +56,11 @@ func (*GenesisState) ProtoMessage() {} func (*GenesisState) Descriptor() ([]byte, []int) { return fileDescriptor_7737a96fb154b10d, []int{0} } + func (m *GenesisState) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } + func (m *GenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_GenesisState.Marshal(b, m, deterministic) @@ -68,12 +73,15 @@ func (m *GenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) return b[:n], nil } } + func (m *GenesisState) XXX_Merge(src proto.Message) { xxx_messageInfo_GenesisState.Merge(m, src) } + func (m *GenesisState) XXX_Size() int { return m.Size() } + func (m *GenesisState) XXX_DiscardUnknown() { xxx_messageInfo_GenesisState.DiscardUnknown(m) } @@ -301,6 +309,7 @@ func encodeVarintGenesis(dAtA []byte, offset int, v uint64) int { dAtA[offset] = uint8(v) return base } + func (m *GenesisState) Size() (n int) { if m == nil { return 0 @@ -350,9 +359,11 @@ func (m *GenesisState) Size() (n int) { func sovGenesis(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } + func sozGenesis(x uint64) (n int) { return sovGenesis(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } + func (m *GenesisState) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -668,6 +679,7 @@ func (m *GenesisState) Unmarshal(dAtA []byte) error { } return nil } + func skipGenesis(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/x/gov/types/v1/gov.pb.go b/x/gov/types/v1/gov.pb.go index 1856e844..8afbc7d6 100644 --- a/x/gov/types/v1/gov.pb.go +++ b/x/gov/types/v1/gov.pb.go @@ -5,6 +5,11 @@ package v1 import ( fmt "fmt" + io "io" + math "math" + math_bits "math/bits" + time "time" + _ "github.com/cosmos/cosmos-proto" types1 "github.com/cosmos/cosmos-sdk/codec/types" types "github.com/cosmos/cosmos-sdk/types" @@ -14,17 +19,15 @@ import ( github_com_cosmos_gogoproto_types "github.com/cosmos/gogoproto/types" _ "google.golang.org/protobuf/types/known/durationpb" _ "google.golang.org/protobuf/types/known/timestamppb" - io "io" - math "math" - math_bits "math/bits" - time "time" ) // Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf -var _ = time.Kitchen +var ( + _ = proto.Marshal + _ = fmt.Errorf + _ = math.Inf + _ = time.Kitchen +) // This is a compile-time assertion to ensure that this generated file // is compatible with the proto package it is being compiled against. @@ -123,7 +126,8 @@ func (ProposalStatus) EnumDescriptor() ([]byte, []int) { // WeightedVoteOption defines a unit of vote for vote split. type WeightedVoteOption struct { - // option defines the valid vote options, it must not contain duplicate vote options. + // option defines the valid vote options, it must not contain duplicate vote + // options. Option VoteOption `protobuf:"varint,1,opt,name=option,proto3,enum=atomone.gov.v1.VoteOption" json:"option,omitempty"` // weight is the vote weight associated with the vote option. Weight string `protobuf:"bytes,2,opt,name=weight,proto3" json:"weight,omitempty"` @@ -135,9 +139,11 @@ func (*WeightedVoteOption) ProtoMessage() {} func (*WeightedVoteOption) Descriptor() ([]byte, []int) { return fileDescriptor_ecf0f9950ff6986c, []int{0} } + func (m *WeightedVoteOption) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } + func (m *WeightedVoteOption) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_WeightedVoteOption.Marshal(b, m, deterministic) @@ -150,12 +156,15 @@ func (m *WeightedVoteOption) XXX_Marshal(b []byte, deterministic bool) ([]byte, return b[:n], nil } } + func (m *WeightedVoteOption) XXX_Merge(src proto.Message) { xxx_messageInfo_WeightedVoteOption.Merge(m, src) } + func (m *WeightedVoteOption) XXX_Size() int { return m.Size() } + func (m *WeightedVoteOption) XXX_DiscardUnknown() { xxx_messageInfo_WeightedVoteOption.DiscardUnknown(m) } @@ -193,9 +202,11 @@ func (*Deposit) ProtoMessage() {} func (*Deposit) Descriptor() ([]byte, []int) { return fileDescriptor_ecf0f9950ff6986c, []int{1} } + func (m *Deposit) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } + func (m *Deposit) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_Deposit.Marshal(b, m, deterministic) @@ -208,12 +219,15 @@ func (m *Deposit) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return b[:n], nil } } + func (m *Deposit) XXX_Merge(src proto.Message) { xxx_messageInfo_Deposit.Merge(m, src) } + func (m *Deposit) XXX_Size() int { return m.Size() } + func (m *Deposit) XXX_DiscardUnknown() { xxx_messageInfo_Deposit.DiscardUnknown(m) } @@ -285,9 +299,11 @@ func (*Proposal) ProtoMessage() {} func (*Proposal) Descriptor() ([]byte, []int) { return fileDescriptor_ecf0f9950ff6986c, []int{2} } + func (m *Proposal) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } + func (m *Proposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_Proposal.Marshal(b, m, deterministic) @@ -300,12 +316,15 @@ func (m *Proposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return b[:n], nil } } + func (m *Proposal) XXX_Merge(src proto.Message) { xxx_messageInfo_Proposal.Merge(m, src) } + func (m *Proposal) XXX_Size() int { return m.Size() } + func (m *Proposal) XXX_DiscardUnknown() { xxx_messageInfo_Proposal.DiscardUnknown(m) } @@ -421,9 +440,11 @@ func (*TallyResult) ProtoMessage() {} func (*TallyResult) Descriptor() ([]byte, []int) { return fileDescriptor_ecf0f9950ff6986c, []int{3} } + func (m *TallyResult) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } + func (m *TallyResult) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_TallyResult.Marshal(b, m, deterministic) @@ -436,12 +457,15 @@ func (m *TallyResult) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) return b[:n], nil } } + func (m *TallyResult) XXX_Merge(src proto.Message) { xxx_messageInfo_TallyResult.Merge(m, src) } + func (m *TallyResult) XXX_Size() int { return m.Size() } + func (m *TallyResult) XXX_DiscardUnknown() { xxx_messageInfo_TallyResult.DiscardUnknown(m) } @@ -495,9 +519,11 @@ func (*Vote) ProtoMessage() {} func (*Vote) Descriptor() ([]byte, []int) { return fileDescriptor_ecf0f9950ff6986c, []int{4} } + func (m *Vote) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } + func (m *Vote) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_Vote.Marshal(b, m, deterministic) @@ -510,12 +536,15 @@ func (m *Vote) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return b[:n], nil } } + func (m *Vote) XXX_Merge(src proto.Message) { xxx_messageInfo_Vote.Merge(m, src) } + func (m *Vote) XXX_Size() int { return m.Size() } + func (m *Vote) XXX_DiscardUnknown() { xxx_messageInfo_Vote.DiscardUnknown(m) } @@ -565,9 +594,11 @@ func (*DepositParams) ProtoMessage() {} func (*DepositParams) Descriptor() ([]byte, []int) { return fileDescriptor_ecf0f9950ff6986c, []int{5} } + func (m *DepositParams) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } + func (m *DepositParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_DepositParams.Marshal(b, m, deterministic) @@ -580,12 +611,15 @@ func (m *DepositParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error return b[:n], nil } } + func (m *DepositParams) XXX_Merge(src proto.Message) { xxx_messageInfo_DepositParams.Merge(m, src) } + func (m *DepositParams) XXX_Size() int { return m.Size() } + func (m *DepositParams) XXX_DiscardUnknown() { xxx_messageInfo_DepositParams.DiscardUnknown(m) } @@ -618,9 +652,11 @@ func (*VotingParams) ProtoMessage() {} func (*VotingParams) Descriptor() ([]byte, []int) { return fileDescriptor_ecf0f9950ff6986c, []int{6} } + func (m *VotingParams) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } + func (m *VotingParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_VotingParams.Marshal(b, m, deterministic) @@ -633,12 +669,15 @@ func (m *VotingParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) return b[:n], nil } } + func (m *VotingParams) XXX_Merge(src proto.Message) { xxx_messageInfo_VotingParams.Merge(m, src) } + func (m *VotingParams) XXX_Size() int { return m.Size() } + func (m *VotingParams) XXX_DiscardUnknown() { xxx_messageInfo_VotingParams.DiscardUnknown(m) } @@ -670,9 +709,11 @@ func (*TallyParams) ProtoMessage() {} func (*TallyParams) Descriptor() ([]byte, []int) { return fileDescriptor_ecf0f9950ff6986c, []int{7} } + func (m *TallyParams) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } + func (m *TallyParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_TallyParams.Marshal(b, m, deterministic) @@ -685,12 +726,15 @@ func (m *TallyParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) return b[:n], nil } } + func (m *TallyParams) XXX_Merge(src proto.Message) { xxx_messageInfo_TallyParams.Merge(m, src) } + func (m *TallyParams) XXX_Size() int { return m.Size() } + func (m *TallyParams) XXX_DiscardUnknown() { xxx_messageInfo_TallyParams.DiscardUnknown(m) } @@ -737,7 +781,8 @@ type Params struct { // Minimum value of Veto votes to Total votes ratio for proposal to be // vetoed. Default value: 1/3. VetoThreshold string `protobuf:"bytes,6,opt,name=veto_threshold,json=vetoThreshold,proto3" json:"veto_threshold,omitempty"` - // The ratio representing the proportion of the deposit value that must be paid at proposal submission. + // The ratio representing the proportion of the deposit value that must be + // paid at proposal submission. MinInitialDepositRatio string `protobuf:"bytes,7,opt,name=min_initial_deposit_ratio,json=minInitialDepositRatio,proto3" json:"min_initial_deposit_ratio,omitempty"` // burn deposits if a proposal does not meet quorum BurnVoteQuorum bool `protobuf:"varint,13,opt,name=burn_vote_quorum,json=burnVoteQuorum,proto3" json:"burn_vote_quorum,omitempty"` @@ -745,6 +790,14 @@ type Params struct { BurnProposalDepositPrevote bool `protobuf:"varint,14,opt,name=burn_proposal_deposit_prevote,json=burnProposalDepositPrevote,proto3" json:"burn_proposal_deposit_prevote,omitempty"` // burn deposits if quorum with vote type no_veto is met BurnVoteVeto bool `protobuf:"varint,15,opt,name=burn_vote_veto,json=burnVoteVeto,proto3" json:"burn_vote_veto,omitempty"` + // The ratio representing the proportion of the deposit value minimum that + // must be met when making a deposit. Default value: 0.01. Meaning that for a + // chain with a min_deposit of 100stake, a deposit of 1stake would be + // required. + // + // Since: cosmos-sdk 0.50 + // NOTE: backported from v50 (https://github.com/cosmos/cosmos-sdk/pull/18146) + MinDepositRatio string `protobuf:"bytes,16,opt,name=min_deposit_ratio,json=minDepositRatio,proto3" json:"min_deposit_ratio,omitempty"` } func (m *Params) Reset() { *m = Params{} } @@ -753,9 +806,11 @@ func (*Params) ProtoMessage() {} func (*Params) Descriptor() ([]byte, []int) { return fileDescriptor_ecf0f9950ff6986c, []int{8} } + func (m *Params) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } + func (m *Params) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_Params.Marshal(b, m, deterministic) @@ -768,12 +823,15 @@ func (m *Params) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return b[:n], nil } } + func (m *Params) XXX_Merge(src proto.Message) { xxx_messageInfo_Params.Merge(m, src) } + func (m *Params) XXX_Size() int { return m.Size() } + func (m *Params) XXX_DiscardUnknown() { xxx_messageInfo_Params.DiscardUnknown(m) } @@ -850,6 +908,13 @@ func (m *Params) GetBurnVoteVeto() bool { return false } +func (m *Params) GetMinDepositRatio() string { + if m != nil { + return m.MinDepositRatio + } + return "" +} + func init() { proto.RegisterEnum("atomone.gov.v1.VoteOption", VoteOption_name, VoteOption_value) proto.RegisterEnum("atomone.gov.v1.ProposalStatus", ProposalStatus_name, ProposalStatus_value) @@ -867,88 +932,89 @@ func init() { func init() { proto.RegisterFile("atomone/gov/v1/gov.proto", fileDescriptor_ecf0f9950ff6986c) } var fileDescriptor_ecf0f9950ff6986c = []byte{ - // 1282 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x57, 0x4f, 0x73, 0xd3, 0x46, - 0x14, 0x8f, 0x6c, 0xd9, 0x71, 0x9e, 0x13, 0xc7, 0x2c, 0x29, 0x28, 0x06, 0xec, 0xd4, 0xc3, 0x30, - 0x29, 0x25, 0x76, 0x13, 0x5a, 0x2e, 0xe5, 0xe2, 0xc4, 0x02, 0xc4, 0xd0, 0xd8, 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 0x8e, 0x51, 0xe8, 0x16, 0xa4, 0x43, 0xe6, - 0xb0, 0x41, 0xa8, 0x25, 0x45, 0x36, 0x8b, 0xb3, 0xd9, 0x8c, 0x7d, 0xb5, 0x04, 0xca, 0x94, 0x68, - 0x64, 0x00, 0x7a, 0x42, 0x7c, 0xa7, 0x67, 0x33, 0xa7, 0xd7, 0x1b, 0xd9, 0x01, 0x0e, 0x07, 0x3d, - 0xa6, 0xa9, 0x1b, 0xca, 0x66, 0x76, 0xe7, 0xd2, 0xac, 0x0d, 0x8b, 0x63, 0x4c, 0x01, 0x31, 0xf3, - 0x82, 0x36, 0x25, 0x41, 0x35, 0xc8, 0x86, 0x83, 0xb6, 0x47, 0x98, 0xcd, 0x3b, 0x4d, 0x4b, 0x09, - 0x1b, 0x85, 0x63, 0x71, 0x5b, 0x71, 0x1b, 0xee, 0xaa, 0xcf, 0xff, 0x2e, 0x29, 0x26, 0x44, 0x24, - 0x2e, 0x46, 0xf7, 0x21, 0x2f, 0xf3, 0x6b, 0x63, 0xdf, 0x8d, 0xec, 0xa4, 0x4f, 0x69, 0x27, 0x27, - 0x99, 0xba, 0xef, 0x0a, 0x5b, 0x06, 0xac, 0x30, 0xca, 0x9c, 0x9e, 0x2d, 0xe5, 0xda, 0xe2, 0x19, - 0xaa, 0xb4, 0x2c, 0xa8, 0x71, 0x0b, 0x3d, 0x80, 0x73, 0x43, 0xca, 0x88, 0xdf, 0xb1, 0x43, 0xe6, - 0x04, 0xf2, 0x7c, 0x99, 0x53, 0xc6, 0xb5, 0x1a, 0x51, 0x5b, 0x9c, 0x29, 0x02, 0xbb, 0x07, 0x52, - 0x34, 0x39, 0xe3, 0xd2, 0x29, 0x6d, 0xad, 0x44, 0xc4, 0xf8, 0x88, 0x05, 0xde, 0x26, 0xcc, 0x71, - 0x1d, 0xe6, 0x68, 0xc0, 0x1b, 0xd7, 0x1c, 0xbf, 0xa3, 0x35, 0x48, 0x31, 0xc2, 0x7a, 0x58, 0xcb, - 0x0a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, 0x6e, 0x59, 0x35, 0xeb, 0x61, 0x6b, 0x26, 0xa6, 0x32, 0x14, 0x67, 0x01, 0x75, 0xbd, - 0xd9, 0x68, 0x19, 0x96, 0xdd, 0xd4, 0x4d, 0xa3, 0x51, 0xcf, 0x2b, 0xe8, 0x63, 0xb8, 0x32, 0x8b, - 0x39, 0x68, 0x58, 0xc6, 0xfe, 0xdd, 0x18, 0x92, 0x40, 0x05, 0xb8, 0x30, 0x0b, 0x69, 0xd6, 0x5a, - 0x2d, 0xbd, 0x1e, 0x05, 0x3d, 0xab, 0x33, 0xf5, 0xfb, 0xfa, 0x9e, 0xa5, 0xd7, 0xf3, 0xea, 0x3c, - 0xe6, 0x9d, 0x9a, 0xf1, 0x40, 0xaf, 0xe7, 0x53, 0xbb, 0x77, 0x5f, 0xbe, 0x2d, 0x2a, 0xaf, 0xde, - 0x16, 0x95, 0x7f, 0xde, 0x16, 0x95, 0xe7, 0xef, 0x8a, 0x0b, 0xaf, 0xde, 0x15, 0x17, 0xfe, 0x7c, - 0x57, 0x5c, 0xf8, 0x66, 0xab, 0x43, 0x58, 0x77, 0xd0, 0xae, 0x1c, 0x52, 0xaf, 0x2a, 0x17, 0xfe, - 0x56, 0x77, 0xd0, 0x8e, 0x9f, 0xab, 0xcf, 0xc4, 0x2f, 0x01, 0x36, 0xea, 0xe3, 0x90, 0x7f, 0xe5, - 0xa7, 0xc5, 0xdc, 0xdc, 0xfc, 0x2f, 0x00, 0x00, 0xff, 0xff, 0xb9, 0x04, 0x79, 0x98, 0x28, 0x0c, - 0x00, 0x00, + // 1300 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x57, 0xcf, 0x73, 0xd3, 0xc6, + 0x17, 0x8f, 0xfc, 0x2b, 0xce, 0x73, 0xe2, 0x88, 0x25, 0x5f, 0x50, 0x0c, 0xd8, 0xf9, 0x7a, 0x18, + 0x26, 0xa5, 0xc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3f, 0x32, 0xac, 0x7b, 0xf6, 0x81, 0x6e, 0x35, + 0xd4, 0xd4, 0xf5, 0xdf, 0x14, 0xc8, 0x1f, 0xfd, 0x59, 0x83, 0x4a, 0x70, 0xa9, 0x69, 0x36, 0x9a, + 0x8d, 0x56, 0xed, 0x81, 0xdd, 0xb2, 0x6a, 0xd6, 0xc3, 0xd6, 0x4c, 0x4c, 0x65, 0x28, 0xce, 0x02, + 0xea, 0x7a, 0xb3, 0xd1, 0x32, 0x2c, 0xbb, 0xa9, 0x9b, 0x46, 0xa3, 0xae, 0x2a, 0xe8, 0xff, 0x70, + 0x65, 0x16, 0x73, 0xd0, 0xb0, 0x8c, 0xfd, 0xbb, 0x31, 0x24, 0x81, 0x0a, 0x70, 0x61, 0x16, 0xd2, + 0xac, 0xb5, 0x5a, 0x7a, 0x3d, 0x0a, 0x7a, 0x56, 0x67, 0xea, 0xf7, 0xf5, 0x3d, 0x4b, 0xaf, 0xab, + 0xa9, 0x79, 0xcc, 0x3b, 0x35, 0xe3, 0x81, 0x5e, 0x57, 0xd3, 0xbb, 0x77, 0x5f, 0xbe, 0x2d, 0x2a, + 0xaf, 0xde, 0x16, 0x95, 0xbf, 0xdf, 0x16, 0x95, 0xe7, 0xef, 0x8a, 0x0b, 0xaf, 0xde, 0x15, 0x17, + 0xfe, 0x78, 0x57, 0x5c, 0xf8, 0x7a, 0xab, 0x43, 0x58, 0x77, 0xd0, 0xae, 0x1c, 0x52, 0xaf, 0x2a, + 0x2f, 0x8b, 0xad, 0xee, 0xa0, 0x1d, 0x3f, 0x57, 0x9f, 0x89, 0xaf, 0x08, 0x36, 0xea, 0xe3, 0x90, + 0x7f, 0x21, 0x64, 0xc4, 0xce, 0xdd, 0xfc, 0x37, 0x00, 0x00, 0xff, 0xff, 0xf7, 0x68, 0x7f, 0x62, + 0x64, 0x0c, 0x00, 0x00, } func (m *WeightedVoteOption) Marshal() (dAtA []byte, err error) { @@ -1427,6 +1493,15 @@ func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if len(m.MinDepositRatio) > 0 { + i -= len(m.MinDepositRatio) + copy(dAtA[i:], m.MinDepositRatio) + i = encodeVarintGov(dAtA, i, uint64(len(m.MinDepositRatio))) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0x82 + } if m.BurnVoteVeto { i-- if m.BurnVoteVeto { @@ -1533,6 +1608,7 @@ func encodeVarintGov(dAtA []byte, offset int, v uint64) int { dAtA[offset] = uint8(v) return base } + func (m *WeightedVoteOption) Size() (n int) { if m == nil { return 0 @@ -1783,15 +1859,21 @@ func (m *Params) Size() (n int) { if m.BurnVoteVeto { n += 2 } + l = len(m.MinDepositRatio) + if l > 0 { + n += 2 + l + sovGov(uint64(l)) + } return n } func sovGov(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } + func sozGov(x uint64) (n int) { return sovGov(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } + func (m *WeightedVoteOption) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -1893,6 +1975,7 @@ func (m *WeightedVoteOption) Unmarshal(dAtA []byte) error { } return nil } + func (m *Deposit) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -2028,6 +2111,7 @@ func (m *Deposit) Unmarshal(dAtA []byte) error { } return nil } + func (m *Proposal) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -2492,6 +2576,7 @@ func (m *Proposal) Unmarshal(dAtA []byte) error { } return nil } + func (m *TallyResult) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -2670,6 +2755,7 @@ func (m *TallyResult) Unmarshal(dAtA []byte) error { } return nil } + func (m *Vote) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -2837,6 +2923,7 @@ func (m *Vote) Unmarshal(dAtA []byte) error { } return nil } + func (m *DepositParams) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -2957,6 +3044,7 @@ func (m *DepositParams) Unmarshal(dAtA []byte) error { } return nil } + func (m *VotingParams) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -3043,6 +3131,7 @@ func (m *VotingParams) Unmarshal(dAtA []byte) error { } return nil } + func (m *TallyParams) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -3189,6 +3278,7 @@ func (m *TallyParams) Unmarshal(dAtA []byte) error { } return nil } + func (m *Params) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -3512,6 +3602,38 @@ func (m *Params) Unmarshal(dAtA []byte) error { } } m.BurnVoteVeto = bool(v != 0) + case 16: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MinDepositRatio", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGov + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGov + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGov + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MinDepositRatio = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGov(dAtA[iNdEx:]) @@ -3533,6 +3655,7 @@ func (m *Params) Unmarshal(dAtA []byte) error { } return nil } + func skipGov(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/x/gov/types/v1/params.go b/x/gov/types/v1/params.go index ef72de65..3c3db595 100644 --- a/x/gov/types/v1/params.go +++ b/x/gov/types/v1/params.go @@ -21,9 +21,10 @@ var ( DefaultThreshold = sdk.NewDecWithPrec(5, 1) DefaultVetoThreshold = sdk.NewDecWithPrec(334, 3) DefaultMinInitialDepositRatio = sdk.ZeroDec() - DefaultBurnProposalPrevote = false // set to false to replicate behavior of when this change was made (0.47) - DefaultBurnVoteQuorom = false // set to false to replicate behavior of when this change was made (0.47) - DefaultBurnVoteVeto = true // set to true to replicate behavior of when this change was made (0.47) + DefaultBurnProposalPrevote = false // set to false to replicate behavior of when this change was made (0.47) + DefaultBurnVoteQuorom = false // set to false to replicate behavior of when this change was made (0.47) + DefaultBurnVoteVeto = true // set to true to replicate behavior of when this change was made (0.47) + DefaultMinDepositRatio = sdk.MustNewDecFromStr("0.01") // NOTE: backport from v50 ) // Deprecated: NewDepositParams creates a new DepositParams object @@ -53,7 +54,7 @@ func NewVotingParams(votingPeriod *time.Duration) VotingParams { // NewParams creates a new Params instance with given values. func NewParams( minDeposit sdk.Coins, maxDepositPeriod, votingPeriod time.Duration, - quorum, threshold, vetoThreshold, minInitialDepositRatio string, burnProposalDeposit, burnVoteQuorum, burnVoteVeto bool, + quorum, threshold, vetoThreshold, minInitialDepositRatio string, burnProposalDeposit, burnVoteQuorum, burnVoteVeto bool, minDepositRatio string, ) Params { return Params{ MinDeposit: minDeposit, @@ -66,6 +67,7 @@ func NewParams( BurnProposalDepositPrevote: burnProposalDeposit, BurnVoteQuorum: burnVoteQuorum, BurnVoteVeto: burnVoteVeto, + MinDepositRatio: minDepositRatio, } } @@ -82,6 +84,7 @@ func DefaultParams() Params { DefaultBurnProposalPrevote, DefaultBurnVoteQuorom, DefaultBurnVoteVeto, + DefaultMinDepositRatio.String(), ) } diff --git a/x/gov/types/v1/query.pb.go b/x/gov/types/v1/query.pb.go index 8d29bb15..bd9ba0d6 100644 --- a/x/gov/types/v1/query.pb.go +++ b/x/gov/types/v1/query.pb.go @@ -6,6 +6,10 @@ package v1 import ( context "context" fmt "fmt" + io "io" + math "math" + math_bits "math/bits" + _ "github.com/cosmos/cosmos-proto" query "github.com/cosmos/cosmos-sdk/types/query" grpc1 "github.com/cosmos/gogoproto/grpc" @@ -14,15 +18,14 @@ import ( grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" - io "io" - math "math" - math_bits "math/bits" ) // Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf +var ( + _ = proto.Marshal + _ = fmt.Errorf + _ = math.Inf +) // This is a compile-time assertion to ensure that this generated file // is compatible with the proto package it is being compiled against. @@ -42,9 +45,11 @@ func (*QueryProposalRequest) ProtoMessage() {} func (*QueryProposalRequest) Descriptor() ([]byte, []int) { return fileDescriptor_2290d0188dd70223, []int{0} } + func (m *QueryProposalRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } + func (m *QueryProposalRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_QueryProposalRequest.Marshal(b, m, deterministic) @@ -57,12 +62,15 @@ func (m *QueryProposalRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte return b[:n], nil } } + func (m *QueryProposalRequest) XXX_Merge(src proto.Message) { xxx_messageInfo_QueryProposalRequest.Merge(m, src) } + func (m *QueryProposalRequest) XXX_Size() int { return m.Size() } + func (m *QueryProposalRequest) XXX_DiscardUnknown() { xxx_messageInfo_QueryProposalRequest.DiscardUnknown(m) } @@ -88,9 +96,11 @@ func (*QueryProposalResponse) ProtoMessage() {} func (*QueryProposalResponse) Descriptor() ([]byte, []int) { return fileDescriptor_2290d0188dd70223, []int{1} } + func (m *QueryProposalResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } + func (m *QueryProposalResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_QueryProposalResponse.Marshal(b, m, deterministic) @@ -103,12 +113,15 @@ func (m *QueryProposalResponse) XXX_Marshal(b []byte, deterministic bool) ([]byt return b[:n], nil } } + func (m *QueryProposalResponse) XXX_Merge(src proto.Message) { xxx_messageInfo_QueryProposalResponse.Merge(m, src) } + func (m *QueryProposalResponse) XXX_Size() int { return m.Size() } + func (m *QueryProposalResponse) XXX_DiscardUnknown() { xxx_messageInfo_QueryProposalResponse.DiscardUnknown(m) } @@ -140,9 +153,11 @@ func (*QueryProposalsRequest) ProtoMessage() {} func (*QueryProposalsRequest) Descriptor() ([]byte, []int) { return fileDescriptor_2290d0188dd70223, []int{2} } + func (m *QueryProposalsRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } + func (m *QueryProposalsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_QueryProposalsRequest.Marshal(b, m, deterministic) @@ -155,12 +170,15 @@ func (m *QueryProposalsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byt return b[:n], nil } } + func (m *QueryProposalsRequest) XXX_Merge(src proto.Message) { xxx_messageInfo_QueryProposalsRequest.Merge(m, src) } + func (m *QueryProposalsRequest) XXX_Size() int { return m.Size() } + func (m *QueryProposalsRequest) XXX_DiscardUnknown() { xxx_messageInfo_QueryProposalsRequest.DiscardUnknown(m) } @@ -210,9 +228,11 @@ func (*QueryProposalsResponse) ProtoMessage() {} func (*QueryProposalsResponse) Descriptor() ([]byte, []int) { return fileDescriptor_2290d0188dd70223, []int{3} } + func (m *QueryProposalsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } + func (m *QueryProposalsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_QueryProposalsResponse.Marshal(b, m, deterministic) @@ -225,12 +245,15 @@ func (m *QueryProposalsResponse) XXX_Marshal(b []byte, deterministic bool) ([]by return b[:n], nil } } + func (m *QueryProposalsResponse) XXX_Merge(src proto.Message) { xxx_messageInfo_QueryProposalsResponse.Merge(m, src) } + func (m *QueryProposalsResponse) XXX_Size() int { return m.Size() } + func (m *QueryProposalsResponse) XXX_DiscardUnknown() { xxx_messageInfo_QueryProposalsResponse.DiscardUnknown(m) } @@ -265,9 +288,11 @@ func (*QueryVoteRequest) ProtoMessage() {} func (*QueryVoteRequest) Descriptor() ([]byte, []int) { return fileDescriptor_2290d0188dd70223, []int{4} } + func (m *QueryVoteRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } + func (m *QueryVoteRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_QueryVoteRequest.Marshal(b, m, deterministic) @@ -280,12 +305,15 @@ func (m *QueryVoteRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, er return b[:n], nil } } + func (m *QueryVoteRequest) XXX_Merge(src proto.Message) { xxx_messageInfo_QueryVoteRequest.Merge(m, src) } + func (m *QueryVoteRequest) XXX_Size() int { return m.Size() } + func (m *QueryVoteRequest) XXX_DiscardUnknown() { xxx_messageInfo_QueryVoteRequest.DiscardUnknown(m) } @@ -318,9 +346,11 @@ func (*QueryVoteResponse) ProtoMessage() {} func (*QueryVoteResponse) Descriptor() ([]byte, []int) { return fileDescriptor_2290d0188dd70223, []int{5} } + func (m *QueryVoteResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } + func (m *QueryVoteResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_QueryVoteResponse.Marshal(b, m, deterministic) @@ -333,12 +363,15 @@ func (m *QueryVoteResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, e return b[:n], nil } } + func (m *QueryVoteResponse) XXX_Merge(src proto.Message) { xxx_messageInfo_QueryVoteResponse.Merge(m, src) } + func (m *QueryVoteResponse) XXX_Size() int { return m.Size() } + func (m *QueryVoteResponse) XXX_DiscardUnknown() { xxx_messageInfo_QueryVoteResponse.DiscardUnknown(m) } @@ -366,9 +399,11 @@ func (*QueryVotesRequest) ProtoMessage() {} func (*QueryVotesRequest) Descriptor() ([]byte, []int) { return fileDescriptor_2290d0188dd70223, []int{6} } + func (m *QueryVotesRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } + func (m *QueryVotesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_QueryVotesRequest.Marshal(b, m, deterministic) @@ -381,12 +416,15 @@ func (m *QueryVotesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, e return b[:n], nil } } + func (m *QueryVotesRequest) XXX_Merge(src proto.Message) { xxx_messageInfo_QueryVotesRequest.Merge(m, src) } + func (m *QueryVotesRequest) XXX_Size() int { return m.Size() } + func (m *QueryVotesRequest) XXX_DiscardUnknown() { xxx_messageInfo_QueryVotesRequest.DiscardUnknown(m) } @@ -421,9 +459,11 @@ func (*QueryVotesResponse) ProtoMessage() {} func (*QueryVotesResponse) Descriptor() ([]byte, []int) { return fileDescriptor_2290d0188dd70223, []int{7} } + func (m *QueryVotesResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } + func (m *QueryVotesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_QueryVotesResponse.Marshal(b, m, deterministic) @@ -436,12 +476,15 @@ func (m *QueryVotesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, return b[:n], nil } } + func (m *QueryVotesResponse) XXX_Merge(src proto.Message) { xxx_messageInfo_QueryVotesResponse.Merge(m, src) } + func (m *QueryVotesResponse) XXX_Size() int { return m.Size() } + func (m *QueryVotesResponse) XXX_DiscardUnknown() { xxx_messageInfo_QueryVotesResponse.DiscardUnknown(m) } @@ -475,9 +518,11 @@ func (*QueryParamsRequest) ProtoMessage() {} func (*QueryParamsRequest) Descriptor() ([]byte, []int) { return fileDescriptor_2290d0188dd70223, []int{8} } + func (m *QueryParamsRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } + func (m *QueryParamsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_QueryParamsRequest.Marshal(b, m, deterministic) @@ -490,12 +535,15 @@ func (m *QueryParamsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, return b[:n], nil } } + func (m *QueryParamsRequest) XXX_Merge(src proto.Message) { xxx_messageInfo_QueryParamsRequest.Merge(m, src) } + func (m *QueryParamsRequest) XXX_Size() int { return m.Size() } + func (m *QueryParamsRequest) XXX_DiscardUnknown() { xxx_messageInfo_QueryParamsRequest.DiscardUnknown(m) } @@ -532,9 +580,11 @@ func (*QueryParamsResponse) ProtoMessage() {} func (*QueryParamsResponse) Descriptor() ([]byte, []int) { return fileDescriptor_2290d0188dd70223, []int{9} } + func (m *QueryParamsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } + func (m *QueryParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_QueryParamsResponse.Marshal(b, m, deterministic) @@ -547,12 +597,15 @@ func (m *QueryParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, return b[:n], nil } } + func (m *QueryParamsResponse) XXX_Merge(src proto.Message) { xxx_messageInfo_QueryParamsResponse.Merge(m, src) } + func (m *QueryParamsResponse) XXX_Size() int { return m.Size() } + func (m *QueryParamsResponse) XXX_DiscardUnknown() { xxx_messageInfo_QueryParamsResponse.DiscardUnknown(m) } @@ -604,9 +657,11 @@ func (*QueryDepositRequest) ProtoMessage() {} func (*QueryDepositRequest) Descriptor() ([]byte, []int) { return fileDescriptor_2290d0188dd70223, []int{10} } + func (m *QueryDepositRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } + func (m *QueryDepositRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_QueryDepositRequest.Marshal(b, m, deterministic) @@ -619,12 +674,15 @@ func (m *QueryDepositRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, return b[:n], nil } } + func (m *QueryDepositRequest) XXX_Merge(src proto.Message) { xxx_messageInfo_QueryDepositRequest.Merge(m, src) } + func (m *QueryDepositRequest) XXX_Size() int { return m.Size() } + func (m *QueryDepositRequest) XXX_DiscardUnknown() { xxx_messageInfo_QueryDepositRequest.DiscardUnknown(m) } @@ -657,9 +715,11 @@ func (*QueryDepositResponse) ProtoMessage() {} func (*QueryDepositResponse) Descriptor() ([]byte, []int) { return fileDescriptor_2290d0188dd70223, []int{11} } + func (m *QueryDepositResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } + func (m *QueryDepositResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_QueryDepositResponse.Marshal(b, m, deterministic) @@ -672,12 +732,15 @@ func (m *QueryDepositResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte return b[:n], nil } } + func (m *QueryDepositResponse) XXX_Merge(src proto.Message) { xxx_messageInfo_QueryDepositResponse.Merge(m, src) } + func (m *QueryDepositResponse) XXX_Size() int { return m.Size() } + func (m *QueryDepositResponse) XXX_DiscardUnknown() { xxx_messageInfo_QueryDepositResponse.DiscardUnknown(m) } @@ -705,9 +768,11 @@ func (*QueryDepositsRequest) ProtoMessage() {} func (*QueryDepositsRequest) Descriptor() ([]byte, []int) { return fileDescriptor_2290d0188dd70223, []int{12} } + func (m *QueryDepositsRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } + func (m *QueryDepositsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_QueryDepositsRequest.Marshal(b, m, deterministic) @@ -720,12 +785,15 @@ func (m *QueryDepositsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte return b[:n], nil } } + func (m *QueryDepositsRequest) XXX_Merge(src proto.Message) { xxx_messageInfo_QueryDepositsRequest.Merge(m, src) } + func (m *QueryDepositsRequest) XXX_Size() int { return m.Size() } + func (m *QueryDepositsRequest) XXX_DiscardUnknown() { xxx_messageInfo_QueryDepositsRequest.DiscardUnknown(m) } @@ -760,9 +828,11 @@ func (*QueryDepositsResponse) ProtoMessage() {} func (*QueryDepositsResponse) Descriptor() ([]byte, []int) { return fileDescriptor_2290d0188dd70223, []int{13} } + func (m *QueryDepositsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } + func (m *QueryDepositsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_QueryDepositsResponse.Marshal(b, m, deterministic) @@ -775,12 +845,15 @@ func (m *QueryDepositsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byt return b[:n], nil } } + func (m *QueryDepositsResponse) XXX_Merge(src proto.Message) { xxx_messageInfo_QueryDepositsResponse.Merge(m, src) } + func (m *QueryDepositsResponse) XXX_Size() int { return m.Size() } + func (m *QueryDepositsResponse) XXX_DiscardUnknown() { xxx_messageInfo_QueryDepositsResponse.DiscardUnknown(m) } @@ -813,9 +886,11 @@ func (*QueryTallyResultRequest) ProtoMessage() {} func (*QueryTallyResultRequest) Descriptor() ([]byte, []int) { return fileDescriptor_2290d0188dd70223, []int{14} } + func (m *QueryTallyResultRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } + func (m *QueryTallyResultRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_QueryTallyResultRequest.Marshal(b, m, deterministic) @@ -828,12 +903,15 @@ func (m *QueryTallyResultRequest) XXX_Marshal(b []byte, deterministic bool) ([]b return b[:n], nil } } + func (m *QueryTallyResultRequest) XXX_Merge(src proto.Message) { xxx_messageInfo_QueryTallyResultRequest.Merge(m, src) } + func (m *QueryTallyResultRequest) XXX_Size() int { return m.Size() } + func (m *QueryTallyResultRequest) XXX_DiscardUnknown() { xxx_messageInfo_QueryTallyResultRequest.DiscardUnknown(m) } @@ -859,9 +937,11 @@ func (*QueryTallyResultResponse) ProtoMessage() {} func (*QueryTallyResultResponse) Descriptor() ([]byte, []int) { return fileDescriptor_2290d0188dd70223, []int{15} } + func (m *QueryTallyResultResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } + func (m *QueryTallyResultResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_QueryTallyResultResponse.Marshal(b, m, deterministic) @@ -874,12 +954,15 @@ func (m *QueryTallyResultResponse) XXX_Marshal(b []byte, deterministic bool) ([] return b[:n], nil } } + func (m *QueryTallyResultResponse) XXX_Merge(src proto.Message) { xxx_messageInfo_QueryTallyResultResponse.Merge(m, src) } + func (m *QueryTallyResultResponse) XXX_Size() int { return m.Size() } + func (m *QueryTallyResultResponse) XXX_DiscardUnknown() { xxx_messageInfo_QueryTallyResultResponse.DiscardUnknown(m) } @@ -980,8 +1063,10 @@ var fileDescriptor_2290d0188dd70223 = []byte{ } // Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConn +var ( + _ context.Context + _ grpc.ClientConn +) // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. @@ -1110,30 +1195,36 @@ type QueryServer interface { } // UnimplementedQueryServer can be embedded to have forward compatible implementations. -type UnimplementedQueryServer struct { -} +type UnimplementedQueryServer struct{} func (*UnimplementedQueryServer) Proposal(ctx context.Context, req *QueryProposalRequest) (*QueryProposalResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Proposal not implemented") } + func (*UnimplementedQueryServer) Proposals(ctx context.Context, req *QueryProposalsRequest) (*QueryProposalsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Proposals not implemented") } + func (*UnimplementedQueryServer) Vote(ctx context.Context, req *QueryVoteRequest) (*QueryVoteResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Vote not implemented") } + func (*UnimplementedQueryServer) Votes(ctx context.Context, req *QueryVotesRequest) (*QueryVotesResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Votes not implemented") } + func (*UnimplementedQueryServer) Params(ctx context.Context, req *QueryParamsRequest) (*QueryParamsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Params not implemented") } + func (*UnimplementedQueryServer) Deposit(ctx context.Context, req *QueryDepositRequest) (*QueryDepositResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Deposit not implemented") } + func (*UnimplementedQueryServer) Deposits(ctx context.Context, req *QueryDepositsRequest) (*QueryDepositsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Deposits not implemented") } + func (*UnimplementedQueryServer) TallyResult(ctx context.Context, req *QueryTallyResultRequest) (*QueryTallyResultResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method TallyResult not implemented") } @@ -1986,6 +2077,7 @@ func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { dAtA[offset] = uint8(v) return base } + func (m *QueryProposalRequest) Size() (n int) { if m == nil { return 0 @@ -2248,9 +2340,11 @@ func (m *QueryTallyResultResponse) Size() (n int) { func sovQuery(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } + func sozQuery(x uint64) (n int) { return sovQuery(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } + func (m *QueryProposalRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -2320,6 +2414,7 @@ func (m *QueryProposalRequest) Unmarshal(dAtA []byte) error { } return nil } + func (m *QueryProposalResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -2406,6 +2501,7 @@ func (m *QueryProposalResponse) Unmarshal(dAtA []byte) error { } return nil } + func (m *QueryProposalsRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -2575,6 +2671,7 @@ func (m *QueryProposalsRequest) Unmarshal(dAtA []byte) error { } return nil } + func (m *QueryProposalsResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -2695,6 +2792,7 @@ func (m *QueryProposalsResponse) Unmarshal(dAtA []byte) error { } return nil } + func (m *QueryVoteRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -2796,6 +2894,7 @@ func (m *QueryVoteRequest) Unmarshal(dAtA []byte) error { } return nil } + func (m *QueryVoteResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -2882,6 +2981,7 @@ func (m *QueryVoteResponse) Unmarshal(dAtA []byte) error { } return nil } + func (m *QueryVotesRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -2987,6 +3087,7 @@ func (m *QueryVotesRequest) Unmarshal(dAtA []byte) error { } return nil } + func (m *QueryVotesResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -3107,6 +3208,7 @@ func (m *QueryVotesResponse) Unmarshal(dAtA []byte) error { } return nil } + func (m *QueryParamsRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -3189,6 +3291,7 @@ func (m *QueryParamsRequest) Unmarshal(dAtA []byte) error { } return nil } + func (m *QueryParamsResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -3383,6 +3486,7 @@ func (m *QueryParamsResponse) Unmarshal(dAtA []byte) error { } return nil } + func (m *QueryDepositRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -3484,6 +3588,7 @@ func (m *QueryDepositRequest) Unmarshal(dAtA []byte) error { } return nil } + func (m *QueryDepositResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -3570,6 +3675,7 @@ func (m *QueryDepositResponse) Unmarshal(dAtA []byte) error { } return nil } + func (m *QueryDepositsRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -3675,6 +3781,7 @@ func (m *QueryDepositsRequest) Unmarshal(dAtA []byte) error { } return nil } + func (m *QueryDepositsResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -3795,6 +3902,7 @@ func (m *QueryDepositsResponse) Unmarshal(dAtA []byte) error { } return nil } + func (m *QueryTallyResultRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -3864,6 +3972,7 @@ func (m *QueryTallyResultRequest) Unmarshal(dAtA []byte) error { } return nil } + func (m *QueryTallyResultResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -3950,6 +4059,7 @@ func (m *QueryTallyResultResponse) Unmarshal(dAtA []byte) error { } return nil } + func skipQuery(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/x/gov/types/v1/query.pb.gw.go b/x/gov/types/v1/query.pb.gw.go index 57431991..87a1a875 100644 --- a/x/gov/types/v1/query.pb.gw.go +++ b/x/gov/types/v1/query.pb.gw.go @@ -25,13 +25,15 @@ import ( ) // Suppress "imported and not used" errors -var _ codes.Code -var _ io.Reader -var _ status.Status -var _ = runtime.String -var _ = utilities.NewDoubleArray -var _ = descriptor.ForMessage -var _ = metadata.Join +var ( + _ codes.Code + _ io.Reader + _ status.Status + _ = runtime.String + _ = utilities.NewDoubleArray + _ = descriptor.ForMessage + _ = metadata.Join +) func request_Query_Proposal_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq QueryProposalRequest @@ -50,14 +52,12 @@ func request_Query_Proposal_0(ctx context.Context, marshaler runtime.Marshaler, } protoReq.ProposalId, err = runtime.Uint64(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "proposal_id", err) } msg, err := client.Proposal(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_Query_Proposal_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -77,19 +77,15 @@ func local_request_Query_Proposal_0(ctx context.Context, marshaler runtime.Marsh } protoReq.ProposalId, err = runtime.Uint64(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "proposal_id", err) } msg, err := server.Proposal(ctx, &protoReq) return msg, metadata, err - } -var ( - filter_Query_Proposals_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) +var filter_Query_Proposals_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} func request_Query_Proposals_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq QueryProposalsRequest @@ -104,7 +100,6 @@ func request_Query_Proposals_0(ctx context.Context, marshaler runtime.Marshaler, msg, err := client.Proposals(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_Query_Proposals_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -120,7 +115,6 @@ func local_request_Query_Proposals_0(ctx context.Context, marshaler runtime.Mars msg, err := server.Proposals(ctx, &protoReq) return msg, metadata, err - } func request_Query_Vote_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -140,7 +134,6 @@ func request_Query_Vote_0(ctx context.Context, marshaler runtime.Marshaler, clie } protoReq.ProposalId, err = runtime.Uint64(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "proposal_id", err) } @@ -151,14 +144,12 @@ func request_Query_Vote_0(ctx context.Context, marshaler runtime.Marshaler, clie } protoReq.Voter, err = runtime.String(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "voter", err) } msg, err := client.Vote(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_Query_Vote_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -178,7 +169,6 @@ func local_request_Query_Vote_0(ctx context.Context, marshaler runtime.Marshaler } protoReq.ProposalId, err = runtime.Uint64(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "proposal_id", err) } @@ -189,19 +179,15 @@ func local_request_Query_Vote_0(ctx context.Context, marshaler runtime.Marshaler } protoReq.Voter, err = runtime.String(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "voter", err) } msg, err := server.Vote(ctx, &protoReq) return msg, metadata, err - } -var ( - filter_Query_Votes_0 = &utilities.DoubleArray{Encoding: map[string]int{"proposal_id": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} -) +var filter_Query_Votes_0 = &utilities.DoubleArray{Encoding: map[string]int{"proposal_id": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} func request_Query_Votes_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq QueryVotesRequest @@ -220,7 +206,6 @@ func request_Query_Votes_0(ctx context.Context, marshaler runtime.Marshaler, cli } protoReq.ProposalId, err = runtime.Uint64(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "proposal_id", err) } @@ -234,7 +219,6 @@ func request_Query_Votes_0(ctx context.Context, marshaler runtime.Marshaler, cli msg, err := client.Votes(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_Query_Votes_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -254,7 +238,6 @@ func local_request_Query_Votes_0(ctx context.Context, marshaler runtime.Marshale } protoReq.ProposalId, err = runtime.Uint64(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "proposal_id", err) } @@ -268,7 +251,6 @@ func local_request_Query_Votes_0(ctx context.Context, marshaler runtime.Marshale msg, err := server.Votes(ctx, &protoReq) return msg, metadata, err - } func request_Query_Params_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -288,14 +270,12 @@ func request_Query_Params_0(ctx context.Context, marshaler runtime.Marshaler, cl } protoReq.ParamsType, err = runtime.String(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "params_type", err) } msg, err := client.Params(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_Query_Params_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -315,14 +295,12 @@ func local_request_Query_Params_0(ctx context.Context, marshaler runtime.Marshal } protoReq.ParamsType, err = runtime.String(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "params_type", err) } msg, err := server.Params(ctx, &protoReq) return msg, metadata, err - } func request_Query_Deposit_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -342,7 +320,6 @@ func request_Query_Deposit_0(ctx context.Context, marshaler runtime.Marshaler, c } protoReq.ProposalId, err = runtime.Uint64(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "proposal_id", err) } @@ -353,14 +330,12 @@ func request_Query_Deposit_0(ctx context.Context, marshaler runtime.Marshaler, c } protoReq.Depositor, err = runtime.String(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "depositor", err) } msg, err := client.Deposit(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_Query_Deposit_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -380,7 +355,6 @@ func local_request_Query_Deposit_0(ctx context.Context, marshaler runtime.Marsha } protoReq.ProposalId, err = runtime.Uint64(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "proposal_id", err) } @@ -391,19 +365,15 @@ func local_request_Query_Deposit_0(ctx context.Context, marshaler runtime.Marsha } protoReq.Depositor, err = runtime.String(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "depositor", err) } msg, err := server.Deposit(ctx, &protoReq) return msg, metadata, err - } -var ( - filter_Query_Deposits_0 = &utilities.DoubleArray{Encoding: map[string]int{"proposal_id": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} -) +var filter_Query_Deposits_0 = &utilities.DoubleArray{Encoding: map[string]int{"proposal_id": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} func request_Query_Deposits_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq QueryDepositsRequest @@ -422,7 +392,6 @@ func request_Query_Deposits_0(ctx context.Context, marshaler runtime.Marshaler, } protoReq.ProposalId, err = runtime.Uint64(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "proposal_id", err) } @@ -436,7 +405,6 @@ func request_Query_Deposits_0(ctx context.Context, marshaler runtime.Marshaler, msg, err := client.Deposits(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_Query_Deposits_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -456,7 +424,6 @@ func local_request_Query_Deposits_0(ctx context.Context, marshaler runtime.Marsh } protoReq.ProposalId, err = runtime.Uint64(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "proposal_id", err) } @@ -470,7 +437,6 @@ func local_request_Query_Deposits_0(ctx context.Context, marshaler runtime.Marsh msg, err := server.Deposits(ctx, &protoReq) return msg, metadata, err - } func request_Query_TallyResult_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -490,14 +456,12 @@ func request_Query_TallyResult_0(ctx context.Context, marshaler runtime.Marshale } protoReq.ProposalId, err = runtime.Uint64(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "proposal_id", err) } msg, err := client.TallyResult(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_Query_TallyResult_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -517,14 +481,12 @@ func local_request_Query_TallyResult_0(ctx context.Context, marshaler runtime.Ma } protoReq.ProposalId, err = runtime.Uint64(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "proposal_id", err) } msg, err := server.TallyResult(ctx, &protoReq) return msg, metadata, err - } // RegisterQueryHandlerServer registers the http handlers for service Query to "mux". @@ -532,7 +494,6 @@ func local_request_Query_TallyResult_0(ctx context.Context, marshaler runtime.Ma // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. // Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterQueryHandlerFromEndpoint instead. func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error { - mux.Handle("GET", pattern_Query_Proposal_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -553,7 +514,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv } forward_Query_Proposal_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("GET", pattern_Query_Proposals_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -576,7 +536,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv } forward_Query_Proposals_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("GET", pattern_Query_Vote_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -599,7 +558,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv } forward_Query_Vote_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("GET", pattern_Query_Votes_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -622,7 +580,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv } forward_Query_Votes_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("GET", pattern_Query_Params_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -645,7 +602,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv } forward_Query_Params_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("GET", pattern_Query_Deposit_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -668,7 +624,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv } forward_Query_Deposit_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("GET", pattern_Query_Deposits_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -691,7 +646,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv } forward_Query_Deposits_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("GET", pattern_Query_TallyResult_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -714,7 +668,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv } forward_Query_TallyResult_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) return nil @@ -757,7 +710,6 @@ func RegisterQueryHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in // "QueryClient" to call the correct interceptors. func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, client QueryClient) error { - mux.Handle("GET", pattern_Query_Proposal_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -775,7 +727,6 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie } forward_Query_Proposal_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("GET", pattern_Query_Proposals_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -795,7 +746,6 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie } forward_Query_Proposals_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("GET", pattern_Query_Vote_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -815,7 +765,6 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie } forward_Query_Vote_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("GET", pattern_Query_Votes_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -835,7 +784,6 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie } forward_Query_Votes_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("GET", pattern_Query_Params_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -855,7 +803,6 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie } forward_Query_Params_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("GET", pattern_Query_Deposit_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -875,7 +822,6 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie } forward_Query_Deposit_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("GET", pattern_Query_Deposits_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -895,7 +841,6 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie } forward_Query_Deposits_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("GET", pattern_Query_TallyResult_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -915,7 +860,6 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie } forward_Query_TallyResult_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) return nil diff --git a/x/gov/types/v1/tx.pb.go b/x/gov/types/v1/tx.pb.go index b9585162..cc9e8dd0 100644 --- a/x/gov/types/v1/tx.pb.go +++ b/x/gov/types/v1/tx.pb.go @@ -6,6 +6,10 @@ package v1 import ( context "context" fmt "fmt" + io "io" + math "math" + math_bits "math/bits" + _ "github.com/cosmos/cosmos-proto" types "github.com/cosmos/cosmos-sdk/codec/types" types1 "github.com/cosmos/cosmos-sdk/types" @@ -17,15 +21,14 @@ import ( grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" - io "io" - math "math" - math_bits "math/bits" ) // Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf +var ( + _ = proto.Marshal + _ = fmt.Errorf + _ = math.Inf +) // This is a compile-time assertion to ensure that this generated file // is compatible with the proto package it is being compiled against. @@ -38,7 +41,8 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package type MsgSubmitProposal struct { // messages are the arbitrary messages to be executed if proposal passes. Messages []*types.Any `protobuf:"bytes,1,rep,name=messages,proto3" json:"messages,omitempty"` - // initial_deposit is the deposit value that must be paid at proposal submission. + // initial_deposit is the deposit value that must be paid at proposal + // submission. InitialDeposit []types1.Coin `protobuf:"bytes,2,rep,name=initial_deposit,json=initialDeposit,proto3" json:"initial_deposit"` // proposer is the account address of the proposer. Proposer string `protobuf:"bytes,3,opt,name=proposer,proto3" json:"proposer,omitempty"` @@ -60,9 +64,11 @@ func (*MsgSubmitProposal) ProtoMessage() {} func (*MsgSubmitProposal) Descriptor() ([]byte, []int) { return fileDescriptor_f6c84786701fca8d, []int{0} } + func (m *MsgSubmitProposal) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } + func (m *MsgSubmitProposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_MsgSubmitProposal.Marshal(b, m, deterministic) @@ -75,12 +81,15 @@ func (m *MsgSubmitProposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, e return b[:n], nil } } + func (m *MsgSubmitProposal) XXX_Merge(src proto.Message) { xxx_messageInfo_MsgSubmitProposal.Merge(m, src) } + func (m *MsgSubmitProposal) XXX_Size() int { return m.Size() } + func (m *MsgSubmitProposal) XXX_DiscardUnknown() { xxx_messageInfo_MsgSubmitProposal.DiscardUnknown(m) } @@ -141,9 +150,11 @@ func (*MsgSubmitProposalResponse) ProtoMessage() {} func (*MsgSubmitProposalResponse) Descriptor() ([]byte, []int) { return fileDescriptor_f6c84786701fca8d, []int{1} } + func (m *MsgSubmitProposalResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } + func (m *MsgSubmitProposalResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_MsgSubmitProposalResponse.Marshal(b, m, deterministic) @@ -156,12 +167,15 @@ func (m *MsgSubmitProposalResponse) XXX_Marshal(b []byte, deterministic bool) ([ return b[:n], nil } } + func (m *MsgSubmitProposalResponse) XXX_Merge(src proto.Message) { xxx_messageInfo_MsgSubmitProposalResponse.Merge(m, src) } + func (m *MsgSubmitProposalResponse) XXX_Size() int { return m.Size() } + func (m *MsgSubmitProposalResponse) XXX_DiscardUnknown() { xxx_messageInfo_MsgSubmitProposalResponse.DiscardUnknown(m) } @@ -190,9 +204,11 @@ func (*MsgExecLegacyContent) ProtoMessage() {} func (*MsgExecLegacyContent) Descriptor() ([]byte, []int) { return fileDescriptor_f6c84786701fca8d, []int{2} } + func (m *MsgExecLegacyContent) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } + func (m *MsgExecLegacyContent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_MsgExecLegacyContent.Marshal(b, m, deterministic) @@ -205,12 +221,15 @@ func (m *MsgExecLegacyContent) XXX_Marshal(b []byte, deterministic bool) ([]byte return b[:n], nil } } + func (m *MsgExecLegacyContent) XXX_Merge(src proto.Message) { xxx_messageInfo_MsgExecLegacyContent.Merge(m, src) } + func (m *MsgExecLegacyContent) XXX_Size() int { return m.Size() } + func (m *MsgExecLegacyContent) XXX_DiscardUnknown() { xxx_messageInfo_MsgExecLegacyContent.DiscardUnknown(m) } @@ -232,8 +251,7 @@ func (m *MsgExecLegacyContent) GetAuthority() string { } // MsgExecLegacyContentResponse defines the Msg/ExecLegacyContent response type. -type MsgExecLegacyContentResponse struct { -} +type MsgExecLegacyContentResponse struct{} func (m *MsgExecLegacyContentResponse) Reset() { *m = MsgExecLegacyContentResponse{} } func (m *MsgExecLegacyContentResponse) String() string { return proto.CompactTextString(m) } @@ -241,9 +259,11 @@ func (*MsgExecLegacyContentResponse) ProtoMessage() {} func (*MsgExecLegacyContentResponse) Descriptor() ([]byte, []int) { return fileDescriptor_f6c84786701fca8d, []int{3} } + func (m *MsgExecLegacyContentResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } + func (m *MsgExecLegacyContentResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_MsgExecLegacyContentResponse.Marshal(b, m, deterministic) @@ -256,12 +276,15 @@ func (m *MsgExecLegacyContentResponse) XXX_Marshal(b []byte, deterministic bool) return b[:n], nil } } + func (m *MsgExecLegacyContentResponse) XXX_Merge(src proto.Message) { xxx_messageInfo_MsgExecLegacyContentResponse.Merge(m, src) } + func (m *MsgExecLegacyContentResponse) XXX_Size() int { return m.Size() } + func (m *MsgExecLegacyContentResponse) XXX_DiscardUnknown() { xxx_messageInfo_MsgExecLegacyContentResponse.DiscardUnknown(m) } @@ -286,9 +309,11 @@ func (*MsgVote) ProtoMessage() {} func (*MsgVote) Descriptor() ([]byte, []int) { return fileDescriptor_f6c84786701fca8d, []int{4} } + func (m *MsgVote) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } + func (m *MsgVote) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_MsgVote.Marshal(b, m, deterministic) @@ -301,12 +326,15 @@ func (m *MsgVote) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return b[:n], nil } } + func (m *MsgVote) XXX_Merge(src proto.Message) { xxx_messageInfo_MsgVote.Merge(m, src) } + func (m *MsgVote) XXX_Size() int { return m.Size() } + func (m *MsgVote) XXX_DiscardUnknown() { xxx_messageInfo_MsgVote.DiscardUnknown(m) } @@ -342,8 +370,7 @@ func (m *MsgVote) GetMetadata() string { } // MsgVoteResponse defines the Msg/Vote response type. -type MsgVoteResponse struct { -} +type MsgVoteResponse struct{} func (m *MsgVoteResponse) Reset() { *m = MsgVoteResponse{} } func (m *MsgVoteResponse) String() string { return proto.CompactTextString(m) } @@ -351,9 +378,11 @@ func (*MsgVoteResponse) ProtoMessage() {} func (*MsgVoteResponse) Descriptor() ([]byte, []int) { return fileDescriptor_f6c84786701fca8d, []int{5} } + func (m *MsgVoteResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } + func (m *MsgVoteResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_MsgVoteResponse.Marshal(b, m, deterministic) @@ -366,12 +395,15 @@ func (m *MsgVoteResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, err return b[:n], nil } } + func (m *MsgVoteResponse) XXX_Merge(src proto.Message) { xxx_messageInfo_MsgVoteResponse.Merge(m, src) } + func (m *MsgVoteResponse) XXX_Size() int { return m.Size() } + func (m *MsgVoteResponse) XXX_DiscardUnknown() { xxx_messageInfo_MsgVoteResponse.DiscardUnknown(m) } @@ -396,9 +428,11 @@ func (*MsgVoteWeighted) ProtoMessage() {} func (*MsgVoteWeighted) Descriptor() ([]byte, []int) { return fileDescriptor_f6c84786701fca8d, []int{6} } + func (m *MsgVoteWeighted) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } + func (m *MsgVoteWeighted) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_MsgVoteWeighted.Marshal(b, m, deterministic) @@ -411,12 +445,15 @@ func (m *MsgVoteWeighted) XXX_Marshal(b []byte, deterministic bool) ([]byte, err return b[:n], nil } } + func (m *MsgVoteWeighted) XXX_Merge(src proto.Message) { xxx_messageInfo_MsgVoteWeighted.Merge(m, src) } + func (m *MsgVoteWeighted) XXX_Size() int { return m.Size() } + func (m *MsgVoteWeighted) XXX_DiscardUnknown() { xxx_messageInfo_MsgVoteWeighted.DiscardUnknown(m) } @@ -452,8 +489,7 @@ func (m *MsgVoteWeighted) GetMetadata() string { } // MsgVoteWeightedResponse defines the Msg/VoteWeighted response type. -type MsgVoteWeightedResponse struct { -} +type MsgVoteWeightedResponse struct{} func (m *MsgVoteWeightedResponse) Reset() { *m = MsgVoteWeightedResponse{} } func (m *MsgVoteWeightedResponse) String() string { return proto.CompactTextString(m) } @@ -461,9 +497,11 @@ func (*MsgVoteWeightedResponse) ProtoMessage() {} func (*MsgVoteWeightedResponse) Descriptor() ([]byte, []int) { return fileDescriptor_f6c84786701fca8d, []int{7} } + func (m *MsgVoteWeightedResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } + func (m *MsgVoteWeightedResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_MsgVoteWeightedResponse.Marshal(b, m, deterministic) @@ -476,12 +514,15 @@ func (m *MsgVoteWeightedResponse) XXX_Marshal(b []byte, deterministic bool) ([]b return b[:n], nil } } + func (m *MsgVoteWeightedResponse) XXX_Merge(src proto.Message) { xxx_messageInfo_MsgVoteWeightedResponse.Merge(m, src) } + func (m *MsgVoteWeightedResponse) XXX_Size() int { return m.Size() } + func (m *MsgVoteWeightedResponse) XXX_DiscardUnknown() { xxx_messageInfo_MsgVoteWeightedResponse.DiscardUnknown(m) } @@ -504,9 +545,11 @@ func (*MsgDeposit) ProtoMessage() {} func (*MsgDeposit) Descriptor() ([]byte, []int) { return fileDescriptor_f6c84786701fca8d, []int{8} } + func (m *MsgDeposit) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } + func (m *MsgDeposit) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_MsgDeposit.Marshal(b, m, deterministic) @@ -519,12 +562,15 @@ func (m *MsgDeposit) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return b[:n], nil } } + func (m *MsgDeposit) XXX_Merge(src proto.Message) { xxx_messageInfo_MsgDeposit.Merge(m, src) } + func (m *MsgDeposit) XXX_Size() int { return m.Size() } + func (m *MsgDeposit) XXX_DiscardUnknown() { xxx_messageInfo_MsgDeposit.DiscardUnknown(m) } @@ -553,8 +599,7 @@ func (m *MsgDeposit) GetAmount() []types1.Coin { } // MsgDepositResponse defines the Msg/Deposit response type. -type MsgDepositResponse struct { -} +type MsgDepositResponse struct{} func (m *MsgDepositResponse) Reset() { *m = MsgDepositResponse{} } func (m *MsgDepositResponse) String() string { return proto.CompactTextString(m) } @@ -562,9 +607,11 @@ func (*MsgDepositResponse) ProtoMessage() {} func (*MsgDepositResponse) Descriptor() ([]byte, []int) { return fileDescriptor_f6c84786701fca8d, []int{9} } + func (m *MsgDepositResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } + func (m *MsgDepositResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_MsgDepositResponse.Marshal(b, m, deterministic) @@ -577,12 +624,15 @@ func (m *MsgDepositResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, return b[:n], nil } } + func (m *MsgDepositResponse) XXX_Merge(src proto.Message) { xxx_messageInfo_MsgDepositResponse.Merge(m, src) } + func (m *MsgDepositResponse) XXX_Size() int { return m.Size() } + func (m *MsgDepositResponse) XXX_DiscardUnknown() { xxx_messageInfo_MsgDepositResponse.DiscardUnknown(m) } @@ -593,7 +643,8 @@ var xxx_messageInfo_MsgDepositResponse proto.InternalMessageInfo // // Since: cosmos-sdk 0.47 type MsgUpdateParams struct { - // authority is the address that controls the module (defaults to x/gov unless overwritten). + // authority is the address that controls the module (defaults to x/gov unless + // overwritten). Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` // params defines the x/gov parameters to update. // @@ -607,9 +658,11 @@ func (*MsgUpdateParams) ProtoMessage() {} func (*MsgUpdateParams) Descriptor() ([]byte, []int) { return fileDescriptor_f6c84786701fca8d, []int{10} } + func (m *MsgUpdateParams) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } + func (m *MsgUpdateParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_MsgUpdateParams.Marshal(b, m, deterministic) @@ -622,12 +675,15 @@ func (m *MsgUpdateParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, err return b[:n], nil } } + func (m *MsgUpdateParams) XXX_Merge(src proto.Message) { xxx_messageInfo_MsgUpdateParams.Merge(m, src) } + func (m *MsgUpdateParams) XXX_Size() int { return m.Size() } + func (m *MsgUpdateParams) XXX_DiscardUnknown() { xxx_messageInfo_MsgUpdateParams.DiscardUnknown(m) } @@ -652,8 +708,7 @@ func (m *MsgUpdateParams) GetParams() Params { // MsgUpdateParams message. // // Since: cosmos-sdk 0.47 -type MsgUpdateParamsResponse struct { -} +type MsgUpdateParamsResponse struct{} func (m *MsgUpdateParamsResponse) Reset() { *m = MsgUpdateParamsResponse{} } func (m *MsgUpdateParamsResponse) String() string { return proto.CompactTextString(m) } @@ -661,9 +716,11 @@ func (*MsgUpdateParamsResponse) ProtoMessage() {} func (*MsgUpdateParamsResponse) Descriptor() ([]byte, []int) { return fileDescriptor_f6c84786701fca8d, []int{11} } + func (m *MsgUpdateParamsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } + func (m *MsgUpdateParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_MsgUpdateParamsResponse.Marshal(b, m, deterministic) @@ -676,12 +733,15 @@ func (m *MsgUpdateParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]b return b[:n], nil } } + func (m *MsgUpdateParamsResponse) XXX_Merge(src proto.Message) { xxx_messageInfo_MsgUpdateParamsResponse.Merge(m, src) } + func (m *MsgUpdateParamsResponse) XXX_Size() int { return m.Size() } + func (m *MsgUpdateParamsResponse) XXX_DiscardUnknown() { xxx_messageInfo_MsgUpdateParamsResponse.DiscardUnknown(m) } @@ -767,8 +827,10 @@ var fileDescriptor_f6c84786701fca8d = []byte{ } // Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConn +var ( + _ context.Context + _ grpc.ClientConn +) // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. @@ -785,7 +847,8 @@ type MsgClient interface { ExecLegacyContent(ctx context.Context, in *MsgExecLegacyContent, opts ...grpc.CallOption) (*MsgExecLegacyContentResponse, error) // Vote defines a method to add a vote on a specific proposal. Vote(ctx context.Context, in *MsgVote, opts ...grpc.CallOption) (*MsgVoteResponse, error) - // VoteWeighted defines a method to add a weighted vote on a specific proposal. + // VoteWeighted defines a method to add a weighted vote on a specific + // proposal. VoteWeighted(ctx context.Context, in *MsgVoteWeighted, opts ...grpc.CallOption) (*MsgVoteWeightedResponse, error) // Deposit defines a method to add deposit on a specific proposal. Deposit(ctx context.Context, in *MsgDeposit, opts ...grpc.CallOption) (*MsgDepositResponse, error) @@ -867,7 +930,8 @@ type MsgServer interface { ExecLegacyContent(context.Context, *MsgExecLegacyContent) (*MsgExecLegacyContentResponse, error) // Vote defines a method to add a vote on a specific proposal. Vote(context.Context, *MsgVote) (*MsgVoteResponse, error) - // VoteWeighted defines a method to add a weighted vote on a specific proposal. + // VoteWeighted defines a method to add a weighted vote on a specific + // proposal. VoteWeighted(context.Context, *MsgVoteWeighted) (*MsgVoteWeightedResponse, error) // Deposit defines a method to add deposit on a specific proposal. Deposit(context.Context, *MsgDeposit) (*MsgDepositResponse, error) @@ -879,24 +943,28 @@ type MsgServer interface { } // UnimplementedMsgServer can be embedded to have forward compatible implementations. -type UnimplementedMsgServer struct { -} +type UnimplementedMsgServer struct{} func (*UnimplementedMsgServer) SubmitProposal(ctx context.Context, req *MsgSubmitProposal) (*MsgSubmitProposalResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method SubmitProposal not implemented") } + func (*UnimplementedMsgServer) ExecLegacyContent(ctx context.Context, req *MsgExecLegacyContent) (*MsgExecLegacyContentResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ExecLegacyContent not implemented") } + func (*UnimplementedMsgServer) Vote(ctx context.Context, req *MsgVote) (*MsgVoteResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Vote not implemented") } + func (*UnimplementedMsgServer) VoteWeighted(ctx context.Context, req *MsgVoteWeighted) (*MsgVoteWeightedResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method VoteWeighted not implemented") } + func (*UnimplementedMsgServer) Deposit(ctx context.Context, req *MsgDeposit) (*MsgDepositResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Deposit not implemented") } + func (*UnimplementedMsgServer) UpdateParams(ctx context.Context, req *MsgUpdateParams) (*MsgUpdateParamsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method UpdateParams not implemented") } @@ -1513,6 +1581,7 @@ func encodeVarintTx(dAtA []byte, offset int, v uint64) int { dAtA[offset] = uint8(v) return base } + func (m *MsgSubmitProposal) Size() (n int) { if m == nil { return 0 @@ -1713,9 +1782,11 @@ func (m *MsgUpdateParamsResponse) Size() (n int) { func sovTx(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } + func sozTx(x uint64) (n int) { return sovTx(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } + func (m *MsgSubmitProposal) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -1962,6 +2033,7 @@ func (m *MsgSubmitProposal) Unmarshal(dAtA []byte) error { } return nil } + func (m *MsgSubmitProposalResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -2031,6 +2103,7 @@ func (m *MsgSubmitProposalResponse) Unmarshal(dAtA []byte) error { } return nil } + func (m *MsgExecLegacyContent) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -2149,6 +2222,7 @@ func (m *MsgExecLegacyContent) Unmarshal(dAtA []byte) error { } return nil } + func (m *MsgExecLegacyContentResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -2199,6 +2273,7 @@ func (m *MsgExecLegacyContentResponse) Unmarshal(dAtA []byte) error { } return nil } + func (m *MsgVote) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -2351,6 +2426,7 @@ func (m *MsgVote) Unmarshal(dAtA []byte) error { } return nil } + func (m *MsgVoteResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -2401,6 +2477,7 @@ func (m *MsgVoteResponse) Unmarshal(dAtA []byte) error { } return nil } + func (m *MsgVoteWeighted) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -2568,6 +2645,7 @@ func (m *MsgVoteWeighted) Unmarshal(dAtA []byte) error { } return nil } + func (m *MsgVoteWeightedResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -2618,6 +2696,7 @@ func (m *MsgVoteWeightedResponse) Unmarshal(dAtA []byte) error { } return nil } + func (m *MsgDeposit) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -2753,6 +2832,7 @@ func (m *MsgDeposit) Unmarshal(dAtA []byte) error { } return nil } + func (m *MsgDepositResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -2803,6 +2883,7 @@ func (m *MsgDepositResponse) Unmarshal(dAtA []byte) error { } return nil } + func (m *MsgUpdateParams) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -2918,6 +2999,7 @@ func (m *MsgUpdateParams) Unmarshal(dAtA []byte) error { } return nil } + func (m *MsgUpdateParamsResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -2968,6 +3050,7 @@ func (m *MsgUpdateParamsResponse) Unmarshal(dAtA []byte) error { } return nil } + func skipTx(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/x/gov/types/v1beta1/genesis.pb.go b/x/gov/types/v1beta1/genesis.pb.go index e1171f4e..81fea60b 100644 --- a/x/gov/types/v1beta1/genesis.pb.go +++ b/x/gov/types/v1beta1/genesis.pb.go @@ -5,18 +5,21 @@ package v1beta1 import ( fmt "fmt" - _ "github.com/cosmos/cosmos-sdk/types/tx/amino" - _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" + + _ "github.com/cosmos/cosmos-sdk/types/tx/amino" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" ) // Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf +var ( + _ = proto.Marshal + _ = fmt.Errorf + _ = math.Inf +) // This is a compile-time assertion to ensure that this generated file // is compatible with the proto package it is being compiled against. @@ -48,9 +51,11 @@ func (*GenesisState) ProtoMessage() {} func (*GenesisState) Descriptor() ([]byte, []int) { return fileDescriptor_78ac7f1c6937d88e, []int{0} } + func (m *GenesisState) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } + func (m *GenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_GenesisState.Marshal(b, m, deterministic) @@ -63,12 +68,15 @@ func (m *GenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) return b[:n], nil } } + func (m *GenesisState) XXX_Merge(src proto.Message) { xxx_messageInfo_GenesisState.Merge(m, src) } + func (m *GenesisState) XXX_Size() int { return m.Size() } + func (m *GenesisState) XXX_DiscardUnknown() { xxx_messageInfo_GenesisState.DiscardUnknown(m) } @@ -271,6 +279,7 @@ func encodeVarintGenesis(dAtA []byte, offset int, v uint64) int { dAtA[offset] = uint8(v) return base } + func (m *GenesisState) Size() (n int) { if m == nil { return 0 @@ -310,9 +319,11 @@ func (m *GenesisState) Size() (n int) { func sovGenesis(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } + func sozGenesis(x uint64) (n int) { return sovGenesis(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } + func (m *GenesisState) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -583,6 +594,7 @@ func (m *GenesisState) Unmarshal(dAtA []byte) error { } return nil } + func skipGenesis(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/x/gov/types/v1beta1/gov.pb.go b/x/gov/types/v1beta1/gov.pb.go index b252ac39..c5e67671 100644 --- a/x/gov/types/v1beta1/gov.pb.go +++ b/x/gov/types/v1beta1/gov.pb.go @@ -5,6 +5,11 @@ package v1beta1 import ( fmt "fmt" + io "io" + math "math" + math_bits "math/bits" + time "time" + _ "github.com/cosmos/cosmos-proto" types1 "github.com/cosmos/cosmos-sdk/codec/types" github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" @@ -15,17 +20,15 @@ import ( github_com_cosmos_gogoproto_types "github.com/cosmos/gogoproto/types" _ "google.golang.org/protobuf/types/known/durationpb" _ "google.golang.org/protobuf/types/known/timestamppb" - io "io" - math "math" - math_bits "math/bits" - time "time" ) // Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf -var _ = time.Kitchen +var ( + _ = proto.Marshal + _ = fmt.Errorf + _ = math.Inf + _ = time.Kitchen +) // This is a compile-time assertion to ensure that this generated file // is compatible with the proto package it is being compiled against. @@ -126,7 +129,8 @@ func (ProposalStatus) EnumDescriptor() ([]byte, []int) { // // Since: cosmos-sdk 0.43 type WeightedVoteOption struct { - // option defines the valid vote options, it must not contain duplicate vote options. + // option defines the valid vote options, it must not contain duplicate vote + // options. Option VoteOption `protobuf:"varint,1,opt,name=option,proto3,enum=atomone.gov.v1beta1.VoteOption" json:"option,omitempty"` // weight is the vote weight associated with the vote option. Weight github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,2,opt,name=weight,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"weight"` @@ -137,9 +141,11 @@ func (*WeightedVoteOption) ProtoMessage() {} func (*WeightedVoteOption) Descriptor() ([]byte, []int) { return fileDescriptor_a7f955cabd147a1f, []int{0} } + func (m *WeightedVoteOption) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } + func (m *WeightedVoteOption) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_WeightedVoteOption.Marshal(b, m, deterministic) @@ -152,12 +158,15 @@ func (m *WeightedVoteOption) XXX_Marshal(b []byte, deterministic bool) ([]byte, return b[:n], nil } } + func (m *WeightedVoteOption) XXX_Merge(src proto.Message) { xxx_messageInfo_WeightedVoteOption.Merge(m, src) } + func (m *WeightedVoteOption) XXX_Size() int { return m.Size() } + func (m *WeightedVoteOption) XXX_DiscardUnknown() { xxx_messageInfo_WeightedVoteOption.DiscardUnknown(m) } @@ -178,9 +187,11 @@ func (*TextProposal) ProtoMessage() {} func (*TextProposal) Descriptor() ([]byte, []int) { return fileDescriptor_a7f955cabd147a1f, []int{1} } + func (m *TextProposal) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } + func (m *TextProposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_TextProposal.Marshal(b, m, deterministic) @@ -193,12 +204,15 @@ func (m *TextProposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) return b[:n], nil } } + func (m *TextProposal) XXX_Merge(src proto.Message) { xxx_messageInfo_TextProposal.Merge(m, src) } + func (m *TextProposal) XXX_Size() int { return m.Size() } + func (m *TextProposal) XXX_DiscardUnknown() { xxx_messageInfo_TextProposal.DiscardUnknown(m) } @@ -221,9 +235,11 @@ func (*Deposit) ProtoMessage() {} func (*Deposit) Descriptor() ([]byte, []int) { return fileDescriptor_a7f955cabd147a1f, []int{2} } + func (m *Deposit) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } + func (m *Deposit) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_Deposit.Marshal(b, m, deterministic) @@ -236,12 +252,15 @@ func (m *Deposit) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return b[:n], nil } } + func (m *Deposit) XXX_Merge(src proto.Message) { xxx_messageInfo_Deposit.Merge(m, src) } + func (m *Deposit) XXX_Size() int { return m.Size() } + func (m *Deposit) XXX_DiscardUnknown() { xxx_messageInfo_Deposit.DiscardUnknown(m) } @@ -277,9 +296,11 @@ func (*Proposal) ProtoMessage() {} func (*Proposal) Descriptor() ([]byte, []int) { return fileDescriptor_a7f955cabd147a1f, []int{3} } + func (m *Proposal) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } + func (m *Proposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_Proposal.Marshal(b, m, deterministic) @@ -292,12 +313,15 @@ func (m *Proposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return b[:n], nil } } + func (m *Proposal) XXX_Merge(src proto.Message) { xxx_messageInfo_Proposal.Merge(m, src) } + func (m *Proposal) XXX_Size() int { return m.Size() } + func (m *Proposal) XXX_DiscardUnknown() { xxx_messageInfo_Proposal.DiscardUnknown(m) } @@ -321,9 +345,11 @@ func (*TallyResult) ProtoMessage() {} func (*TallyResult) Descriptor() ([]byte, []int) { return fileDescriptor_a7f955cabd147a1f, []int{4} } + func (m *TallyResult) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } + func (m *TallyResult) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_TallyResult.Marshal(b, m, deterministic) @@ -336,12 +362,15 @@ func (m *TallyResult) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) return b[:n], nil } } + func (m *TallyResult) XXX_Merge(src proto.Message) { xxx_messageInfo_TallyResult.Merge(m, src) } + func (m *TallyResult) XXX_Size() int { return m.Size() } + func (m *TallyResult) XXX_DiscardUnknown() { xxx_messageInfo_TallyResult.DiscardUnknown(m) } @@ -370,9 +399,11 @@ func (*Vote) ProtoMessage() {} func (*Vote) Descriptor() ([]byte, []int) { return fileDescriptor_a7f955cabd147a1f, []int{5} } + func (m *Vote) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } + func (m *Vote) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_Vote.Marshal(b, m, deterministic) @@ -385,12 +416,15 @@ func (m *Vote) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return b[:n], nil } } + func (m *Vote) XXX_Merge(src proto.Message) { xxx_messageInfo_Vote.Merge(m, src) } + func (m *Vote) XXX_Size() int { return m.Size() } + func (m *Vote) XXX_DiscardUnknown() { xxx_messageInfo_Vote.DiscardUnknown(m) } @@ -411,9 +445,11 @@ func (*DepositParams) ProtoMessage() {} func (*DepositParams) Descriptor() ([]byte, []int) { return fileDescriptor_a7f955cabd147a1f, []int{6} } + func (m *DepositParams) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } + func (m *DepositParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_DepositParams.Marshal(b, m, deterministic) @@ -426,12 +462,15 @@ func (m *DepositParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error return b[:n], nil } } + func (m *DepositParams) XXX_Merge(src proto.Message) { xxx_messageInfo_DepositParams.Merge(m, src) } + func (m *DepositParams) XXX_Size() int { return m.Size() } + func (m *DepositParams) XXX_DiscardUnknown() { xxx_messageInfo_DepositParams.DiscardUnknown(m) } @@ -449,9 +488,11 @@ func (*VotingParams) ProtoMessage() {} func (*VotingParams) Descriptor() ([]byte, []int) { return fileDescriptor_a7f955cabd147a1f, []int{7} } + func (m *VotingParams) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } + func (m *VotingParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_VotingParams.Marshal(b, m, deterministic) @@ -464,12 +505,15 @@ func (m *VotingParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) return b[:n], nil } } + func (m *VotingParams) XXX_Merge(src proto.Message) { xxx_messageInfo_VotingParams.Merge(m, src) } + func (m *VotingParams) XXX_Size() int { return m.Size() } + func (m *VotingParams) XXX_DiscardUnknown() { xxx_messageInfo_VotingParams.DiscardUnknown(m) } @@ -493,9 +537,11 @@ func (*TallyParams) ProtoMessage() {} func (*TallyParams) Descriptor() ([]byte, []int) { return fileDescriptor_a7f955cabd147a1f, []int{8} } + func (m *TallyParams) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } + func (m *TallyParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_TallyParams.Marshal(b, m, deterministic) @@ -508,12 +554,15 @@ func (m *TallyParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) return b[:n], nil } } + func (m *TallyParams) XXX_Merge(src proto.Message) { xxx_messageInfo_TallyParams.Merge(m, src) } + func (m *TallyParams) XXX_Size() int { return m.Size() } + func (m *TallyParams) XXX_DiscardUnknown() { xxx_messageInfo_TallyParams.DiscardUnknown(m) } @@ -656,6 +705,7 @@ func (this *TextProposal) Equal(that interface{}) bool { } return true } + func (this *Proposal) Equal(that interface{}) bool { if that == nil { return this == nil @@ -709,6 +759,7 @@ func (this *Proposal) Equal(that interface{}) bool { } return true } + func (this *TallyResult) Equal(that interface{}) bool { if that == nil { return this == nil @@ -742,6 +793,7 @@ func (this *TallyResult) Equal(that interface{}) bool { } return true } + func (m *WeightedVoteOption) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -1224,6 +1276,7 @@ func encodeVarintGov(dAtA []byte, offset int, v uint64) int { dAtA[offset] = uint8(v) return base } + func (m *WeightedVoteOption) Size() (n int) { if m == nil { return 0 @@ -1400,9 +1453,11 @@ func (m *TallyParams) Size() (n int) { func sovGov(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } + func sozGov(x uint64) (n int) { return sovGov(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } + func (m *WeightedVoteOption) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -1506,6 +1561,7 @@ func (m *WeightedVoteOption) Unmarshal(dAtA []byte) error { } return nil } + func (m *TextProposal) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -1620,6 +1676,7 @@ func (m *TextProposal) Unmarshal(dAtA []byte) error { } return nil } + func (m *Deposit) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -1755,6 +1812,7 @@ func (m *Deposit) Unmarshal(dAtA []byte) error { } return nil } + func (m *Proposal) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -2078,6 +2136,7 @@ func (m *Proposal) Unmarshal(dAtA []byte) error { } return nil } + func (m *TallyResult) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -2264,6 +2323,7 @@ func (m *TallyResult) Unmarshal(dAtA []byte) error { } return nil } + func (m *Vote) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -2418,6 +2478,7 @@ func (m *Vote) Unmarshal(dAtA []byte) error { } return nil } + func (m *DepositParams) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -2535,6 +2596,7 @@ func (m *DepositParams) Unmarshal(dAtA []byte) error { } return nil } + func (m *VotingParams) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -2618,6 +2680,7 @@ func (m *VotingParams) Unmarshal(dAtA []byte) error { } return nil } + func (m *TallyParams) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -2767,6 +2830,7 @@ func (m *TallyParams) Unmarshal(dAtA []byte) error { } return nil } + func skipGov(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/x/gov/types/v1beta1/query.pb.go b/x/gov/types/v1beta1/query.pb.go index fefad821..625bc717 100644 --- a/x/gov/types/v1beta1/query.pb.go +++ b/x/gov/types/v1beta1/query.pb.go @@ -6,6 +6,10 @@ package v1beta1 import ( context "context" fmt "fmt" + io "io" + math "math" + math_bits "math/bits" + _ "github.com/cosmos/cosmos-proto" query "github.com/cosmos/cosmos-sdk/types/query" _ "github.com/cosmos/cosmos-sdk/types/tx/amino" @@ -16,15 +20,14 @@ import ( grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" - io "io" - math "math" - math_bits "math/bits" ) // Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf +var ( + _ = proto.Marshal + _ = fmt.Errorf + _ = math.Inf +) // This is a compile-time assertion to ensure that this generated file // is compatible with the proto package it is being compiled against. @@ -44,9 +47,11 @@ func (*QueryProposalRequest) ProtoMessage() {} func (*QueryProposalRequest) Descriptor() ([]byte, []int) { return fileDescriptor_8cba678bb4489dfd, []int{0} } + func (m *QueryProposalRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } + func (m *QueryProposalRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_QueryProposalRequest.Marshal(b, m, deterministic) @@ -59,12 +64,15 @@ func (m *QueryProposalRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte return b[:n], nil } } + func (m *QueryProposalRequest) XXX_Merge(src proto.Message) { xxx_messageInfo_QueryProposalRequest.Merge(m, src) } + func (m *QueryProposalRequest) XXX_Size() int { return m.Size() } + func (m *QueryProposalRequest) XXX_DiscardUnknown() { xxx_messageInfo_QueryProposalRequest.DiscardUnknown(m) } @@ -89,9 +97,11 @@ func (*QueryProposalResponse) ProtoMessage() {} func (*QueryProposalResponse) Descriptor() ([]byte, []int) { return fileDescriptor_8cba678bb4489dfd, []int{1} } + func (m *QueryProposalResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } + func (m *QueryProposalResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_QueryProposalResponse.Marshal(b, m, deterministic) @@ -104,12 +114,15 @@ func (m *QueryProposalResponse) XXX_Marshal(b []byte, deterministic bool) ([]byt return b[:n], nil } } + func (m *QueryProposalResponse) XXX_Merge(src proto.Message) { xxx_messageInfo_QueryProposalResponse.Merge(m, src) } + func (m *QueryProposalResponse) XXX_Size() int { return m.Size() } + func (m *QueryProposalResponse) XXX_DiscardUnknown() { xxx_messageInfo_QueryProposalResponse.DiscardUnknown(m) } @@ -141,9 +154,11 @@ func (*QueryProposalsRequest) ProtoMessage() {} func (*QueryProposalsRequest) Descriptor() ([]byte, []int) { return fileDescriptor_8cba678bb4489dfd, []int{2} } + func (m *QueryProposalsRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } + func (m *QueryProposalsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_QueryProposalsRequest.Marshal(b, m, deterministic) @@ -156,12 +171,15 @@ func (m *QueryProposalsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byt return b[:n], nil } } + func (m *QueryProposalsRequest) XXX_Merge(src proto.Message) { xxx_messageInfo_QueryProposalsRequest.Merge(m, src) } + func (m *QueryProposalsRequest) XXX_Size() int { return m.Size() } + func (m *QueryProposalsRequest) XXX_DiscardUnknown() { xxx_messageInfo_QueryProposalsRequest.DiscardUnknown(m) } @@ -183,9 +201,11 @@ func (*QueryProposalsResponse) ProtoMessage() {} func (*QueryProposalsResponse) Descriptor() ([]byte, []int) { return fileDescriptor_8cba678bb4489dfd, []int{3} } + func (m *QueryProposalsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } + func (m *QueryProposalsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_QueryProposalsResponse.Marshal(b, m, deterministic) @@ -198,12 +218,15 @@ func (m *QueryProposalsResponse) XXX_Marshal(b []byte, deterministic bool) ([]by return b[:n], nil } } + func (m *QueryProposalsResponse) XXX_Merge(src proto.Message) { xxx_messageInfo_QueryProposalsResponse.Merge(m, src) } + func (m *QueryProposalsResponse) XXX_Size() int { return m.Size() } + func (m *QueryProposalsResponse) XXX_DiscardUnknown() { xxx_messageInfo_QueryProposalsResponse.DiscardUnknown(m) } @@ -238,9 +261,11 @@ func (*QueryVoteRequest) ProtoMessage() {} func (*QueryVoteRequest) Descriptor() ([]byte, []int) { return fileDescriptor_8cba678bb4489dfd, []int{4} } + func (m *QueryVoteRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } + func (m *QueryVoteRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_QueryVoteRequest.Marshal(b, m, deterministic) @@ -253,12 +278,15 @@ func (m *QueryVoteRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, er return b[:n], nil } } + func (m *QueryVoteRequest) XXX_Merge(src proto.Message) { xxx_messageInfo_QueryVoteRequest.Merge(m, src) } + func (m *QueryVoteRequest) XXX_Size() int { return m.Size() } + func (m *QueryVoteRequest) XXX_DiscardUnknown() { xxx_messageInfo_QueryVoteRequest.DiscardUnknown(m) } @@ -277,9 +305,11 @@ func (*QueryVoteResponse) ProtoMessage() {} func (*QueryVoteResponse) Descriptor() ([]byte, []int) { return fileDescriptor_8cba678bb4489dfd, []int{5} } + func (m *QueryVoteResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } + func (m *QueryVoteResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_QueryVoteResponse.Marshal(b, m, deterministic) @@ -292,12 +322,15 @@ func (m *QueryVoteResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, e return b[:n], nil } } + func (m *QueryVoteResponse) XXX_Merge(src proto.Message) { xxx_messageInfo_QueryVoteResponse.Merge(m, src) } + func (m *QueryVoteResponse) XXX_Size() int { return m.Size() } + func (m *QueryVoteResponse) XXX_DiscardUnknown() { xxx_messageInfo_QueryVoteResponse.DiscardUnknown(m) } @@ -325,9 +358,11 @@ func (*QueryVotesRequest) ProtoMessage() {} func (*QueryVotesRequest) Descriptor() ([]byte, []int) { return fileDescriptor_8cba678bb4489dfd, []int{6} } + func (m *QueryVotesRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } + func (m *QueryVotesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_QueryVotesRequest.Marshal(b, m, deterministic) @@ -340,12 +375,15 @@ func (m *QueryVotesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, e return b[:n], nil } } + func (m *QueryVotesRequest) XXX_Merge(src proto.Message) { xxx_messageInfo_QueryVotesRequest.Merge(m, src) } + func (m *QueryVotesRequest) XXX_Size() int { return m.Size() } + func (m *QueryVotesRequest) XXX_DiscardUnknown() { xxx_messageInfo_QueryVotesRequest.DiscardUnknown(m) } @@ -380,9 +418,11 @@ func (*QueryVotesResponse) ProtoMessage() {} func (*QueryVotesResponse) Descriptor() ([]byte, []int) { return fileDescriptor_8cba678bb4489dfd, []int{7} } + func (m *QueryVotesResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } + func (m *QueryVotesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_QueryVotesResponse.Marshal(b, m, deterministic) @@ -395,12 +435,15 @@ func (m *QueryVotesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, return b[:n], nil } } + func (m *QueryVotesResponse) XXX_Merge(src proto.Message) { xxx_messageInfo_QueryVotesResponse.Merge(m, src) } + func (m *QueryVotesResponse) XXX_Size() int { return m.Size() } + func (m *QueryVotesResponse) XXX_DiscardUnknown() { xxx_messageInfo_QueryVotesResponse.DiscardUnknown(m) } @@ -434,9 +477,11 @@ func (*QueryParamsRequest) ProtoMessage() {} func (*QueryParamsRequest) Descriptor() ([]byte, []int) { return fileDescriptor_8cba678bb4489dfd, []int{8} } + func (m *QueryParamsRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } + func (m *QueryParamsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_QueryParamsRequest.Marshal(b, m, deterministic) @@ -449,12 +494,15 @@ func (m *QueryParamsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, return b[:n], nil } } + func (m *QueryParamsRequest) XXX_Merge(src proto.Message) { xxx_messageInfo_QueryParamsRequest.Merge(m, src) } + func (m *QueryParamsRequest) XXX_Size() int { return m.Size() } + func (m *QueryParamsRequest) XXX_DiscardUnknown() { xxx_messageInfo_QueryParamsRequest.DiscardUnknown(m) } @@ -484,9 +532,11 @@ func (*QueryParamsResponse) ProtoMessage() {} func (*QueryParamsResponse) Descriptor() ([]byte, []int) { return fileDescriptor_8cba678bb4489dfd, []int{9} } + func (m *QueryParamsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } + func (m *QueryParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_QueryParamsResponse.Marshal(b, m, deterministic) @@ -499,12 +549,15 @@ func (m *QueryParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, return b[:n], nil } } + func (m *QueryParamsResponse) XXX_Merge(src proto.Message) { xxx_messageInfo_QueryParamsResponse.Merge(m, src) } + func (m *QueryParamsResponse) XXX_Size() int { return m.Size() } + func (m *QueryParamsResponse) XXX_DiscardUnknown() { xxx_messageInfo_QueryParamsResponse.DiscardUnknown(m) } @@ -546,9 +599,11 @@ func (*QueryDepositRequest) ProtoMessage() {} func (*QueryDepositRequest) Descriptor() ([]byte, []int) { return fileDescriptor_8cba678bb4489dfd, []int{10} } + func (m *QueryDepositRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } + func (m *QueryDepositRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_QueryDepositRequest.Marshal(b, m, deterministic) @@ -561,12 +616,15 @@ func (m *QueryDepositRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, return b[:n], nil } } + func (m *QueryDepositRequest) XXX_Merge(src proto.Message) { xxx_messageInfo_QueryDepositRequest.Merge(m, src) } + func (m *QueryDepositRequest) XXX_Size() int { return m.Size() } + func (m *QueryDepositRequest) XXX_DiscardUnknown() { xxx_messageInfo_QueryDepositRequest.DiscardUnknown(m) } @@ -585,9 +643,11 @@ func (*QueryDepositResponse) ProtoMessage() {} func (*QueryDepositResponse) Descriptor() ([]byte, []int) { return fileDescriptor_8cba678bb4489dfd, []int{11} } + func (m *QueryDepositResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } + func (m *QueryDepositResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_QueryDepositResponse.Marshal(b, m, deterministic) @@ -600,12 +660,15 @@ func (m *QueryDepositResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte return b[:n], nil } } + func (m *QueryDepositResponse) XXX_Merge(src proto.Message) { xxx_messageInfo_QueryDepositResponse.Merge(m, src) } + func (m *QueryDepositResponse) XXX_Size() int { return m.Size() } + func (m *QueryDepositResponse) XXX_DiscardUnknown() { xxx_messageInfo_QueryDepositResponse.DiscardUnknown(m) } @@ -633,9 +696,11 @@ func (*QueryDepositsRequest) ProtoMessage() {} func (*QueryDepositsRequest) Descriptor() ([]byte, []int) { return fileDescriptor_8cba678bb4489dfd, []int{12} } + func (m *QueryDepositsRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } + func (m *QueryDepositsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_QueryDepositsRequest.Marshal(b, m, deterministic) @@ -648,12 +713,15 @@ func (m *QueryDepositsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte return b[:n], nil } } + func (m *QueryDepositsRequest) XXX_Merge(src proto.Message) { xxx_messageInfo_QueryDepositsRequest.Merge(m, src) } + func (m *QueryDepositsRequest) XXX_Size() int { return m.Size() } + func (m *QueryDepositsRequest) XXX_DiscardUnknown() { xxx_messageInfo_QueryDepositsRequest.DiscardUnknown(m) } @@ -688,9 +756,11 @@ func (*QueryDepositsResponse) ProtoMessage() {} func (*QueryDepositsResponse) Descriptor() ([]byte, []int) { return fileDescriptor_8cba678bb4489dfd, []int{13} } + func (m *QueryDepositsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } + func (m *QueryDepositsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_QueryDepositsResponse.Marshal(b, m, deterministic) @@ -703,12 +773,15 @@ func (m *QueryDepositsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byt return b[:n], nil } } + func (m *QueryDepositsResponse) XXX_Merge(src proto.Message) { xxx_messageInfo_QueryDepositsResponse.Merge(m, src) } + func (m *QueryDepositsResponse) XXX_Size() int { return m.Size() } + func (m *QueryDepositsResponse) XXX_DiscardUnknown() { xxx_messageInfo_QueryDepositsResponse.DiscardUnknown(m) } @@ -741,9 +814,11 @@ func (*QueryTallyResultRequest) ProtoMessage() {} func (*QueryTallyResultRequest) Descriptor() ([]byte, []int) { return fileDescriptor_8cba678bb4489dfd, []int{14} } + func (m *QueryTallyResultRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } + func (m *QueryTallyResultRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_QueryTallyResultRequest.Marshal(b, m, deterministic) @@ -756,12 +831,15 @@ func (m *QueryTallyResultRequest) XXX_Marshal(b []byte, deterministic bool) ([]b return b[:n], nil } } + func (m *QueryTallyResultRequest) XXX_Merge(src proto.Message) { xxx_messageInfo_QueryTallyResultRequest.Merge(m, src) } + func (m *QueryTallyResultRequest) XXX_Size() int { return m.Size() } + func (m *QueryTallyResultRequest) XXX_DiscardUnknown() { xxx_messageInfo_QueryTallyResultRequest.DiscardUnknown(m) } @@ -787,9 +865,11 @@ func (*QueryTallyResultResponse) ProtoMessage() {} func (*QueryTallyResultResponse) Descriptor() ([]byte, []int) { return fileDescriptor_8cba678bb4489dfd, []int{15} } + func (m *QueryTallyResultResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } + func (m *QueryTallyResultResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_QueryTallyResultResponse.Marshal(b, m, deterministic) @@ -802,12 +882,15 @@ func (m *QueryTallyResultResponse) XXX_Marshal(b []byte, deterministic bool) ([] return b[:n], nil } } + func (m *QueryTallyResultResponse) XXX_Merge(src proto.Message) { xxx_messageInfo_QueryTallyResultResponse.Merge(m, src) } + func (m *QueryTallyResultResponse) XXX_Size() int { return m.Size() } + func (m *QueryTallyResultResponse) XXX_DiscardUnknown() { xxx_messageInfo_QueryTallyResultResponse.DiscardUnknown(m) } @@ -911,8 +994,10 @@ var fileDescriptor_8cba678bb4489dfd = []byte{ } // Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConn +var ( + _ context.Context + _ grpc.ClientConn +) // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. @@ -1041,30 +1126,36 @@ type QueryServer interface { } // UnimplementedQueryServer can be embedded to have forward compatible implementations. -type UnimplementedQueryServer struct { -} +type UnimplementedQueryServer struct{} func (*UnimplementedQueryServer) Proposal(ctx context.Context, req *QueryProposalRequest) (*QueryProposalResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Proposal not implemented") } + func (*UnimplementedQueryServer) Proposals(ctx context.Context, req *QueryProposalsRequest) (*QueryProposalsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Proposals not implemented") } + func (*UnimplementedQueryServer) Vote(ctx context.Context, req *QueryVoteRequest) (*QueryVoteResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Vote not implemented") } + func (*UnimplementedQueryServer) Votes(ctx context.Context, req *QueryVotesRequest) (*QueryVotesResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Votes not implemented") } + func (*UnimplementedQueryServer) Params(ctx context.Context, req *QueryParamsRequest) (*QueryParamsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Params not implemented") } + func (*UnimplementedQueryServer) Deposit(ctx context.Context, req *QueryDepositRequest) (*QueryDepositResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Deposit not implemented") } + func (*UnimplementedQueryServer) Deposits(ctx context.Context, req *QueryDepositsRequest) (*QueryDepositsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Deposits not implemented") } + func (*UnimplementedQueryServer) TallyResult(ctx context.Context, req *QueryTallyResultRequest) (*QueryTallyResultResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method TallyResult not implemented") } @@ -1891,6 +1982,7 @@ func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { dAtA[offset] = uint8(v) return base } + func (m *QueryProposalRequest) Size() (n int) { if m == nil { return 0 @@ -2135,9 +2227,11 @@ func (m *QueryTallyResultResponse) Size() (n int) { func sovQuery(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } + func sozQuery(x uint64) (n int) { return sovQuery(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } + func (m *QueryProposalRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -2207,6 +2301,7 @@ func (m *QueryProposalRequest) Unmarshal(dAtA []byte) error { } return nil } + func (m *QueryProposalResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -2290,6 +2385,7 @@ func (m *QueryProposalResponse) Unmarshal(dAtA []byte) error { } return nil } + func (m *QueryProposalsRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -2459,6 +2555,7 @@ func (m *QueryProposalsRequest) Unmarshal(dAtA []byte) error { } return nil } + func (m *QueryProposalsResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -2579,6 +2676,7 @@ func (m *QueryProposalsResponse) Unmarshal(dAtA []byte) error { } return nil } + func (m *QueryVoteRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -2680,6 +2778,7 @@ func (m *QueryVoteRequest) Unmarshal(dAtA []byte) error { } return nil } + func (m *QueryVoteResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -2763,6 +2862,7 @@ func (m *QueryVoteResponse) Unmarshal(dAtA []byte) error { } return nil } + func (m *QueryVotesRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -2868,6 +2968,7 @@ func (m *QueryVotesRequest) Unmarshal(dAtA []byte) error { } return nil } + func (m *QueryVotesResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -2988,6 +3089,7 @@ func (m *QueryVotesResponse) Unmarshal(dAtA []byte) error { } return nil } + func (m *QueryParamsRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -3070,6 +3172,7 @@ func (m *QueryParamsRequest) Unmarshal(dAtA []byte) error { } return nil } + func (m *QueryParamsResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -3219,6 +3322,7 @@ func (m *QueryParamsResponse) Unmarshal(dAtA []byte) error { } return nil } + func (m *QueryDepositRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -3320,6 +3424,7 @@ func (m *QueryDepositRequest) Unmarshal(dAtA []byte) error { } return nil } + func (m *QueryDepositResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -3403,6 +3508,7 @@ func (m *QueryDepositResponse) Unmarshal(dAtA []byte) error { } return nil } + func (m *QueryDepositsRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -3508,6 +3614,7 @@ func (m *QueryDepositsRequest) Unmarshal(dAtA []byte) error { } return nil } + func (m *QueryDepositsResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -3628,6 +3735,7 @@ func (m *QueryDepositsResponse) Unmarshal(dAtA []byte) error { } return nil } + func (m *QueryTallyResultRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -3697,6 +3805,7 @@ func (m *QueryTallyResultRequest) Unmarshal(dAtA []byte) error { } return nil } + func (m *QueryTallyResultResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -3780,6 +3889,7 @@ func (m *QueryTallyResultResponse) Unmarshal(dAtA []byte) error { } return nil } + func skipQuery(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/x/gov/types/v1beta1/query.pb.gw.go b/x/gov/types/v1beta1/query.pb.gw.go index 7cd998e1..9cb7451d 100644 --- a/x/gov/types/v1beta1/query.pb.gw.go +++ b/x/gov/types/v1beta1/query.pb.gw.go @@ -25,13 +25,15 @@ import ( ) // Suppress "imported and not used" errors -var _ codes.Code -var _ io.Reader -var _ status.Status -var _ = runtime.String -var _ = utilities.NewDoubleArray -var _ = descriptor.ForMessage -var _ = metadata.Join +var ( + _ codes.Code + _ io.Reader + _ status.Status + _ = runtime.String + _ = utilities.NewDoubleArray + _ = descriptor.ForMessage + _ = metadata.Join +) func request_Query_Proposal_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq QueryProposalRequest @@ -50,14 +52,12 @@ func request_Query_Proposal_0(ctx context.Context, marshaler runtime.Marshaler, } protoReq.ProposalId, err = runtime.Uint64(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "proposal_id", err) } msg, err := client.Proposal(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_Query_Proposal_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -77,19 +77,15 @@ func local_request_Query_Proposal_0(ctx context.Context, marshaler runtime.Marsh } protoReq.ProposalId, err = runtime.Uint64(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "proposal_id", err) } msg, err := server.Proposal(ctx, &protoReq) return msg, metadata, err - } -var ( - filter_Query_Proposals_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) +var filter_Query_Proposals_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} func request_Query_Proposals_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq QueryProposalsRequest @@ -104,7 +100,6 @@ func request_Query_Proposals_0(ctx context.Context, marshaler runtime.Marshaler, msg, err := client.Proposals(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_Query_Proposals_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -120,7 +115,6 @@ func local_request_Query_Proposals_0(ctx context.Context, marshaler runtime.Mars msg, err := server.Proposals(ctx, &protoReq) return msg, metadata, err - } func request_Query_Vote_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -140,7 +134,6 @@ func request_Query_Vote_0(ctx context.Context, marshaler runtime.Marshaler, clie } protoReq.ProposalId, err = runtime.Uint64(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "proposal_id", err) } @@ -151,14 +144,12 @@ func request_Query_Vote_0(ctx context.Context, marshaler runtime.Marshaler, clie } protoReq.Voter, err = runtime.String(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "voter", err) } msg, err := client.Vote(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_Query_Vote_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -178,7 +169,6 @@ func local_request_Query_Vote_0(ctx context.Context, marshaler runtime.Marshaler } protoReq.ProposalId, err = runtime.Uint64(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "proposal_id", err) } @@ -189,19 +179,15 @@ func local_request_Query_Vote_0(ctx context.Context, marshaler runtime.Marshaler } protoReq.Voter, err = runtime.String(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "voter", err) } msg, err := server.Vote(ctx, &protoReq) return msg, metadata, err - } -var ( - filter_Query_Votes_0 = &utilities.DoubleArray{Encoding: map[string]int{"proposal_id": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} -) +var filter_Query_Votes_0 = &utilities.DoubleArray{Encoding: map[string]int{"proposal_id": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} func request_Query_Votes_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq QueryVotesRequest @@ -220,7 +206,6 @@ func request_Query_Votes_0(ctx context.Context, marshaler runtime.Marshaler, cli } protoReq.ProposalId, err = runtime.Uint64(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "proposal_id", err) } @@ -234,7 +219,6 @@ func request_Query_Votes_0(ctx context.Context, marshaler runtime.Marshaler, cli msg, err := client.Votes(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_Query_Votes_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -254,7 +238,6 @@ func local_request_Query_Votes_0(ctx context.Context, marshaler runtime.Marshale } protoReq.ProposalId, err = runtime.Uint64(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "proposal_id", err) } @@ -268,7 +251,6 @@ func local_request_Query_Votes_0(ctx context.Context, marshaler runtime.Marshale msg, err := server.Votes(ctx, &protoReq) return msg, metadata, err - } func request_Query_Params_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -288,14 +270,12 @@ func request_Query_Params_0(ctx context.Context, marshaler runtime.Marshaler, cl } protoReq.ParamsType, err = runtime.String(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "params_type", err) } msg, err := client.Params(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_Query_Params_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -315,14 +295,12 @@ func local_request_Query_Params_0(ctx context.Context, marshaler runtime.Marshal } protoReq.ParamsType, err = runtime.String(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "params_type", err) } msg, err := server.Params(ctx, &protoReq) return msg, metadata, err - } func request_Query_Deposit_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -342,7 +320,6 @@ func request_Query_Deposit_0(ctx context.Context, marshaler runtime.Marshaler, c } protoReq.ProposalId, err = runtime.Uint64(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "proposal_id", err) } @@ -353,14 +330,12 @@ func request_Query_Deposit_0(ctx context.Context, marshaler runtime.Marshaler, c } protoReq.Depositor, err = runtime.String(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "depositor", err) } msg, err := client.Deposit(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_Query_Deposit_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -380,7 +355,6 @@ func local_request_Query_Deposit_0(ctx context.Context, marshaler runtime.Marsha } protoReq.ProposalId, err = runtime.Uint64(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "proposal_id", err) } @@ -391,19 +365,15 @@ func local_request_Query_Deposit_0(ctx context.Context, marshaler runtime.Marsha } protoReq.Depositor, err = runtime.String(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "depositor", err) } msg, err := server.Deposit(ctx, &protoReq) return msg, metadata, err - } -var ( - filter_Query_Deposits_0 = &utilities.DoubleArray{Encoding: map[string]int{"proposal_id": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} -) +var filter_Query_Deposits_0 = &utilities.DoubleArray{Encoding: map[string]int{"proposal_id": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} func request_Query_Deposits_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq QueryDepositsRequest @@ -422,7 +392,6 @@ func request_Query_Deposits_0(ctx context.Context, marshaler runtime.Marshaler, } protoReq.ProposalId, err = runtime.Uint64(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "proposal_id", err) } @@ -436,7 +405,6 @@ func request_Query_Deposits_0(ctx context.Context, marshaler runtime.Marshaler, msg, err := client.Deposits(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_Query_Deposits_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -456,7 +424,6 @@ func local_request_Query_Deposits_0(ctx context.Context, marshaler runtime.Marsh } protoReq.ProposalId, err = runtime.Uint64(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "proposal_id", err) } @@ -470,7 +437,6 @@ func local_request_Query_Deposits_0(ctx context.Context, marshaler runtime.Marsh msg, err := server.Deposits(ctx, &protoReq) return msg, metadata, err - } func request_Query_TallyResult_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -490,14 +456,12 @@ func request_Query_TallyResult_0(ctx context.Context, marshaler runtime.Marshale } protoReq.ProposalId, err = runtime.Uint64(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "proposal_id", err) } msg, err := client.TallyResult(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_Query_TallyResult_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -517,14 +481,12 @@ func local_request_Query_TallyResult_0(ctx context.Context, marshaler runtime.Ma } protoReq.ProposalId, err = runtime.Uint64(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "proposal_id", err) } msg, err := server.TallyResult(ctx, &protoReq) return msg, metadata, err - } // RegisterQueryHandlerServer registers the http handlers for service Query to "mux". @@ -532,7 +494,6 @@ func local_request_Query_TallyResult_0(ctx context.Context, marshaler runtime.Ma // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. // Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterQueryHandlerFromEndpoint instead. func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error { - mux.Handle("GET", pattern_Query_Proposal_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -553,7 +514,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv } forward_Query_Proposal_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("GET", pattern_Query_Proposals_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -576,7 +536,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv } forward_Query_Proposals_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("GET", pattern_Query_Vote_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -599,7 +558,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv } forward_Query_Vote_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("GET", pattern_Query_Votes_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -622,7 +580,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv } forward_Query_Votes_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("GET", pattern_Query_Params_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -645,7 +602,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv } forward_Query_Params_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("GET", pattern_Query_Deposit_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -668,7 +624,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv } forward_Query_Deposit_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("GET", pattern_Query_Deposits_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -691,7 +646,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv } forward_Query_Deposits_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("GET", pattern_Query_TallyResult_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -714,7 +668,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv } forward_Query_TallyResult_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) return nil @@ -757,7 +710,6 @@ func RegisterQueryHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in // "QueryClient" to call the correct interceptors. func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, client QueryClient) error { - mux.Handle("GET", pattern_Query_Proposal_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -775,7 +727,6 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie } forward_Query_Proposal_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("GET", pattern_Query_Proposals_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -795,7 +746,6 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie } forward_Query_Proposals_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("GET", pattern_Query_Vote_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -815,7 +765,6 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie } forward_Query_Vote_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("GET", pattern_Query_Votes_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -835,7 +784,6 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie } forward_Query_Votes_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("GET", pattern_Query_Params_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -855,7 +803,6 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie } forward_Query_Params_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("GET", pattern_Query_Deposit_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -875,7 +822,6 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie } forward_Query_Deposit_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("GET", pattern_Query_Deposits_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -895,7 +841,6 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie } forward_Query_Deposits_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("GET", pattern_Query_TallyResult_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -915,7 +860,6 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie } forward_Query_TallyResult_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) return nil diff --git a/x/gov/types/v1beta1/tx.pb.go b/x/gov/types/v1beta1/tx.pb.go index 5bdb9bf8..50174b02 100644 --- a/x/gov/types/v1beta1/tx.pb.go +++ b/x/gov/types/v1beta1/tx.pb.go @@ -6,6 +6,10 @@ package v1beta1 import ( context "context" fmt "fmt" + io "io" + math "math" + math_bits "math/bits" + _ "github.com/cosmos/cosmos-proto" types "github.com/cosmos/cosmos-sdk/codec/types" github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" @@ -18,15 +22,14 @@ import ( grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" - io "io" - math "math" - math_bits "math/bits" ) // Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf +var ( + _ = proto.Marshal + _ = fmt.Errorf + _ = math.Inf +) // This is a compile-time assertion to ensure that this generated file // is compatible with the proto package it is being compiled against. @@ -39,7 +42,8 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package type MsgSubmitProposal struct { // content is the proposal's content. Content *types.Any `protobuf:"bytes,1,opt,name=content,proto3" json:"content,omitempty"` - // initial_deposit is the deposit value that must be paid at proposal submission. + // initial_deposit is the deposit value that must be paid at proposal + // submission. InitialDeposit github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,2,rep,name=initial_deposit,json=initialDeposit,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"initial_deposit"` // proposer is the account address of the proposer. Proposer string `protobuf:"bytes,3,opt,name=proposer,proto3" json:"proposer,omitempty"` @@ -50,9 +54,11 @@ func (*MsgSubmitProposal) ProtoMessage() {} func (*MsgSubmitProposal) Descriptor() ([]byte, []int) { return fileDescriptor_c121a56b868812b2, []int{0} } + func (m *MsgSubmitProposal) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } + func (m *MsgSubmitProposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_MsgSubmitProposal.Marshal(b, m, deterministic) @@ -65,12 +71,15 @@ func (m *MsgSubmitProposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, e return b[:n], nil } } + func (m *MsgSubmitProposal) XXX_Merge(src proto.Message) { xxx_messageInfo_MsgSubmitProposal.Merge(m, src) } + func (m *MsgSubmitProposal) XXX_Size() int { return m.Size() } + func (m *MsgSubmitProposal) XXX_DiscardUnknown() { xxx_messageInfo_MsgSubmitProposal.DiscardUnknown(m) } @@ -89,9 +98,11 @@ func (*MsgSubmitProposalResponse) ProtoMessage() {} func (*MsgSubmitProposalResponse) Descriptor() ([]byte, []int) { return fileDescriptor_c121a56b868812b2, []int{1} } + func (m *MsgSubmitProposalResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } + func (m *MsgSubmitProposalResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_MsgSubmitProposalResponse.Marshal(b, m, deterministic) @@ -104,12 +115,15 @@ func (m *MsgSubmitProposalResponse) XXX_Marshal(b []byte, deterministic bool) ([ return b[:n], nil } } + func (m *MsgSubmitProposalResponse) XXX_Merge(src proto.Message) { xxx_messageInfo_MsgSubmitProposalResponse.Merge(m, src) } + func (m *MsgSubmitProposalResponse) XXX_Size() int { return m.Size() } + func (m *MsgSubmitProposalResponse) XXX_DiscardUnknown() { xxx_messageInfo_MsgSubmitProposalResponse.DiscardUnknown(m) } @@ -138,9 +152,11 @@ func (*MsgVote) ProtoMessage() {} func (*MsgVote) Descriptor() ([]byte, []int) { return fileDescriptor_c121a56b868812b2, []int{2} } + func (m *MsgVote) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } + func (m *MsgVote) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_MsgVote.Marshal(b, m, deterministic) @@ -153,12 +169,15 @@ func (m *MsgVote) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return b[:n], nil } } + func (m *MsgVote) XXX_Merge(src proto.Message) { xxx_messageInfo_MsgVote.Merge(m, src) } + func (m *MsgVote) XXX_Size() int { return m.Size() } + func (m *MsgVote) XXX_DiscardUnknown() { xxx_messageInfo_MsgVote.DiscardUnknown(m) } @@ -166,8 +185,7 @@ func (m *MsgVote) XXX_DiscardUnknown() { var xxx_messageInfo_MsgVote proto.InternalMessageInfo // MsgVoteResponse defines the Msg/Vote response type. -type MsgVoteResponse struct { -} +type MsgVoteResponse struct{} func (m *MsgVoteResponse) Reset() { *m = MsgVoteResponse{} } func (m *MsgVoteResponse) String() string { return proto.CompactTextString(m) } @@ -175,9 +193,11 @@ func (*MsgVoteResponse) ProtoMessage() {} func (*MsgVoteResponse) Descriptor() ([]byte, []int) { return fileDescriptor_c121a56b868812b2, []int{3} } + func (m *MsgVoteResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } + func (m *MsgVoteResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_MsgVoteResponse.Marshal(b, m, deterministic) @@ -190,12 +210,15 @@ func (m *MsgVoteResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, err return b[:n], nil } } + func (m *MsgVoteResponse) XXX_Merge(src proto.Message) { xxx_messageInfo_MsgVoteResponse.Merge(m, src) } + func (m *MsgVoteResponse) XXX_Size() int { return m.Size() } + func (m *MsgVoteResponse) XXX_DiscardUnknown() { xxx_messageInfo_MsgVoteResponse.DiscardUnknown(m) } @@ -219,9 +242,11 @@ func (*MsgVoteWeighted) ProtoMessage() {} func (*MsgVoteWeighted) Descriptor() ([]byte, []int) { return fileDescriptor_c121a56b868812b2, []int{4} } + func (m *MsgVoteWeighted) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } + func (m *MsgVoteWeighted) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_MsgVoteWeighted.Marshal(b, m, deterministic) @@ -234,12 +259,15 @@ func (m *MsgVoteWeighted) XXX_Marshal(b []byte, deterministic bool) ([]byte, err return b[:n], nil } } + func (m *MsgVoteWeighted) XXX_Merge(src proto.Message) { xxx_messageInfo_MsgVoteWeighted.Merge(m, src) } + func (m *MsgVoteWeighted) XXX_Size() int { return m.Size() } + func (m *MsgVoteWeighted) XXX_DiscardUnknown() { xxx_messageInfo_MsgVoteWeighted.DiscardUnknown(m) } @@ -249,8 +277,7 @@ var xxx_messageInfo_MsgVoteWeighted proto.InternalMessageInfo // MsgVoteWeightedResponse defines the Msg/VoteWeighted response type. // // Since: cosmos-sdk 0.43 -type MsgVoteWeightedResponse struct { -} +type MsgVoteWeightedResponse struct{} func (m *MsgVoteWeightedResponse) Reset() { *m = MsgVoteWeightedResponse{} } func (m *MsgVoteWeightedResponse) String() string { return proto.CompactTextString(m) } @@ -258,9 +285,11 @@ func (*MsgVoteWeightedResponse) ProtoMessage() {} func (*MsgVoteWeightedResponse) Descriptor() ([]byte, []int) { return fileDescriptor_c121a56b868812b2, []int{5} } + func (m *MsgVoteWeightedResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } + func (m *MsgVoteWeightedResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_MsgVoteWeightedResponse.Marshal(b, m, deterministic) @@ -273,12 +302,15 @@ func (m *MsgVoteWeightedResponse) XXX_Marshal(b []byte, deterministic bool) ([]b return b[:n], nil } } + func (m *MsgVoteWeightedResponse) XXX_Merge(src proto.Message) { xxx_messageInfo_MsgVoteWeightedResponse.Merge(m, src) } + func (m *MsgVoteWeightedResponse) XXX_Size() int { return m.Size() } + func (m *MsgVoteWeightedResponse) XXX_DiscardUnknown() { xxx_messageInfo_MsgVoteWeightedResponse.DiscardUnknown(m) } @@ -300,9 +332,11 @@ func (*MsgDeposit) ProtoMessage() {} func (*MsgDeposit) Descriptor() ([]byte, []int) { return fileDescriptor_c121a56b868812b2, []int{6} } + func (m *MsgDeposit) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } + func (m *MsgDeposit) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_MsgDeposit.Marshal(b, m, deterministic) @@ -315,12 +349,15 @@ func (m *MsgDeposit) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return b[:n], nil } } + func (m *MsgDeposit) XXX_Merge(src proto.Message) { xxx_messageInfo_MsgDeposit.Merge(m, src) } + func (m *MsgDeposit) XXX_Size() int { return m.Size() } + func (m *MsgDeposit) XXX_DiscardUnknown() { xxx_messageInfo_MsgDeposit.DiscardUnknown(m) } @@ -328,8 +365,7 @@ func (m *MsgDeposit) XXX_DiscardUnknown() { var xxx_messageInfo_MsgDeposit proto.InternalMessageInfo // MsgDepositResponse defines the Msg/Deposit response type. -type MsgDepositResponse struct { -} +type MsgDepositResponse struct{} func (m *MsgDepositResponse) Reset() { *m = MsgDepositResponse{} } func (m *MsgDepositResponse) String() string { return proto.CompactTextString(m) } @@ -337,9 +373,11 @@ func (*MsgDepositResponse) ProtoMessage() {} func (*MsgDepositResponse) Descriptor() ([]byte, []int) { return fileDescriptor_c121a56b868812b2, []int{7} } + func (m *MsgDepositResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } + func (m *MsgDepositResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_MsgDepositResponse.Marshal(b, m, deterministic) @@ -352,12 +390,15 @@ func (m *MsgDepositResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, return b[:n], nil } } + func (m *MsgDepositResponse) XXX_Merge(src proto.Message) { xxx_messageInfo_MsgDepositResponse.Merge(m, src) } + func (m *MsgDepositResponse) XXX_Size() int { return m.Size() } + func (m *MsgDepositResponse) XXX_DiscardUnknown() { xxx_messageInfo_MsgDepositResponse.DiscardUnknown(m) } @@ -429,8 +470,10 @@ var fileDescriptor_c121a56b868812b2 = []byte{ } // Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConn +var ( + _ context.Context + _ grpc.ClientConn +) // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. @@ -444,7 +487,8 @@ type MsgClient interface { SubmitProposal(ctx context.Context, in *MsgSubmitProposal, opts ...grpc.CallOption) (*MsgSubmitProposalResponse, error) // Vote defines a method to add a vote on a specific proposal. Vote(ctx context.Context, in *MsgVote, opts ...grpc.CallOption) (*MsgVoteResponse, error) - // VoteWeighted defines a method to add a weighted vote on a specific proposal. + // VoteWeighted defines a method to add a weighted vote on a specific + // proposal. // // Since: cosmos-sdk 0.43 VoteWeighted(ctx context.Context, in *MsgVoteWeighted, opts ...grpc.CallOption) (*MsgVoteWeightedResponse, error) @@ -502,7 +546,8 @@ type MsgServer interface { SubmitProposal(context.Context, *MsgSubmitProposal) (*MsgSubmitProposalResponse, error) // Vote defines a method to add a vote on a specific proposal. Vote(context.Context, *MsgVote) (*MsgVoteResponse, error) - // VoteWeighted defines a method to add a weighted vote on a specific proposal. + // VoteWeighted defines a method to add a weighted vote on a specific + // proposal. // // Since: cosmos-sdk 0.43 VoteWeighted(context.Context, *MsgVoteWeighted) (*MsgVoteWeightedResponse, error) @@ -511,18 +556,20 @@ type MsgServer interface { } // UnimplementedMsgServer can be embedded to have forward compatible implementations. -type UnimplementedMsgServer struct { -} +type UnimplementedMsgServer struct{} func (*UnimplementedMsgServer) SubmitProposal(ctx context.Context, req *MsgSubmitProposal) (*MsgSubmitProposalResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method SubmitProposal not implemented") } + func (*UnimplementedMsgServer) Vote(ctx context.Context, req *MsgVote) (*MsgVoteResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Vote not implemented") } + func (*UnimplementedMsgServer) VoteWeighted(ctx context.Context, req *MsgVoteWeighted) (*MsgVoteWeightedResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method VoteWeighted not implemented") } + func (*UnimplementedMsgServer) Deposit(ctx context.Context, req *MsgDeposit) (*MsgDepositResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Deposit not implemented") } @@ -930,6 +977,7 @@ func encodeVarintTx(dAtA []byte, offset int, v uint64) int { dAtA[offset] = uint8(v) return base } + func (m *MsgSubmitProposal) Size() (n int) { if m == nil { return 0 @@ -1058,9 +1106,11 @@ func (m *MsgDepositResponse) Size() (n int) { func sovTx(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } + func sozTx(x uint64) (n int) { return sovTx(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } + func (m *MsgSubmitProposal) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -1213,6 +1263,7 @@ func (m *MsgSubmitProposal) Unmarshal(dAtA []byte) error { } return nil } + func (m *MsgSubmitProposalResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -1282,6 +1333,7 @@ func (m *MsgSubmitProposalResponse) Unmarshal(dAtA []byte) error { } return nil } + func (m *MsgVote) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -1402,6 +1454,7 @@ func (m *MsgVote) Unmarshal(dAtA []byte) error { } return nil } + func (m *MsgVoteResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -1452,6 +1505,7 @@ func (m *MsgVoteResponse) Unmarshal(dAtA []byte) error { } return nil } + func (m *MsgVoteWeighted) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -1587,6 +1641,7 @@ func (m *MsgVoteWeighted) Unmarshal(dAtA []byte) error { } return nil } + func (m *MsgVoteWeightedResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -1637,6 +1692,7 @@ func (m *MsgVoteWeightedResponse) Unmarshal(dAtA []byte) error { } return nil } + func (m *MsgDeposit) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -1772,6 +1828,7 @@ func (m *MsgDeposit) Unmarshal(dAtA []byte) error { } return nil } + func (m *MsgDepositResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -1822,6 +1879,7 @@ func (m *MsgDepositResponse) Unmarshal(dAtA []byte) error { } return nil } + func skipTx(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0