cosmos-sdk/x/gov/types/gov.pb.go

2661 lines
69 KiB
Go
Raw Normal View History

// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: cosmos/gov/v1beta1/gov.proto
package types
import (
fmt "fmt"
types1 "github.com/cosmos/cosmos-sdk/codec/types"
github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types"
types "github.com/cosmos/cosmos-sdk/types"
_ "github.com/gogo/protobuf/gogoproto"
proto "github.com/gogo/protobuf/proto"
github_com_gogo_protobuf_types "github.com/gogo/protobuf/types"
x/gov: gRPC query Service (#6491) * WIP: adding gRPC for gov * removed passing new store * fixed error * added register query service in module * order of imports changed * order of imports changed * Fix proto file * added get all proposals grpc * added more tests * added doc in tests * added grpc for votes * Added grpc for Deposits * updated protos * added grpc for proposal, vote, deposit, tally * WIP: adding params grpc * added params in gRPC * updated error messages * fixed error check * added more tests * updated tests * added yaml types * review changes and lint issues * updated tests * code cleanup * removed cosmos.gov prefixes * added more checks * added more test checks * added filtered pagination * removed test check * added tests for filtered pagination * Fix Proposals * lint * fixed error in tests * lint issues * Add nil check for params * Added unpacker * removed casttypes * review changes * use suite in grpc query tests * migrated tests to use suite * fix non-determinism * tests migrated to table driven tests * fixed doc typo * revert change * Merge branch 'master' of github.com:cosmos/cosmos-sdk into atheesh/5921-grpc-x-gov * review changes * review changes * review changes * review change * review changes * docs updated * review change * review changes * review changes * review changes * Update x/gov/keeper/keeper_test.go Co-authored-by: sahith-narahari <sahithnarahari@gmail.com> Co-authored-by: Anil Kumar Kammari <anil@vitwit.com> Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-07-16 02:16:23 -07:00
_ "github.com/golang/protobuf/ptypes/duration"
_ "github.com/golang/protobuf/ptypes/timestamp"
_ "github.com/regen-network/cosmos-proto"
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
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
// VoteOption enumerates the valid vote options for a given governance proposal.
type VoteOption int32
const (
2020-03-03 06:59:05 -08:00
// VOTE_OPTION_UNSPECIFIED defines a no-op vote option.
OptionEmpty VoteOption = 0
// VOTE_OPTION_YES defines a yes vote option.
OptionYes VoteOption = 1
// VOTE_OPTION_ABSTAIN defines an abstain vote option.
OptionAbstain VoteOption = 2
// VOTE_OPTION_NO defines a no vote option.
OptionNo VoteOption = 3
// VOTE_OPTION_NO_WITH_VETO defines a no with veto vote option.
OptionNoWithVeto VoteOption = 4
)
var VoteOption_name = map[int32]string{
2020-03-03 06:59:05 -08:00
0: "VOTE_OPTION_UNSPECIFIED",
1: "VOTE_OPTION_YES",
2: "VOTE_OPTION_ABSTAIN",
3: "VOTE_OPTION_NO",
4: "VOTE_OPTION_NO_WITH_VETO",
}
var VoteOption_value = map[string]int32{
2020-03-03 06:59:05 -08:00
"VOTE_OPTION_UNSPECIFIED": 0,
"VOTE_OPTION_YES": 1,
"VOTE_OPTION_ABSTAIN": 2,
"VOTE_OPTION_NO": 3,
"VOTE_OPTION_NO_WITH_VETO": 4,
}
func (x VoteOption) String() string {
return proto.EnumName(VoteOption_name, int32(x))
}
func (VoteOption) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_6e82113c1a9a4b7c, []int{0}
}
// ProposalStatus enumerates the valid statuses of a proposal.
type ProposalStatus int32
const (
2020-03-03 06:59:05 -08:00
// PROPOSAL_STATUS_UNSPECIFIED defines the default propopsal status.
StatusNil ProposalStatus = 0
Change `address` from bytes to bech32 strings (#7242) * init * Fix bank proto messages * missing conversions * remove casttype for addresses * Fix tests * Fix consaddress * more test fixes * Fix tests * fixed tests * migrate missing proto declarations * format * Fix format * Fix alignment * Fix more tests * Fix ibc merge issue * Fix fmt * Fix more tests * Fix missing address declarations * Fix staking tests * Fix more tests * Fix config * fixed tests * Fix more tests * Update staking grpc tests * Fix merge issue * fixed failing tests in x/distr * fixed sim tests * fixed failing tests * Fix bugs * Add logs * fixed slashing issue * Fix staking grpc tests * Fix all bank tests :) * Fix tests in distribution * Fix more tests in distr * Fix slashing tests * Fix statking tests * Fix evidence tests * Fix gov tests * Fix bug in create vesting account * Fix test * remove fmt * fixed gov tests * fixed x/ibc tests * fixed x/ibc-transfer tests * fixed staking tests * fixed staking tests * fixed test * fixed distribution issue * fix pagination test * fmt * lint * fix build * fix format * revert tally tests * revert tally tests * lint * Fix sim test * revert * revert * fixed tally issue * fix tests * revert * fmt * refactor * remove `GetAddress()` * remove fmt * revert fmt.Striger usage * Fix tests * Fix rest test * disable interfacer lint check * make proto-format * add nolint rule * remove stray println Co-authored-by: aleem1314 <aleem.md789@gmail.com> Co-authored-by: atheesh <atheesh@vitwit.com>
2020-09-25 03:25:37 -07:00
// PROPOSAL_STATUS_DEPOSIT_PERIOD defines a proposal status during the deposit
// period.
StatusDepositPeriod ProposalStatus = 1
Change `address` from bytes to bech32 strings (#7242) * init * Fix bank proto messages * missing conversions * remove casttype for addresses * Fix tests * Fix consaddress * more test fixes * Fix tests * fixed tests * migrate missing proto declarations * format * Fix format * Fix alignment * Fix more tests * Fix ibc merge issue * Fix fmt * Fix more tests * Fix missing address declarations * Fix staking tests * Fix more tests * Fix config * fixed tests * Fix more tests * Update staking grpc tests * Fix merge issue * fixed failing tests in x/distr * fixed sim tests * fixed failing tests * Fix bugs * Add logs * fixed slashing issue * Fix staking grpc tests * Fix all bank tests :) * Fix tests in distribution * Fix more tests in distr * Fix slashing tests * Fix statking tests * Fix evidence tests * Fix gov tests * Fix bug in create vesting account * Fix test * remove fmt * fixed gov tests * fixed x/ibc tests * fixed x/ibc-transfer tests * fixed staking tests * fixed staking tests * fixed test * fixed distribution issue * fix pagination test * fmt * lint * fix build * fix format * revert tally tests * revert tally tests * lint * Fix sim test * revert * revert * fixed tally issue * fix tests * revert * fmt * refactor * remove `GetAddress()` * remove fmt * revert fmt.Striger usage * Fix tests * Fix rest test * disable interfacer lint check * make proto-format * add nolint rule * remove stray println Co-authored-by: aleem1314 <aleem.md789@gmail.com> Co-authored-by: atheesh <atheesh@vitwit.com>
2020-09-25 03:25:37 -07:00
// PROPOSAL_STATUS_VOTING_PERIOD defines a proposal status during the voting
// period.
2020-03-03 06:59:05 -08:00
StatusVotingPeriod ProposalStatus = 2
Change `address` from bytes to bech32 strings (#7242) * init * Fix bank proto messages * missing conversions * remove casttype for addresses * Fix tests * Fix consaddress * more test fixes * Fix tests * fixed tests * migrate missing proto declarations * format * Fix format * Fix alignment * Fix more tests * Fix ibc merge issue * Fix fmt * Fix more tests * Fix missing address declarations * Fix staking tests * Fix more tests * Fix config * fixed tests * Fix more tests * Update staking grpc tests * Fix merge issue * fixed failing tests in x/distr * fixed sim tests * fixed failing tests * Fix bugs * Add logs * fixed slashing issue * Fix staking grpc tests * Fix all bank tests :) * Fix tests in distribution * Fix more tests in distr * Fix slashing tests * Fix statking tests * Fix evidence tests * Fix gov tests * Fix bug in create vesting account * Fix test * remove fmt * fixed gov tests * fixed x/ibc tests * fixed x/ibc-transfer tests * fixed staking tests * fixed staking tests * fixed test * fixed distribution issue * fix pagination test * fmt * lint * fix build * fix format * revert tally tests * revert tally tests * lint * Fix sim test * revert * revert * fixed tally issue * fix tests * revert * fmt * refactor * remove `GetAddress()` * remove fmt * revert fmt.Striger usage * Fix tests * Fix rest test * disable interfacer lint check * make proto-format * add nolint rule * remove stray println Co-authored-by: aleem1314 <aleem.md789@gmail.com> Co-authored-by: atheesh <atheesh@vitwit.com>
2020-09-25 03:25:37 -07:00
// PROPOSAL_STATUS_PASSED defines a proposal status of a proposal that has
// passed.
2020-03-03 06:59:05 -08:00
StatusPassed ProposalStatus = 3
Change `address` from bytes to bech32 strings (#7242) * init * Fix bank proto messages * missing conversions * remove casttype for addresses * Fix tests * Fix consaddress * more test fixes * Fix tests * fixed tests * migrate missing proto declarations * format * Fix format * Fix alignment * Fix more tests * Fix ibc merge issue * Fix fmt * Fix more tests * Fix missing address declarations * Fix staking tests * Fix more tests * Fix config * fixed tests * Fix more tests * Update staking grpc tests * Fix merge issue * fixed failing tests in x/distr * fixed sim tests * fixed failing tests * Fix bugs * Add logs * fixed slashing issue * Fix staking grpc tests * Fix all bank tests :) * Fix tests in distribution * Fix more tests in distr * Fix slashing tests * Fix statking tests * Fix evidence tests * Fix gov tests * Fix bug in create vesting account * Fix test * remove fmt * fixed gov tests * fixed x/ibc tests * fixed x/ibc-transfer tests * fixed staking tests * fixed staking tests * fixed test * fixed distribution issue * fix pagination test * fmt * lint * fix build * fix format * revert tally tests * revert tally tests * lint * Fix sim test * revert * revert * fixed tally issue * fix tests * revert * fmt * refactor * remove `GetAddress()` * remove fmt * revert fmt.Striger usage * Fix tests * Fix rest test * disable interfacer lint check * make proto-format * add nolint rule * remove stray println Co-authored-by: aleem1314 <aleem.md789@gmail.com> Co-authored-by: atheesh <atheesh@vitwit.com>
2020-09-25 03:25:37 -07:00
// PROPOSAL_STATUS_REJECTED defines a proposal status of a proposal that has
// been rejected.
2020-03-03 06:59:05 -08:00
StatusRejected ProposalStatus = 4
Change `address` from bytes to bech32 strings (#7242) * init * Fix bank proto messages * missing conversions * remove casttype for addresses * Fix tests * Fix consaddress * more test fixes * Fix tests * fixed tests * migrate missing proto declarations * format * Fix format * Fix alignment * Fix more tests * Fix ibc merge issue * Fix fmt * Fix more tests * Fix missing address declarations * Fix staking tests * Fix more tests * Fix config * fixed tests * Fix more tests * Update staking grpc tests * Fix merge issue * fixed failing tests in x/distr * fixed sim tests * fixed failing tests * Fix bugs * Add logs * fixed slashing issue * Fix staking grpc tests * Fix all bank tests :) * Fix tests in distribution * Fix more tests in distr * Fix slashing tests * Fix statking tests * Fix evidence tests * Fix gov tests * Fix bug in create vesting account * Fix test * remove fmt * fixed gov tests * fixed x/ibc tests * fixed x/ibc-transfer tests * fixed staking tests * fixed staking tests * fixed test * fixed distribution issue * fix pagination test * fmt * lint * fix build * fix format * revert tally tests * revert tally tests * lint * Fix sim test * revert * revert * fixed tally issue * fix tests * revert * fmt * refactor * remove `GetAddress()` * remove fmt * revert fmt.Striger usage * Fix tests * Fix rest test * disable interfacer lint check * make proto-format * add nolint rule * remove stray println Co-authored-by: aleem1314 <aleem.md789@gmail.com> Co-authored-by: atheesh <atheesh@vitwit.com>
2020-09-25 03:25:37 -07:00
// PROPOSAL_STATUS_FAILED defines a proposal status of a proposal that has
// failed.
2020-03-03 06:59:05 -08:00
StatusFailed ProposalStatus = 5
)
var ProposalStatus_name = map[int32]string{
2020-03-03 06:59:05 -08:00
0: "PROPOSAL_STATUS_UNSPECIFIED",
1: "PROPOSAL_STATUS_DEPOSIT_PERIOD",
2: "PROPOSAL_STATUS_VOTING_PERIOD",
3: "PROPOSAL_STATUS_PASSED",
4: "PROPOSAL_STATUS_REJECTED",
5: "PROPOSAL_STATUS_FAILED",
}
var ProposalStatus_value = map[string]int32{
2020-03-03 06:59:05 -08:00
"PROPOSAL_STATUS_UNSPECIFIED": 0,
"PROPOSAL_STATUS_DEPOSIT_PERIOD": 1,
"PROPOSAL_STATUS_VOTING_PERIOD": 2,
"PROPOSAL_STATUS_PASSED": 3,
"PROPOSAL_STATUS_REJECTED": 4,
"PROPOSAL_STATUS_FAILED": 5,
}
func (x ProposalStatus) String() string {
return proto.EnumName(ProposalStatus_name, int32(x))
}
func (ProposalStatus) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_6e82113c1a9a4b7c, []int{1}
}
// TextProposal defines a standard text proposal whose changes need to be
// manually updated in case of approval.
type TextProposal struct {
Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"`
Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
}
func (m *TextProposal) Reset() { *m = TextProposal{} }
func (*TextProposal) ProtoMessage() {}
func (*TextProposal) Descriptor() ([]byte, []int) {
return fileDescriptor_6e82113c1a9a4b7c, []int{0}
}
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)
} else {
b = b[:cap(b)]
n, err := m.MarshalToSizedBuffer(b)
if err != nil {
return nil, err
}
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)
}
var xxx_messageInfo_TextProposal proto.InternalMessageInfo
Change `address` from bytes to bech32 strings (#7242) * init * Fix bank proto messages * missing conversions * remove casttype for addresses * Fix tests * Fix consaddress * more test fixes * Fix tests * fixed tests * migrate missing proto declarations * format * Fix format * Fix alignment * Fix more tests * Fix ibc merge issue * Fix fmt * Fix more tests * Fix missing address declarations * Fix staking tests * Fix more tests * Fix config * fixed tests * Fix more tests * Update staking grpc tests * Fix merge issue * fixed failing tests in x/distr * fixed sim tests * fixed failing tests * Fix bugs * Add logs * fixed slashing issue * Fix staking grpc tests * Fix all bank tests :) * Fix tests in distribution * Fix more tests in distr * Fix slashing tests * Fix statking tests * Fix evidence tests * Fix gov tests * Fix bug in create vesting account * Fix test * remove fmt * fixed gov tests * fixed x/ibc tests * fixed x/ibc-transfer tests * fixed staking tests * fixed staking tests * fixed test * fixed distribution issue * fix pagination test * fmt * lint * fix build * fix format * revert tally tests * revert tally tests * lint * Fix sim test * revert * revert * fixed tally issue * fix tests * revert * fmt * refactor * remove `GetAddress()` * remove fmt * revert fmt.Striger usage * Fix tests * Fix rest test * disable interfacer lint check * make proto-format * add nolint rule * remove stray println Co-authored-by: aleem1314 <aleem.md789@gmail.com> Co-authored-by: atheesh <atheesh@vitwit.com>
2020-09-25 03:25:37 -07:00
// Deposit defines an amount deposited by an account address to an active
// proposal.
type Deposit struct {
Change `address` from bytes to bech32 strings (#7242) * init * Fix bank proto messages * missing conversions * remove casttype for addresses * Fix tests * Fix consaddress * more test fixes * Fix tests * fixed tests * migrate missing proto declarations * format * Fix format * Fix alignment * Fix more tests * Fix ibc merge issue * Fix fmt * Fix more tests * Fix missing address declarations * Fix staking tests * Fix more tests * Fix config * fixed tests * Fix more tests * Update staking grpc tests * Fix merge issue * fixed failing tests in x/distr * fixed sim tests * fixed failing tests * Fix bugs * Add logs * fixed slashing issue * Fix staking grpc tests * Fix all bank tests :) * Fix tests in distribution * Fix more tests in distr * Fix slashing tests * Fix statking tests * Fix evidence tests * Fix gov tests * Fix bug in create vesting account * Fix test * remove fmt * fixed gov tests * fixed x/ibc tests * fixed x/ibc-transfer tests * fixed staking tests * fixed staking tests * fixed test * fixed distribution issue * fix pagination test * fmt * lint * fix build * fix format * revert tally tests * revert tally tests * lint * Fix sim test * revert * revert * fixed tally issue * fix tests * revert * fmt * refactor * remove `GetAddress()` * remove fmt * revert fmt.Striger usage * Fix tests * Fix rest test * disable interfacer lint check * make proto-format * add nolint rule * remove stray println Co-authored-by: aleem1314 <aleem.md789@gmail.com> Co-authored-by: atheesh <atheesh@vitwit.com>
2020-09-25 03:25:37 -07:00
ProposalId uint64 `protobuf:"varint,1,opt,name=proposal_id,json=proposalId,proto3" json:"proposal_id,omitempty" yaml:"proposal_id"`
Depositor string `protobuf:"bytes,2,opt,name=depositor,proto3" json:"depositor,omitempty"`
Amount github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,3,rep,name=amount,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"amount"`
}
func (m *Deposit) Reset() { *m = Deposit{} }
func (*Deposit) ProtoMessage() {}
func (*Deposit) Descriptor() ([]byte, []int) {
return fileDescriptor_6e82113c1a9a4b7c, []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)
} else {
b = b[:cap(b)]
n, err := m.MarshalToSizedBuffer(b)
if err != nil {
return nil, err
}
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)
}
var xxx_messageInfo_Deposit proto.InternalMessageInfo
// Proposal defines the core field members of a governance proposal.
type Proposal struct {
ProposalId uint64 `protobuf:"varint,1,opt,name=proposal_id,json=proposalId,proto3" json:"id" yaml:"id"`
Content *types1.Any `protobuf:"bytes,2,opt,name=content,proto3" json:"content,omitempty"`
Status ProposalStatus `protobuf:"varint,3,opt,name=status,proto3,enum=cosmos.gov.v1beta1.ProposalStatus" json:"status,omitempty" yaml:"proposal_status"`
FinalTallyResult TallyResult `protobuf:"bytes,4,opt,name=final_tally_result,json=finalTallyResult,proto3" json:"final_tally_result" yaml:"final_tally_result"`
SubmitTime time.Time `protobuf:"bytes,5,opt,name=submit_time,json=submitTime,proto3,stdtime" json:"submit_time" yaml:"submit_time"`
DepositEndTime time.Time `protobuf:"bytes,6,opt,name=deposit_end_time,json=depositEndTime,proto3,stdtime" json:"deposit_end_time" yaml:"deposit_end_time"`
TotalDeposit github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,7,rep,name=total_deposit,json=totalDeposit,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"total_deposit" yaml:"total_deposit"`
VotingStartTime time.Time `protobuf:"bytes,8,opt,name=voting_start_time,json=votingStartTime,proto3,stdtime" json:"voting_start_time" yaml:"voting_start_time"`
VotingEndTime time.Time `protobuf:"bytes,9,opt,name=voting_end_time,json=votingEndTime,proto3,stdtime" json:"voting_end_time" yaml:"voting_end_time"`
}
func (m *Proposal) Reset() { *m = Proposal{} }
func (*Proposal) ProtoMessage() {}
func (*Proposal) Descriptor() ([]byte, []int) {
return fileDescriptor_6e82113c1a9a4b7c, []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)
} else {
b = b[:cap(b)]
n, err := m.MarshalToSizedBuffer(b)
if err != nil {
return nil, err
}
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)
}
var xxx_messageInfo_Proposal proto.InternalMessageInfo
// TallyResult defines a standard tally for a governance proposal.
type TallyResult struct {
Yes github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,1,opt,name=yes,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"yes"`
Abstain github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,2,opt,name=abstain,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"abstain"`
No github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,3,opt,name=no,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"no"`
NoWithVeto github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,4,opt,name=no_with_veto,json=noWithVeto,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"no_with_veto" yaml:"no_with_veto"`
}
func (m *TallyResult) Reset() { *m = TallyResult{} }
func (*TallyResult) ProtoMessage() {}
func (*TallyResult) Descriptor() ([]byte, []int) {
return fileDescriptor_6e82113c1a9a4b7c, []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)
} else {
b = b[:cap(b)]
n, err := m.MarshalToSizedBuffer(b)
if err != nil {
return nil, err
}
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)
}
var xxx_messageInfo_TallyResult proto.InternalMessageInfo
// Vote defines a vote on a governance proposal.
// A Vote consists of a proposal ID, the voter, and the vote option.
type Vote struct {
2020-10-27 02:23:15 -07:00
ProposalId uint64 `protobuf:"varint,1,opt,name=proposal_id,json=proposalId,proto3" json:"proposal_id,omitempty" yaml:"proposal_id"`
Voter string `protobuf:"bytes,2,opt,name=voter,proto3" json:"voter,omitempty"`
Options []VoteOption `protobuf:"varint,3,rep,packed,name=options,proto3,enum=cosmos.gov.v1beta1.VoteOption" json:"options,omitempty"`
}
func (m *Vote) Reset() { *m = Vote{} }
func (*Vote) ProtoMessage() {}
func (*Vote) Descriptor() ([]byte, []int) {
return fileDescriptor_6e82113c1a9a4b7c, []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)
} else {
b = b[:cap(b)]
n, err := m.MarshalToSizedBuffer(b)
if err != nil {
return nil, err
}
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)
}
var xxx_messageInfo_Vote proto.InternalMessageInfo
// DepositParams defines the params for deposits on governance proposals.
x/gov: gRPC query Service (#6491) * WIP: adding gRPC for gov * removed passing new store * fixed error * added register query service in module * order of imports changed * order of imports changed * Fix proto file * added get all proposals grpc * added more tests * added doc in tests * added grpc for votes * Added grpc for Deposits * updated protos * added grpc for proposal, vote, deposit, tally * WIP: adding params grpc * added params in gRPC * updated error messages * fixed error check * added more tests * updated tests * added yaml types * review changes and lint issues * updated tests * code cleanup * removed cosmos.gov prefixes * added more checks * added more test checks * added filtered pagination * removed test check * added tests for filtered pagination * Fix Proposals * lint * fixed error in tests * lint issues * Add nil check for params * Added unpacker * removed casttypes * review changes * use suite in grpc query tests * migrated tests to use suite * fix non-determinism * tests migrated to table driven tests * fixed doc typo * revert change * Merge branch 'master' of github.com:cosmos/cosmos-sdk into atheesh/5921-grpc-x-gov * review changes * review changes * review changes * review change * review changes * docs updated * review change * review changes * review changes * review changes * Update x/gov/keeper/keeper_test.go Co-authored-by: sahith-narahari <sahithnarahari@gmail.com> Co-authored-by: Anil Kumar Kammari <anil@vitwit.com> Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-07-16 02:16:23 -07:00
type DepositParams struct {
// Minimum deposit for a proposal to enter voting period.
MinDeposit github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,1,rep,name=min_deposit,json=minDeposit,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"min_deposit,omitempty" yaml:"min_deposit"`
Change `address` from bytes to bech32 strings (#7242) * init * Fix bank proto messages * missing conversions * remove casttype for addresses * Fix tests * Fix consaddress * more test fixes * Fix tests * fixed tests * migrate missing proto declarations * format * Fix format * Fix alignment * Fix more tests * Fix ibc merge issue * Fix fmt * Fix more tests * Fix missing address declarations * Fix staking tests * Fix more tests * Fix config * fixed tests * Fix more tests * Update staking grpc tests * Fix merge issue * fixed failing tests in x/distr * fixed sim tests * fixed failing tests * Fix bugs * Add logs * fixed slashing issue * Fix staking grpc tests * Fix all bank tests :) * Fix tests in distribution * Fix more tests in distr * Fix slashing tests * Fix statking tests * Fix evidence tests * Fix gov tests * Fix bug in create vesting account * Fix test * remove fmt * fixed gov tests * fixed x/ibc tests * fixed x/ibc-transfer tests * fixed staking tests * fixed staking tests * fixed test * fixed distribution issue * fix pagination test * fmt * lint * fix build * fix format * revert tally tests * revert tally tests * lint * Fix sim test * revert * revert * fixed tally issue * fix tests * revert * fmt * refactor * remove `GetAddress()` * remove fmt * revert fmt.Striger usage * Fix tests * Fix rest test * disable interfacer lint check * make proto-format * add nolint rule * remove stray println Co-authored-by: aleem1314 <aleem.md789@gmail.com> Co-authored-by: atheesh <atheesh@vitwit.com>
2020-09-25 03:25:37 -07:00
// Maximum period for Atom holders to deposit on a proposal. Initial value: 2
// months.
x/gov: gRPC query Service (#6491) * WIP: adding gRPC for gov * removed passing new store * fixed error * added register query service in module * order of imports changed * order of imports changed * Fix proto file * added get all proposals grpc * added more tests * added doc in tests * added grpc for votes * Added grpc for Deposits * updated protos * added grpc for proposal, vote, deposit, tally * WIP: adding params grpc * added params in gRPC * updated error messages * fixed error check * added more tests * updated tests * added yaml types * review changes and lint issues * updated tests * code cleanup * removed cosmos.gov prefixes * added more checks * added more test checks * added filtered pagination * removed test check * added tests for filtered pagination * Fix Proposals * lint * fixed error in tests * lint issues * Add nil check for params * Added unpacker * removed casttypes * review changes * use suite in grpc query tests * migrated tests to use suite * fix non-determinism * tests migrated to table driven tests * fixed doc typo * revert change * Merge branch 'master' of github.com:cosmos/cosmos-sdk into atheesh/5921-grpc-x-gov * review changes * review changes * review changes * review change * review changes * docs updated * review change * review changes * review changes * review changes * Update x/gov/keeper/keeper_test.go Co-authored-by: sahith-narahari <sahithnarahari@gmail.com> Co-authored-by: Anil Kumar Kammari <anil@vitwit.com> Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-07-16 02:16:23 -07:00
MaxDepositPeriod time.Duration `protobuf:"bytes,2,opt,name=max_deposit_period,json=maxDepositPeriod,proto3,stdduration" json:"max_deposit_period,omitempty" yaml:"max_deposit_period"`
}
func (m *DepositParams) Reset() { *m = DepositParams{} }
func (*DepositParams) ProtoMessage() {}
func (*DepositParams) Descriptor() ([]byte, []int) {
return fileDescriptor_6e82113c1a9a4b7c, []int{5}
x/gov: gRPC query Service (#6491) * WIP: adding gRPC for gov * removed passing new store * fixed error * added register query service in module * order of imports changed * order of imports changed * Fix proto file * added get all proposals grpc * added more tests * added doc in tests * added grpc for votes * Added grpc for Deposits * updated protos * added grpc for proposal, vote, deposit, tally * WIP: adding params grpc * added params in gRPC * updated error messages * fixed error check * added more tests * updated tests * added yaml types * review changes and lint issues * updated tests * code cleanup * removed cosmos.gov prefixes * added more checks * added more test checks * added filtered pagination * removed test check * added tests for filtered pagination * Fix Proposals * lint * fixed error in tests * lint issues * Add nil check for params * Added unpacker * removed casttypes * review changes * use suite in grpc query tests * migrated tests to use suite * fix non-determinism * tests migrated to table driven tests * fixed doc typo * revert change * Merge branch 'master' of github.com:cosmos/cosmos-sdk into atheesh/5921-grpc-x-gov * review changes * review changes * review changes * review change * review changes * docs updated * review change * review changes * review changes * review changes * Update x/gov/keeper/keeper_test.go Co-authored-by: sahith-narahari <sahithnarahari@gmail.com> Co-authored-by: Anil Kumar Kammari <anil@vitwit.com> Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-07-16 02:16:23 -07:00
}
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)
} else {
b = b[:cap(b)]
n, err := m.MarshalToSizedBuffer(b)
if err != nil {
return nil, err
}
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)
}
var xxx_messageInfo_DepositParams proto.InternalMessageInfo
// VotingParams defines the params for voting on governance proposals.
x/gov: gRPC query Service (#6491) * WIP: adding gRPC for gov * removed passing new store * fixed error * added register query service in module * order of imports changed * order of imports changed * Fix proto file * added get all proposals grpc * added more tests * added doc in tests * added grpc for votes * Added grpc for Deposits * updated protos * added grpc for proposal, vote, deposit, tally * WIP: adding params grpc * added params in gRPC * updated error messages * fixed error check * added more tests * updated tests * added yaml types * review changes and lint issues * updated tests * code cleanup * removed cosmos.gov prefixes * added more checks * added more test checks * added filtered pagination * removed test check * added tests for filtered pagination * Fix Proposals * lint * fixed error in tests * lint issues * Add nil check for params * Added unpacker * removed casttypes * review changes * use suite in grpc query tests * migrated tests to use suite * fix non-determinism * tests migrated to table driven tests * fixed doc typo * revert change * Merge branch 'master' of github.com:cosmos/cosmos-sdk into atheesh/5921-grpc-x-gov * review changes * review changes * review changes * review change * review changes * docs updated * review change * review changes * review changes * review changes * Update x/gov/keeper/keeper_test.go Co-authored-by: sahith-narahari <sahithnarahari@gmail.com> Co-authored-by: Anil Kumar Kammari <anil@vitwit.com> Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-07-16 02:16:23 -07:00
type VotingParams struct {
// Length of the voting period.
VotingPeriod time.Duration `protobuf:"bytes,1,opt,name=voting_period,json=votingPeriod,proto3,stdduration" json:"voting_period,omitempty" yaml:"voting_period"`
}
func (m *VotingParams) Reset() { *m = VotingParams{} }
func (*VotingParams) ProtoMessage() {}
func (*VotingParams) Descriptor() ([]byte, []int) {
return fileDescriptor_6e82113c1a9a4b7c, []int{6}
x/gov: gRPC query Service (#6491) * WIP: adding gRPC for gov * removed passing new store * fixed error * added register query service in module * order of imports changed * order of imports changed * Fix proto file * added get all proposals grpc * added more tests * added doc in tests * added grpc for votes * Added grpc for Deposits * updated protos * added grpc for proposal, vote, deposit, tally * WIP: adding params grpc * added params in gRPC * updated error messages * fixed error check * added more tests * updated tests * added yaml types * review changes and lint issues * updated tests * code cleanup * removed cosmos.gov prefixes * added more checks * added more test checks * added filtered pagination * removed test check * added tests for filtered pagination * Fix Proposals * lint * fixed error in tests * lint issues * Add nil check for params * Added unpacker * removed casttypes * review changes * use suite in grpc query tests * migrated tests to use suite * fix non-determinism * tests migrated to table driven tests * fixed doc typo * revert change * Merge branch 'master' of github.com:cosmos/cosmos-sdk into atheesh/5921-grpc-x-gov * review changes * review changes * review changes * review change * review changes * docs updated * review change * review changes * review changes * review changes * Update x/gov/keeper/keeper_test.go Co-authored-by: sahith-narahari <sahithnarahari@gmail.com> Co-authored-by: Anil Kumar Kammari <anil@vitwit.com> Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-07-16 02:16:23 -07:00
}
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)
} else {
b = b[:cap(b)]
n, err := m.MarshalToSizedBuffer(b)
if err != nil {
return nil, err
}
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)
}
var xxx_messageInfo_VotingParams proto.InternalMessageInfo
// TallyParams defines the params for tallying votes on governance proposals.
x/gov: gRPC query Service (#6491) * WIP: adding gRPC for gov * removed passing new store * fixed error * added register query service in module * order of imports changed * order of imports changed * Fix proto file * added get all proposals grpc * added more tests * added doc in tests * added grpc for votes * Added grpc for Deposits * updated protos * added grpc for proposal, vote, deposit, tally * WIP: adding params grpc * added params in gRPC * updated error messages * fixed error check * added more tests * updated tests * added yaml types * review changes and lint issues * updated tests * code cleanup * removed cosmos.gov prefixes * added more checks * added more test checks * added filtered pagination * removed test check * added tests for filtered pagination * Fix Proposals * lint * fixed error in tests * lint issues * Add nil check for params * Added unpacker * removed casttypes * review changes * use suite in grpc query tests * migrated tests to use suite * fix non-determinism * tests migrated to table driven tests * fixed doc typo * revert change * Merge branch 'master' of github.com:cosmos/cosmos-sdk into atheesh/5921-grpc-x-gov * review changes * review changes * review changes * review change * review changes * docs updated * review change * review changes * review changes * review changes * Update x/gov/keeper/keeper_test.go Co-authored-by: sahith-narahari <sahithnarahari@gmail.com> Co-authored-by: Anil Kumar Kammari <anil@vitwit.com> Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-07-16 02:16:23 -07:00
type TallyParams struct {
Change `address` from bytes to bech32 strings (#7242) * init * Fix bank proto messages * missing conversions * remove casttype for addresses * Fix tests * Fix consaddress * more test fixes * Fix tests * fixed tests * migrate missing proto declarations * format * Fix format * Fix alignment * Fix more tests * Fix ibc merge issue * Fix fmt * Fix more tests * Fix missing address declarations * Fix staking tests * Fix more tests * Fix config * fixed tests * Fix more tests * Update staking grpc tests * Fix merge issue * fixed failing tests in x/distr * fixed sim tests * fixed failing tests * Fix bugs * Add logs * fixed slashing issue * Fix staking grpc tests * Fix all bank tests :) * Fix tests in distribution * Fix more tests in distr * Fix slashing tests * Fix statking tests * Fix evidence tests * Fix gov tests * Fix bug in create vesting account * Fix test * remove fmt * fixed gov tests * fixed x/ibc tests * fixed x/ibc-transfer tests * fixed staking tests * fixed staking tests * fixed test * fixed distribution issue * fix pagination test * fmt * lint * fix build * fix format * revert tally tests * revert tally tests * lint * Fix sim test * revert * revert * fixed tally issue * fix tests * revert * fmt * refactor * remove `GetAddress()` * remove fmt * revert fmt.Striger usage * Fix tests * Fix rest test * disable interfacer lint check * make proto-format * add nolint rule * remove stray println Co-authored-by: aleem1314 <aleem.md789@gmail.com> Co-authored-by: atheesh <atheesh@vitwit.com>
2020-09-25 03:25:37 -07:00
// Minimum percentage of total stake needed to vote for a result to be
// considered valid.
x/gov: gRPC query Service (#6491) * WIP: adding gRPC for gov * removed passing new store * fixed error * added register query service in module * order of imports changed * order of imports changed * Fix proto file * added get all proposals grpc * added more tests * added doc in tests * added grpc for votes * Added grpc for Deposits * updated protos * added grpc for proposal, vote, deposit, tally * WIP: adding params grpc * added params in gRPC * updated error messages * fixed error check * added more tests * updated tests * added yaml types * review changes and lint issues * updated tests * code cleanup * removed cosmos.gov prefixes * added more checks * added more test checks * added filtered pagination * removed test check * added tests for filtered pagination * Fix Proposals * lint * fixed error in tests * lint issues * Add nil check for params * Added unpacker * removed casttypes * review changes * use suite in grpc query tests * migrated tests to use suite * fix non-determinism * tests migrated to table driven tests * fixed doc typo * revert change * Merge branch 'master' of github.com:cosmos/cosmos-sdk into atheesh/5921-grpc-x-gov * review changes * review changes * review changes * review change * review changes * docs updated * review change * review changes * review changes * review changes * Update x/gov/keeper/keeper_test.go Co-authored-by: sahith-narahari <sahithnarahari@gmail.com> Co-authored-by: Anil Kumar Kammari <anil@vitwit.com> Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-07-16 02:16:23 -07:00
Quorum github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,1,opt,name=quorum,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"quorum,omitempty"`
// Minimum proportion of Yes votes for proposal to pass. Default value: 0.5.
x/gov: gRPC query Service (#6491) * WIP: adding gRPC for gov * removed passing new store * fixed error * added register query service in module * order of imports changed * order of imports changed * Fix proto file * added get all proposals grpc * added more tests * added doc in tests * added grpc for votes * Added grpc for Deposits * updated protos * added grpc for proposal, vote, deposit, tally * WIP: adding params grpc * added params in gRPC * updated error messages * fixed error check * added more tests * updated tests * added yaml types * review changes and lint issues * updated tests * code cleanup * removed cosmos.gov prefixes * added more checks * added more test checks * added filtered pagination * removed test check * added tests for filtered pagination * Fix Proposals * lint * fixed error in tests * lint issues * Add nil check for params * Added unpacker * removed casttypes * review changes * use suite in grpc query tests * migrated tests to use suite * fix non-determinism * tests migrated to table driven tests * fixed doc typo * revert change * Merge branch 'master' of github.com:cosmos/cosmos-sdk into atheesh/5921-grpc-x-gov * review changes * review changes * review changes * review change * review changes * docs updated * review change * review changes * review changes * review changes * Update x/gov/keeper/keeper_test.go Co-authored-by: sahith-narahari <sahithnarahari@gmail.com> Co-authored-by: Anil Kumar Kammari <anil@vitwit.com> Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-07-16 02:16:23 -07:00
Threshold github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,2,opt,name=threshold,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"threshold,omitempty"`
Change `address` from bytes to bech32 strings (#7242) * init * Fix bank proto messages * missing conversions * remove casttype for addresses * Fix tests * Fix consaddress * more test fixes * Fix tests * fixed tests * migrate missing proto declarations * format * Fix format * Fix alignment * Fix more tests * Fix ibc merge issue * Fix fmt * Fix more tests * Fix missing address declarations * Fix staking tests * Fix more tests * Fix config * fixed tests * Fix more tests * Update staking grpc tests * Fix merge issue * fixed failing tests in x/distr * fixed sim tests * fixed failing tests * Fix bugs * Add logs * fixed slashing issue * Fix staking grpc tests * Fix all bank tests :) * Fix tests in distribution * Fix more tests in distr * Fix slashing tests * Fix statking tests * Fix evidence tests * Fix gov tests * Fix bug in create vesting account * Fix test * remove fmt * fixed gov tests * fixed x/ibc tests * fixed x/ibc-transfer tests * fixed staking tests * fixed staking tests * fixed test * fixed distribution issue * fix pagination test * fmt * lint * fix build * fix format * revert tally tests * revert tally tests * lint * Fix sim test * revert * revert * fixed tally issue * fix tests * revert * fmt * refactor * remove `GetAddress()` * remove fmt * revert fmt.Striger usage * Fix tests * Fix rest test * disable interfacer lint check * make proto-format * add nolint rule * remove stray println Co-authored-by: aleem1314 <aleem.md789@gmail.com> Co-authored-by: atheesh <atheesh@vitwit.com>
2020-09-25 03:25:37 -07:00
// Minimum value of Veto votes to Total votes ratio for proposal to be
// vetoed. Default value: 1/3.
VetoThreshold github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,3,opt,name=veto_threshold,json=vetoThreshold,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"veto_threshold,omitempty" yaml:"veto_threshold"`
x/gov: gRPC query Service (#6491) * WIP: adding gRPC for gov * removed passing new store * fixed error * added register query service in module * order of imports changed * order of imports changed * Fix proto file * added get all proposals grpc * added more tests * added doc in tests * added grpc for votes * Added grpc for Deposits * updated protos * added grpc for proposal, vote, deposit, tally * WIP: adding params grpc * added params in gRPC * updated error messages * fixed error check * added more tests * updated tests * added yaml types * review changes and lint issues * updated tests * code cleanup * removed cosmos.gov prefixes * added more checks * added more test checks * added filtered pagination * removed test check * added tests for filtered pagination * Fix Proposals * lint * fixed error in tests * lint issues * Add nil check for params * Added unpacker * removed casttypes * review changes * use suite in grpc query tests * migrated tests to use suite * fix non-determinism * tests migrated to table driven tests * fixed doc typo * revert change * Merge branch 'master' of github.com:cosmos/cosmos-sdk into atheesh/5921-grpc-x-gov * review changes * review changes * review changes * review change * review changes * docs updated * review change * review changes * review changes * review changes * Update x/gov/keeper/keeper_test.go Co-authored-by: sahith-narahari <sahithnarahari@gmail.com> Co-authored-by: Anil Kumar Kammari <anil@vitwit.com> Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-07-16 02:16:23 -07:00
}
func (m *TallyParams) Reset() { *m = TallyParams{} }
func (*TallyParams) ProtoMessage() {}
func (*TallyParams) Descriptor() ([]byte, []int) {
return fileDescriptor_6e82113c1a9a4b7c, []int{7}
x/gov: gRPC query Service (#6491) * WIP: adding gRPC for gov * removed passing new store * fixed error * added register query service in module * order of imports changed * order of imports changed * Fix proto file * added get all proposals grpc * added more tests * added doc in tests * added grpc for votes * Added grpc for Deposits * updated protos * added grpc for proposal, vote, deposit, tally * WIP: adding params grpc * added params in gRPC * updated error messages * fixed error check * added more tests * updated tests * added yaml types * review changes and lint issues * updated tests * code cleanup * removed cosmos.gov prefixes * added more checks * added more test checks * added filtered pagination * removed test check * added tests for filtered pagination * Fix Proposals * lint * fixed error in tests * lint issues * Add nil check for params * Added unpacker * removed casttypes * review changes * use suite in grpc query tests * migrated tests to use suite * fix non-determinism * tests migrated to table driven tests * fixed doc typo * revert change * Merge branch 'master' of github.com:cosmos/cosmos-sdk into atheesh/5921-grpc-x-gov * review changes * review changes * review changes * review change * review changes * docs updated * review change * review changes * review changes * review changes * Update x/gov/keeper/keeper_test.go Co-authored-by: sahith-narahari <sahithnarahari@gmail.com> Co-authored-by: Anil Kumar Kammari <anil@vitwit.com> Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-07-16 02:16:23 -07:00
}
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)
} else {
b = b[:cap(b)]
n, err := m.MarshalToSizedBuffer(b)
if err != nil {
return nil, err
}
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)
}
var xxx_messageInfo_TallyParams proto.InternalMessageInfo
func init() {
proto.RegisterEnum("cosmos.gov.v1beta1.VoteOption", VoteOption_name, VoteOption_value)
proto.RegisterEnum("cosmos.gov.v1beta1.ProposalStatus", ProposalStatus_name, ProposalStatus_value)
proto.RegisterType((*TextProposal)(nil), "cosmos.gov.v1beta1.TextProposal")
proto.RegisterType((*Deposit)(nil), "cosmos.gov.v1beta1.Deposit")
proto.RegisterType((*Proposal)(nil), "cosmos.gov.v1beta1.Proposal")
proto.RegisterType((*TallyResult)(nil), "cosmos.gov.v1beta1.TallyResult")
proto.RegisterType((*Vote)(nil), "cosmos.gov.v1beta1.Vote")
proto.RegisterType((*DepositParams)(nil), "cosmos.gov.v1beta1.DepositParams")
proto.RegisterType((*VotingParams)(nil), "cosmos.gov.v1beta1.VotingParams")
proto.RegisterType((*TallyParams)(nil), "cosmos.gov.v1beta1.TallyParams")
}
func init() { proto.RegisterFile("cosmos/gov/v1beta1/gov.proto", fileDescriptor_6e82113c1a9a4b7c) }
var fileDescriptor_6e82113c1a9a4b7c = []byte{
2020-10-27 02:23:15 -07:00
// 1380 bytes of a gzipped FileDescriptorProto
Change `address` from bytes to bech32 strings (#7242) * init * Fix bank proto messages * missing conversions * remove casttype for addresses * Fix tests * Fix consaddress * more test fixes * Fix tests * fixed tests * migrate missing proto declarations * format * Fix format * Fix alignment * Fix more tests * Fix ibc merge issue * Fix fmt * Fix more tests * Fix missing address declarations * Fix staking tests * Fix more tests * Fix config * fixed tests * Fix more tests * Update staking grpc tests * Fix merge issue * fixed failing tests in x/distr * fixed sim tests * fixed failing tests * Fix bugs * Add logs * fixed slashing issue * Fix staking grpc tests * Fix all bank tests :) * Fix tests in distribution * Fix more tests in distr * Fix slashing tests * Fix statking tests * Fix evidence tests * Fix gov tests * Fix bug in create vesting account * Fix test * remove fmt * fixed gov tests * fixed x/ibc tests * fixed x/ibc-transfer tests * fixed staking tests * fixed staking tests * fixed test * fixed distribution issue * fix pagination test * fmt * lint * fix build * fix format * revert tally tests * revert tally tests * lint * Fix sim test * revert * revert * fixed tally issue * fix tests * revert * fmt * refactor * remove `GetAddress()` * remove fmt * revert fmt.Striger usage * Fix tests * Fix rest test * disable interfacer lint check * make proto-format * add nolint rule * remove stray println Co-authored-by: aleem1314 <aleem.md789@gmail.com> Co-authored-by: atheesh <atheesh@vitwit.com>
2020-09-25 03:25:37 -07:00
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x57, 0x5f, 0x6c, 0xdb, 0xd4,
2020-10-27 02:23:15 -07:00
0x17, 0x8e, 0xd3, 0xff, 0x37, 0x69, 0xea, 0xdd, 0x66, 0x6d, 0xea, 0xdf, 0x7e, 0xb6, 0x31, 0x08,
0x55, 0xd3, 0x96, 0x6e, 0x05, 0x09, 0xe8, 0x24, 0x44, 0xd2, 0x78, 0x2c, 0x68, 0x4a, 0x22, 0xc7,
0xcb, 0xb4, 0xf1, 0x60, 0x39, 0xc9, 0x5d, 0x6a, 0x88, 0x7d, 0x43, 0x7c, 0x53, 0x1a, 0xf1, 0xc2,
0xe3, 0x14, 0x24, 0xb4, 0xc7, 0x21, 0x14, 0x69, 0x12, 0x6f, 0x3c, 0xf3, 0xcc, 0x73, 0x85, 0x90,
0x98, 0x78, 0x9a, 0x40, 0xca, 0x58, 0x27, 0xa1, 0xa9, 0x8f, 0x7d, 0xe0, 0x19, 0xd9, 0xf7, 0xba,
0x71, 0x92, 0x8a, 0x12, 0x9e, 0x66, 0x9f, 0x7b, 0xbe, 0xef, 0x3b, 0xf7, 0xf3, 0x39, 0x27, 0x2b,
0xb8, 0x54, 0xc3, 0xae, 0x8d, 0xdd, 0xad, 0x06, 0xde, 0xdf, 0xda, 0xbf, 0x5e, 0x45, 0xc4, 0xbc,
0xee, 0x3d, 0xa7, 0x5b, 0x6d, 0x4c, 0x30, 0x84, 0xf4, 0x34, 0xed, 0x45, 0xd8, 0xa9, 0x20, 0x32,
0x44, 0xd5, 0x74, 0xd1, 0x29, 0xa4, 0x86, 0x2d, 0x87, 0x62, 0x84, 0x64, 0x03, 0x37, 0xb0, 0xff,
0xb8, 0xe5, 0x3d, 0xb1, 0xe8, 0x06, 0x45, 0x19, 0xf4, 0x80, 0xd1, 0xd2, 0x23, 0xa9, 0x81, 0x71,
0xa3, 0x89, 0xb6, 0xfc, 0xb7, 0x6a, 0xe7, 0xc1, 0x16, 0xb1, 0x6c, 0xe4, 0x12, 0xd3, 0x6e, 0x05,
0xd8, 0xf1, 0x04, 0xd3, 0xe9, 0xb2, 0x23, 0x71, 0xfc, 0xa8, 0xde, 0x69, 0x9b, 0xc4, 0xc2, 0xac,
0x18, 0xe5, 0x2e, 0x88, 0xeb, 0xe8, 0x80, 0x94, 0xda, 0xb8, 0x85, 0x5d, 0xb3, 0x09, 0x93, 0x60,
0x8e, 0x58, 0xa4, 0x89, 0x52, 0x9c, 0xcc, 0x6d, 0x2e, 0x69, 0xf4, 0x05, 0xca, 0x20, 0x56, 0x47,
0x6e, 0xad, 0x6d, 0xb5, 0x3c, 0x68, 0x2a, 0xea, 0x9f, 0x85, 0x43, 0x3b, 0x2b, 0xaf, 0x9e, 0x48,
0xdc, 0xaf, 0x3f, 0x5c, 0x5d, 0xd8, 0xc5, 0x0e, 0x41, 0x0e, 0x51, 0x7e, 0xe1, 0xc0, 0x42, 0x0e,
0xb5, 0xb0, 0x6b, 0x11, 0xf8, 0x0e, 0x88, 0xb5, 0x98, 0x80, 0x61, 0xd5, 0x7d, 0xea, 0xd9, 0xec,
0xda, 0xc9, 0x40, 0x82, 0x5d, 0xd3, 0x6e, 0xee, 0x28, 0xa1, 0x43, 0x45, 0x03, 0xc1, 0x5b, 0xbe,
0x0e, 0x2f, 0x81, 0xa5, 0x3a, 0xe5, 0xc0, 0x6d, 0xa6, 0x3a, 0x0c, 0xc0, 0x1a, 0x98, 0x37, 0x6d,
0xdc, 0x71, 0x48, 0x6a, 0x46, 0x9e, 0xd9, 0x8c, 0x6d, 0x6f, 0xa4, 0x99, 0x6d, 0x9e, 0xf3, 0xc1,
0xe7, 0x48, 0xef, 0x62, 0xcb, 0xc9, 0x5e, 0x3b, 0x1c, 0x48, 0x91, 0xef, 0x9f, 0x4b, 0x9b, 0x0d,
0x8b, 0xec, 0x75, 0xaa, 0xe9, 0x1a, 0xb6, 0x99, 0xc7, 0xec, 0x9f, 0xab, 0x6e, 0xfd, 0xd3, 0x2d,
0xd2, 0x6d, 0x21, 0xd7, 0x07, 0xb8, 0x1a, 0xa3, 0xde, 0x59, 0x7c, 0xf8, 0x44, 0x8a, 0xbc, 0x7a,
0x22, 0x45, 0x94, 0xbf, 0xe6, 0xc1, 0xe2, 0xa9, 0x4f, 0x6f, 0x9f, 0x75, 0xa5, 0xd5, 0xe3, 0x81,
0x14, 0xb5, 0xea, 0x27, 0x03, 0x69, 0x89, 0x5e, 0x6c, 0xfc, 0x3e, 0x37, 0xc0, 0x42, 0x8d, 0xfa,
0xe3, 0xdf, 0x26, 0xb6, 0x9d, 0x4c, 0xd3, 0xef, 0x93, 0x0e, 0xbe, 0x4f, 0x3a, 0xe3, 0x74, 0xb3,
0xb1, 0x9f, 0x86, 0x46, 0x6a, 0x01, 0x02, 0x56, 0xc0, 0xbc, 0x4b, 0x4c, 0xd2, 0x71, 0x53, 0x33,
0x32, 0xb7, 0x99, 0xd8, 0x56, 0xd2, 0x93, 0xcd, 0x97, 0x0e, 0x0a, 0x2c, 0xfb, 0x99, 0x59, 0xe1,
0x64, 0x20, 0xad, 0x8d, 0x99, 0x4c, 0x49, 0x14, 0x8d, 0xb1, 0xc1, 0x16, 0x80, 0x0f, 0x2c, 0xc7,
0x6c, 0x1a, 0xc4, 0x6c, 0x36, 0xbb, 0x46, 0x1b, 0xb9, 0x9d, 0x26, 0x49, 0xcd, 0xfa, 0xf5, 0x49,
0x67, 0x69, 0xe8, 0x5e, 0x9e, 0xe6, 0xa7, 0x65, 0x5f, 0xf3, 0x8c, 0x3d, 0x19, 0x48, 0x1b, 0x54,
0x64, 0x92, 0x48, 0xd1, 0x78, 0x3f, 0x18, 0x02, 0xc1, 0x8f, 0x41, 0xcc, 0xed, 0x54, 0x6d, 0x8b,
0x18, 0x5e, 0x27, 0xa7, 0xe6, 0x7c, 0x29, 0x61, 0xc2, 0x0a, 0x3d, 0x68, 0xf3, 0xac, 0xc8, 0x54,
0x58, 0xbf, 0x84, 0xc0, 0xca, 0xa3, 0xe7, 0x12, 0xa7, 0x01, 0x1a, 0xf1, 0x00, 0xd0, 0x02, 0x3c,
0x6b, 0x11, 0x03, 0x39, 0x75, 0xaa, 0x30, 0x7f, 0xae, 0xc2, 0xeb, 0x4c, 0x61, 0x9d, 0x2a, 0x8c,
0x33, 0x50, 0x99, 0x04, 0x0b, 0xab, 0x4e, 0xdd, 0x97, 0x7a, 0xc8, 0x81, 0x65, 0x82, 0x89, 0xd9,
0x34, 0xd8, 0x41, 0x6a, 0xe1, 0xbc, 0x46, 0xbc, 0xc5, 0x74, 0x92, 0x54, 0x67, 0x04, 0xad, 0x4c,
0xd5, 0xa0, 0x71, 0x1f, 0x1b, 0x8c, 0x58, 0x13, 0x5c, 0xd8, 0xc7, 0xc4, 0x72, 0x1a, 0xde, 0xe7,
0x6d, 0x33, 0x63, 0x17, 0xcf, 0xbd, 0xf6, 0x1b, 0xac, 0x9c, 0x14, 0x2d, 0x67, 0x82, 0x82, 0xde,
0x7b, 0x85, 0xc6, 0xcb, 0x5e, 0xd8, 0xbf, 0xf8, 0x03, 0xc0, 0x42, 0x43, 0x8b, 0x97, 0xce, 0xd5,
0x52, 0x98, 0xd6, 0xda, 0x88, 0xd6, 0xa8, 0xc3, 0xcb, 0x34, 0xca, 0x0c, 0xde, 0x99, 0xf5, 0xb6,
0x8a, 0x72, 0x18, 0x05, 0xb1, 0x70, 0xfb, 0x7c, 0x00, 0x66, 0xba, 0xc8, 0xa5, 0x1b, 0x2a, 0x9b,
0xf6, 0x58, 0x7f, 0x1b, 0x48, 0x6f, 0xfe, 0x0b, 0xe3, 0xf2, 0x0e, 0xd1, 0x3c, 0x28, 0xbc, 0x05,
0x16, 0xcc, 0xaa, 0x4b, 0x4c, 0x8b, 0xed, 0xb2, 0xa9, 0x59, 0x02, 0x38, 0x7c, 0x1f, 0x44, 0x1d,
0xec, 0x0f, 0xe4, 0xf4, 0x24, 0x51, 0x07, 0xc3, 0x06, 0x88, 0x3b, 0xd8, 0xf8, 0xdc, 0x22, 0x7b,
0xc6, 0x3e, 0x22, 0xd8, 0x1f, 0xbb, 0xa5, 0xac, 0x3a, 0x1d, 0xd3, 0xc9, 0x40, 0x5a, 0xa5, 0xa6,
0x86, 0xb9, 0x14, 0x0d, 0x38, 0xf8, 0xae, 0x45, 0xf6, 0x2a, 0x88, 0x60, 0x66, 0xe5, 0x37, 0x1c,
0x98, 0xad, 0x60, 0x82, 0xfe, 0xfb, 0x4a, 0x4e, 0x82, 0xb9, 0x7d, 0x4c, 0x50, 0xb0, 0x8e, 0xe9,
0x0b, 0x7c, 0x17, 0x2c, 0x60, 0xff, 0x87, 0xc0, 0xf5, 0x77, 0x71, 0x62, 0x5b, 0x3c, 0x6b, 0x71,
0x78, 0xca, 0x45, 0x3f, 0x4d, 0x0b, 0xd2, 0x77, 0x16, 0x1f, 0x07, 0xfb, 0xf5, 0xc7, 0x28, 0x58,
0x66, 0xed, 0x5c, 0x32, 0xdb, 0xa6, 0xed, 0xc2, 0x6f, 0x39, 0x10, 0xb3, 0x2d, 0xe7, 0x74, 0xba,
0xb8, 0xf3, 0xa6, 0xcb, 0xf0, 0x7c, 0x3b, 0x1e, 0x48, 0x17, 0x43, 0xa8, 0x2b, 0xd8, 0xb6, 0x08,
0xb2, 0x5b, 0xa4, 0x3b, 0xbc, 0x5d, 0xe8, 0x78, 0xba, 0xa1, 0x03, 0xb6, 0xe5, 0x04, 0x23, 0xf7,
0x35, 0x07, 0xa0, 0x6d, 0x1e, 0x04, 0x44, 0x46, 0x0b, 0xb5, 0x2d, 0x5c, 0x67, 0x8b, 0x7d, 0x63,
0x62, 0x10, 0x72, 0xec, 0x87, 0x97, 0x7e, 0xdc, 0xe3, 0x81, 0x74, 0x69, 0x12, 0x3c, 0x52, 0x2b,
0x5b, 0xa9, 0x93, 0x59, 0xca, 0x63, 0x6f, 0x54, 0x78, 0xdb, 0x3c, 0x08, 0xec, 0xa2, 0xe1, 0xaf,
0x38, 0x10, 0xaf, 0xf8, 0xf3, 0xc3, 0xfc, 0xfb, 0x02, 0xb0, 0x79, 0x0a, 0x6a, 0xe3, 0xce, 0xab,
0xed, 0x06, 0xab, 0x6d, 0x7d, 0x04, 0x37, 0x52, 0x56, 0x72, 0x64, 0x7c, 0xc3, 0x15, 0xc5, 0x69,
0x8c, 0x55, 0xf3, 0x7b, 0x30, 0xb5, 0xac, 0x98, 0xfb, 0x60, 0xfe, 0xb3, 0x0e, 0x6e, 0x77, 0x6c,
0xbf, 0x8a, 0x78, 0x36, 0x3b, 0x45, 0x8f, 0xe7, 0x50, 0xed, 0x78, 0x20, 0xf1, 0x14, 0x3f, 0xac,
0x46, 0x63, 0x8c, 0xb0, 0x06, 0x96, 0xc8, 0x5e, 0x1b, 0xb9, 0x7b, 0xb8, 0x49, 0x3f, 0x40, 0x7c,
0xaa, 0x11, 0xa2, 0xf4, 0xab, 0xa7, 0x14, 0x21, 0x85, 0x21, 0x2f, 0xec, 0x71, 0x20, 0xe1, 0xcd,
0x95, 0x31, 0x94, 0x9a, 0xf1, 0xa5, 0x6a, 0x53, 0x4b, 0xa5, 0x46, 0x79, 0x46, 0xfc, 0xbd, 0xc8,
0xfc, 0x1d, 0xc9, 0x50, 0xb4, 0x65, 0x2f, 0xa0, 0x07, 0xef, 0x97, 0xff, 0xe4, 0x00, 0x18, 0x8e,
0x13, 0xbc, 0x02, 0xd6, 0x2b, 0x45, 0x5d, 0x35, 0x8a, 0x25, 0x3d, 0x5f, 0x2c, 0x18, 0x77, 0x0a,
0xe5, 0x92, 0xba, 0x9b, 0xbf, 0x99, 0x57, 0x73, 0x7c, 0x44, 0x58, 0xe9, 0xf5, 0xe5, 0x18, 0x4d,
0x54, 0x3d, 0x11, 0xa8, 0x80, 0x95, 0x70, 0xf6, 0x3d, 0xb5, 0xcc, 0x73, 0xc2, 0x72, 0xaf, 0x2f,
0x2f, 0xd1, 0xac, 0x7b, 0xc8, 0x85, 0x97, 0xc1, 0x6a, 0x38, 0x27, 0x93, 0x2d, 0xeb, 0x99, 0x7c,
0x81, 0x8f, 0x0a, 0x17, 0x7a, 0x7d, 0x79, 0x99, 0xe6, 0x65, 0xd8, 0x12, 0x94, 0x41, 0x22, 0x9c,
0x5b, 0x28, 0xf2, 0x33, 0x42, 0xbc, 0xd7, 0x97, 0x17, 0x69, 0x5a, 0x01, 0xc3, 0x6d, 0x90, 0x1a,
0xcd, 0x30, 0xee, 0xe6, 0xf5, 0x5b, 0x46, 0x45, 0xd5, 0x8b, 0xfc, 0xac, 0x90, 0xec, 0xf5, 0x65,
0x3e, 0xc8, 0x0d, 0x36, 0x96, 0x30, 0xfb, 0xf0, 0x3b, 0x31, 0x72, 0xf9, 0xe7, 0x28, 0x48, 0x8c,
0xfe, 0xa7, 0x06, 0xa6, 0xc1, 0xff, 0x4a, 0x5a, 0xb1, 0x54, 0x2c, 0x67, 0x6e, 0x1b, 0x65, 0x3d,
0xa3, 0xdf, 0x29, 0x8f, 0x5d, 0xd8, 0xbf, 0x0a, 0x4d, 0x2e, 0x58, 0x4d, 0x78, 0x03, 0x88, 0xe3,
0xf9, 0x39, 0xb5, 0x54, 0x2c, 0xe7, 0x75, 0xa3, 0xa4, 0x6a, 0xf9, 0x62, 0x8e, 0xe7, 0x84, 0xf5,
0x5e, 0x5f, 0x5e, 0xa5, 0x90, 0x91, 0xa1, 0x82, 0xef, 0x81, 0xff, 0x8f, 0x83, 0x2b, 0x45, 0x3d,
0x5f, 0xf8, 0x30, 0xc0, 0x46, 0x85, 0xb5, 0x5e, 0x5f, 0x86, 0x14, 0x5b, 0x09, 0x4d, 0x00, 0xbc,
0x02, 0xd6, 0xc6, 0xa1, 0xa5, 0x4c, 0xb9, 0xac, 0xe6, 0xf8, 0x19, 0x81, 0xef, 0xf5, 0xe5, 0x38,
0xc5, 0x94, 0x4c, 0xd7, 0x45, 0x75, 0x78, 0x0d, 0xa4, 0xc6, 0xb3, 0x35, 0xf5, 0x23, 0x75, 0x57,
0x57, 0x73, 0xfc, 0xac, 0x00, 0x7b, 0x7d, 0x39, 0x41, 0xf3, 0x35, 0xf4, 0x09, 0xaa, 0x11, 0x74,
0x26, 0xff, 0xcd, 0x4c, 0xfe, 0xb6, 0x9a, 0xe3, 0xe7, 0xc2, 0xfc, 0x37, 0x4d, 0xab, 0x89, 0xea,
0xd4, 0xce, 0x6c, 0xe1, 0xf0, 0x85, 0x18, 0x79, 0xf6, 0x42, 0x8c, 0x7c, 0x79, 0x24, 0x46, 0x0e,
0x8f, 0x44, 0xee, 0xe9, 0x91, 0xc8, 0xfd, 0x71, 0x24, 0x72, 0x8f, 0x5e, 0x8a, 0x91, 0xa7, 0x2f,
0xc5, 0xc8, 0xb3, 0x97, 0x62, 0xe4, 0xfe, 0x3f, 0x2f, 0xc4, 0x03, 0xff, 0x8f, 0x21, 0xbf, 0x9f,
0xab, 0xf3, 0xfe, 0x0e, 0x79, 0xeb, 0xef, 0x00, 0x00, 0x00, 0xff, 0xff, 0xd9, 0xc3, 0x29, 0xda,
0x27, 0x0d, 0x00, 0x00,
2020-03-02 11:13:42 -08:00
}
func (this *TextProposal) Equal(that interface{}) bool {
if that == nil {
return this == nil
}
that1, ok := that.(*TextProposal)
if !ok {
that2, ok := that.(TextProposal)
if ok {
that1 = &that2
} else {
return false
}
}
if that1 == nil {
return this == nil
} else if this == nil {
return false
}
if this.Title != that1.Title {
return false
}
if this.Description != that1.Description {
return false
}
return true
}
func (this *Proposal) Equal(that interface{}) bool {
2020-03-02 13:46:28 -08:00
if that == nil {
return this == nil
}
that1, ok := that.(*Proposal)
2020-03-02 13:46:28 -08:00
if !ok {
that2, ok := that.(Proposal)
2020-03-02 13:46:28 -08:00
if ok {
that1 = &that2
} else {
return false
}
}
if that1 == nil {
return this == nil
} else if this == nil {
return false
}
if this.ProposalId != that1.ProposalId {
2020-03-02 13:46:28 -08:00
return false
}
if !this.Content.Equal(that1.Content) {
return false
}
2020-03-02 13:46:28 -08:00
if this.Status != that1.Status {
return false
}
if !this.FinalTallyResult.Equal(&that1.FinalTallyResult) {
return false
}
if !this.SubmitTime.Equal(that1.SubmitTime) {
return false
}
if !this.DepositEndTime.Equal(that1.DepositEndTime) {
return false
}
if len(this.TotalDeposit) != len(that1.TotalDeposit) {
return false
}
for i := range this.TotalDeposit {
if !this.TotalDeposit[i].Equal(&that1.TotalDeposit[i]) {
return false
}
}
if !this.VotingStartTime.Equal(that1.VotingStartTime) {
return false
}
if !this.VotingEndTime.Equal(that1.VotingEndTime) {
return false
}
return true
}
2020-03-02 11:13:42 -08:00
func (this *TallyResult) Equal(that interface{}) bool {
if that == nil {
return this == nil
}
that1, ok := that.(*TallyResult)
if !ok {
that2, ok := that.(TallyResult)
if ok {
that1 = &that2
} else {
return false
}
}
if that1 == nil {
return this == nil
} else if this == nil {
return false
}
if !this.Yes.Equal(that1.Yes) {
return false
}
if !this.Abstain.Equal(that1.Abstain) {
return false
}
if !this.No.Equal(that1.No) {
return false
}
if !this.NoWithVeto.Equal(that1.NoWithVeto) {
return false
}
return true
}
func (m *TextProposal) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalToSizedBuffer(dAtA[:size])
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *TextProposal) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *TextProposal) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if len(m.Description) > 0 {
i -= len(m.Description)
copy(dAtA[i:], m.Description)
i = encodeVarintGov(dAtA, i, uint64(len(m.Description)))
i--
dAtA[i] = 0x12
}
if len(m.Title) > 0 {
i -= len(m.Title)
copy(dAtA[i:], m.Title)
i = encodeVarintGov(dAtA, i, uint64(len(m.Title)))
i--
dAtA[i] = 0xa
}
return len(dAtA) - i, nil
}
func (m *Deposit) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalToSizedBuffer(dAtA[:size])
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *Deposit) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *Deposit) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
2020-03-02 11:13:42 -08:00
if len(m.Amount) > 0 {
for iNdEx := len(m.Amount) - 1; iNdEx >= 0; iNdEx-- {
{
size, err := m.Amount[iNdEx].MarshalToSizedBuffer(dAtA[:i])
if err != nil {
return 0, err
}
i -= size
i = encodeVarintGov(dAtA, i, uint64(size))
2020-03-02 11:13:42 -08:00
}
i--
dAtA[i] = 0x1a
}
}
2020-03-02 11:13:42 -08:00
if len(m.Depositor) > 0 {
i -= len(m.Depositor)
copy(dAtA[i:], m.Depositor)
i = encodeVarintGov(dAtA, i, uint64(len(m.Depositor)))
i--
dAtA[i] = 0x12
}
if m.ProposalId != 0 {
i = encodeVarintGov(dAtA, i, uint64(m.ProposalId))
i--
dAtA[i] = 0x8
}
return len(dAtA) - i, nil
}
func (m *Proposal) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalToSizedBuffer(dAtA[:size])
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *Proposal) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *Proposal) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
n1, err1 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.VotingEndTime, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.VotingEndTime):])
if err1 != nil {
return 0, err1
}
i -= n1
i = encodeVarintGov(dAtA, i, uint64(n1))
i--
dAtA[i] = 0x4a
n2, err2 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.VotingStartTime, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.VotingStartTime):])
if err2 != nil {
return 0, err2
}
2020-02-17 11:29:24 -08:00
i -= n2
i = encodeVarintGov(dAtA, i, uint64(n2))
i--
dAtA[i] = 0x42
if len(m.TotalDeposit) > 0 {
for iNdEx := len(m.TotalDeposit) - 1; iNdEx >= 0; iNdEx-- {
{
size, err := m.TotalDeposit[iNdEx].MarshalToSizedBuffer(dAtA[:i])
if err != nil {
return 0, err
}
i -= size
i = encodeVarintGov(dAtA, i, uint64(size))
}
i--
dAtA[i] = 0x3a
}
}
n3, err3 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.DepositEndTime, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.DepositEndTime):])
if err3 != nil {
return 0, err3
}
i -= n3
i = encodeVarintGov(dAtA, i, uint64(n3))
i--
dAtA[i] = 0x32
n4, err4 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.SubmitTime, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.SubmitTime):])
2020-02-17 11:29:24 -08:00
if err4 != nil {
return 0, err4
}
2020-02-17 11:29:24 -08:00
i -= n4
i = encodeVarintGov(dAtA, i, uint64(n4))
i--
dAtA[i] = 0x2a
{
size, err := m.FinalTallyResult.MarshalToSizedBuffer(dAtA[:i])
if err != nil {
return 0, err
}
i -= size
i = encodeVarintGov(dAtA, i, uint64(size))
}
i--
dAtA[i] = 0x22
if m.Status != 0 {
i = encodeVarintGov(dAtA, i, uint64(m.Status))
i--
dAtA[i] = 0x18
}
if m.Content != nil {
{
size, err := m.Content.MarshalToSizedBuffer(dAtA[:i])
if err != nil {
return 0, err
}
i -= size
i = encodeVarintGov(dAtA, i, uint64(size))
}
i--
dAtA[i] = 0x12
}
if m.ProposalId != 0 {
i = encodeVarintGov(dAtA, i, uint64(m.ProposalId))
i--
dAtA[i] = 0x8
}
return len(dAtA) - i, nil
}
func (m *TallyResult) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalToSizedBuffer(dAtA[:size])
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *TallyResult) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *TallyResult) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
{
size := m.NoWithVeto.Size()
i -= size
if _, err := m.NoWithVeto.MarshalTo(dAtA[i:]); err != nil {
return 0, err
}
i = encodeVarintGov(dAtA, i, uint64(size))
}
i--
dAtA[i] = 0x22
{
size := m.No.Size()
i -= size
if _, err := m.No.MarshalTo(dAtA[i:]); err != nil {
return 0, err
}
i = encodeVarintGov(dAtA, i, uint64(size))
}
i--
dAtA[i] = 0x1a
{
size := m.Abstain.Size()
i -= size
if _, err := m.Abstain.MarshalTo(dAtA[i:]); err != nil {
return 0, err
}
i = encodeVarintGov(dAtA, i, uint64(size))
}
i--
dAtA[i] = 0x12
{
size := m.Yes.Size()
i -= size
if _, err := m.Yes.MarshalTo(dAtA[i:]); err != nil {
return 0, err
}
i = encodeVarintGov(dAtA, i, uint64(size))
}
i--
dAtA[i] = 0xa
return len(dAtA) - i, nil
}
func (m *Vote) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalToSizedBuffer(dAtA[:size])
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *Vote) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *Vote) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
2020-10-27 02:23:15 -07:00
if len(m.Options) > 0 {
dAtA8 := make([]byte, len(m.Options)*10)
var j7 int
for _, num := range m.Options {
for num >= 1<<7 {
dAtA8[j7] = uint8(uint64(num)&0x7f | 0x80)
num >>= 7
j7++
}
dAtA8[j7] = uint8(num)
j7++
}
i -= j7
copy(dAtA[i:], dAtA8[:j7])
i = encodeVarintGov(dAtA, i, uint64(j7))
i--
2020-10-27 02:23:15 -07:00
dAtA[i] = 0x1a
}
if len(m.Voter) > 0 {
i -= len(m.Voter)
copy(dAtA[i:], m.Voter)
i = encodeVarintGov(dAtA, i, uint64(len(m.Voter)))
i--
dAtA[i] = 0x12
}
if m.ProposalId != 0 {
i = encodeVarintGov(dAtA, i, uint64(m.ProposalId))
i--
dAtA[i] = 0x8
}
return len(dAtA) - i, nil
}
x/gov: gRPC query Service (#6491) * WIP: adding gRPC for gov * removed passing new store * fixed error * added register query service in module * order of imports changed * order of imports changed * Fix proto file * added get all proposals grpc * added more tests * added doc in tests * added grpc for votes * Added grpc for Deposits * updated protos * added grpc for proposal, vote, deposit, tally * WIP: adding params grpc * added params in gRPC * updated error messages * fixed error check * added more tests * updated tests * added yaml types * review changes and lint issues * updated tests * code cleanup * removed cosmos.gov prefixes * added more checks * added more test checks * added filtered pagination * removed test check * added tests for filtered pagination * Fix Proposals * lint * fixed error in tests * lint issues * Add nil check for params * Added unpacker * removed casttypes * review changes * use suite in grpc query tests * migrated tests to use suite * fix non-determinism * tests migrated to table driven tests * fixed doc typo * revert change * Merge branch 'master' of github.com:cosmos/cosmos-sdk into atheesh/5921-grpc-x-gov * review changes * review changes * review changes * review change * review changes * docs updated * review change * review changes * review changes * review changes * Update x/gov/keeper/keeper_test.go Co-authored-by: sahith-narahari <sahithnarahari@gmail.com> Co-authored-by: Anil Kumar Kammari <anil@vitwit.com> Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-07-16 02:16:23 -07:00
func (m *DepositParams) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalToSizedBuffer(dAtA[:size])
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *DepositParams) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *DepositParams) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
2020-10-27 02:23:15 -07:00
n9, err9 := github_com_gogo_protobuf_types.StdDurationMarshalTo(m.MaxDepositPeriod, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdDuration(m.MaxDepositPeriod):])
if err9 != nil {
return 0, err9
x/gov: gRPC query Service (#6491) * WIP: adding gRPC for gov * removed passing new store * fixed error * added register query service in module * order of imports changed * order of imports changed * Fix proto file * added get all proposals grpc * added more tests * added doc in tests * added grpc for votes * Added grpc for Deposits * updated protos * added grpc for proposal, vote, deposit, tally * WIP: adding params grpc * added params in gRPC * updated error messages * fixed error check * added more tests * updated tests * added yaml types * review changes and lint issues * updated tests * code cleanup * removed cosmos.gov prefixes * added more checks * added more test checks * added filtered pagination * removed test check * added tests for filtered pagination * Fix Proposals * lint * fixed error in tests * lint issues * Add nil check for params * Added unpacker * removed casttypes * review changes * use suite in grpc query tests * migrated tests to use suite * fix non-determinism * tests migrated to table driven tests * fixed doc typo * revert change * Merge branch 'master' of github.com:cosmos/cosmos-sdk into atheesh/5921-grpc-x-gov * review changes * review changes * review changes * review change * review changes * docs updated * review change * review changes * review changes * review changes * Update x/gov/keeper/keeper_test.go Co-authored-by: sahith-narahari <sahithnarahari@gmail.com> Co-authored-by: Anil Kumar Kammari <anil@vitwit.com> Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-07-16 02:16:23 -07:00
}
2020-10-27 02:23:15 -07:00
i -= n9
i = encodeVarintGov(dAtA, i, uint64(n9))
x/gov: gRPC query Service (#6491) * WIP: adding gRPC for gov * removed passing new store * fixed error * added register query service in module * order of imports changed * order of imports changed * Fix proto file * added get all proposals grpc * added more tests * added doc in tests * added grpc for votes * Added grpc for Deposits * updated protos * added grpc for proposal, vote, deposit, tally * WIP: adding params grpc * added params in gRPC * updated error messages * fixed error check * added more tests * updated tests * added yaml types * review changes and lint issues * updated tests * code cleanup * removed cosmos.gov prefixes * added more checks * added more test checks * added filtered pagination * removed test check * added tests for filtered pagination * Fix Proposals * lint * fixed error in tests * lint issues * Add nil check for params * Added unpacker * removed casttypes * review changes * use suite in grpc query tests * migrated tests to use suite * fix non-determinism * tests migrated to table driven tests * fixed doc typo * revert change * Merge branch 'master' of github.com:cosmos/cosmos-sdk into atheesh/5921-grpc-x-gov * review changes * review changes * review changes * review change * review changes * docs updated * review change * review changes * review changes * review changes * Update x/gov/keeper/keeper_test.go Co-authored-by: sahith-narahari <sahithnarahari@gmail.com> Co-authored-by: Anil Kumar Kammari <anil@vitwit.com> Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-07-16 02:16:23 -07:00
i--
dAtA[i] = 0x12
if len(m.MinDeposit) > 0 {
for iNdEx := len(m.MinDeposit) - 1; iNdEx >= 0; iNdEx-- {
{
size, err := m.MinDeposit[iNdEx].MarshalToSizedBuffer(dAtA[:i])
if err != nil {
return 0, err
}
i -= size
i = encodeVarintGov(dAtA, i, uint64(size))
}
i--
dAtA[i] = 0xa
}
}
return len(dAtA) - i, nil
}
func (m *VotingParams) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalToSizedBuffer(dAtA[:size])
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *VotingParams) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *VotingParams) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
2020-10-27 02:23:15 -07:00
n10, err10 := github_com_gogo_protobuf_types.StdDurationMarshalTo(m.VotingPeriod, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdDuration(m.VotingPeriod):])
if err10 != nil {
return 0, err10
x/gov: gRPC query Service (#6491) * WIP: adding gRPC for gov * removed passing new store * fixed error * added register query service in module * order of imports changed * order of imports changed * Fix proto file * added get all proposals grpc * added more tests * added doc in tests * added grpc for votes * Added grpc for Deposits * updated protos * added grpc for proposal, vote, deposit, tally * WIP: adding params grpc * added params in gRPC * updated error messages * fixed error check * added more tests * updated tests * added yaml types * review changes and lint issues * updated tests * code cleanup * removed cosmos.gov prefixes * added more checks * added more test checks * added filtered pagination * removed test check * added tests for filtered pagination * Fix Proposals * lint * fixed error in tests * lint issues * Add nil check for params * Added unpacker * removed casttypes * review changes * use suite in grpc query tests * migrated tests to use suite * fix non-determinism * tests migrated to table driven tests * fixed doc typo * revert change * Merge branch 'master' of github.com:cosmos/cosmos-sdk into atheesh/5921-grpc-x-gov * review changes * review changes * review changes * review change * review changes * docs updated * review change * review changes * review changes * review changes * Update x/gov/keeper/keeper_test.go Co-authored-by: sahith-narahari <sahithnarahari@gmail.com> Co-authored-by: Anil Kumar Kammari <anil@vitwit.com> Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-07-16 02:16:23 -07:00
}
2020-10-27 02:23:15 -07:00
i -= n10
i = encodeVarintGov(dAtA, i, uint64(n10))
x/gov: gRPC query Service (#6491) * WIP: adding gRPC for gov * removed passing new store * fixed error * added register query service in module * order of imports changed * order of imports changed * Fix proto file * added get all proposals grpc * added more tests * added doc in tests * added grpc for votes * Added grpc for Deposits * updated protos * added grpc for proposal, vote, deposit, tally * WIP: adding params grpc * added params in gRPC * updated error messages * fixed error check * added more tests * updated tests * added yaml types * review changes and lint issues * updated tests * code cleanup * removed cosmos.gov prefixes * added more checks * added more test checks * added filtered pagination * removed test check * added tests for filtered pagination * Fix Proposals * lint * fixed error in tests * lint issues * Add nil check for params * Added unpacker * removed casttypes * review changes * use suite in grpc query tests * migrated tests to use suite * fix non-determinism * tests migrated to table driven tests * fixed doc typo * revert change * Merge branch 'master' of github.com:cosmos/cosmos-sdk into atheesh/5921-grpc-x-gov * review changes * review changes * review changes * review change * review changes * docs updated * review change * review changes * review changes * review changes * Update x/gov/keeper/keeper_test.go Co-authored-by: sahith-narahari <sahithnarahari@gmail.com> Co-authored-by: Anil Kumar Kammari <anil@vitwit.com> Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-07-16 02:16:23 -07:00
i--
dAtA[i] = 0xa
return len(dAtA) - i, nil
}
func (m *TallyParams) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalToSizedBuffer(dAtA[:size])
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *TallyParams) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *TallyParams) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
{
size := m.VetoThreshold.Size()
x/gov: gRPC query Service (#6491) * WIP: adding gRPC for gov * removed passing new store * fixed error * added register query service in module * order of imports changed * order of imports changed * Fix proto file * added get all proposals grpc * added more tests * added doc in tests * added grpc for votes * Added grpc for Deposits * updated protos * added grpc for proposal, vote, deposit, tally * WIP: adding params grpc * added params in gRPC * updated error messages * fixed error check * added more tests * updated tests * added yaml types * review changes and lint issues * updated tests * code cleanup * removed cosmos.gov prefixes * added more checks * added more test checks * added filtered pagination * removed test check * added tests for filtered pagination * Fix Proposals * lint * fixed error in tests * lint issues * Add nil check for params * Added unpacker * removed casttypes * review changes * use suite in grpc query tests * migrated tests to use suite * fix non-determinism * tests migrated to table driven tests * fixed doc typo * revert change * Merge branch 'master' of github.com:cosmos/cosmos-sdk into atheesh/5921-grpc-x-gov * review changes * review changes * review changes * review change * review changes * docs updated * review change * review changes * review changes * review changes * Update x/gov/keeper/keeper_test.go Co-authored-by: sahith-narahari <sahithnarahari@gmail.com> Co-authored-by: Anil Kumar Kammari <anil@vitwit.com> Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-07-16 02:16:23 -07:00
i -= size
if _, err := m.VetoThreshold.MarshalTo(dAtA[i:]); err != nil {
x/gov: gRPC query Service (#6491) * WIP: adding gRPC for gov * removed passing new store * fixed error * added register query service in module * order of imports changed * order of imports changed * Fix proto file * added get all proposals grpc * added more tests * added doc in tests * added grpc for votes * Added grpc for Deposits * updated protos * added grpc for proposal, vote, deposit, tally * WIP: adding params grpc * added params in gRPC * updated error messages * fixed error check * added more tests * updated tests * added yaml types * review changes and lint issues * updated tests * code cleanup * removed cosmos.gov prefixes * added more checks * added more test checks * added filtered pagination * removed test check * added tests for filtered pagination * Fix Proposals * lint * fixed error in tests * lint issues * Add nil check for params * Added unpacker * removed casttypes * review changes * use suite in grpc query tests * migrated tests to use suite * fix non-determinism * tests migrated to table driven tests * fixed doc typo * revert change * Merge branch 'master' of github.com:cosmos/cosmos-sdk into atheesh/5921-grpc-x-gov * review changes * review changes * review changes * review change * review changes * docs updated * review change * review changes * review changes * review changes * Update x/gov/keeper/keeper_test.go Co-authored-by: sahith-narahari <sahithnarahari@gmail.com> Co-authored-by: Anil Kumar Kammari <anil@vitwit.com> Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-07-16 02:16:23 -07:00
return 0, err
}
i = encodeVarintGov(dAtA, i, uint64(size))
}
i--
dAtA[i] = 0x1a
{
size := m.Threshold.Size()
i -= size
if _, err := m.Threshold.MarshalTo(dAtA[i:]); err != nil {
return 0, err
}
i = encodeVarintGov(dAtA, i, uint64(size))
}
i--
dAtA[i] = 0x12
{
size := m.Quorum.Size()
i -= size
if _, err := m.Quorum.MarshalTo(dAtA[i:]); err != nil {
return 0, err
}
i = encodeVarintGov(dAtA, i, uint64(size))
}
i--
dAtA[i] = 0xa
return len(dAtA) - i, nil
}
func encodeVarintGov(dAtA []byte, offset int, v uint64) int {
offset -= sovGov(v)
base := offset
for v >= 1<<7 {
dAtA[offset] = uint8(v&0x7f | 0x80)
v >>= 7
offset++
}
dAtA[offset] = uint8(v)
return base
}
func (m *TextProposal) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
l = len(m.Title)
if l > 0 {
n += 1 + l + sovGov(uint64(l))
}
l = len(m.Description)
if l > 0 {
n += 1 + l + sovGov(uint64(l))
}
return n
}
func (m *Deposit) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
if m.ProposalId != 0 {
n += 1 + sovGov(uint64(m.ProposalId))
}
l = len(m.Depositor)
if l > 0 {
n += 1 + l + sovGov(uint64(l))
}
if len(m.Amount) > 0 {
for _, e := range m.Amount {
l = e.Size()
n += 1 + l + sovGov(uint64(l))
}
}
return n
}
func (m *Proposal) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
if m.ProposalId != 0 {
n += 1 + sovGov(uint64(m.ProposalId))
}
if m.Content != nil {
l = m.Content.Size()
n += 1 + l + sovGov(uint64(l))
}
if m.Status != 0 {
n += 1 + sovGov(uint64(m.Status))
}
l = m.FinalTallyResult.Size()
n += 1 + l + sovGov(uint64(l))
l = github_com_gogo_protobuf_types.SizeOfStdTime(m.SubmitTime)
n += 1 + l + sovGov(uint64(l))
l = github_com_gogo_protobuf_types.SizeOfStdTime(m.DepositEndTime)
n += 1 + l + sovGov(uint64(l))
if len(m.TotalDeposit) > 0 {
for _, e := range m.TotalDeposit {
l = e.Size()
n += 1 + l + sovGov(uint64(l))
}
}
l = github_com_gogo_protobuf_types.SizeOfStdTime(m.VotingStartTime)
n += 1 + l + sovGov(uint64(l))
l = github_com_gogo_protobuf_types.SizeOfStdTime(m.VotingEndTime)
n += 1 + l + sovGov(uint64(l))
return n
}
func (m *TallyResult) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
l = m.Yes.Size()
n += 1 + l + sovGov(uint64(l))
l = m.Abstain.Size()
n += 1 + l + sovGov(uint64(l))
l = m.No.Size()
n += 1 + l + sovGov(uint64(l))
l = m.NoWithVeto.Size()
n += 1 + l + sovGov(uint64(l))
return n
}
func (m *Vote) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
if m.ProposalId != 0 {
n += 1 + sovGov(uint64(m.ProposalId))
}
l = len(m.Voter)
if l > 0 {
n += 1 + l + sovGov(uint64(l))
}
2020-10-27 02:23:15 -07:00
if len(m.Options) > 0 {
l = 0
for _, e := range m.Options {
l += sovGov(uint64(e))
}
n += 1 + sovGov(uint64(l)) + l
}
return n
}
x/gov: gRPC query Service (#6491) * WIP: adding gRPC for gov * removed passing new store * fixed error * added register query service in module * order of imports changed * order of imports changed * Fix proto file * added get all proposals grpc * added more tests * added doc in tests * added grpc for votes * Added grpc for Deposits * updated protos * added grpc for proposal, vote, deposit, tally * WIP: adding params grpc * added params in gRPC * updated error messages * fixed error check * added more tests * updated tests * added yaml types * review changes and lint issues * updated tests * code cleanup * removed cosmos.gov prefixes * added more checks * added more test checks * added filtered pagination * removed test check * added tests for filtered pagination * Fix Proposals * lint * fixed error in tests * lint issues * Add nil check for params * Added unpacker * removed casttypes * review changes * use suite in grpc query tests * migrated tests to use suite * fix non-determinism * tests migrated to table driven tests * fixed doc typo * revert change * Merge branch 'master' of github.com:cosmos/cosmos-sdk into atheesh/5921-grpc-x-gov * review changes * review changes * review changes * review change * review changes * docs updated * review change * review changes * review changes * review changes * Update x/gov/keeper/keeper_test.go Co-authored-by: sahith-narahari <sahithnarahari@gmail.com> Co-authored-by: Anil Kumar Kammari <anil@vitwit.com> Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-07-16 02:16:23 -07:00
func (m *DepositParams) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
if len(m.MinDeposit) > 0 {
for _, e := range m.MinDeposit {
l = e.Size()
n += 1 + l + sovGov(uint64(l))
}
}
l = github_com_gogo_protobuf_types.SizeOfStdDuration(m.MaxDepositPeriod)
n += 1 + l + sovGov(uint64(l))
return n
}
func (m *VotingParams) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
l = github_com_gogo_protobuf_types.SizeOfStdDuration(m.VotingPeriod)
n += 1 + l + sovGov(uint64(l))
return n
}
func (m *TallyParams) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
l = m.Quorum.Size()
n += 1 + l + sovGov(uint64(l))
l = m.Threshold.Size()
n += 1 + l + sovGov(uint64(l))
l = m.VetoThreshold.Size()
x/gov: gRPC query Service (#6491) * WIP: adding gRPC for gov * removed passing new store * fixed error * added register query service in module * order of imports changed * order of imports changed * Fix proto file * added get all proposals grpc * added more tests * added doc in tests * added grpc for votes * Added grpc for Deposits * updated protos * added grpc for proposal, vote, deposit, tally * WIP: adding params grpc * added params in gRPC * updated error messages * fixed error check * added more tests * updated tests * added yaml types * review changes and lint issues * updated tests * code cleanup * removed cosmos.gov prefixes * added more checks * added more test checks * added filtered pagination * removed test check * added tests for filtered pagination * Fix Proposals * lint * fixed error in tests * lint issues * Add nil check for params * Added unpacker * removed casttypes * review changes * use suite in grpc query tests * migrated tests to use suite * fix non-determinism * tests migrated to table driven tests * fixed doc typo * revert change * Merge branch 'master' of github.com:cosmos/cosmos-sdk into atheesh/5921-grpc-x-gov * review changes * review changes * review changes * review change * review changes * docs updated * review change * review changes * review changes * review changes * Update x/gov/keeper/keeper_test.go Co-authored-by: sahith-narahari <sahithnarahari@gmail.com> Co-authored-by: Anil Kumar Kammari <anil@vitwit.com> Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-07-16 02:16:23 -07:00
n += 1 + 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 *TextProposal) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGov
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: TextProposal: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: TextProposal: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Title", 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.Title = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Description", 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.Description = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipGov(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthGov
}
if (iNdEx + skippy) < 0 {
return ErrInvalidLengthGov
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *Deposit) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGov
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: Deposit: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: Deposit: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field ProposalId", wireType)
}
m.ProposalId = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGov
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.ProposalId |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Depositor", wireType)
}
Change `address` from bytes to bech32 strings (#7242) * init * Fix bank proto messages * missing conversions * remove casttype for addresses * Fix tests * Fix consaddress * more test fixes * Fix tests * fixed tests * migrate missing proto declarations * format * Fix format * Fix alignment * Fix more tests * Fix ibc merge issue * Fix fmt * Fix more tests * Fix missing address declarations * Fix staking tests * Fix more tests * Fix config * fixed tests * Fix more tests * Update staking grpc tests * Fix merge issue * fixed failing tests in x/distr * fixed sim tests * fixed failing tests * Fix bugs * Add logs * fixed slashing issue * Fix staking grpc tests * Fix all bank tests :) * Fix tests in distribution * Fix more tests in distr * Fix slashing tests * Fix statking tests * Fix evidence tests * Fix gov tests * Fix bug in create vesting account * Fix test * remove fmt * fixed gov tests * fixed x/ibc tests * fixed x/ibc-transfer tests * fixed staking tests * fixed staking tests * fixed test * fixed distribution issue * fix pagination test * fmt * lint * fix build * fix format * revert tally tests * revert tally tests * lint * Fix sim test * revert * revert * fixed tally issue * fix tests * revert * fmt * refactor * remove `GetAddress()` * remove fmt * revert fmt.Striger usage * Fix tests * Fix rest test * disable interfacer lint check * make proto-format * add nolint rule * remove stray println Co-authored-by: aleem1314 <aleem.md789@gmail.com> Co-authored-by: atheesh <atheesh@vitwit.com>
2020-09-25 03:25:37 -07:00
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGov
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
Change `address` from bytes to bech32 strings (#7242) * init * Fix bank proto messages * missing conversions * remove casttype for addresses * Fix tests * Fix consaddress * more test fixes * Fix tests * fixed tests * migrate missing proto declarations * format * Fix format * Fix alignment * Fix more tests * Fix ibc merge issue * Fix fmt * Fix more tests * Fix missing address declarations * Fix staking tests * Fix more tests * Fix config * fixed tests * Fix more tests * Update staking grpc tests * Fix merge issue * fixed failing tests in x/distr * fixed sim tests * fixed failing tests * Fix bugs * Add logs * fixed slashing issue * Fix staking grpc tests * Fix all bank tests :) * Fix tests in distribution * Fix more tests in distr * Fix slashing tests * Fix statking tests * Fix evidence tests * Fix gov tests * Fix bug in create vesting account * Fix test * remove fmt * fixed gov tests * fixed x/ibc tests * fixed x/ibc-transfer tests * fixed staking tests * fixed staking tests * fixed test * fixed distribution issue * fix pagination test * fmt * lint * fix build * fix format * revert tally tests * revert tally tests * lint * Fix sim test * revert * revert * fixed tally issue * fix tests * revert * fmt * refactor * remove `GetAddress()` * remove fmt * revert fmt.Striger usage * Fix tests * Fix rest test * disable interfacer lint check * make proto-format * add nolint rule * remove stray println Co-authored-by: aleem1314 <aleem.md789@gmail.com> Co-authored-by: atheesh <atheesh@vitwit.com>
2020-09-25 03:25:37 -07:00
stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
Change `address` from bytes to bech32 strings (#7242) * init * Fix bank proto messages * missing conversions * remove casttype for addresses * Fix tests * Fix consaddress * more test fixes * Fix tests * fixed tests * migrate missing proto declarations * format * Fix format * Fix alignment * Fix more tests * Fix ibc merge issue * Fix fmt * Fix more tests * Fix missing address declarations * Fix staking tests * Fix more tests * Fix config * fixed tests * Fix more tests * Update staking grpc tests * Fix merge issue * fixed failing tests in x/distr * fixed sim tests * fixed failing tests * Fix bugs * Add logs * fixed slashing issue * Fix staking grpc tests * Fix all bank tests :) * Fix tests in distribution * Fix more tests in distr * Fix slashing tests * Fix statking tests * Fix evidence tests * Fix gov tests * Fix bug in create vesting account * Fix test * remove fmt * fixed gov tests * fixed x/ibc tests * fixed x/ibc-transfer tests * fixed staking tests * fixed staking tests * fixed test * fixed distribution issue * fix pagination test * fmt * lint * fix build * fix format * revert tally tests * revert tally tests * lint * Fix sim test * revert * revert * fixed tally issue * fix tests * revert * fmt * refactor * remove `GetAddress()` * remove fmt * revert fmt.Striger usage * Fix tests * Fix rest test * disable interfacer lint check * make proto-format * add nolint rule * remove stray println Co-authored-by: aleem1314 <aleem.md789@gmail.com> Co-authored-by: atheesh <atheesh@vitwit.com>
2020-09-25 03:25:37 -07:00
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthGov
}
Change `address` from bytes to bech32 strings (#7242) * init * Fix bank proto messages * missing conversions * remove casttype for addresses * Fix tests * Fix consaddress * more test fixes * Fix tests * fixed tests * migrate missing proto declarations * format * Fix format * Fix alignment * Fix more tests * Fix ibc merge issue * Fix fmt * Fix more tests * Fix missing address declarations * Fix staking tests * Fix more tests * Fix config * fixed tests * Fix more tests * Update staking grpc tests * Fix merge issue * fixed failing tests in x/distr * fixed sim tests * fixed failing tests * Fix bugs * Add logs * fixed slashing issue * Fix staking grpc tests * Fix all bank tests :) * Fix tests in distribution * Fix more tests in distr * Fix slashing tests * Fix statking tests * Fix evidence tests * Fix gov tests * Fix bug in create vesting account * Fix test * remove fmt * fixed gov tests * fixed x/ibc tests * fixed x/ibc-transfer tests * fixed staking tests * fixed staking tests * fixed test * fixed distribution issue * fix pagination test * fmt * lint * fix build * fix format * revert tally tests * revert tally tests * lint * Fix sim test * revert * revert * fixed tally issue * fix tests * revert * fmt * refactor * remove `GetAddress()` * remove fmt * revert fmt.Striger usage * Fix tests * Fix rest test * disable interfacer lint check * make proto-format * add nolint rule * remove stray println Co-authored-by: aleem1314 <aleem.md789@gmail.com> Co-authored-by: atheesh <atheesh@vitwit.com>
2020-09-25 03:25:37 -07:00
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthGov
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
Change `address` from bytes to bech32 strings (#7242) * init * Fix bank proto messages * missing conversions * remove casttype for addresses * Fix tests * Fix consaddress * more test fixes * Fix tests * fixed tests * migrate missing proto declarations * format * Fix format * Fix alignment * Fix more tests * Fix ibc merge issue * Fix fmt * Fix more tests * Fix missing address declarations * Fix staking tests * Fix more tests * Fix config * fixed tests * Fix more tests * Update staking grpc tests * Fix merge issue * fixed failing tests in x/distr * fixed sim tests * fixed failing tests * Fix bugs * Add logs * fixed slashing issue * Fix staking grpc tests * Fix all bank tests :) * Fix tests in distribution * Fix more tests in distr * Fix slashing tests * Fix statking tests * Fix evidence tests * Fix gov tests * Fix bug in create vesting account * Fix test * remove fmt * fixed gov tests * fixed x/ibc tests * fixed x/ibc-transfer tests * fixed staking tests * fixed staking tests * fixed test * fixed distribution issue * fix pagination test * fmt * lint * fix build * fix format * revert tally tests * revert tally tests * lint * Fix sim test * revert * revert * fixed tally issue * fix tests * revert * fmt * refactor * remove `GetAddress()` * remove fmt * revert fmt.Striger usage * Fix tests * Fix rest test * disable interfacer lint check * make proto-format * add nolint rule * remove stray println Co-authored-by: aleem1314 <aleem.md789@gmail.com> Co-authored-by: atheesh <atheesh@vitwit.com>
2020-09-25 03:25:37 -07:00
m.Depositor = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 3:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGov
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthGov
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthGov
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Amount = append(m.Amount, types.Coin{})
if err := m.Amount[len(m.Amount)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipGov(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthGov
}
if (iNdEx + skippy) < 0 {
return ErrInvalidLengthGov
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *Proposal) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGov
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: Proposal: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: Proposal: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field ProposalId", wireType)
}
m.ProposalId = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGov
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.ProposalId |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Content", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGov
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthGov
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthGov
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.Content == nil {
m.Content = &types1.Any{}
}
if err := m.Content.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
case 3:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType)
}
m.Status = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGov
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.Status |= ProposalStatus(b&0x7F) << shift
if b < 0x80 {
break
}
}
case 4:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field FinalTallyResult", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGov
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthGov
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthGov
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
if err := m.FinalTallyResult.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
case 5:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field SubmitTime", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGov
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthGov
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthGov
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.SubmitTime, dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
case 6:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field DepositEndTime", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGov
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthGov
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthGov
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.DepositEndTime, dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
case 7:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field TotalDeposit", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGov
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthGov
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthGov
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.TotalDeposit = append(m.TotalDeposit, types.Coin{})
if err := m.TotalDeposit[len(m.TotalDeposit)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
case 8:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field VotingStartTime", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGov
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthGov
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthGov
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.VotingStartTime, dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
case 9:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field VotingEndTime", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGov
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthGov
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthGov
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.VotingEndTime, dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipGov(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthGov
}
if (iNdEx + skippy) < 0 {
return ErrInvalidLengthGov
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *TallyResult) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGov
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: TallyResult: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: TallyResult: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Yes", wireType)
}
2020-03-02 06:14:17 -08:00
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGov
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
2020-03-02 06:14:17 -08:00
stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
2020-03-02 06:14:17 -08:00
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthGov
}
2020-03-02 06:14:17 -08:00
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthGov
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
if err := m.Yes.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Abstain", wireType)
}
2020-03-02 06:14:17 -08:00
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGov
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
2020-03-02 06:14:17 -08:00
stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
2020-03-02 06:14:17 -08:00
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthGov
}
2020-03-02 06:14:17 -08:00
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthGov
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
if err := m.Abstain.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
case 3:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field No", wireType)
}
2020-03-02 06:14:17 -08:00
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGov
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
2020-03-02 06:14:17 -08:00
stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
2020-03-02 06:14:17 -08:00
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthGov
}
2020-03-02 06:14:17 -08:00
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthGov
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
if err := m.No.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
case 4:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field NoWithVeto", wireType)
}
2020-03-02 06:14:17 -08:00
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGov
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
2020-03-02 06:14:17 -08:00
stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
2020-03-02 06:14:17 -08:00
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthGov
}
2020-03-02 06:14:17 -08:00
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthGov
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
if err := m.NoWithVeto.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipGov(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthGov
}
if (iNdEx + skippy) < 0 {
return ErrInvalidLengthGov
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *Vote) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGov
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: Vote: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: Vote: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field ProposalId", wireType)
}
m.ProposalId = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGov
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.ProposalId |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Voter", wireType)
}
Change `address` from bytes to bech32 strings (#7242) * init * Fix bank proto messages * missing conversions * remove casttype for addresses * Fix tests * Fix consaddress * more test fixes * Fix tests * fixed tests * migrate missing proto declarations * format * Fix format * Fix alignment * Fix more tests * Fix ibc merge issue * Fix fmt * Fix more tests * Fix missing address declarations * Fix staking tests * Fix more tests * Fix config * fixed tests * Fix more tests * Update staking grpc tests * Fix merge issue * fixed failing tests in x/distr * fixed sim tests * fixed failing tests * Fix bugs * Add logs * fixed slashing issue * Fix staking grpc tests * Fix all bank tests :) * Fix tests in distribution * Fix more tests in distr * Fix slashing tests * Fix statking tests * Fix evidence tests * Fix gov tests * Fix bug in create vesting account * Fix test * remove fmt * fixed gov tests * fixed x/ibc tests * fixed x/ibc-transfer tests * fixed staking tests * fixed staking tests * fixed test * fixed distribution issue * fix pagination test * fmt * lint * fix build * fix format * revert tally tests * revert tally tests * lint * Fix sim test * revert * revert * fixed tally issue * fix tests * revert * fmt * refactor * remove `GetAddress()` * remove fmt * revert fmt.Striger usage * Fix tests * Fix rest test * disable interfacer lint check * make proto-format * add nolint rule * remove stray println Co-authored-by: aleem1314 <aleem.md789@gmail.com> Co-authored-by: atheesh <atheesh@vitwit.com>
2020-09-25 03:25:37 -07:00
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGov
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
Change `address` from bytes to bech32 strings (#7242) * init * Fix bank proto messages * missing conversions * remove casttype for addresses * Fix tests * Fix consaddress * more test fixes * Fix tests * fixed tests * migrate missing proto declarations * format * Fix format * Fix alignment * Fix more tests * Fix ibc merge issue * Fix fmt * Fix more tests * Fix missing address declarations * Fix staking tests * Fix more tests * Fix config * fixed tests * Fix more tests * Update staking grpc tests * Fix merge issue * fixed failing tests in x/distr * fixed sim tests * fixed failing tests * Fix bugs * Add logs * fixed slashing issue * Fix staking grpc tests * Fix all bank tests :) * Fix tests in distribution * Fix more tests in distr * Fix slashing tests * Fix statking tests * Fix evidence tests * Fix gov tests * Fix bug in create vesting account * Fix test * remove fmt * fixed gov tests * fixed x/ibc tests * fixed x/ibc-transfer tests * fixed staking tests * fixed staking tests * fixed test * fixed distribution issue * fix pagination test * fmt * lint * fix build * fix format * revert tally tests * revert tally tests * lint * Fix sim test * revert * revert * fixed tally issue * fix tests * revert * fmt * refactor * remove `GetAddress()` * remove fmt * revert fmt.Striger usage * Fix tests * Fix rest test * disable interfacer lint check * make proto-format * add nolint rule * remove stray println Co-authored-by: aleem1314 <aleem.md789@gmail.com> Co-authored-by: atheesh <atheesh@vitwit.com>
2020-09-25 03:25:37 -07:00
stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
Change `address` from bytes to bech32 strings (#7242) * init * Fix bank proto messages * missing conversions * remove casttype for addresses * Fix tests * Fix consaddress * more test fixes * Fix tests * fixed tests * migrate missing proto declarations * format * Fix format * Fix alignment * Fix more tests * Fix ibc merge issue * Fix fmt * Fix more tests * Fix missing address declarations * Fix staking tests * Fix more tests * Fix config * fixed tests * Fix more tests * Update staking grpc tests * Fix merge issue * fixed failing tests in x/distr * fixed sim tests * fixed failing tests * Fix bugs * Add logs * fixed slashing issue * Fix staking grpc tests * Fix all bank tests :) * Fix tests in distribution * Fix more tests in distr * Fix slashing tests * Fix statking tests * Fix evidence tests * Fix gov tests * Fix bug in create vesting account * Fix test * remove fmt * fixed gov tests * fixed x/ibc tests * fixed x/ibc-transfer tests * fixed staking tests * fixed staking tests * fixed test * fixed distribution issue * fix pagination test * fmt * lint * fix build * fix format * revert tally tests * revert tally tests * lint * Fix sim test * revert * revert * fixed tally issue * fix tests * revert * fmt * refactor * remove `GetAddress()` * remove fmt * revert fmt.Striger usage * Fix tests * Fix rest test * disable interfacer lint check * make proto-format * add nolint rule * remove stray println Co-authored-by: aleem1314 <aleem.md789@gmail.com> Co-authored-by: atheesh <atheesh@vitwit.com>
2020-09-25 03:25:37 -07:00
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthGov
}
Change `address` from bytes to bech32 strings (#7242) * init * Fix bank proto messages * missing conversions * remove casttype for addresses * Fix tests * Fix consaddress * more test fixes * Fix tests * fixed tests * migrate missing proto declarations * format * Fix format * Fix alignment * Fix more tests * Fix ibc merge issue * Fix fmt * Fix more tests * Fix missing address declarations * Fix staking tests * Fix more tests * Fix config * fixed tests * Fix more tests * Update staking grpc tests * Fix merge issue * fixed failing tests in x/distr * fixed sim tests * fixed failing tests * Fix bugs * Add logs * fixed slashing issue * Fix staking grpc tests * Fix all bank tests :) * Fix tests in distribution * Fix more tests in distr * Fix slashing tests * Fix statking tests * Fix evidence tests * Fix gov tests * Fix bug in create vesting account * Fix test * remove fmt * fixed gov tests * fixed x/ibc tests * fixed x/ibc-transfer tests * fixed staking tests * fixed staking tests * fixed test * fixed distribution issue * fix pagination test * fmt * lint * fix build * fix format * revert tally tests * revert tally tests * lint * Fix sim test * revert * revert * fixed tally issue * fix tests * revert * fmt * refactor * remove `GetAddress()` * remove fmt * revert fmt.Striger usage * Fix tests * Fix rest test * disable interfacer lint check * make proto-format * add nolint rule * remove stray println Co-authored-by: aleem1314 <aleem.md789@gmail.com> Co-authored-by: atheesh <atheesh@vitwit.com>
2020-09-25 03:25:37 -07:00
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthGov
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
Change `address` from bytes to bech32 strings (#7242) * init * Fix bank proto messages * missing conversions * remove casttype for addresses * Fix tests * Fix consaddress * more test fixes * Fix tests * fixed tests * migrate missing proto declarations * format * Fix format * Fix alignment * Fix more tests * Fix ibc merge issue * Fix fmt * Fix more tests * Fix missing address declarations * Fix staking tests * Fix more tests * Fix config * fixed tests * Fix more tests * Update staking grpc tests * Fix merge issue * fixed failing tests in x/distr * fixed sim tests * fixed failing tests * Fix bugs * Add logs * fixed slashing issue * Fix staking grpc tests * Fix all bank tests :) * Fix tests in distribution * Fix more tests in distr * Fix slashing tests * Fix statking tests * Fix evidence tests * Fix gov tests * Fix bug in create vesting account * Fix test * remove fmt * fixed gov tests * fixed x/ibc tests * fixed x/ibc-transfer tests * fixed staking tests * fixed staking tests * fixed test * fixed distribution issue * fix pagination test * fmt * lint * fix build * fix format * revert tally tests * revert tally tests * lint * Fix sim test * revert * revert * fixed tally issue * fix tests * revert * fmt * refactor * remove `GetAddress()` * remove fmt * revert fmt.Striger usage * Fix tests * Fix rest test * disable interfacer lint check * make proto-format * add nolint rule * remove stray println Co-authored-by: aleem1314 <aleem.md789@gmail.com> Co-authored-by: atheesh <atheesh@vitwit.com>
2020-09-25 03:25:37 -07:00
m.Voter = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 3:
2020-10-27 02:23:15 -07:00
if wireType == 0 {
var v VoteOption
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGov
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
v |= VoteOption(b&0x7F) << shift
if b < 0x80 {
break
}
}
m.Options = append(m.Options, v)
} else if wireType == 2 {
var packedLen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGov
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
packedLen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if packedLen < 0 {
return ErrInvalidLengthGov
}
postIndex := iNdEx + packedLen
if postIndex < 0 {
return ErrInvalidLengthGov
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
2020-10-27 02:23:15 -07:00
var elementCount int
if elementCount != 0 && len(m.Options) == 0 {
m.Options = make([]VoteOption, 0, elementCount)
}
for iNdEx < postIndex {
var v VoteOption
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGov
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
v |= VoteOption(b&0x7F) << shift
if b < 0x80 {
break
}
}
m.Options = append(m.Options, v)
}
} else {
return fmt.Errorf("proto: wrong wireType = %d for field Options", wireType)
}
default:
iNdEx = preIndex
skippy, err := skipGov(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthGov
}
if (iNdEx + skippy) < 0 {
return ErrInvalidLengthGov
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
x/gov: gRPC query Service (#6491) * WIP: adding gRPC for gov * removed passing new store * fixed error * added register query service in module * order of imports changed * order of imports changed * Fix proto file * added get all proposals grpc * added more tests * added doc in tests * added grpc for votes * Added grpc for Deposits * updated protos * added grpc for proposal, vote, deposit, tally * WIP: adding params grpc * added params in gRPC * updated error messages * fixed error check * added more tests * updated tests * added yaml types * review changes and lint issues * updated tests * code cleanup * removed cosmos.gov prefixes * added more checks * added more test checks * added filtered pagination * removed test check * added tests for filtered pagination * Fix Proposals * lint * fixed error in tests * lint issues * Add nil check for params * Added unpacker * removed casttypes * review changes * use suite in grpc query tests * migrated tests to use suite * fix non-determinism * tests migrated to table driven tests * fixed doc typo * revert change * Merge branch 'master' of github.com:cosmos/cosmos-sdk into atheesh/5921-grpc-x-gov * review changes * review changes * review changes * review change * review changes * docs updated * review change * review changes * review changes * review changes * Update x/gov/keeper/keeper_test.go Co-authored-by: sahith-narahari <sahithnarahari@gmail.com> Co-authored-by: Anil Kumar Kammari <anil@vitwit.com> Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-07-16 02:16:23 -07:00
func (m *DepositParams) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGov
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: DepositParams: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: DepositParams: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field MinDeposit", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGov
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthGov
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthGov
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.MinDeposit = append(m.MinDeposit, types.Coin{})
x/gov: gRPC query Service (#6491) * WIP: adding gRPC for gov * removed passing new store * fixed error * added register query service in module * order of imports changed * order of imports changed * Fix proto file * added get all proposals grpc * added more tests * added doc in tests * added grpc for votes * Added grpc for Deposits * updated protos * added grpc for proposal, vote, deposit, tally * WIP: adding params grpc * added params in gRPC * updated error messages * fixed error check * added more tests * updated tests * added yaml types * review changes and lint issues * updated tests * code cleanup * removed cosmos.gov prefixes * added more checks * added more test checks * added filtered pagination * removed test check * added tests for filtered pagination * Fix Proposals * lint * fixed error in tests * lint issues * Add nil check for params * Added unpacker * removed casttypes * review changes * use suite in grpc query tests * migrated tests to use suite * fix non-determinism * tests migrated to table driven tests * fixed doc typo * revert change * Merge branch 'master' of github.com:cosmos/cosmos-sdk into atheesh/5921-grpc-x-gov * review changes * review changes * review changes * review change * review changes * docs updated * review change * review changes * review changes * review changes * Update x/gov/keeper/keeper_test.go Co-authored-by: sahith-narahari <sahithnarahari@gmail.com> Co-authored-by: Anil Kumar Kammari <anil@vitwit.com> Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-07-16 02:16:23 -07:00
if err := m.MinDeposit[len(m.MinDeposit)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field MaxDepositPeriod", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGov
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthGov
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthGov
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
if err := github_com_gogo_protobuf_types.StdDurationUnmarshal(&m.MaxDepositPeriod, dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipGov(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthGov
}
if (iNdEx + skippy) < 0 {
return ErrInvalidLengthGov
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *VotingParams) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGov
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: VotingParams: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: VotingParams: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field VotingPeriod", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGov
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthGov
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthGov
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
if err := github_com_gogo_protobuf_types.StdDurationUnmarshal(&m.VotingPeriod, dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipGov(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthGov
}
if (iNdEx + skippy) < 0 {
return ErrInvalidLengthGov
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *TallyParams) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGov
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: TallyParams: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: TallyParams: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Quorum", wireType)
}
var byteLen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGov
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
byteLen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if byteLen < 0 {
return ErrInvalidLengthGov
}
postIndex := iNdEx + byteLen
if postIndex < 0 {
return ErrInvalidLengthGov
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
if err := m.Quorum.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Threshold", wireType)
}
var byteLen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGov
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
byteLen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if byteLen < 0 {
return ErrInvalidLengthGov
}
postIndex := iNdEx + byteLen
if postIndex < 0 {
return ErrInvalidLengthGov
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
if err := m.Threshold.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
case 3:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field VetoThreshold", wireType)
x/gov: gRPC query Service (#6491) * WIP: adding gRPC for gov * removed passing new store * fixed error * added register query service in module * order of imports changed * order of imports changed * Fix proto file * added get all proposals grpc * added more tests * added doc in tests * added grpc for votes * Added grpc for Deposits * updated protos * added grpc for proposal, vote, deposit, tally * WIP: adding params grpc * added params in gRPC * updated error messages * fixed error check * added more tests * updated tests * added yaml types * review changes and lint issues * updated tests * code cleanup * removed cosmos.gov prefixes * added more checks * added more test checks * added filtered pagination * removed test check * added tests for filtered pagination * Fix Proposals * lint * fixed error in tests * lint issues * Add nil check for params * Added unpacker * removed casttypes * review changes * use suite in grpc query tests * migrated tests to use suite * fix non-determinism * tests migrated to table driven tests * fixed doc typo * revert change * Merge branch 'master' of github.com:cosmos/cosmos-sdk into atheesh/5921-grpc-x-gov * review changes * review changes * review changes * review change * review changes * docs updated * review change * review changes * review changes * review changes * Update x/gov/keeper/keeper_test.go Co-authored-by: sahith-narahari <sahithnarahari@gmail.com> Co-authored-by: Anil Kumar Kammari <anil@vitwit.com> Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-07-16 02:16:23 -07:00
}
var byteLen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGov
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
byteLen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if byteLen < 0 {
return ErrInvalidLengthGov
}
postIndex := iNdEx + byteLen
if postIndex < 0 {
return ErrInvalidLengthGov
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
if err := m.VetoThreshold.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
x/gov: gRPC query Service (#6491) * WIP: adding gRPC for gov * removed passing new store * fixed error * added register query service in module * order of imports changed * order of imports changed * Fix proto file * added get all proposals grpc * added more tests * added doc in tests * added grpc for votes * Added grpc for Deposits * updated protos * added grpc for proposal, vote, deposit, tally * WIP: adding params grpc * added params in gRPC * updated error messages * fixed error check * added more tests * updated tests * added yaml types * review changes and lint issues * updated tests * code cleanup * removed cosmos.gov prefixes * added more checks * added more test checks * added filtered pagination * removed test check * added tests for filtered pagination * Fix Proposals * lint * fixed error in tests * lint issues * Add nil check for params * Added unpacker * removed casttypes * review changes * use suite in grpc query tests * migrated tests to use suite * fix non-determinism * tests migrated to table driven tests * fixed doc typo * revert change * Merge branch 'master' of github.com:cosmos/cosmos-sdk into atheesh/5921-grpc-x-gov * review changes * review changes * review changes * review change * review changes * docs updated * review change * review changes * review changes * review changes * Update x/gov/keeper/keeper_test.go Co-authored-by: sahith-narahari <sahithnarahari@gmail.com> Co-authored-by: Anil Kumar Kammari <anil@vitwit.com> Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-07-16 02:16:23 -07:00
return err
}
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipGov(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthGov
}
if (iNdEx + skippy) < 0 {
return ErrInvalidLengthGov
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func skipGov(dAtA []byte) (n int, err error) {
l := len(dAtA)
iNdEx := 0
depth := 0
for iNdEx < l {
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflowGov
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
wireType := int(wire & 0x7)
switch wireType {
case 0:
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflowGov
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
iNdEx++
if dAtA[iNdEx-1] < 0x80 {
break
}
}
case 1:
iNdEx += 8
case 2:
var length int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflowGov
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
length |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if length < 0 {
return 0, ErrInvalidLengthGov
}
iNdEx += length
case 3:
depth++
case 4:
if depth == 0 {
return 0, ErrUnexpectedEndOfGroupGov
}
depth--
case 5:
iNdEx += 4
default:
return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
}
if iNdEx < 0 {
return 0, ErrInvalidLengthGov
}
if depth == 0 {
return iNdEx, nil
}
}
return 0, io.ErrUnexpectedEOF
}
var (
ErrInvalidLengthGov = fmt.Errorf("proto: negative length found during unmarshaling")
ErrIntOverflowGov = fmt.Errorf("proto: integer overflow")
ErrUnexpectedEndOfGroupGov = fmt.Errorf("proto: unexpected end of group")
)