github.com/Finschia/finschia-sdk@v0.49.1/x/gov/types/tx.pb.go (about) 1 // Code generated by protoc-gen-gogo. DO NOT EDIT. 2 // source: cosmos/gov/v1beta1/tx.proto 3 4 package types 5 6 import ( 7 context "context" 8 fmt "fmt" 9 types "github.com/Finschia/finschia-sdk/codec/types" 10 github_com_Finschia_finschia_sdk_types "github.com/Finschia/finschia-sdk/types" 11 types1 "github.com/Finschia/finschia-sdk/types" 12 _ "github.com/gogo/protobuf/gogoproto" 13 grpc1 "github.com/gogo/protobuf/grpc" 14 proto "github.com/gogo/protobuf/proto" 15 _ "github.com/regen-network/cosmos-proto" 16 grpc "google.golang.org/grpc" 17 codes "google.golang.org/grpc/codes" 18 status "google.golang.org/grpc/status" 19 io "io" 20 math "math" 21 math_bits "math/bits" 22 ) 23 24 // Reference imports to suppress errors if they are not otherwise used. 25 var _ = proto.Marshal 26 var _ = fmt.Errorf 27 var _ = math.Inf 28 29 // This is a compile-time assertion to ensure that this generated file 30 // is compatible with the proto package it is being compiled against. 31 // A compilation error at this line likely means your copy of the 32 // proto package needs to be updated. 33 const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package 34 35 // MsgSubmitProposal defines an sdk.Msg type that supports submitting arbitrary 36 // proposal Content. 37 type MsgSubmitProposal struct { 38 Content *types.Any `protobuf:"bytes,1,opt,name=content,proto3" json:"content,omitempty"` 39 InitialDeposit github_com_Finschia_finschia_sdk_types.Coins `protobuf:"bytes,2,rep,name=initial_deposit,json=initialDeposit,proto3,castrepeated=github.com/Finschia/finschia-sdk/types.Coins" json:"initial_deposit" yaml:"initial_deposit"` 40 Proposer string `protobuf:"bytes,3,opt,name=proposer,proto3" json:"proposer,omitempty"` 41 } 42 43 func (m *MsgSubmitProposal) Reset() { *m = MsgSubmitProposal{} } 44 func (*MsgSubmitProposal) ProtoMessage() {} 45 func (*MsgSubmitProposal) Descriptor() ([]byte, []int) { 46 return fileDescriptor_3c053992595e3dce, []int{0} 47 } 48 func (m *MsgSubmitProposal) XXX_Unmarshal(b []byte) error { 49 return m.Unmarshal(b) 50 } 51 func (m *MsgSubmitProposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 52 if deterministic { 53 return xxx_messageInfo_MsgSubmitProposal.Marshal(b, m, deterministic) 54 } else { 55 b = b[:cap(b)] 56 n, err := m.MarshalToSizedBuffer(b) 57 if err != nil { 58 return nil, err 59 } 60 return b[:n], nil 61 } 62 } 63 func (m *MsgSubmitProposal) XXX_Merge(src proto.Message) { 64 xxx_messageInfo_MsgSubmitProposal.Merge(m, src) 65 } 66 func (m *MsgSubmitProposal) XXX_Size() int { 67 return m.Size() 68 } 69 func (m *MsgSubmitProposal) XXX_DiscardUnknown() { 70 xxx_messageInfo_MsgSubmitProposal.DiscardUnknown(m) 71 } 72 73 var xxx_messageInfo_MsgSubmitProposal proto.InternalMessageInfo 74 75 // MsgSubmitProposalResponse defines the Msg/SubmitProposal response type. 76 type MsgSubmitProposalResponse struct { 77 ProposalId uint64 `protobuf:"varint,1,opt,name=proposal_id,json=proposalId,proto3" json:"proposal_id" yaml:"proposal_id"` 78 } 79 80 func (m *MsgSubmitProposalResponse) Reset() { *m = MsgSubmitProposalResponse{} } 81 func (m *MsgSubmitProposalResponse) String() string { return proto.CompactTextString(m) } 82 func (*MsgSubmitProposalResponse) ProtoMessage() {} 83 func (*MsgSubmitProposalResponse) Descriptor() ([]byte, []int) { 84 return fileDescriptor_3c053992595e3dce, []int{1} 85 } 86 func (m *MsgSubmitProposalResponse) XXX_Unmarshal(b []byte) error { 87 return m.Unmarshal(b) 88 } 89 func (m *MsgSubmitProposalResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 90 if deterministic { 91 return xxx_messageInfo_MsgSubmitProposalResponse.Marshal(b, m, deterministic) 92 } else { 93 b = b[:cap(b)] 94 n, err := m.MarshalToSizedBuffer(b) 95 if err != nil { 96 return nil, err 97 } 98 return b[:n], nil 99 } 100 } 101 func (m *MsgSubmitProposalResponse) XXX_Merge(src proto.Message) { 102 xxx_messageInfo_MsgSubmitProposalResponse.Merge(m, src) 103 } 104 func (m *MsgSubmitProposalResponse) XXX_Size() int { 105 return m.Size() 106 } 107 func (m *MsgSubmitProposalResponse) XXX_DiscardUnknown() { 108 xxx_messageInfo_MsgSubmitProposalResponse.DiscardUnknown(m) 109 } 110 111 var xxx_messageInfo_MsgSubmitProposalResponse proto.InternalMessageInfo 112 113 func (m *MsgSubmitProposalResponse) GetProposalId() uint64 { 114 if m != nil { 115 return m.ProposalId 116 } 117 return 0 118 } 119 120 // MsgVote defines a message to cast a vote. 121 type MsgVote struct { 122 ProposalId uint64 `protobuf:"varint,1,opt,name=proposal_id,json=proposalId,proto3" json:"proposal_id" yaml:"proposal_id"` 123 Voter string `protobuf:"bytes,2,opt,name=voter,proto3" json:"voter,omitempty"` 124 Option VoteOption `protobuf:"varint,3,opt,name=option,proto3,enum=cosmos.gov.v1beta1.VoteOption" json:"option,omitempty"` 125 } 126 127 func (m *MsgVote) Reset() { *m = MsgVote{} } 128 func (*MsgVote) ProtoMessage() {} 129 func (*MsgVote) Descriptor() ([]byte, []int) { 130 return fileDescriptor_3c053992595e3dce, []int{2} 131 } 132 func (m *MsgVote) XXX_Unmarshal(b []byte) error { 133 return m.Unmarshal(b) 134 } 135 func (m *MsgVote) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 136 if deterministic { 137 return xxx_messageInfo_MsgVote.Marshal(b, m, deterministic) 138 } else { 139 b = b[:cap(b)] 140 n, err := m.MarshalToSizedBuffer(b) 141 if err != nil { 142 return nil, err 143 } 144 return b[:n], nil 145 } 146 } 147 func (m *MsgVote) XXX_Merge(src proto.Message) { 148 xxx_messageInfo_MsgVote.Merge(m, src) 149 } 150 func (m *MsgVote) XXX_Size() int { 151 return m.Size() 152 } 153 func (m *MsgVote) XXX_DiscardUnknown() { 154 xxx_messageInfo_MsgVote.DiscardUnknown(m) 155 } 156 157 var xxx_messageInfo_MsgVote proto.InternalMessageInfo 158 159 // MsgVoteResponse defines the Msg/Vote response type. 160 type MsgVoteResponse struct { 161 } 162 163 func (m *MsgVoteResponse) Reset() { *m = MsgVoteResponse{} } 164 func (m *MsgVoteResponse) String() string { return proto.CompactTextString(m) } 165 func (*MsgVoteResponse) ProtoMessage() {} 166 func (*MsgVoteResponse) Descriptor() ([]byte, []int) { 167 return fileDescriptor_3c053992595e3dce, []int{3} 168 } 169 func (m *MsgVoteResponse) XXX_Unmarshal(b []byte) error { 170 return m.Unmarshal(b) 171 } 172 func (m *MsgVoteResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 173 if deterministic { 174 return xxx_messageInfo_MsgVoteResponse.Marshal(b, m, deterministic) 175 } else { 176 b = b[:cap(b)] 177 n, err := m.MarshalToSizedBuffer(b) 178 if err != nil { 179 return nil, err 180 } 181 return b[:n], nil 182 } 183 } 184 func (m *MsgVoteResponse) XXX_Merge(src proto.Message) { 185 xxx_messageInfo_MsgVoteResponse.Merge(m, src) 186 } 187 func (m *MsgVoteResponse) XXX_Size() int { 188 return m.Size() 189 } 190 func (m *MsgVoteResponse) XXX_DiscardUnknown() { 191 xxx_messageInfo_MsgVoteResponse.DiscardUnknown(m) 192 } 193 194 var xxx_messageInfo_MsgVoteResponse proto.InternalMessageInfo 195 196 // MsgVoteWeighted defines a message to cast a vote. 197 // 198 // Since: cosmos-sdk 0.43 199 type MsgVoteWeighted struct { 200 ProposalId uint64 `protobuf:"varint,1,opt,name=proposal_id,json=proposalId,proto3" json:"proposal_id,omitempty" yaml:"proposal_id"` 201 Voter string `protobuf:"bytes,2,opt,name=voter,proto3" json:"voter,omitempty"` 202 Options []WeightedVoteOption `protobuf:"bytes,3,rep,name=options,proto3" json:"options"` 203 } 204 205 func (m *MsgVoteWeighted) Reset() { *m = MsgVoteWeighted{} } 206 func (*MsgVoteWeighted) ProtoMessage() {} 207 func (*MsgVoteWeighted) Descriptor() ([]byte, []int) { 208 return fileDescriptor_3c053992595e3dce, []int{4} 209 } 210 func (m *MsgVoteWeighted) XXX_Unmarshal(b []byte) error { 211 return m.Unmarshal(b) 212 } 213 func (m *MsgVoteWeighted) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 214 if deterministic { 215 return xxx_messageInfo_MsgVoteWeighted.Marshal(b, m, deterministic) 216 } else { 217 b = b[:cap(b)] 218 n, err := m.MarshalToSizedBuffer(b) 219 if err != nil { 220 return nil, err 221 } 222 return b[:n], nil 223 } 224 } 225 func (m *MsgVoteWeighted) XXX_Merge(src proto.Message) { 226 xxx_messageInfo_MsgVoteWeighted.Merge(m, src) 227 } 228 func (m *MsgVoteWeighted) XXX_Size() int { 229 return m.Size() 230 } 231 func (m *MsgVoteWeighted) XXX_DiscardUnknown() { 232 xxx_messageInfo_MsgVoteWeighted.DiscardUnknown(m) 233 } 234 235 var xxx_messageInfo_MsgVoteWeighted proto.InternalMessageInfo 236 237 // MsgVoteWeightedResponse defines the Msg/VoteWeighted response type. 238 // 239 // Since: cosmos-sdk 0.43 240 type MsgVoteWeightedResponse struct { 241 } 242 243 func (m *MsgVoteWeightedResponse) Reset() { *m = MsgVoteWeightedResponse{} } 244 func (m *MsgVoteWeightedResponse) String() string { return proto.CompactTextString(m) } 245 func (*MsgVoteWeightedResponse) ProtoMessage() {} 246 func (*MsgVoteWeightedResponse) Descriptor() ([]byte, []int) { 247 return fileDescriptor_3c053992595e3dce, []int{5} 248 } 249 func (m *MsgVoteWeightedResponse) XXX_Unmarshal(b []byte) error { 250 return m.Unmarshal(b) 251 } 252 func (m *MsgVoteWeightedResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 253 if deterministic { 254 return xxx_messageInfo_MsgVoteWeightedResponse.Marshal(b, m, deterministic) 255 } else { 256 b = b[:cap(b)] 257 n, err := m.MarshalToSizedBuffer(b) 258 if err != nil { 259 return nil, err 260 } 261 return b[:n], nil 262 } 263 } 264 func (m *MsgVoteWeightedResponse) XXX_Merge(src proto.Message) { 265 xxx_messageInfo_MsgVoteWeightedResponse.Merge(m, src) 266 } 267 func (m *MsgVoteWeightedResponse) XXX_Size() int { 268 return m.Size() 269 } 270 func (m *MsgVoteWeightedResponse) XXX_DiscardUnknown() { 271 xxx_messageInfo_MsgVoteWeightedResponse.DiscardUnknown(m) 272 } 273 274 var xxx_messageInfo_MsgVoteWeightedResponse proto.InternalMessageInfo 275 276 // MsgDeposit defines a message to submit a deposit to an existing proposal. 277 type MsgDeposit struct { 278 ProposalId uint64 `protobuf:"varint,1,opt,name=proposal_id,json=proposalId,proto3" json:"proposal_id" yaml:"proposal_id"` 279 Depositor string `protobuf:"bytes,2,opt,name=depositor,proto3" json:"depositor,omitempty"` 280 Amount github_com_Finschia_finschia_sdk_types.Coins `protobuf:"bytes,3,rep,name=amount,proto3,castrepeated=github.com/Finschia/finschia-sdk/types.Coins" json:"amount"` 281 } 282 283 func (m *MsgDeposit) Reset() { *m = MsgDeposit{} } 284 func (*MsgDeposit) ProtoMessage() {} 285 func (*MsgDeposit) Descriptor() ([]byte, []int) { 286 return fileDescriptor_3c053992595e3dce, []int{6} 287 } 288 func (m *MsgDeposit) XXX_Unmarshal(b []byte) error { 289 return m.Unmarshal(b) 290 } 291 func (m *MsgDeposit) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 292 if deterministic { 293 return xxx_messageInfo_MsgDeposit.Marshal(b, m, deterministic) 294 } else { 295 b = b[:cap(b)] 296 n, err := m.MarshalToSizedBuffer(b) 297 if err != nil { 298 return nil, err 299 } 300 return b[:n], nil 301 } 302 } 303 func (m *MsgDeposit) XXX_Merge(src proto.Message) { 304 xxx_messageInfo_MsgDeposit.Merge(m, src) 305 } 306 func (m *MsgDeposit) XXX_Size() int { 307 return m.Size() 308 } 309 func (m *MsgDeposit) XXX_DiscardUnknown() { 310 xxx_messageInfo_MsgDeposit.DiscardUnknown(m) 311 } 312 313 var xxx_messageInfo_MsgDeposit proto.InternalMessageInfo 314 315 // MsgDepositResponse defines the Msg/Deposit response type. 316 type MsgDepositResponse struct { 317 } 318 319 func (m *MsgDepositResponse) Reset() { *m = MsgDepositResponse{} } 320 func (m *MsgDepositResponse) String() string { return proto.CompactTextString(m) } 321 func (*MsgDepositResponse) ProtoMessage() {} 322 func (*MsgDepositResponse) Descriptor() ([]byte, []int) { 323 return fileDescriptor_3c053992595e3dce, []int{7} 324 } 325 func (m *MsgDepositResponse) XXX_Unmarshal(b []byte) error { 326 return m.Unmarshal(b) 327 } 328 func (m *MsgDepositResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 329 if deterministic { 330 return xxx_messageInfo_MsgDepositResponse.Marshal(b, m, deterministic) 331 } else { 332 b = b[:cap(b)] 333 n, err := m.MarshalToSizedBuffer(b) 334 if err != nil { 335 return nil, err 336 } 337 return b[:n], nil 338 } 339 } 340 func (m *MsgDepositResponse) XXX_Merge(src proto.Message) { 341 xxx_messageInfo_MsgDepositResponse.Merge(m, src) 342 } 343 func (m *MsgDepositResponse) XXX_Size() int { 344 return m.Size() 345 } 346 func (m *MsgDepositResponse) XXX_DiscardUnknown() { 347 xxx_messageInfo_MsgDepositResponse.DiscardUnknown(m) 348 } 349 350 var xxx_messageInfo_MsgDepositResponse proto.InternalMessageInfo 351 352 func init() { 353 proto.RegisterType((*MsgSubmitProposal)(nil), "cosmos.gov.v1beta1.MsgSubmitProposal") 354 proto.RegisterType((*MsgSubmitProposalResponse)(nil), "cosmos.gov.v1beta1.MsgSubmitProposalResponse") 355 proto.RegisterType((*MsgVote)(nil), "cosmos.gov.v1beta1.MsgVote") 356 proto.RegisterType((*MsgVoteResponse)(nil), "cosmos.gov.v1beta1.MsgVoteResponse") 357 proto.RegisterType((*MsgVoteWeighted)(nil), "cosmos.gov.v1beta1.MsgVoteWeighted") 358 proto.RegisterType((*MsgVoteWeightedResponse)(nil), "cosmos.gov.v1beta1.MsgVoteWeightedResponse") 359 proto.RegisterType((*MsgDeposit)(nil), "cosmos.gov.v1beta1.MsgDeposit") 360 proto.RegisterType((*MsgDepositResponse)(nil), "cosmos.gov.v1beta1.MsgDepositResponse") 361 } 362 363 func init() { proto.RegisterFile("cosmos/gov/v1beta1/tx.proto", fileDescriptor_3c053992595e3dce) } 364 365 var fileDescriptor_3c053992595e3dce = []byte{ 366 // 668 bytes of a gzipped FileDescriptorProto 367 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x55, 0xbf, 0x6f, 0xd3, 0x4e, 368 0x14, 0xb7, 0x93, 0x7e, 0x9b, 0x6f, 0x2f, 0xa8, 0xa5, 0xa7, 0xa8, 0x24, 0x6e, 0x65, 0x47, 0x46, 369 0xad, 0x2a, 0x41, 0x6d, 0x35, 0x20, 0x90, 0xca, 0x44, 0x8a, 0x22, 0x18, 0xc2, 0x0f, 0x23, 0x81, 370 0xc4, 0x52, 0x9c, 0xc4, 0xbd, 0x9e, 0x48, 0x7c, 0x56, 0xee, 0x12, 0x35, 0x1b, 0x23, 0x23, 0x82, 371 0x85, 0xb1, 0x33, 0x1b, 0x12, 0x13, 0x7f, 0x41, 0xc5, 0xd4, 0x91, 0x01, 0x05, 0xd4, 0x2e, 0x08, 372 0xc1, 0xd2, 0xbf, 0x00, 0xf9, 0x7e, 0xb8, 0xa5, 0x75, 0x43, 0x41, 0xdd, 0x7c, 0xef, 0xf3, 0x3e, 373 0x1f, 0xbf, 0xcf, 0xbb, 0xf7, 0x6c, 0x30, 0xdb, 0x24, 0xb4, 0x43, 0xa8, 0x8b, 0x48, 0xdf, 0xed, 374 0x2f, 0x37, 0x02, 0xe6, 0x2f, 0xbb, 0x6c, 0xd3, 0x89, 0xba, 0x84, 0x11, 0x08, 0x05, 0xe8, 0x20, 375 0xd2, 0x77, 0x24, 0x68, 0x98, 0x92, 0xd0, 0xf0, 0x69, 0x90, 0x30, 0x9a, 0x04, 0x87, 0x82, 0x63, 376 0xcc, 0xa5, 0x08, 0xc6, 0x7c, 0x81, 0x96, 0x04, 0xba, 0xc6, 0x4f, 0xae, 0x94, 0x17, 0x50, 0x01, 377 0x11, 0x44, 0x44, 0x3c, 0x7e, 0x52, 0x04, 0x44, 0x08, 0x6a, 0x07, 0x2e, 0x3f, 0x35, 0x7a, 0xeb, 378 0xae, 0x1f, 0x0e, 0x04, 0x64, 0xbf, 0xce, 0x80, 0xe9, 0x3a, 0x45, 0x0f, 0x7b, 0x8d, 0x0e, 0x66, 379 0xf7, 0xbb, 0x24, 0x22, 0xd4, 0x6f, 0xc3, 0x1b, 0x20, 0xd7, 0x24, 0x21, 0x0b, 0x42, 0x56, 0xd4, 380 0xcb, 0xfa, 0x62, 0xbe, 0x52, 0x70, 0x84, 0x84, 0xa3, 0x24, 0x9c, 0x9b, 0xe1, 0xa0, 0x9a, 0xff, 381 0xf8, 0x7e, 0x29, 0xb7, 0x2a, 0x12, 0x3d, 0xc5, 0x80, 0xaf, 0x74, 0x30, 0x85, 0x43, 0xcc, 0xb0, 382 0xdf, 0x5e, 0x6b, 0x05, 0x11, 0xa1, 0x98, 0x15, 0x33, 0xe5, 0xec, 0x62, 0xbe, 0x52, 0x72, 0x64, 383 0xb1, 0xb1, 0x6f, 0xd5, 0x0c, 0x67, 0x95, 0xe0, 0xb0, 0x7a, 0x77, 0x7b, 0x68, 0x69, 0xfb, 0x43, 384 0x6b, 0x66, 0xe0, 0x77, 0xda, 0x2b, 0xf6, 0x11, 0xbe, 0xfd, 0xf6, 0x8b, 0x75, 0x19, 0x61, 0xb6, 385 0xd1, 0x6b, 0x38, 0x4d, 0xd2, 0x71, 0x6b, 0x38, 0xa4, 0xcd, 0x0d, 0xec, 0xbb, 0xeb, 0xf2, 0x61, 386 0x89, 0xb6, 0x9e, 0xb9, 0x6c, 0x10, 0x05, 0x94, 0xcb, 0x51, 0x6f, 0x52, 0x2a, 0xdc, 0x12, 0x02, 387 0xd0, 0x00, 0xff, 0x47, 0xdc, 0x5d, 0xd0, 0x2d, 0x66, 0xcb, 0xfa, 0xe2, 0x84, 0x97, 0x9c, 0x57, 388 0xce, 0xbf, 0xd8, 0xb2, 0xb4, 0x37, 0x5b, 0x96, 0xf6, 0x6d, 0xcb, 0xd2, 0x9e, 0x7f, 0x2e, 0x6b, 389 0x76, 0x13, 0x94, 0x8e, 0x35, 0xc5, 0x0b, 0x68, 0x44, 0x42, 0x1a, 0xc0, 0x1a, 0xc8, 0x47, 0x32, 390 0xb6, 0x86, 0x5b, 0xbc, 0x41, 0x63, 0xd5, 0xf9, 0xef, 0x43, 0xeb, 0x70, 0x78, 0x7f, 0x68, 0x41, 391 0x61, 0xe5, 0x50, 0xd0, 0xf6, 0x80, 0x3a, 0xdd, 0x69, 0xd9, 0xef, 0x74, 0x90, 0xab, 0x53, 0xf4, 392 0x88, 0xb0, 0x33, 0xd3, 0x84, 0x05, 0xf0, 0x5f, 0x9f, 0xb0, 0xa0, 0x5b, 0xcc, 0x70, 0x8f, 0xe2, 393 0x00, 0xaf, 0x81, 0x71, 0x12, 0x31, 0x4c, 0x42, 0x6e, 0x7d, 0xb2, 0x62, 0x3a, 0xc7, 0x67, 0xd2, 394 0x89, 0xeb, 0xb8, 0xc7, 0xb3, 0x3c, 0x99, 0x9d, 0xd2, 0x98, 0x69, 0x30, 0x25, 0x4b, 0x56, 0xed, 395 0xb0, 0x3f, 0xe8, 0x49, 0xec, 0x71, 0x80, 0xd1, 0x06, 0x0b, 0x5a, 0xf0, 0x7a, 0x9a, 0x9d, 0x99, 396 0x7f, 0xae, 0xbf, 0x06, 0x72, 0xa2, 0x22, 0x5a, 0xcc, 0xf2, 0x41, 0x5a, 0x48, 0x33, 0xa0, 0xde, 397 0x7e, 0x60, 0xa4, 0x3a, 0x16, 0x4f, 0x95, 0xa7, 0xc8, 0x29, 0x7e, 0x4a, 0xe0, 0xc2, 0x91, 0xda, 398 0x13, 0x5f, 0x3f, 0x75, 0x00, 0xea, 0x14, 0xa9, 0x01, 0x3a, 0xab, 0x1b, 0x9a, 0x03, 0x13, 0x72, 399 0xa8, 0x89, 0x72, 0x79, 0x10, 0x80, 0x08, 0x8c, 0xfb, 0x1d, 0xd2, 0x0b, 0x99, 0x34, 0x3a, 0x62, 400 0x63, 0xae, 0xc6, 0xde, 0xfe, 0x7a, 0x2f, 0xa4, 0x7c, 0x4a, 0x2b, 0x0a, 0x00, 0x1e, 0xd8, 0x55, 401 0x5d, 0xa8, 0xfc, 0xc8, 0x80, 0x6c, 0x9d, 0x22, 0xb8, 0x0e, 0x26, 0x8f, 0x7c, 0x23, 0xe6, 0xd3, 402 0xee, 0xe0, 0xd8, 0xd6, 0x18, 0x4b, 0xa7, 0x4a, 0x4b, 0x96, 0xeb, 0x36, 0x18, 0xe3, 0x0b, 0x31, 403 0x7b, 0x02, 0x2d, 0x06, 0x8d, 0x8b, 0x23, 0xc0, 0x44, 0xe9, 0x29, 0x38, 0xf7, 0xdb, 0x4c, 0x8e, 404 0x22, 0xa9, 0x24, 0xe3, 0xd2, 0x29, 0x92, 0x92, 0x37, 0x3c, 0x00, 0x39, 0x35, 0x1d, 0xe6, 0x09, 405 0x3c, 0x89, 0x1b, 0x0b, 0xa3, 0x71, 0x25, 0x59, 0xad, 0x6d, 0xef, 0x9a, 0xfa, 0xce, 0xae, 0xa9, 406 0x7f, 0xdd, 0x35, 0xf5, 0x97, 0x7b, 0xa6, 0xb6, 0xb3, 0x67, 0x6a, 0x9f, 0xf6, 0x4c, 0xed, 0xc9, 407 0x9f, 0xaf, 0x79, 0x93, 0xff, 0x2e, 0xf8, 0x65, 0x37, 0xc6, 0xf9, 0x77, 0xfa, 0xca, 0xaf, 0x00, 408 0x00, 0x00, 0xff, 0xff, 0x07, 0xda, 0x4d, 0x6b, 0x9a, 0x06, 0x00, 0x00, 409 } 410 411 // Reference imports to suppress errors if they are not otherwise used. 412 var _ context.Context 413 var _ grpc.ClientConn 414 415 // This is a compile-time assertion to ensure that this generated file 416 // is compatible with the grpc package it is being compiled against. 417 const _ = grpc.SupportPackageIsVersion4 418 419 // MsgClient is the client API for Msg service. 420 // 421 // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. 422 type MsgClient interface { 423 // SubmitProposal defines a method to create new proposal given a content. 424 SubmitProposal(ctx context.Context, in *MsgSubmitProposal, opts ...grpc.CallOption) (*MsgSubmitProposalResponse, error) 425 // Vote defines a method to add a vote on a specific proposal. 426 Vote(ctx context.Context, in *MsgVote, opts ...grpc.CallOption) (*MsgVoteResponse, error) 427 // VoteWeighted defines a method to add a weighted vote on a specific proposal. 428 // 429 // Since: cosmos-sdk 0.43 430 VoteWeighted(ctx context.Context, in *MsgVoteWeighted, opts ...grpc.CallOption) (*MsgVoteWeightedResponse, error) 431 // Deposit defines a method to add deposit on a specific proposal. 432 Deposit(ctx context.Context, in *MsgDeposit, opts ...grpc.CallOption) (*MsgDepositResponse, error) 433 } 434 435 type msgClient struct { 436 cc grpc1.ClientConn 437 } 438 439 func NewMsgClient(cc grpc1.ClientConn) MsgClient { 440 return &msgClient{cc} 441 } 442 443 func (c *msgClient) SubmitProposal(ctx context.Context, in *MsgSubmitProposal, opts ...grpc.CallOption) (*MsgSubmitProposalResponse, error) { 444 out := new(MsgSubmitProposalResponse) 445 err := c.cc.Invoke(ctx, "/cosmos.gov.v1beta1.Msg/SubmitProposal", in, out, opts...) 446 if err != nil { 447 return nil, err 448 } 449 return out, nil 450 } 451 452 func (c *msgClient) Vote(ctx context.Context, in *MsgVote, opts ...grpc.CallOption) (*MsgVoteResponse, error) { 453 out := new(MsgVoteResponse) 454 err := c.cc.Invoke(ctx, "/cosmos.gov.v1beta1.Msg/Vote", in, out, opts...) 455 if err != nil { 456 return nil, err 457 } 458 return out, nil 459 } 460 461 func (c *msgClient) VoteWeighted(ctx context.Context, in *MsgVoteWeighted, opts ...grpc.CallOption) (*MsgVoteWeightedResponse, error) { 462 out := new(MsgVoteWeightedResponse) 463 err := c.cc.Invoke(ctx, "/cosmos.gov.v1beta1.Msg/VoteWeighted", in, out, opts...) 464 if err != nil { 465 return nil, err 466 } 467 return out, nil 468 } 469 470 func (c *msgClient) Deposit(ctx context.Context, in *MsgDeposit, opts ...grpc.CallOption) (*MsgDepositResponse, error) { 471 out := new(MsgDepositResponse) 472 err := c.cc.Invoke(ctx, "/cosmos.gov.v1beta1.Msg/Deposit", in, out, opts...) 473 if err != nil { 474 return nil, err 475 } 476 return out, nil 477 } 478 479 // MsgServer is the server API for Msg service. 480 type MsgServer interface { 481 // SubmitProposal defines a method to create new proposal given a content. 482 SubmitProposal(context.Context, *MsgSubmitProposal) (*MsgSubmitProposalResponse, error) 483 // Vote defines a method to add a vote on a specific proposal. 484 Vote(context.Context, *MsgVote) (*MsgVoteResponse, error) 485 // VoteWeighted defines a method to add a weighted vote on a specific proposal. 486 // 487 // Since: cosmos-sdk 0.43 488 VoteWeighted(context.Context, *MsgVoteWeighted) (*MsgVoteWeightedResponse, error) 489 // Deposit defines a method to add deposit on a specific proposal. 490 Deposit(context.Context, *MsgDeposit) (*MsgDepositResponse, error) 491 } 492 493 // UnimplementedMsgServer can be embedded to have forward compatible implementations. 494 type UnimplementedMsgServer struct { 495 } 496 497 func (*UnimplementedMsgServer) SubmitProposal(ctx context.Context, req *MsgSubmitProposal) (*MsgSubmitProposalResponse, error) { 498 return nil, status.Errorf(codes.Unimplemented, "method SubmitProposal not implemented") 499 } 500 func (*UnimplementedMsgServer) Vote(ctx context.Context, req *MsgVote) (*MsgVoteResponse, error) { 501 return nil, status.Errorf(codes.Unimplemented, "method Vote not implemented") 502 } 503 func (*UnimplementedMsgServer) VoteWeighted(ctx context.Context, req *MsgVoteWeighted) (*MsgVoteWeightedResponse, error) { 504 return nil, status.Errorf(codes.Unimplemented, "method VoteWeighted not implemented") 505 } 506 func (*UnimplementedMsgServer) Deposit(ctx context.Context, req *MsgDeposit) (*MsgDepositResponse, error) { 507 return nil, status.Errorf(codes.Unimplemented, "method Deposit not implemented") 508 } 509 510 func RegisterMsgServer(s grpc1.Server, srv MsgServer) { 511 s.RegisterService(&_Msg_serviceDesc, srv) 512 } 513 514 func _Msg_SubmitProposal_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 515 in := new(MsgSubmitProposal) 516 if err := dec(in); err != nil { 517 return nil, err 518 } 519 if interceptor == nil { 520 return srv.(MsgServer).SubmitProposal(ctx, in) 521 } 522 info := &grpc.UnaryServerInfo{ 523 Server: srv, 524 FullMethod: "/cosmos.gov.v1beta1.Msg/SubmitProposal", 525 } 526 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 527 return srv.(MsgServer).SubmitProposal(ctx, req.(*MsgSubmitProposal)) 528 } 529 return interceptor(ctx, in, info, handler) 530 } 531 532 func _Msg_Vote_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 533 in := new(MsgVote) 534 if err := dec(in); err != nil { 535 return nil, err 536 } 537 if interceptor == nil { 538 return srv.(MsgServer).Vote(ctx, in) 539 } 540 info := &grpc.UnaryServerInfo{ 541 Server: srv, 542 FullMethod: "/cosmos.gov.v1beta1.Msg/Vote", 543 } 544 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 545 return srv.(MsgServer).Vote(ctx, req.(*MsgVote)) 546 } 547 return interceptor(ctx, in, info, handler) 548 } 549 550 func _Msg_VoteWeighted_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 551 in := new(MsgVoteWeighted) 552 if err := dec(in); err != nil { 553 return nil, err 554 } 555 if interceptor == nil { 556 return srv.(MsgServer).VoteWeighted(ctx, in) 557 } 558 info := &grpc.UnaryServerInfo{ 559 Server: srv, 560 FullMethod: "/cosmos.gov.v1beta1.Msg/VoteWeighted", 561 } 562 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 563 return srv.(MsgServer).VoteWeighted(ctx, req.(*MsgVoteWeighted)) 564 } 565 return interceptor(ctx, in, info, handler) 566 } 567 568 func _Msg_Deposit_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 569 in := new(MsgDeposit) 570 if err := dec(in); err != nil { 571 return nil, err 572 } 573 if interceptor == nil { 574 return srv.(MsgServer).Deposit(ctx, in) 575 } 576 info := &grpc.UnaryServerInfo{ 577 Server: srv, 578 FullMethod: "/cosmos.gov.v1beta1.Msg/Deposit", 579 } 580 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 581 return srv.(MsgServer).Deposit(ctx, req.(*MsgDeposit)) 582 } 583 return interceptor(ctx, in, info, handler) 584 } 585 586 var _Msg_serviceDesc = grpc.ServiceDesc{ 587 ServiceName: "cosmos.gov.v1beta1.Msg", 588 HandlerType: (*MsgServer)(nil), 589 Methods: []grpc.MethodDesc{ 590 { 591 MethodName: "SubmitProposal", 592 Handler: _Msg_SubmitProposal_Handler, 593 }, 594 { 595 MethodName: "Vote", 596 Handler: _Msg_Vote_Handler, 597 }, 598 { 599 MethodName: "VoteWeighted", 600 Handler: _Msg_VoteWeighted_Handler, 601 }, 602 { 603 MethodName: "Deposit", 604 Handler: _Msg_Deposit_Handler, 605 }, 606 }, 607 Streams: []grpc.StreamDesc{}, 608 Metadata: "cosmos/gov/v1beta1/tx.proto", 609 } 610 611 func (m *MsgSubmitProposal) Marshal() (dAtA []byte, err error) { 612 size := m.Size() 613 dAtA = make([]byte, size) 614 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 615 if err != nil { 616 return nil, err 617 } 618 return dAtA[:n], nil 619 } 620 621 func (m *MsgSubmitProposal) MarshalTo(dAtA []byte) (int, error) { 622 size := m.Size() 623 return m.MarshalToSizedBuffer(dAtA[:size]) 624 } 625 626 func (m *MsgSubmitProposal) MarshalToSizedBuffer(dAtA []byte) (int, error) { 627 i := len(dAtA) 628 _ = i 629 var l int 630 _ = l 631 if len(m.Proposer) > 0 { 632 i -= len(m.Proposer) 633 copy(dAtA[i:], m.Proposer) 634 i = encodeVarintTx(dAtA, i, uint64(len(m.Proposer))) 635 i-- 636 dAtA[i] = 0x1a 637 } 638 if len(m.InitialDeposit) > 0 { 639 for iNdEx := len(m.InitialDeposit) - 1; iNdEx >= 0; iNdEx-- { 640 { 641 size, err := m.InitialDeposit[iNdEx].MarshalToSizedBuffer(dAtA[:i]) 642 if err != nil { 643 return 0, err 644 } 645 i -= size 646 i = encodeVarintTx(dAtA, i, uint64(size)) 647 } 648 i-- 649 dAtA[i] = 0x12 650 } 651 } 652 if m.Content != nil { 653 { 654 size, err := m.Content.MarshalToSizedBuffer(dAtA[:i]) 655 if err != nil { 656 return 0, err 657 } 658 i -= size 659 i = encodeVarintTx(dAtA, i, uint64(size)) 660 } 661 i-- 662 dAtA[i] = 0xa 663 } 664 return len(dAtA) - i, nil 665 } 666 667 func (m *MsgSubmitProposalResponse) Marshal() (dAtA []byte, err error) { 668 size := m.Size() 669 dAtA = make([]byte, size) 670 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 671 if err != nil { 672 return nil, err 673 } 674 return dAtA[:n], nil 675 } 676 677 func (m *MsgSubmitProposalResponse) MarshalTo(dAtA []byte) (int, error) { 678 size := m.Size() 679 return m.MarshalToSizedBuffer(dAtA[:size]) 680 } 681 682 func (m *MsgSubmitProposalResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { 683 i := len(dAtA) 684 _ = i 685 var l int 686 _ = l 687 if m.ProposalId != 0 { 688 i = encodeVarintTx(dAtA, i, uint64(m.ProposalId)) 689 i-- 690 dAtA[i] = 0x8 691 } 692 return len(dAtA) - i, nil 693 } 694 695 func (m *MsgVote) Marshal() (dAtA []byte, err error) { 696 size := m.Size() 697 dAtA = make([]byte, size) 698 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 699 if err != nil { 700 return nil, err 701 } 702 return dAtA[:n], nil 703 } 704 705 func (m *MsgVote) MarshalTo(dAtA []byte) (int, error) { 706 size := m.Size() 707 return m.MarshalToSizedBuffer(dAtA[:size]) 708 } 709 710 func (m *MsgVote) MarshalToSizedBuffer(dAtA []byte) (int, error) { 711 i := len(dAtA) 712 _ = i 713 var l int 714 _ = l 715 if m.Option != 0 { 716 i = encodeVarintTx(dAtA, i, uint64(m.Option)) 717 i-- 718 dAtA[i] = 0x18 719 } 720 if len(m.Voter) > 0 { 721 i -= len(m.Voter) 722 copy(dAtA[i:], m.Voter) 723 i = encodeVarintTx(dAtA, i, uint64(len(m.Voter))) 724 i-- 725 dAtA[i] = 0x12 726 } 727 if m.ProposalId != 0 { 728 i = encodeVarintTx(dAtA, i, uint64(m.ProposalId)) 729 i-- 730 dAtA[i] = 0x8 731 } 732 return len(dAtA) - i, nil 733 } 734 735 func (m *MsgVoteResponse) Marshal() (dAtA []byte, err error) { 736 size := m.Size() 737 dAtA = make([]byte, size) 738 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 739 if err != nil { 740 return nil, err 741 } 742 return dAtA[:n], nil 743 } 744 745 func (m *MsgVoteResponse) MarshalTo(dAtA []byte) (int, error) { 746 size := m.Size() 747 return m.MarshalToSizedBuffer(dAtA[:size]) 748 } 749 750 func (m *MsgVoteResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { 751 i := len(dAtA) 752 _ = i 753 var l int 754 _ = l 755 return len(dAtA) - i, nil 756 } 757 758 func (m *MsgVoteWeighted) Marshal() (dAtA []byte, err error) { 759 size := m.Size() 760 dAtA = make([]byte, size) 761 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 762 if err != nil { 763 return nil, err 764 } 765 return dAtA[:n], nil 766 } 767 768 func (m *MsgVoteWeighted) MarshalTo(dAtA []byte) (int, error) { 769 size := m.Size() 770 return m.MarshalToSizedBuffer(dAtA[:size]) 771 } 772 773 func (m *MsgVoteWeighted) MarshalToSizedBuffer(dAtA []byte) (int, error) { 774 i := len(dAtA) 775 _ = i 776 var l int 777 _ = l 778 if len(m.Options) > 0 { 779 for iNdEx := len(m.Options) - 1; iNdEx >= 0; iNdEx-- { 780 { 781 size, err := m.Options[iNdEx].MarshalToSizedBuffer(dAtA[:i]) 782 if err != nil { 783 return 0, err 784 } 785 i -= size 786 i = encodeVarintTx(dAtA, i, uint64(size)) 787 } 788 i-- 789 dAtA[i] = 0x1a 790 } 791 } 792 if len(m.Voter) > 0 { 793 i -= len(m.Voter) 794 copy(dAtA[i:], m.Voter) 795 i = encodeVarintTx(dAtA, i, uint64(len(m.Voter))) 796 i-- 797 dAtA[i] = 0x12 798 } 799 if m.ProposalId != 0 { 800 i = encodeVarintTx(dAtA, i, uint64(m.ProposalId)) 801 i-- 802 dAtA[i] = 0x8 803 } 804 return len(dAtA) - i, nil 805 } 806 807 func (m *MsgVoteWeightedResponse) Marshal() (dAtA []byte, err error) { 808 size := m.Size() 809 dAtA = make([]byte, size) 810 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 811 if err != nil { 812 return nil, err 813 } 814 return dAtA[:n], nil 815 } 816 817 func (m *MsgVoteWeightedResponse) MarshalTo(dAtA []byte) (int, error) { 818 size := m.Size() 819 return m.MarshalToSizedBuffer(dAtA[:size]) 820 } 821 822 func (m *MsgVoteWeightedResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { 823 i := len(dAtA) 824 _ = i 825 var l int 826 _ = l 827 return len(dAtA) - i, nil 828 } 829 830 func (m *MsgDeposit) Marshal() (dAtA []byte, err error) { 831 size := m.Size() 832 dAtA = make([]byte, size) 833 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 834 if err != nil { 835 return nil, err 836 } 837 return dAtA[:n], nil 838 } 839 840 func (m *MsgDeposit) MarshalTo(dAtA []byte) (int, error) { 841 size := m.Size() 842 return m.MarshalToSizedBuffer(dAtA[:size]) 843 } 844 845 func (m *MsgDeposit) MarshalToSizedBuffer(dAtA []byte) (int, error) { 846 i := len(dAtA) 847 _ = i 848 var l int 849 _ = l 850 if len(m.Amount) > 0 { 851 for iNdEx := len(m.Amount) - 1; iNdEx >= 0; iNdEx-- { 852 { 853 size, err := m.Amount[iNdEx].MarshalToSizedBuffer(dAtA[:i]) 854 if err != nil { 855 return 0, err 856 } 857 i -= size 858 i = encodeVarintTx(dAtA, i, uint64(size)) 859 } 860 i-- 861 dAtA[i] = 0x1a 862 } 863 } 864 if len(m.Depositor) > 0 { 865 i -= len(m.Depositor) 866 copy(dAtA[i:], m.Depositor) 867 i = encodeVarintTx(dAtA, i, uint64(len(m.Depositor))) 868 i-- 869 dAtA[i] = 0x12 870 } 871 if m.ProposalId != 0 { 872 i = encodeVarintTx(dAtA, i, uint64(m.ProposalId)) 873 i-- 874 dAtA[i] = 0x8 875 } 876 return len(dAtA) - i, nil 877 } 878 879 func (m *MsgDepositResponse) Marshal() (dAtA []byte, err error) { 880 size := m.Size() 881 dAtA = make([]byte, size) 882 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 883 if err != nil { 884 return nil, err 885 } 886 return dAtA[:n], nil 887 } 888 889 func (m *MsgDepositResponse) MarshalTo(dAtA []byte) (int, error) { 890 size := m.Size() 891 return m.MarshalToSizedBuffer(dAtA[:size]) 892 } 893 894 func (m *MsgDepositResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { 895 i := len(dAtA) 896 _ = i 897 var l int 898 _ = l 899 return len(dAtA) - i, nil 900 } 901 902 func encodeVarintTx(dAtA []byte, offset int, v uint64) int { 903 offset -= sovTx(v) 904 base := offset 905 for v >= 1<<7 { 906 dAtA[offset] = uint8(v&0x7f | 0x80) 907 v >>= 7 908 offset++ 909 } 910 dAtA[offset] = uint8(v) 911 return base 912 } 913 func (m *MsgSubmitProposal) Size() (n int) { 914 if m == nil { 915 return 0 916 } 917 var l int 918 _ = l 919 if m.Content != nil { 920 l = m.Content.Size() 921 n += 1 + l + sovTx(uint64(l)) 922 } 923 if len(m.InitialDeposit) > 0 { 924 for _, e := range m.InitialDeposit { 925 l = e.Size() 926 n += 1 + l + sovTx(uint64(l)) 927 } 928 } 929 l = len(m.Proposer) 930 if l > 0 { 931 n += 1 + l + sovTx(uint64(l)) 932 } 933 return n 934 } 935 936 func (m *MsgSubmitProposalResponse) Size() (n int) { 937 if m == nil { 938 return 0 939 } 940 var l int 941 _ = l 942 if m.ProposalId != 0 { 943 n += 1 + sovTx(uint64(m.ProposalId)) 944 } 945 return n 946 } 947 948 func (m *MsgVote) Size() (n int) { 949 if m == nil { 950 return 0 951 } 952 var l int 953 _ = l 954 if m.ProposalId != 0 { 955 n += 1 + sovTx(uint64(m.ProposalId)) 956 } 957 l = len(m.Voter) 958 if l > 0 { 959 n += 1 + l + sovTx(uint64(l)) 960 } 961 if m.Option != 0 { 962 n += 1 + sovTx(uint64(m.Option)) 963 } 964 return n 965 } 966 967 func (m *MsgVoteResponse) Size() (n int) { 968 if m == nil { 969 return 0 970 } 971 var l int 972 _ = l 973 return n 974 } 975 976 func (m *MsgVoteWeighted) Size() (n int) { 977 if m == nil { 978 return 0 979 } 980 var l int 981 _ = l 982 if m.ProposalId != 0 { 983 n += 1 + sovTx(uint64(m.ProposalId)) 984 } 985 l = len(m.Voter) 986 if l > 0 { 987 n += 1 + l + sovTx(uint64(l)) 988 } 989 if len(m.Options) > 0 { 990 for _, e := range m.Options { 991 l = e.Size() 992 n += 1 + l + sovTx(uint64(l)) 993 } 994 } 995 return n 996 } 997 998 func (m *MsgVoteWeightedResponse) Size() (n int) { 999 if m == nil { 1000 return 0 1001 } 1002 var l int 1003 _ = l 1004 return n 1005 } 1006 1007 func (m *MsgDeposit) Size() (n int) { 1008 if m == nil { 1009 return 0 1010 } 1011 var l int 1012 _ = l 1013 if m.ProposalId != 0 { 1014 n += 1 + sovTx(uint64(m.ProposalId)) 1015 } 1016 l = len(m.Depositor) 1017 if l > 0 { 1018 n += 1 + l + sovTx(uint64(l)) 1019 } 1020 if len(m.Amount) > 0 { 1021 for _, e := range m.Amount { 1022 l = e.Size() 1023 n += 1 + l + sovTx(uint64(l)) 1024 } 1025 } 1026 return n 1027 } 1028 1029 func (m *MsgDepositResponse) Size() (n int) { 1030 if m == nil { 1031 return 0 1032 } 1033 var l int 1034 _ = l 1035 return n 1036 } 1037 1038 func sovTx(x uint64) (n int) { 1039 return (math_bits.Len64(x|1) + 6) / 7 1040 } 1041 func sozTx(x uint64) (n int) { 1042 return sovTx(uint64((x << 1) ^ uint64((int64(x) >> 63)))) 1043 } 1044 func (m *MsgSubmitProposal) Unmarshal(dAtA []byte) error { 1045 l := len(dAtA) 1046 iNdEx := 0 1047 for iNdEx < l { 1048 preIndex := iNdEx 1049 var wire uint64 1050 for shift := uint(0); ; shift += 7 { 1051 if shift >= 64 { 1052 return ErrIntOverflowTx 1053 } 1054 if iNdEx >= l { 1055 return io.ErrUnexpectedEOF 1056 } 1057 b := dAtA[iNdEx] 1058 iNdEx++ 1059 wire |= uint64(b&0x7F) << shift 1060 if b < 0x80 { 1061 break 1062 } 1063 } 1064 fieldNum := int32(wire >> 3) 1065 wireType := int(wire & 0x7) 1066 if wireType == 4 { 1067 return fmt.Errorf("proto: MsgSubmitProposal: wiretype end group for non-group") 1068 } 1069 if fieldNum <= 0 { 1070 return fmt.Errorf("proto: MsgSubmitProposal: illegal tag %d (wire type %d)", fieldNum, wire) 1071 } 1072 switch fieldNum { 1073 case 1: 1074 if wireType != 2 { 1075 return fmt.Errorf("proto: wrong wireType = %d for field Content", wireType) 1076 } 1077 var msglen int 1078 for shift := uint(0); ; shift += 7 { 1079 if shift >= 64 { 1080 return ErrIntOverflowTx 1081 } 1082 if iNdEx >= l { 1083 return io.ErrUnexpectedEOF 1084 } 1085 b := dAtA[iNdEx] 1086 iNdEx++ 1087 msglen |= int(b&0x7F) << shift 1088 if b < 0x80 { 1089 break 1090 } 1091 } 1092 if msglen < 0 { 1093 return ErrInvalidLengthTx 1094 } 1095 postIndex := iNdEx + msglen 1096 if postIndex < 0 { 1097 return ErrInvalidLengthTx 1098 } 1099 if postIndex > l { 1100 return io.ErrUnexpectedEOF 1101 } 1102 if m.Content == nil { 1103 m.Content = &types.Any{} 1104 } 1105 if err := m.Content.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 1106 return err 1107 } 1108 iNdEx = postIndex 1109 case 2: 1110 if wireType != 2 { 1111 return fmt.Errorf("proto: wrong wireType = %d for field InitialDeposit", wireType) 1112 } 1113 var msglen int 1114 for shift := uint(0); ; shift += 7 { 1115 if shift >= 64 { 1116 return ErrIntOverflowTx 1117 } 1118 if iNdEx >= l { 1119 return io.ErrUnexpectedEOF 1120 } 1121 b := dAtA[iNdEx] 1122 iNdEx++ 1123 msglen |= int(b&0x7F) << shift 1124 if b < 0x80 { 1125 break 1126 } 1127 } 1128 if msglen < 0 { 1129 return ErrInvalidLengthTx 1130 } 1131 postIndex := iNdEx + msglen 1132 if postIndex < 0 { 1133 return ErrInvalidLengthTx 1134 } 1135 if postIndex > l { 1136 return io.ErrUnexpectedEOF 1137 } 1138 m.InitialDeposit = append(m.InitialDeposit, types1.Coin{}) 1139 if err := m.InitialDeposit[len(m.InitialDeposit)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 1140 return err 1141 } 1142 iNdEx = postIndex 1143 case 3: 1144 if wireType != 2 { 1145 return fmt.Errorf("proto: wrong wireType = %d for field Proposer", wireType) 1146 } 1147 var stringLen uint64 1148 for shift := uint(0); ; shift += 7 { 1149 if shift >= 64 { 1150 return ErrIntOverflowTx 1151 } 1152 if iNdEx >= l { 1153 return io.ErrUnexpectedEOF 1154 } 1155 b := dAtA[iNdEx] 1156 iNdEx++ 1157 stringLen |= uint64(b&0x7F) << shift 1158 if b < 0x80 { 1159 break 1160 } 1161 } 1162 intStringLen := int(stringLen) 1163 if intStringLen < 0 { 1164 return ErrInvalidLengthTx 1165 } 1166 postIndex := iNdEx + intStringLen 1167 if postIndex < 0 { 1168 return ErrInvalidLengthTx 1169 } 1170 if postIndex > l { 1171 return io.ErrUnexpectedEOF 1172 } 1173 m.Proposer = string(dAtA[iNdEx:postIndex]) 1174 iNdEx = postIndex 1175 default: 1176 iNdEx = preIndex 1177 skippy, err := skipTx(dAtA[iNdEx:]) 1178 if err != nil { 1179 return err 1180 } 1181 if (skippy < 0) || (iNdEx+skippy) < 0 { 1182 return ErrInvalidLengthTx 1183 } 1184 if (iNdEx + skippy) > l { 1185 return io.ErrUnexpectedEOF 1186 } 1187 iNdEx += skippy 1188 } 1189 } 1190 1191 if iNdEx > l { 1192 return io.ErrUnexpectedEOF 1193 } 1194 return nil 1195 } 1196 func (m *MsgSubmitProposalResponse) Unmarshal(dAtA []byte) error { 1197 l := len(dAtA) 1198 iNdEx := 0 1199 for iNdEx < l { 1200 preIndex := iNdEx 1201 var wire uint64 1202 for shift := uint(0); ; shift += 7 { 1203 if shift >= 64 { 1204 return ErrIntOverflowTx 1205 } 1206 if iNdEx >= l { 1207 return io.ErrUnexpectedEOF 1208 } 1209 b := dAtA[iNdEx] 1210 iNdEx++ 1211 wire |= uint64(b&0x7F) << shift 1212 if b < 0x80 { 1213 break 1214 } 1215 } 1216 fieldNum := int32(wire >> 3) 1217 wireType := int(wire & 0x7) 1218 if wireType == 4 { 1219 return fmt.Errorf("proto: MsgSubmitProposalResponse: wiretype end group for non-group") 1220 } 1221 if fieldNum <= 0 { 1222 return fmt.Errorf("proto: MsgSubmitProposalResponse: illegal tag %d (wire type %d)", fieldNum, wire) 1223 } 1224 switch fieldNum { 1225 case 1: 1226 if wireType != 0 { 1227 return fmt.Errorf("proto: wrong wireType = %d for field ProposalId", wireType) 1228 } 1229 m.ProposalId = 0 1230 for shift := uint(0); ; shift += 7 { 1231 if shift >= 64 { 1232 return ErrIntOverflowTx 1233 } 1234 if iNdEx >= l { 1235 return io.ErrUnexpectedEOF 1236 } 1237 b := dAtA[iNdEx] 1238 iNdEx++ 1239 m.ProposalId |= uint64(b&0x7F) << shift 1240 if b < 0x80 { 1241 break 1242 } 1243 } 1244 default: 1245 iNdEx = preIndex 1246 skippy, err := skipTx(dAtA[iNdEx:]) 1247 if err != nil { 1248 return err 1249 } 1250 if (skippy < 0) || (iNdEx+skippy) < 0 { 1251 return ErrInvalidLengthTx 1252 } 1253 if (iNdEx + skippy) > l { 1254 return io.ErrUnexpectedEOF 1255 } 1256 iNdEx += skippy 1257 } 1258 } 1259 1260 if iNdEx > l { 1261 return io.ErrUnexpectedEOF 1262 } 1263 return nil 1264 } 1265 func (m *MsgVote) Unmarshal(dAtA []byte) error { 1266 l := len(dAtA) 1267 iNdEx := 0 1268 for iNdEx < l { 1269 preIndex := iNdEx 1270 var wire uint64 1271 for shift := uint(0); ; shift += 7 { 1272 if shift >= 64 { 1273 return ErrIntOverflowTx 1274 } 1275 if iNdEx >= l { 1276 return io.ErrUnexpectedEOF 1277 } 1278 b := dAtA[iNdEx] 1279 iNdEx++ 1280 wire |= uint64(b&0x7F) << shift 1281 if b < 0x80 { 1282 break 1283 } 1284 } 1285 fieldNum := int32(wire >> 3) 1286 wireType := int(wire & 0x7) 1287 if wireType == 4 { 1288 return fmt.Errorf("proto: MsgVote: wiretype end group for non-group") 1289 } 1290 if fieldNum <= 0 { 1291 return fmt.Errorf("proto: MsgVote: illegal tag %d (wire type %d)", fieldNum, wire) 1292 } 1293 switch fieldNum { 1294 case 1: 1295 if wireType != 0 { 1296 return fmt.Errorf("proto: wrong wireType = %d for field ProposalId", wireType) 1297 } 1298 m.ProposalId = 0 1299 for shift := uint(0); ; shift += 7 { 1300 if shift >= 64 { 1301 return ErrIntOverflowTx 1302 } 1303 if iNdEx >= l { 1304 return io.ErrUnexpectedEOF 1305 } 1306 b := dAtA[iNdEx] 1307 iNdEx++ 1308 m.ProposalId |= uint64(b&0x7F) << shift 1309 if b < 0x80 { 1310 break 1311 } 1312 } 1313 case 2: 1314 if wireType != 2 { 1315 return fmt.Errorf("proto: wrong wireType = %d for field Voter", wireType) 1316 } 1317 var stringLen uint64 1318 for shift := uint(0); ; shift += 7 { 1319 if shift >= 64 { 1320 return ErrIntOverflowTx 1321 } 1322 if iNdEx >= l { 1323 return io.ErrUnexpectedEOF 1324 } 1325 b := dAtA[iNdEx] 1326 iNdEx++ 1327 stringLen |= uint64(b&0x7F) << shift 1328 if b < 0x80 { 1329 break 1330 } 1331 } 1332 intStringLen := int(stringLen) 1333 if intStringLen < 0 { 1334 return ErrInvalidLengthTx 1335 } 1336 postIndex := iNdEx + intStringLen 1337 if postIndex < 0 { 1338 return ErrInvalidLengthTx 1339 } 1340 if postIndex > l { 1341 return io.ErrUnexpectedEOF 1342 } 1343 m.Voter = string(dAtA[iNdEx:postIndex]) 1344 iNdEx = postIndex 1345 case 3: 1346 if wireType != 0 { 1347 return fmt.Errorf("proto: wrong wireType = %d for field Option", wireType) 1348 } 1349 m.Option = 0 1350 for shift := uint(0); ; shift += 7 { 1351 if shift >= 64 { 1352 return ErrIntOverflowTx 1353 } 1354 if iNdEx >= l { 1355 return io.ErrUnexpectedEOF 1356 } 1357 b := dAtA[iNdEx] 1358 iNdEx++ 1359 m.Option |= VoteOption(b&0x7F) << shift 1360 if b < 0x80 { 1361 break 1362 } 1363 } 1364 default: 1365 iNdEx = preIndex 1366 skippy, err := skipTx(dAtA[iNdEx:]) 1367 if err != nil { 1368 return err 1369 } 1370 if (skippy < 0) || (iNdEx+skippy) < 0 { 1371 return ErrInvalidLengthTx 1372 } 1373 if (iNdEx + skippy) > l { 1374 return io.ErrUnexpectedEOF 1375 } 1376 iNdEx += skippy 1377 } 1378 } 1379 1380 if iNdEx > l { 1381 return io.ErrUnexpectedEOF 1382 } 1383 return nil 1384 } 1385 func (m *MsgVoteResponse) Unmarshal(dAtA []byte) error { 1386 l := len(dAtA) 1387 iNdEx := 0 1388 for iNdEx < l { 1389 preIndex := iNdEx 1390 var wire uint64 1391 for shift := uint(0); ; shift += 7 { 1392 if shift >= 64 { 1393 return ErrIntOverflowTx 1394 } 1395 if iNdEx >= l { 1396 return io.ErrUnexpectedEOF 1397 } 1398 b := dAtA[iNdEx] 1399 iNdEx++ 1400 wire |= uint64(b&0x7F) << shift 1401 if b < 0x80 { 1402 break 1403 } 1404 } 1405 fieldNum := int32(wire >> 3) 1406 wireType := int(wire & 0x7) 1407 if wireType == 4 { 1408 return fmt.Errorf("proto: MsgVoteResponse: wiretype end group for non-group") 1409 } 1410 if fieldNum <= 0 { 1411 return fmt.Errorf("proto: MsgVoteResponse: illegal tag %d (wire type %d)", fieldNum, wire) 1412 } 1413 switch fieldNum { 1414 default: 1415 iNdEx = preIndex 1416 skippy, err := skipTx(dAtA[iNdEx:]) 1417 if err != nil { 1418 return err 1419 } 1420 if (skippy < 0) || (iNdEx+skippy) < 0 { 1421 return ErrInvalidLengthTx 1422 } 1423 if (iNdEx + skippy) > l { 1424 return io.ErrUnexpectedEOF 1425 } 1426 iNdEx += skippy 1427 } 1428 } 1429 1430 if iNdEx > l { 1431 return io.ErrUnexpectedEOF 1432 } 1433 return nil 1434 } 1435 func (m *MsgVoteWeighted) Unmarshal(dAtA []byte) error { 1436 l := len(dAtA) 1437 iNdEx := 0 1438 for iNdEx < l { 1439 preIndex := iNdEx 1440 var wire uint64 1441 for shift := uint(0); ; shift += 7 { 1442 if shift >= 64 { 1443 return ErrIntOverflowTx 1444 } 1445 if iNdEx >= l { 1446 return io.ErrUnexpectedEOF 1447 } 1448 b := dAtA[iNdEx] 1449 iNdEx++ 1450 wire |= uint64(b&0x7F) << shift 1451 if b < 0x80 { 1452 break 1453 } 1454 } 1455 fieldNum := int32(wire >> 3) 1456 wireType := int(wire & 0x7) 1457 if wireType == 4 { 1458 return fmt.Errorf("proto: MsgVoteWeighted: wiretype end group for non-group") 1459 } 1460 if fieldNum <= 0 { 1461 return fmt.Errorf("proto: MsgVoteWeighted: illegal tag %d (wire type %d)", fieldNum, wire) 1462 } 1463 switch fieldNum { 1464 case 1: 1465 if wireType != 0 { 1466 return fmt.Errorf("proto: wrong wireType = %d for field ProposalId", wireType) 1467 } 1468 m.ProposalId = 0 1469 for shift := uint(0); ; shift += 7 { 1470 if shift >= 64 { 1471 return ErrIntOverflowTx 1472 } 1473 if iNdEx >= l { 1474 return io.ErrUnexpectedEOF 1475 } 1476 b := dAtA[iNdEx] 1477 iNdEx++ 1478 m.ProposalId |= uint64(b&0x7F) << shift 1479 if b < 0x80 { 1480 break 1481 } 1482 } 1483 case 2: 1484 if wireType != 2 { 1485 return fmt.Errorf("proto: wrong wireType = %d for field Voter", wireType) 1486 } 1487 var stringLen uint64 1488 for shift := uint(0); ; shift += 7 { 1489 if shift >= 64 { 1490 return ErrIntOverflowTx 1491 } 1492 if iNdEx >= l { 1493 return io.ErrUnexpectedEOF 1494 } 1495 b := dAtA[iNdEx] 1496 iNdEx++ 1497 stringLen |= uint64(b&0x7F) << shift 1498 if b < 0x80 { 1499 break 1500 } 1501 } 1502 intStringLen := int(stringLen) 1503 if intStringLen < 0 { 1504 return ErrInvalidLengthTx 1505 } 1506 postIndex := iNdEx + intStringLen 1507 if postIndex < 0 { 1508 return ErrInvalidLengthTx 1509 } 1510 if postIndex > l { 1511 return io.ErrUnexpectedEOF 1512 } 1513 m.Voter = string(dAtA[iNdEx:postIndex]) 1514 iNdEx = postIndex 1515 case 3: 1516 if wireType != 2 { 1517 return fmt.Errorf("proto: wrong wireType = %d for field Options", wireType) 1518 } 1519 var msglen int 1520 for shift := uint(0); ; shift += 7 { 1521 if shift >= 64 { 1522 return ErrIntOverflowTx 1523 } 1524 if iNdEx >= l { 1525 return io.ErrUnexpectedEOF 1526 } 1527 b := dAtA[iNdEx] 1528 iNdEx++ 1529 msglen |= int(b&0x7F) << shift 1530 if b < 0x80 { 1531 break 1532 } 1533 } 1534 if msglen < 0 { 1535 return ErrInvalidLengthTx 1536 } 1537 postIndex := iNdEx + msglen 1538 if postIndex < 0 { 1539 return ErrInvalidLengthTx 1540 } 1541 if postIndex > l { 1542 return io.ErrUnexpectedEOF 1543 } 1544 m.Options = append(m.Options, WeightedVoteOption{}) 1545 if err := m.Options[len(m.Options)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 1546 return err 1547 } 1548 iNdEx = postIndex 1549 default: 1550 iNdEx = preIndex 1551 skippy, err := skipTx(dAtA[iNdEx:]) 1552 if err != nil { 1553 return err 1554 } 1555 if (skippy < 0) || (iNdEx+skippy) < 0 { 1556 return ErrInvalidLengthTx 1557 } 1558 if (iNdEx + skippy) > l { 1559 return io.ErrUnexpectedEOF 1560 } 1561 iNdEx += skippy 1562 } 1563 } 1564 1565 if iNdEx > l { 1566 return io.ErrUnexpectedEOF 1567 } 1568 return nil 1569 } 1570 func (m *MsgVoteWeightedResponse) Unmarshal(dAtA []byte) error { 1571 l := len(dAtA) 1572 iNdEx := 0 1573 for iNdEx < l { 1574 preIndex := iNdEx 1575 var wire uint64 1576 for shift := uint(0); ; shift += 7 { 1577 if shift >= 64 { 1578 return ErrIntOverflowTx 1579 } 1580 if iNdEx >= l { 1581 return io.ErrUnexpectedEOF 1582 } 1583 b := dAtA[iNdEx] 1584 iNdEx++ 1585 wire |= uint64(b&0x7F) << shift 1586 if b < 0x80 { 1587 break 1588 } 1589 } 1590 fieldNum := int32(wire >> 3) 1591 wireType := int(wire & 0x7) 1592 if wireType == 4 { 1593 return fmt.Errorf("proto: MsgVoteWeightedResponse: wiretype end group for non-group") 1594 } 1595 if fieldNum <= 0 { 1596 return fmt.Errorf("proto: MsgVoteWeightedResponse: illegal tag %d (wire type %d)", fieldNum, wire) 1597 } 1598 switch fieldNum { 1599 default: 1600 iNdEx = preIndex 1601 skippy, err := skipTx(dAtA[iNdEx:]) 1602 if err != nil { 1603 return err 1604 } 1605 if (skippy < 0) || (iNdEx+skippy) < 0 { 1606 return ErrInvalidLengthTx 1607 } 1608 if (iNdEx + skippy) > l { 1609 return io.ErrUnexpectedEOF 1610 } 1611 iNdEx += skippy 1612 } 1613 } 1614 1615 if iNdEx > l { 1616 return io.ErrUnexpectedEOF 1617 } 1618 return nil 1619 } 1620 func (m *MsgDeposit) Unmarshal(dAtA []byte) error { 1621 l := len(dAtA) 1622 iNdEx := 0 1623 for iNdEx < l { 1624 preIndex := iNdEx 1625 var wire uint64 1626 for shift := uint(0); ; shift += 7 { 1627 if shift >= 64 { 1628 return ErrIntOverflowTx 1629 } 1630 if iNdEx >= l { 1631 return io.ErrUnexpectedEOF 1632 } 1633 b := dAtA[iNdEx] 1634 iNdEx++ 1635 wire |= uint64(b&0x7F) << shift 1636 if b < 0x80 { 1637 break 1638 } 1639 } 1640 fieldNum := int32(wire >> 3) 1641 wireType := int(wire & 0x7) 1642 if wireType == 4 { 1643 return fmt.Errorf("proto: MsgDeposit: wiretype end group for non-group") 1644 } 1645 if fieldNum <= 0 { 1646 return fmt.Errorf("proto: MsgDeposit: illegal tag %d (wire type %d)", fieldNum, wire) 1647 } 1648 switch fieldNum { 1649 case 1: 1650 if wireType != 0 { 1651 return fmt.Errorf("proto: wrong wireType = %d for field ProposalId", wireType) 1652 } 1653 m.ProposalId = 0 1654 for shift := uint(0); ; shift += 7 { 1655 if shift >= 64 { 1656 return ErrIntOverflowTx 1657 } 1658 if iNdEx >= l { 1659 return io.ErrUnexpectedEOF 1660 } 1661 b := dAtA[iNdEx] 1662 iNdEx++ 1663 m.ProposalId |= uint64(b&0x7F) << shift 1664 if b < 0x80 { 1665 break 1666 } 1667 } 1668 case 2: 1669 if wireType != 2 { 1670 return fmt.Errorf("proto: wrong wireType = %d for field Depositor", wireType) 1671 } 1672 var stringLen uint64 1673 for shift := uint(0); ; shift += 7 { 1674 if shift >= 64 { 1675 return ErrIntOverflowTx 1676 } 1677 if iNdEx >= l { 1678 return io.ErrUnexpectedEOF 1679 } 1680 b := dAtA[iNdEx] 1681 iNdEx++ 1682 stringLen |= uint64(b&0x7F) << shift 1683 if b < 0x80 { 1684 break 1685 } 1686 } 1687 intStringLen := int(stringLen) 1688 if intStringLen < 0 { 1689 return ErrInvalidLengthTx 1690 } 1691 postIndex := iNdEx + intStringLen 1692 if postIndex < 0 { 1693 return ErrInvalidLengthTx 1694 } 1695 if postIndex > l { 1696 return io.ErrUnexpectedEOF 1697 } 1698 m.Depositor = string(dAtA[iNdEx:postIndex]) 1699 iNdEx = postIndex 1700 case 3: 1701 if wireType != 2 { 1702 return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) 1703 } 1704 var msglen int 1705 for shift := uint(0); ; shift += 7 { 1706 if shift >= 64 { 1707 return ErrIntOverflowTx 1708 } 1709 if iNdEx >= l { 1710 return io.ErrUnexpectedEOF 1711 } 1712 b := dAtA[iNdEx] 1713 iNdEx++ 1714 msglen |= int(b&0x7F) << shift 1715 if b < 0x80 { 1716 break 1717 } 1718 } 1719 if msglen < 0 { 1720 return ErrInvalidLengthTx 1721 } 1722 postIndex := iNdEx + msglen 1723 if postIndex < 0 { 1724 return ErrInvalidLengthTx 1725 } 1726 if postIndex > l { 1727 return io.ErrUnexpectedEOF 1728 } 1729 m.Amount = append(m.Amount, types1.Coin{}) 1730 if err := m.Amount[len(m.Amount)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 1731 return err 1732 } 1733 iNdEx = postIndex 1734 default: 1735 iNdEx = preIndex 1736 skippy, err := skipTx(dAtA[iNdEx:]) 1737 if err != nil { 1738 return err 1739 } 1740 if (skippy < 0) || (iNdEx+skippy) < 0 { 1741 return ErrInvalidLengthTx 1742 } 1743 if (iNdEx + skippy) > l { 1744 return io.ErrUnexpectedEOF 1745 } 1746 iNdEx += skippy 1747 } 1748 } 1749 1750 if iNdEx > l { 1751 return io.ErrUnexpectedEOF 1752 } 1753 return nil 1754 } 1755 func (m *MsgDepositResponse) Unmarshal(dAtA []byte) error { 1756 l := len(dAtA) 1757 iNdEx := 0 1758 for iNdEx < l { 1759 preIndex := iNdEx 1760 var wire uint64 1761 for shift := uint(0); ; shift += 7 { 1762 if shift >= 64 { 1763 return ErrIntOverflowTx 1764 } 1765 if iNdEx >= l { 1766 return io.ErrUnexpectedEOF 1767 } 1768 b := dAtA[iNdEx] 1769 iNdEx++ 1770 wire |= uint64(b&0x7F) << shift 1771 if b < 0x80 { 1772 break 1773 } 1774 } 1775 fieldNum := int32(wire >> 3) 1776 wireType := int(wire & 0x7) 1777 if wireType == 4 { 1778 return fmt.Errorf("proto: MsgDepositResponse: wiretype end group for non-group") 1779 } 1780 if fieldNum <= 0 { 1781 return fmt.Errorf("proto: MsgDepositResponse: illegal tag %d (wire type %d)", fieldNum, wire) 1782 } 1783 switch fieldNum { 1784 default: 1785 iNdEx = preIndex 1786 skippy, err := skipTx(dAtA[iNdEx:]) 1787 if err != nil { 1788 return err 1789 } 1790 if (skippy < 0) || (iNdEx+skippy) < 0 { 1791 return ErrInvalidLengthTx 1792 } 1793 if (iNdEx + skippy) > l { 1794 return io.ErrUnexpectedEOF 1795 } 1796 iNdEx += skippy 1797 } 1798 } 1799 1800 if iNdEx > l { 1801 return io.ErrUnexpectedEOF 1802 } 1803 return nil 1804 } 1805 func skipTx(dAtA []byte) (n int, err error) { 1806 l := len(dAtA) 1807 iNdEx := 0 1808 depth := 0 1809 for iNdEx < l { 1810 var wire uint64 1811 for shift := uint(0); ; shift += 7 { 1812 if shift >= 64 { 1813 return 0, ErrIntOverflowTx 1814 } 1815 if iNdEx >= l { 1816 return 0, io.ErrUnexpectedEOF 1817 } 1818 b := dAtA[iNdEx] 1819 iNdEx++ 1820 wire |= (uint64(b) & 0x7F) << shift 1821 if b < 0x80 { 1822 break 1823 } 1824 } 1825 wireType := int(wire & 0x7) 1826 switch wireType { 1827 case 0: 1828 for shift := uint(0); ; shift += 7 { 1829 if shift >= 64 { 1830 return 0, ErrIntOverflowTx 1831 } 1832 if iNdEx >= l { 1833 return 0, io.ErrUnexpectedEOF 1834 } 1835 iNdEx++ 1836 if dAtA[iNdEx-1] < 0x80 { 1837 break 1838 } 1839 } 1840 case 1: 1841 iNdEx += 8 1842 case 2: 1843 var length int 1844 for shift := uint(0); ; shift += 7 { 1845 if shift >= 64 { 1846 return 0, ErrIntOverflowTx 1847 } 1848 if iNdEx >= l { 1849 return 0, io.ErrUnexpectedEOF 1850 } 1851 b := dAtA[iNdEx] 1852 iNdEx++ 1853 length |= (int(b) & 0x7F) << shift 1854 if b < 0x80 { 1855 break 1856 } 1857 } 1858 if length < 0 { 1859 return 0, ErrInvalidLengthTx 1860 } 1861 iNdEx += length 1862 case 3: 1863 depth++ 1864 case 4: 1865 if depth == 0 { 1866 return 0, ErrUnexpectedEndOfGroupTx 1867 } 1868 depth-- 1869 case 5: 1870 iNdEx += 4 1871 default: 1872 return 0, fmt.Errorf("proto: illegal wireType %d", wireType) 1873 } 1874 if iNdEx < 0 { 1875 return 0, ErrInvalidLengthTx 1876 } 1877 if depth == 0 { 1878 return iNdEx, nil 1879 } 1880 } 1881 return 0, io.ErrUnexpectedEOF 1882 } 1883 1884 var ( 1885 ErrInvalidLengthTx = fmt.Errorf("proto: negative length found during unmarshaling") 1886 ErrIntOverflowTx = fmt.Errorf("proto: integer overflow") 1887 ErrUnexpectedEndOfGroupTx = fmt.Errorf("proto: unexpected end of group") 1888 )