github.com/fibonacci-chain/fbc@v0.0.0-20231124064014-c7636198c1e9/x/wasm/types/proposal.pb.go (about) 1 // Code generated by protoc-gen-gogo. DO NOT EDIT. 2 // source: cosmwasm/wasm/v1/proposal.proto 3 4 package types 5 6 import ( 7 bytes "bytes" 8 fmt "fmt" 9 io "io" 10 math "math" 11 math_bits "math/bits" 12 13 _ "github.com/gogo/protobuf/gogoproto" 14 proto "github.com/gogo/protobuf/proto" 15 github_com_cosmos_cosmos_sdk_types "github.com/fibonacci-chain/fbc/libs/cosmos-sdk/types" 16 types "github.com/fibonacci-chain/fbc/libs/cosmos-sdk/types" 17 ) 18 19 // Reference imports to suppress errors if they are not otherwise used. 20 var _ = proto.Marshal 21 22 var ( 23 _ = fmt.Errorf 24 _ = math.Inf 25 ) 26 27 // This is a compile-time assertion to ensure that this generated file 28 // is compatible with the proto package it is being compiled against. 29 // A compilation error at this line likely means your copy of the 30 // proto package needs to be updated. 31 const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package 32 33 // StoreCodeProposal gov proposal content type to submit WASM code to the system 34 type StoreCodeProposal struct { 35 // Title is a short summary 36 Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"` 37 // Description is a human readable text 38 Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` 39 // RunAs is the address that is passed to the contract's environment as sender 40 RunAs string `protobuf:"bytes,3,opt,name=run_as,json=runAs,proto3" json:"run_as,omitempty"` 41 // WASMByteCode can be raw or gzip compressed 42 WASMByteCode []byte `protobuf:"bytes,4,opt,name=wasm_byte_code,json=wasmByteCode,proto3" json:"wasm_byte_code,omitempty"` 43 // InstantiatePermission to apply on contract creation, optional 44 InstantiatePermission *AccessConfig `protobuf:"bytes,7,opt,name=instantiate_permission,json=instantiatePermission,proto3" json:"instantiate_permission,omitempty"` 45 } 46 47 func (m *StoreCodeProposal) Reset() { *m = StoreCodeProposal{} } 48 func (*StoreCodeProposal) ProtoMessage() {} 49 func (*StoreCodeProposal) Descriptor() ([]byte, []int) { 50 return fileDescriptor_be6422d717c730cb, []int{0} 51 } 52 53 func (m *StoreCodeProposal) XXX_Unmarshal(b []byte) error { 54 return m.Unmarshal(b) 55 } 56 57 func (m *StoreCodeProposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 58 if deterministic { 59 return xxx_messageInfo_StoreCodeProposal.Marshal(b, m, deterministic) 60 } else { 61 b = b[:cap(b)] 62 n, err := m.MarshalToSizedBuffer(b) 63 if err != nil { 64 return nil, err 65 } 66 return b[:n], nil 67 } 68 } 69 70 func (m *StoreCodeProposal) XXX_Merge(src proto.Message) { 71 xxx_messageInfo_StoreCodeProposal.Merge(m, src) 72 } 73 74 func (m *StoreCodeProposal) XXX_Size() int { 75 return m.Size() 76 } 77 78 func (m *StoreCodeProposal) XXX_DiscardUnknown() { 79 xxx_messageInfo_StoreCodeProposal.DiscardUnknown(m) 80 } 81 82 var xxx_messageInfo_StoreCodeProposal proto.InternalMessageInfo 83 84 // InstantiateContractProposal gov proposal content type to instantiate a 85 // contract. 86 type InstantiateContractProposal struct { 87 // Title is a short summary 88 Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"` 89 // Description is a human readable text 90 Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` 91 // RunAs is the address that is passed to the contract's environment as sender 92 RunAs string `protobuf:"bytes,3,opt,name=run_as,json=runAs,proto3" json:"run_as,omitempty"` 93 // Admin is an optional address that can execute migrations 94 Admin string `protobuf:"bytes,4,opt,name=admin,proto3" json:"admin,omitempty"` 95 // CodeID is the reference to the stored WASM code 96 CodeID uint64 `protobuf:"varint,5,opt,name=code_id,json=codeId,proto3" json:"code_id,omitempty"` 97 // Label is optional metadata to be stored with a constract instance. 98 Label string `protobuf:"bytes,6,opt,name=label,proto3" json:"label,omitempty"` 99 // Msg json encoded message to be passed to the contract on instantiation 100 Msg RawContractMessage `protobuf:"bytes,7,opt,name=msg,proto3,casttype=RawContractMessage" json:"msg,omitempty"` 101 // Funds coins that are transferred to the contract on instantiation 102 Funds github_com_cosmos_cosmos_sdk_types.CoinAdapters `protobuf:"bytes,8,rep,name=funds,proto3,castrepeated=github.com/fibonacci-chain/fbc/libs/cosmos-sdk/types.Coins" json:"funds"` 103 } 104 105 func (m *InstantiateContractProposal) Reset() { *m = InstantiateContractProposal{} } 106 func (*InstantiateContractProposal) ProtoMessage() {} 107 func (*InstantiateContractProposal) Descriptor() ([]byte, []int) { 108 return fileDescriptor_be6422d717c730cb, []int{1} 109 } 110 111 func (m *InstantiateContractProposal) XXX_Unmarshal(b []byte) error { 112 return m.Unmarshal(b) 113 } 114 115 func (m *InstantiateContractProposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 116 if deterministic { 117 return xxx_messageInfo_InstantiateContractProposal.Marshal(b, m, deterministic) 118 } else { 119 b = b[:cap(b)] 120 n, err := m.MarshalToSizedBuffer(b) 121 if err != nil { 122 return nil, err 123 } 124 return b[:n], nil 125 } 126 } 127 128 func (m *InstantiateContractProposal) XXX_Merge(src proto.Message) { 129 xxx_messageInfo_InstantiateContractProposal.Merge(m, src) 130 } 131 132 func (m *InstantiateContractProposal) XXX_Size() int { 133 return m.Size() 134 } 135 136 func (m *InstantiateContractProposal) XXX_DiscardUnknown() { 137 xxx_messageInfo_InstantiateContractProposal.DiscardUnknown(m) 138 } 139 140 var xxx_messageInfo_InstantiateContractProposal proto.InternalMessageInfo 141 142 // MigrateContractProposal gov proposal content type to migrate a contract. 143 type MigrateContractProposal struct { 144 // Title is a short summary 145 Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"` 146 // Description is a human readable text 147 Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` 148 // Contract is the address of the smart contract 149 Contract string `protobuf:"bytes,4,opt,name=contract,proto3" json:"contract,omitempty"` 150 // CodeID references the new WASM code 151 CodeID uint64 `protobuf:"varint,5,opt,name=code_id,json=codeId,proto3" json:"code_id,omitempty"` 152 // Msg json encoded message to be passed to the contract on migration 153 Msg RawContractMessage `protobuf:"bytes,6,opt,name=msg,proto3,casttype=RawContractMessage" json:"msg,omitempty"` 154 } 155 156 func (m *MigrateContractProposal) Reset() { *m = MigrateContractProposal{} } 157 func (*MigrateContractProposal) ProtoMessage() {} 158 func (*MigrateContractProposal) Descriptor() ([]byte, []int) { 159 return fileDescriptor_be6422d717c730cb, []int{2} 160 } 161 162 func (m *MigrateContractProposal) XXX_Unmarshal(b []byte) error { 163 return m.Unmarshal(b) 164 } 165 166 func (m *MigrateContractProposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 167 if deterministic { 168 return xxx_messageInfo_MigrateContractProposal.Marshal(b, m, deterministic) 169 } else { 170 b = b[:cap(b)] 171 n, err := m.MarshalToSizedBuffer(b) 172 if err != nil { 173 return nil, err 174 } 175 return b[:n], nil 176 } 177 } 178 179 func (m *MigrateContractProposal) XXX_Merge(src proto.Message) { 180 xxx_messageInfo_MigrateContractProposal.Merge(m, src) 181 } 182 183 func (m *MigrateContractProposal) XXX_Size() int { 184 return m.Size() 185 } 186 187 func (m *MigrateContractProposal) XXX_DiscardUnknown() { 188 xxx_messageInfo_MigrateContractProposal.DiscardUnknown(m) 189 } 190 191 var xxx_messageInfo_MigrateContractProposal proto.InternalMessageInfo 192 193 // SudoContractProposal gov proposal content type to call sudo on a contract. 194 type SudoContractProposal struct { 195 // Title is a short summary 196 Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"` 197 // Description is a human readable text 198 Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` 199 // Contract is the address of the smart contract 200 Contract string `protobuf:"bytes,3,opt,name=contract,proto3" json:"contract,omitempty"` 201 // Msg json encoded message to be passed to the contract as sudo 202 Msg RawContractMessage `protobuf:"bytes,4,opt,name=msg,proto3,casttype=RawContractMessage" json:"msg,omitempty"` 203 } 204 205 func (m *SudoContractProposal) Reset() { *m = SudoContractProposal{} } 206 func (*SudoContractProposal) ProtoMessage() {} 207 func (*SudoContractProposal) Descriptor() ([]byte, []int) { 208 return fileDescriptor_be6422d717c730cb, []int{3} 209 } 210 211 func (m *SudoContractProposal) XXX_Unmarshal(b []byte) error { 212 return m.Unmarshal(b) 213 } 214 215 func (m *SudoContractProposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 216 if deterministic { 217 return xxx_messageInfo_SudoContractProposal.Marshal(b, m, deterministic) 218 } else { 219 b = b[:cap(b)] 220 n, err := m.MarshalToSizedBuffer(b) 221 if err != nil { 222 return nil, err 223 } 224 return b[:n], nil 225 } 226 } 227 228 func (m *SudoContractProposal) XXX_Merge(src proto.Message) { 229 xxx_messageInfo_SudoContractProposal.Merge(m, src) 230 } 231 232 func (m *SudoContractProposal) XXX_Size() int { 233 return m.Size() 234 } 235 236 func (m *SudoContractProposal) XXX_DiscardUnknown() { 237 xxx_messageInfo_SudoContractProposal.DiscardUnknown(m) 238 } 239 240 var xxx_messageInfo_SudoContractProposal proto.InternalMessageInfo 241 242 // ExecuteContractProposal gov proposal content type to call execute on a 243 // contract. 244 type ExecuteContractProposal struct { 245 // Title is a short summary 246 Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"` 247 // Description is a human readable text 248 Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` 249 // RunAs is the address that is passed to the contract's environment as sender 250 RunAs string `protobuf:"bytes,3,opt,name=run_as,json=runAs,proto3" json:"run_as,omitempty"` 251 // Contract is the address of the smart contract 252 Contract string `protobuf:"bytes,4,opt,name=contract,proto3" json:"contract,omitempty"` 253 // Msg json encoded message to be passed to the contract as execute 254 Msg RawContractMessage `protobuf:"bytes,5,opt,name=msg,proto3,casttype=RawContractMessage" json:"msg,omitempty"` 255 // Funds coins that are transferred to the contract on instantiation 256 Funds github_com_cosmos_cosmos_sdk_types.CoinAdapters `protobuf:"bytes,6,rep,name=funds,proto3,castrepeated=github.com/fibonacci-chain/fbc/libs/cosmos-sdk/types.Coins" json:"funds"` 257 } 258 259 func (m *ExecuteContractProposal) Reset() { *m = ExecuteContractProposal{} } 260 func (*ExecuteContractProposal) ProtoMessage() {} 261 func (*ExecuteContractProposal) Descriptor() ([]byte, []int) { 262 return fileDescriptor_be6422d717c730cb, []int{4} 263 } 264 265 func (m *ExecuteContractProposal) XXX_Unmarshal(b []byte) error { 266 return m.Unmarshal(b) 267 } 268 269 func (m *ExecuteContractProposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 270 if deterministic { 271 return xxx_messageInfo_ExecuteContractProposal.Marshal(b, m, deterministic) 272 } else { 273 b = b[:cap(b)] 274 n, err := m.MarshalToSizedBuffer(b) 275 if err != nil { 276 return nil, err 277 } 278 return b[:n], nil 279 } 280 } 281 282 func (m *ExecuteContractProposal) XXX_Merge(src proto.Message) { 283 xxx_messageInfo_ExecuteContractProposal.Merge(m, src) 284 } 285 286 func (m *ExecuteContractProposal) XXX_Size() int { 287 return m.Size() 288 } 289 290 func (m *ExecuteContractProposal) XXX_DiscardUnknown() { 291 xxx_messageInfo_ExecuteContractProposal.DiscardUnknown(m) 292 } 293 294 var xxx_messageInfo_ExecuteContractProposal proto.InternalMessageInfo 295 296 // UpdateAdminProposal gov proposal content type to set an admin for a contract. 297 type UpdateAdminProposal struct { 298 // Title is a short summary 299 Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"` 300 // Description is a human readable text 301 Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` 302 // NewAdmin address to be set 303 NewAdmin string `protobuf:"bytes,3,opt,name=new_admin,json=newAdmin,proto3" json:"new_admin,omitempty" yaml:"new_admin"` 304 // Contract is the address of the smart contract 305 Contract string `protobuf:"bytes,4,opt,name=contract,proto3" json:"contract,omitempty"` 306 } 307 308 func (m *UpdateAdminProposal) Reset() { *m = UpdateAdminProposal{} } 309 func (*UpdateAdminProposal) ProtoMessage() {} 310 func (*UpdateAdminProposal) Descriptor() ([]byte, []int) { 311 return fileDescriptor_be6422d717c730cb, []int{5} 312 } 313 314 func (m *UpdateAdminProposal) XXX_Unmarshal(b []byte) error { 315 return m.Unmarshal(b) 316 } 317 318 func (m *UpdateAdminProposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 319 if deterministic { 320 return xxx_messageInfo_UpdateAdminProposal.Marshal(b, m, deterministic) 321 } else { 322 b = b[:cap(b)] 323 n, err := m.MarshalToSizedBuffer(b) 324 if err != nil { 325 return nil, err 326 } 327 return b[:n], nil 328 } 329 } 330 331 func (m *UpdateAdminProposal) XXX_Merge(src proto.Message) { 332 xxx_messageInfo_UpdateAdminProposal.Merge(m, src) 333 } 334 335 func (m *UpdateAdminProposal) XXX_Size() int { 336 return m.Size() 337 } 338 339 func (m *UpdateAdminProposal) XXX_DiscardUnknown() { 340 xxx_messageInfo_UpdateAdminProposal.DiscardUnknown(m) 341 } 342 343 var xxx_messageInfo_UpdateAdminProposal proto.InternalMessageInfo 344 345 // ClearAdminProposal gov proposal content type to clear the admin of a 346 // contract. 347 type ClearAdminProposal struct { 348 // Title is a short summary 349 Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"` 350 // Description is a human readable text 351 Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` 352 // Contract is the address of the smart contract 353 Contract string `protobuf:"bytes,3,opt,name=contract,proto3" json:"contract,omitempty"` 354 } 355 356 func (m *ClearAdminProposal) Reset() { *m = ClearAdminProposal{} } 357 func (*ClearAdminProposal) ProtoMessage() {} 358 func (*ClearAdminProposal) Descriptor() ([]byte, []int) { 359 return fileDescriptor_be6422d717c730cb, []int{6} 360 } 361 362 func (m *ClearAdminProposal) XXX_Unmarshal(b []byte) error { 363 return m.Unmarshal(b) 364 } 365 366 func (m *ClearAdminProposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 367 if deterministic { 368 return xxx_messageInfo_ClearAdminProposal.Marshal(b, m, deterministic) 369 } else { 370 b = b[:cap(b)] 371 n, err := m.MarshalToSizedBuffer(b) 372 if err != nil { 373 return nil, err 374 } 375 return b[:n], nil 376 } 377 } 378 379 func (m *ClearAdminProposal) XXX_Merge(src proto.Message) { 380 xxx_messageInfo_ClearAdminProposal.Merge(m, src) 381 } 382 383 func (m *ClearAdminProposal) XXX_Size() int { 384 return m.Size() 385 } 386 387 func (m *ClearAdminProposal) XXX_DiscardUnknown() { 388 xxx_messageInfo_ClearAdminProposal.DiscardUnknown(m) 389 } 390 391 var xxx_messageInfo_ClearAdminProposal proto.InternalMessageInfo 392 393 // PinCodesProposal gov proposal content type to pin a set of code ids in the 394 // wasmvm cache. 395 type PinCodesProposal struct { 396 // Title is a short summary 397 Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty" yaml:"title"` 398 // Description is a human readable text 399 Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty" yaml:"description"` 400 // CodeIDs references the new WASM codes 401 CodeIDs []uint64 `protobuf:"varint,3,rep,packed,name=code_ids,json=codeIds,proto3" json:"code_ids,omitempty" yaml:"code_ids"` 402 } 403 404 func (m *PinCodesProposal) Reset() { *m = PinCodesProposal{} } 405 func (*PinCodesProposal) ProtoMessage() {} 406 func (*PinCodesProposal) Descriptor() ([]byte, []int) { 407 return fileDescriptor_be6422d717c730cb, []int{7} 408 } 409 410 func (m *PinCodesProposal) XXX_Unmarshal(b []byte) error { 411 return m.Unmarshal(b) 412 } 413 414 func (m *PinCodesProposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 415 if deterministic { 416 return xxx_messageInfo_PinCodesProposal.Marshal(b, m, deterministic) 417 } else { 418 b = b[:cap(b)] 419 n, err := m.MarshalToSizedBuffer(b) 420 if err != nil { 421 return nil, err 422 } 423 return b[:n], nil 424 } 425 } 426 427 func (m *PinCodesProposal) XXX_Merge(src proto.Message) { 428 xxx_messageInfo_PinCodesProposal.Merge(m, src) 429 } 430 431 func (m *PinCodesProposal) XXX_Size() int { 432 return m.Size() 433 } 434 435 func (m *PinCodesProposal) XXX_DiscardUnknown() { 436 xxx_messageInfo_PinCodesProposal.DiscardUnknown(m) 437 } 438 439 var xxx_messageInfo_PinCodesProposal proto.InternalMessageInfo 440 441 // UnpinCodesProposal gov proposal content type to unpin a set of code ids in 442 // the wasmvm cache. 443 type UnpinCodesProposal struct { 444 // Title is a short summary 445 Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty" yaml:"title"` 446 // Description is a human readable text 447 Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty" yaml:"description"` 448 // CodeIDs references the WASM codes 449 CodeIDs []uint64 `protobuf:"varint,3,rep,packed,name=code_ids,json=codeIds,proto3" json:"code_ids,omitempty" yaml:"code_ids"` 450 } 451 452 func (m *UnpinCodesProposal) Reset() { *m = UnpinCodesProposal{} } 453 func (*UnpinCodesProposal) ProtoMessage() {} 454 func (*UnpinCodesProposal) Descriptor() ([]byte, []int) { 455 return fileDescriptor_be6422d717c730cb, []int{8} 456 } 457 458 func (m *UnpinCodesProposal) XXX_Unmarshal(b []byte) error { 459 return m.Unmarshal(b) 460 } 461 462 func (m *UnpinCodesProposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 463 if deterministic { 464 return xxx_messageInfo_UnpinCodesProposal.Marshal(b, m, deterministic) 465 } else { 466 b = b[:cap(b)] 467 n, err := m.MarshalToSizedBuffer(b) 468 if err != nil { 469 return nil, err 470 } 471 return b[:n], nil 472 } 473 } 474 475 func (m *UnpinCodesProposal) XXX_Merge(src proto.Message) { 476 xxx_messageInfo_UnpinCodesProposal.Merge(m, src) 477 } 478 479 func (m *UnpinCodesProposal) XXX_Size() int { 480 return m.Size() 481 } 482 483 func (m *UnpinCodesProposal) XXX_DiscardUnknown() { 484 xxx_messageInfo_UnpinCodesProposal.DiscardUnknown(m) 485 } 486 487 var xxx_messageInfo_UnpinCodesProposal proto.InternalMessageInfo 488 489 // AccessConfigUpdate contains the code id and the access config to be 490 // applied. 491 type AccessConfigUpdate struct { 492 // CodeID is the reference to the stored WASM code to be updated 493 CodeID uint64 `protobuf:"varint,1,opt,name=code_id,json=codeId,proto3" json:"code_id,omitempty"` 494 // InstantiatePermission to apply to the set of code ids 495 InstantiatePermission AccessConfig `protobuf:"bytes,2,opt,name=instantiate_permission,json=instantiatePermission,proto3" json:"instantiate_permission"` 496 } 497 498 func (m *AccessConfigUpdate) Reset() { *m = AccessConfigUpdate{} } 499 func (*AccessConfigUpdate) ProtoMessage() {} 500 func (*AccessConfigUpdate) Descriptor() ([]byte, []int) { 501 return fileDescriptor_be6422d717c730cb, []int{9} 502 } 503 504 func (m *AccessConfigUpdate) XXX_Unmarshal(b []byte) error { 505 return m.Unmarshal(b) 506 } 507 508 func (m *AccessConfigUpdate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 509 if deterministic { 510 return xxx_messageInfo_AccessConfigUpdate.Marshal(b, m, deterministic) 511 } else { 512 b = b[:cap(b)] 513 n, err := m.MarshalToSizedBuffer(b) 514 if err != nil { 515 return nil, err 516 } 517 return b[:n], nil 518 } 519 } 520 521 func (m *AccessConfigUpdate) XXX_Merge(src proto.Message) { 522 xxx_messageInfo_AccessConfigUpdate.Merge(m, src) 523 } 524 525 func (m *AccessConfigUpdate) XXX_Size() int { 526 return m.Size() 527 } 528 529 func (m *AccessConfigUpdate) XXX_DiscardUnknown() { 530 xxx_messageInfo_AccessConfigUpdate.DiscardUnknown(m) 531 } 532 533 var xxx_messageInfo_AccessConfigUpdate proto.InternalMessageInfo 534 535 // UpdateInstantiateConfigProposal gov proposal content type to update 536 // instantiate config to a set of code ids. 537 type UpdateInstantiateConfigProposal struct { 538 // Title is a short summary 539 Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty" yaml:"title"` 540 // Description is a human readable text 541 Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty" yaml:"description"` 542 // AccessConfigUpdate contains the list of code ids and the access config 543 // to be applied. 544 AccessConfigUpdates []AccessConfigUpdate `protobuf:"bytes,3,rep,name=access_config_updates,json=accessConfigUpdates,proto3" json:"access_config_updates"` 545 } 546 547 func (m *UpdateInstantiateConfigProposal) Reset() { *m = UpdateInstantiateConfigProposal{} } 548 func (*UpdateInstantiateConfigProposal) ProtoMessage() {} 549 func (*UpdateInstantiateConfigProposal) Descriptor() ([]byte, []int) { 550 return fileDescriptor_be6422d717c730cb, []int{10} 551 } 552 553 func (m *UpdateInstantiateConfigProposal) XXX_Unmarshal(b []byte) error { 554 return m.Unmarshal(b) 555 } 556 557 func (m *UpdateInstantiateConfigProposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 558 if deterministic { 559 return xxx_messageInfo_UpdateInstantiateConfigProposal.Marshal(b, m, deterministic) 560 } else { 561 b = b[:cap(b)] 562 n, err := m.MarshalToSizedBuffer(b) 563 if err != nil { 564 return nil, err 565 } 566 return b[:n], nil 567 } 568 } 569 570 func (m *UpdateInstantiateConfigProposal) XXX_Merge(src proto.Message) { 571 xxx_messageInfo_UpdateInstantiateConfigProposal.Merge(m, src) 572 } 573 574 func (m *UpdateInstantiateConfigProposal) XXX_Size() int { 575 return m.Size() 576 } 577 578 func (m *UpdateInstantiateConfigProposal) XXX_DiscardUnknown() { 579 xxx_messageInfo_UpdateInstantiateConfigProposal.DiscardUnknown(m) 580 } 581 582 var xxx_messageInfo_UpdateInstantiateConfigProposal proto.InternalMessageInfo 583 584 func init() { 585 proto.RegisterType((*StoreCodeProposal)(nil), "cosmwasm.wasm.v1.StoreCodeProposal") 586 proto.RegisterType((*InstantiateContractProposal)(nil), "cosmwasm.wasm.v1.InstantiateContractProposal") 587 proto.RegisterType((*MigrateContractProposal)(nil), "cosmwasm.wasm.v1.MigrateContractProposal") 588 proto.RegisterType((*SudoContractProposal)(nil), "cosmwasm.wasm.v1.SudoContractProposal") 589 proto.RegisterType((*ExecuteContractProposal)(nil), "cosmwasm.wasm.v1.ExecuteContractProposal") 590 proto.RegisterType((*UpdateAdminProposal)(nil), "cosmwasm.wasm.v1.UpdateAdminProposal") 591 proto.RegisterType((*ClearAdminProposal)(nil), "cosmwasm.wasm.v1.ClearAdminProposal") 592 proto.RegisterType((*PinCodesProposal)(nil), "cosmwasm.wasm.v1.PinCodesProposal") 593 proto.RegisterType((*UnpinCodesProposal)(nil), "cosmwasm.wasm.v1.UnpinCodesProposal") 594 proto.RegisterType((*AccessConfigUpdate)(nil), "cosmwasm.wasm.v1.AccessConfigUpdate") 595 proto.RegisterType((*UpdateInstantiateConfigProposal)(nil), "cosmwasm.wasm.v1.UpdateInstantiateConfigProposal") 596 } 597 598 func init() { proto.RegisterFile("cosmwasm/wasm/v1/proposal.proto", fileDescriptor_be6422d717c730cb) } 599 600 var fileDescriptor_be6422d717c730cb = []byte{ 601 // 817 bytes of a gzipped FileDescriptorProto 602 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x56, 0x4f, 0x6f, 0xe3, 0x44, 603 0x14, 0xcf, 0xe4, 0x8f, 0x93, 0x4e, 0x22, 0x08, 0xde, 0xb4, 0x1b, 0x0a, 0xb2, 0x23, 0x83, 0x56, 604 0xbe, 0x60, 0x93, 0x22, 0x21, 0xe0, 0x16, 0x07, 0x0e, 0x5d, 0x51, 0xa9, 0x72, 0x55, 0xad, 0x04, 605 0x12, 0xd6, 0xc4, 0x9e, 0x7a, 0x2d, 0x62, 0x8f, 0xe5, 0x99, 0x34, 0x9b, 0x6f, 0x01, 0x12, 0xe2, 606 0xc4, 0x07, 0x40, 0x5c, 0x10, 0x77, 0x3e, 0x40, 0xc5, 0x69, 0x8f, 0x7b, 0x32, 0x6c, 0xf2, 0x0d, 607 0x72, 0x44, 0x42, 0x42, 0x33, 0xe3, 0x84, 0x74, 0x97, 0x66, 0x17, 0xd1, 0x20, 0x71, 0x71, 0xf2, 608 0xe6, 0xbd, 0x37, 0xef, 0x37, 0x3f, 0xfd, 0xde, 0xbc, 0x81, 0xba, 0x4f, 0x68, 0x3c, 0x45, 0x34, 609 0xb6, 0xc5, 0xe7, 0xb2, 0x6f, 0xa7, 0x19, 0x49, 0x09, 0x45, 0x63, 0x2b, 0xcd, 0x08, 0x23, 0x6a, 610 0x7b, 0x15, 0x60, 0x89, 0xcf, 0x65, 0xff, 0xb0, 0x13, 0x92, 0x90, 0x08, 0xa7, 0xcd, 0xff, 0xc9, 611 0xb8, 0x43, 0x8d, 0xc7, 0x11, 0x6a, 0x8f, 0x10, 0xc5, 0xf6, 0x65, 0x7f, 0x84, 0x19, 0xea, 0xdb, 612 0x3e, 0x89, 0x92, 0xc2, 0xff, 0xe6, 0x73, 0x85, 0xd8, 0x2c, 0xc5, 0x54, 0x7a, 0x8d, 0x3f, 0x00, 613 0x7c, 0xed, 0x8c, 0x91, 0x0c, 0x0f, 0x49, 0x80, 0x4f, 0x0b, 0x04, 0x6a, 0x07, 0xd6, 0x58, 0xc4, 614 0xc6, 0xb8, 0x0b, 0x7a, 0xc0, 0xdc, 0x73, 0xa5, 0xa1, 0xf6, 0x60, 0x33, 0xc0, 0xd4, 0xcf, 0xa2, 615 0x94, 0x45, 0x24, 0xe9, 0x96, 0x85, 0x6f, 0x73, 0x49, 0xdd, 0x87, 0x4a, 0x36, 0x49, 0x3c, 0x44, 616 0xbb, 0x15, 0x99, 0x98, 0x4d, 0x92, 0x01, 0x55, 0xdf, 0x87, 0xaf, 0xf0, 0xda, 0xde, 0x68, 0xc6, 617 0xb0, 0xe7, 0x93, 0x00, 0x77, 0xab, 0x3d, 0x60, 0xb6, 0x9c, 0xf6, 0x3c, 0xd7, 0x5b, 0x0f, 0x06, 618 0x67, 0x27, 0xce, 0x8c, 0x09, 0x00, 0x6e, 0x8b, 0xc7, 0xad, 0x2c, 0xf5, 0x1c, 0x1e, 0x44, 0x09, 619 0x65, 0x28, 0x61, 0x11, 0x62, 0xd8, 0x4b, 0x71, 0x16, 0x47, 0x94, 0xf2, 0xda, 0xf5, 0x1e, 0x30, 620 0x9b, 0x47, 0x9a, 0xf5, 0x2c, 0x47, 0xd6, 0xc0, 0xf7, 0x31, 0xa5, 0x43, 0x92, 0x5c, 0x44, 0xa1, 621 0xbb, 0xbf, 0x91, 0x7d, 0xba, 0x4e, 0xbe, 0x5f, 0x6d, 0xd4, 0xda, 0xca, 0xfd, 0x6a, 0x43, 0x69, 622 0xd7, 0x8d, 0x5f, 0xca, 0xf0, 0x8d, 0xe3, 0xbf, 0xa2, 0x86, 0x24, 0x61, 0x19, 0xf2, 0xd9, 0xae, 623 0x98, 0xe8, 0xc0, 0x1a, 0x0a, 0xe2, 0x28, 0x11, 0x04, 0xec, 0xb9, 0xd2, 0x50, 0xdf, 0x82, 0x75, 624 0xce, 0x8a, 0x17, 0x05, 0xdd, 0x5a, 0x0f, 0x98, 0x55, 0x07, 0xce, 0x73, 0x5d, 0xe1, 0x14, 0x1c, 625 0x7f, 0xec, 0x2a, 0xdc, 0x75, 0x1c, 0xf0, 0xd4, 0x31, 0x1a, 0xe1, 0x71, 0x57, 0x91, 0xa9, 0xc2, 626 0x50, 0x4d, 0x58, 0x89, 0x69, 0x28, 0xf8, 0x68, 0x39, 0x07, 0xbf, 0xe7, 0xba, 0xea, 0xa2, 0xe9, 627 0xea, 0x14, 0x27, 0x98, 0x52, 0x14, 0x62, 0x97, 0x87, 0xa8, 0x08, 0xd6, 0x2e, 0x26, 0x49, 0x40, 628 0xbb, 0x8d, 0x5e, 0xc5, 0x6c, 0x1e, 0xbd, 0x6e, 0x49, 0xdd, 0x58, 0x5c, 0x37, 0x56, 0xa1, 0x1b, 629 0x6b, 0x48, 0xa2, 0xc4, 0x79, 0xf7, 0x2a, 0xd7, 0x4b, 0x3f, 0xfc, 0xaa, 0x9b, 0x61, 0xc4, 0x1e, 630 0x4e, 0x46, 0x96, 0x4f, 0x62, 0xbb, 0x10, 0x99, 0xfc, 0x79, 0x87, 0x06, 0x5f, 0x16, 0x2a, 0xe2, 631 0x09, 0xd4, 0x95, 0x3b, 0x1b, 0x3f, 0x03, 0x78, 0xf7, 0x24, 0x0a, 0xb3, 0xdb, 0x24, 0xf2, 0x10, 632 0x36, 0xfc, 0x62, 0xaf, 0x82, 0xb4, 0xb5, 0xfd, 0x72, 0xbc, 0x15, 0x0c, 0x29, 0x2f, 0x64, 0xc8, 633 0xf8, 0x06, 0xc0, 0xce, 0xd9, 0x24, 0x20, 0x3b, 0xc1, 0x5e, 0x79, 0x06, 0x7b, 0x01, 0xab, 0xfa, 634 0x62, 0x58, 0x5f, 0x97, 0xe1, 0xdd, 0x4f, 0x1e, 0x61, 0x7f, 0xb2, 0x7b, 0x79, 0x6e, 0x23, 0xbb, 635 0x00, 0x5c, 0xfb, 0x07, 0x4a, 0x53, 0x76, 0xa6, 0xb4, 0xef, 0x00, 0xbc, 0x73, 0x9e, 0x06, 0x88, 636 0xe1, 0x01, 0xef, 0xa0, 0x7f, 0xcd, 0x47, 0x1f, 0xee, 0x25, 0x78, 0xea, 0xc9, 0xde, 0x14, 0x94, 637 0x38, 0x9d, 0x65, 0xae, 0xb7, 0x67, 0x28, 0x1e, 0x7f, 0x64, 0xac, 0x5d, 0x86, 0xdb, 0x48, 0xf0, 638 0x54, 0x94, 0xdc, 0xc6, 0x95, 0xf1, 0x10, 0xaa, 0xc3, 0x31, 0x46, 0xd9, 0xed, 0x80, 0xdb, 0x22, 639 0x23, 0xe3, 0x47, 0x00, 0xdb, 0xa7, 0x51, 0xc2, 0x35, 0x4f, 0xd7, 0x85, 0xee, 0x5d, 0x2b, 0xe4, 640 0xb4, 0x97, 0xb9, 0xde, 0x92, 0x27, 0x11, 0xcb, 0xc6, 0xaa, 0xf4, 0x07, 0x7f, 0x53, 0xda, 0x39, 641 0x58, 0xe6, 0xba, 0x2a, 0xa3, 0x37, 0x9c, 0xc6, 0x75, 0x48, 0x1f, 0x72, 0x48, 0xa2, 0xf3, 0xb8, 642 0x82, 0x2a, 0x66, 0xd5, 0xd1, 0xe6, 0xb9, 0x5e, 0x97, 0xad, 0x47, 0x97, 0xb9, 0xfe, 0xaa, 0xdc, 643 0x61, 0x15, 0x64, 0xb8, 0x75, 0xd9, 0x8e, 0xd4, 0xf8, 0x09, 0x40, 0xf5, 0x3c, 0x49, 0xff, 0x57, 644 0x98, 0xbf, 0x05, 0x50, 0xdd, 0x9c, 0x2c, 0x52, 0x7a, 0x9b, 0xf7, 0x0f, 0xb8, 0xf1, 0xfe, 0xf9, 645 0xfc, 0xc6, 0x21, 0x56, 0x7e, 0x99, 0x21, 0xe6, 0x54, 0x79, 0x8f, 0xdc, 0x30, 0xca, 0x8c, 0x05, 646 0x80, 0xba, 0x04, 0x73, 0x7d, 0x88, 0x5d, 0x44, 0xe1, 0x7f, 0xc8, 0xec, 0x17, 0x70, 0x1f, 0x09, 647 0xc8, 0x9e, 0x2f, 0x4a, 0x7b, 0x13, 0x01, 0x49, 0xd2, 0xdc, 0x3c, 0x7a, 0x7b, 0xfb, 0x09, 0x25, 648 0xfe, 0xe2, 0x9c, 0x77, 0xd0, 0x73, 0x1e, 0xea, 0x7c, 0x7a, 0xf5, 0x54, 0x2b, 0x3d, 0x79, 0xaa, 649 0x95, 0xbe, 0x9f, 0x6b, 0xe0, 0x6a, 0xae, 0x81, 0xc7, 0x73, 0x0d, 0xfc, 0x36, 0xd7, 0xc0, 0x57, 650 0x0b, 0xad, 0xf4, 0x78, 0xa1, 0x95, 0x9e, 0x2c, 0xb4, 0xd2, 0x67, 0xf7, 0x36, 0x2e, 0x91, 0x21, 651 0xa1, 0xf1, 0x83, 0xd5, 0x9b, 0x27, 0xb0, 0x1f, 0xc9, 0xb7, 0x8f, 0xb8, 0x48, 0x46, 0x8a, 0x78, 652 0xf9, 0xbc, 0xf7, 0x67, 0x00, 0x00, 0x00, 0xff, 0xff, 0x70, 0x3f, 0xe6, 0xf2, 0x82, 0x09, 0x00, 653 0x00, 654 } 655 656 func (this *StoreCodeProposal) Equal(that interface{}) bool { 657 if that == nil { 658 return this == nil 659 } 660 661 that1, ok := that.(*StoreCodeProposal) 662 if !ok { 663 that2, ok := that.(StoreCodeProposal) 664 if ok { 665 that1 = &that2 666 } else { 667 return false 668 } 669 } 670 if that1 == nil { 671 return this == nil 672 } else if this == nil { 673 return false 674 } 675 if this.Title != that1.Title { 676 return false 677 } 678 if this.Description != that1.Description { 679 return false 680 } 681 if this.RunAs != that1.RunAs { 682 return false 683 } 684 if !bytes.Equal(this.WASMByteCode, that1.WASMByteCode) { 685 return false 686 } 687 if !this.InstantiatePermission.Equal(that1.InstantiatePermission) { 688 return false 689 } 690 return true 691 } 692 693 func (this *InstantiateContractProposal) Equal(that interface{}) bool { 694 if that == nil { 695 return this == nil 696 } 697 698 that1, ok := that.(*InstantiateContractProposal) 699 if !ok { 700 that2, ok := that.(InstantiateContractProposal) 701 if ok { 702 that1 = &that2 703 } else { 704 return false 705 } 706 } 707 if that1 == nil { 708 return this == nil 709 } else if this == nil { 710 return false 711 } 712 if this.Title != that1.Title { 713 return false 714 } 715 if this.Description != that1.Description { 716 return false 717 } 718 if this.RunAs != that1.RunAs { 719 return false 720 } 721 if this.Admin != that1.Admin { 722 return false 723 } 724 if this.CodeID != that1.CodeID { 725 return false 726 } 727 if this.Label != that1.Label { 728 return false 729 } 730 if !bytes.Equal(this.Msg, that1.Msg) { 731 return false 732 } 733 if len(this.Funds) != len(that1.Funds) { 734 return false 735 } 736 for i := range this.Funds { 737 if !this.Funds[i].Equal(&that1.Funds[i]) { 738 return false 739 } 740 } 741 return true 742 } 743 744 func (this *MigrateContractProposal) Equal(that interface{}) bool { 745 if that == nil { 746 return this == nil 747 } 748 749 that1, ok := that.(*MigrateContractProposal) 750 if !ok { 751 that2, ok := that.(MigrateContractProposal) 752 if ok { 753 that1 = &that2 754 } else { 755 return false 756 } 757 } 758 if that1 == nil { 759 return this == nil 760 } else if this == nil { 761 return false 762 } 763 if this.Title != that1.Title { 764 return false 765 } 766 if this.Description != that1.Description { 767 return false 768 } 769 if this.Contract != that1.Contract { 770 return false 771 } 772 if this.CodeID != that1.CodeID { 773 return false 774 } 775 if !bytes.Equal(this.Msg, that1.Msg) { 776 return false 777 } 778 return true 779 } 780 781 func (this *SudoContractProposal) Equal(that interface{}) bool { 782 if that == nil { 783 return this == nil 784 } 785 786 that1, ok := that.(*SudoContractProposal) 787 if !ok { 788 that2, ok := that.(SudoContractProposal) 789 if ok { 790 that1 = &that2 791 } else { 792 return false 793 } 794 } 795 if that1 == nil { 796 return this == nil 797 } else if this == nil { 798 return false 799 } 800 if this.Title != that1.Title { 801 return false 802 } 803 if this.Description != that1.Description { 804 return false 805 } 806 if this.Contract != that1.Contract { 807 return false 808 } 809 if !bytes.Equal(this.Msg, that1.Msg) { 810 return false 811 } 812 return true 813 } 814 815 func (this *ExecuteContractProposal) Equal(that interface{}) bool { 816 if that == nil { 817 return this == nil 818 } 819 820 that1, ok := that.(*ExecuteContractProposal) 821 if !ok { 822 that2, ok := that.(ExecuteContractProposal) 823 if ok { 824 that1 = &that2 825 } else { 826 return false 827 } 828 } 829 if that1 == nil { 830 return this == nil 831 } else if this == nil { 832 return false 833 } 834 if this.Title != that1.Title { 835 return false 836 } 837 if this.Description != that1.Description { 838 return false 839 } 840 if this.RunAs != that1.RunAs { 841 return false 842 } 843 if this.Contract != that1.Contract { 844 return false 845 } 846 if !bytes.Equal(this.Msg, that1.Msg) { 847 return false 848 } 849 if len(this.Funds) != len(that1.Funds) { 850 return false 851 } 852 for i := range this.Funds { 853 if !this.Funds[i].Equal(&that1.Funds[i]) { 854 return false 855 } 856 } 857 return true 858 } 859 860 func (this *UpdateAdminProposal) Equal(that interface{}) bool { 861 if that == nil { 862 return this == nil 863 } 864 865 that1, ok := that.(*UpdateAdminProposal) 866 if !ok { 867 that2, ok := that.(UpdateAdminProposal) 868 if ok { 869 that1 = &that2 870 } else { 871 return false 872 } 873 } 874 if that1 == nil { 875 return this == nil 876 } else if this == nil { 877 return false 878 } 879 if this.Title != that1.Title { 880 return false 881 } 882 if this.Description != that1.Description { 883 return false 884 } 885 if this.NewAdmin != that1.NewAdmin { 886 return false 887 } 888 if this.Contract != that1.Contract { 889 return false 890 } 891 return true 892 } 893 894 func (this *ClearAdminProposal) Equal(that interface{}) bool { 895 if that == nil { 896 return this == nil 897 } 898 899 that1, ok := that.(*ClearAdminProposal) 900 if !ok { 901 that2, ok := that.(ClearAdminProposal) 902 if ok { 903 that1 = &that2 904 } else { 905 return false 906 } 907 } 908 if that1 == nil { 909 return this == nil 910 } else if this == nil { 911 return false 912 } 913 if this.Title != that1.Title { 914 return false 915 } 916 if this.Description != that1.Description { 917 return false 918 } 919 if this.Contract != that1.Contract { 920 return false 921 } 922 return true 923 } 924 925 func (this *PinCodesProposal) Equal(that interface{}) bool { 926 if that == nil { 927 return this == nil 928 } 929 930 that1, ok := that.(*PinCodesProposal) 931 if !ok { 932 that2, ok := that.(PinCodesProposal) 933 if ok { 934 that1 = &that2 935 } else { 936 return false 937 } 938 } 939 if that1 == nil { 940 return this == nil 941 } else if this == nil { 942 return false 943 } 944 if this.Title != that1.Title { 945 return false 946 } 947 if this.Description != that1.Description { 948 return false 949 } 950 if len(this.CodeIDs) != len(that1.CodeIDs) { 951 return false 952 } 953 for i := range this.CodeIDs { 954 if this.CodeIDs[i] != that1.CodeIDs[i] { 955 return false 956 } 957 } 958 return true 959 } 960 961 func (this *UnpinCodesProposal) Equal(that interface{}) bool { 962 if that == nil { 963 return this == nil 964 } 965 966 that1, ok := that.(*UnpinCodesProposal) 967 if !ok { 968 that2, ok := that.(UnpinCodesProposal) 969 if ok { 970 that1 = &that2 971 } else { 972 return false 973 } 974 } 975 if that1 == nil { 976 return this == nil 977 } else if this == nil { 978 return false 979 } 980 if this.Title != that1.Title { 981 return false 982 } 983 if this.Description != that1.Description { 984 return false 985 } 986 if len(this.CodeIDs) != len(that1.CodeIDs) { 987 return false 988 } 989 for i := range this.CodeIDs { 990 if this.CodeIDs[i] != that1.CodeIDs[i] { 991 return false 992 } 993 } 994 return true 995 } 996 997 func (this *AccessConfigUpdate) Equal(that interface{}) bool { 998 if that == nil { 999 return this == nil 1000 } 1001 1002 that1, ok := that.(*AccessConfigUpdate) 1003 if !ok { 1004 that2, ok := that.(AccessConfigUpdate) 1005 if ok { 1006 that1 = &that2 1007 } else { 1008 return false 1009 } 1010 } 1011 if that1 == nil { 1012 return this == nil 1013 } else if this == nil { 1014 return false 1015 } 1016 if this.CodeID != that1.CodeID { 1017 return false 1018 } 1019 if !this.InstantiatePermission.Equal(&that1.InstantiatePermission) { 1020 return false 1021 } 1022 return true 1023 } 1024 1025 func (this *UpdateInstantiateConfigProposal) Equal(that interface{}) bool { 1026 if that == nil { 1027 return this == nil 1028 } 1029 1030 that1, ok := that.(*UpdateInstantiateConfigProposal) 1031 if !ok { 1032 that2, ok := that.(UpdateInstantiateConfigProposal) 1033 if ok { 1034 that1 = &that2 1035 } else { 1036 return false 1037 } 1038 } 1039 if that1 == nil { 1040 return this == nil 1041 } else if this == nil { 1042 return false 1043 } 1044 if this.Title != that1.Title { 1045 return false 1046 } 1047 if this.Description != that1.Description { 1048 return false 1049 } 1050 if len(this.AccessConfigUpdates) != len(that1.AccessConfigUpdates) { 1051 return false 1052 } 1053 for i := range this.AccessConfigUpdates { 1054 if !this.AccessConfigUpdates[i].Equal(&that1.AccessConfigUpdates[i]) { 1055 return false 1056 } 1057 } 1058 return true 1059 } 1060 1061 func (m *StoreCodeProposal) Marshal() (dAtA []byte, err error) { 1062 size := m.Size() 1063 dAtA = make([]byte, size) 1064 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 1065 if err != nil { 1066 return nil, err 1067 } 1068 return dAtA[:n], nil 1069 } 1070 1071 func (m *StoreCodeProposal) MarshalTo(dAtA []byte) (int, error) { 1072 size := m.Size() 1073 return m.MarshalToSizedBuffer(dAtA[:size]) 1074 } 1075 1076 func (m *StoreCodeProposal) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1077 i := len(dAtA) 1078 _ = i 1079 var l int 1080 _ = l 1081 if m.InstantiatePermission != nil { 1082 { 1083 size, err := m.InstantiatePermission.MarshalToSizedBuffer(dAtA[:i]) 1084 if err != nil { 1085 return 0, err 1086 } 1087 i -= size 1088 i = encodeVarintProposal(dAtA, i, uint64(size)) 1089 } 1090 i-- 1091 dAtA[i] = 0x3a 1092 } 1093 if len(m.WASMByteCode) > 0 { 1094 i -= len(m.WASMByteCode) 1095 copy(dAtA[i:], m.WASMByteCode) 1096 i = encodeVarintProposal(dAtA, i, uint64(len(m.WASMByteCode))) 1097 i-- 1098 dAtA[i] = 0x22 1099 } 1100 if len(m.RunAs) > 0 { 1101 i -= len(m.RunAs) 1102 copy(dAtA[i:], m.RunAs) 1103 i = encodeVarintProposal(dAtA, i, uint64(len(m.RunAs))) 1104 i-- 1105 dAtA[i] = 0x1a 1106 } 1107 if len(m.Description) > 0 { 1108 i -= len(m.Description) 1109 copy(dAtA[i:], m.Description) 1110 i = encodeVarintProposal(dAtA, i, uint64(len(m.Description))) 1111 i-- 1112 dAtA[i] = 0x12 1113 } 1114 if len(m.Title) > 0 { 1115 i -= len(m.Title) 1116 copy(dAtA[i:], m.Title) 1117 i = encodeVarintProposal(dAtA, i, uint64(len(m.Title))) 1118 i-- 1119 dAtA[i] = 0xa 1120 } 1121 return len(dAtA) - i, nil 1122 } 1123 1124 func (m *InstantiateContractProposal) Marshal() (dAtA []byte, err error) { 1125 size := m.Size() 1126 dAtA = make([]byte, size) 1127 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 1128 if err != nil { 1129 return nil, err 1130 } 1131 return dAtA[:n], nil 1132 } 1133 1134 func (m *InstantiateContractProposal) MarshalTo(dAtA []byte) (int, error) { 1135 size := m.Size() 1136 return m.MarshalToSizedBuffer(dAtA[:size]) 1137 } 1138 1139 func (m *InstantiateContractProposal) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1140 i := len(dAtA) 1141 _ = i 1142 var l int 1143 _ = l 1144 if len(m.Funds) > 0 { 1145 for iNdEx := len(m.Funds) - 1; iNdEx >= 0; iNdEx-- { 1146 { 1147 size, err := m.Funds[iNdEx].MarshalToSizedBuffer(dAtA[:i]) 1148 if err != nil { 1149 return 0, err 1150 } 1151 i -= size 1152 i = encodeVarintProposal(dAtA, i, uint64(size)) 1153 } 1154 i-- 1155 dAtA[i] = 0x42 1156 } 1157 } 1158 if len(m.Msg) > 0 { 1159 i -= len(m.Msg) 1160 copy(dAtA[i:], m.Msg) 1161 i = encodeVarintProposal(dAtA, i, uint64(len(m.Msg))) 1162 i-- 1163 dAtA[i] = 0x3a 1164 } 1165 if len(m.Label) > 0 { 1166 i -= len(m.Label) 1167 copy(dAtA[i:], m.Label) 1168 i = encodeVarintProposal(dAtA, i, uint64(len(m.Label))) 1169 i-- 1170 dAtA[i] = 0x32 1171 } 1172 if m.CodeID != 0 { 1173 i = encodeVarintProposal(dAtA, i, uint64(m.CodeID)) 1174 i-- 1175 dAtA[i] = 0x28 1176 } 1177 if len(m.Admin) > 0 { 1178 i -= len(m.Admin) 1179 copy(dAtA[i:], m.Admin) 1180 i = encodeVarintProposal(dAtA, i, uint64(len(m.Admin))) 1181 i-- 1182 dAtA[i] = 0x22 1183 } 1184 if len(m.RunAs) > 0 { 1185 i -= len(m.RunAs) 1186 copy(dAtA[i:], m.RunAs) 1187 i = encodeVarintProposal(dAtA, i, uint64(len(m.RunAs))) 1188 i-- 1189 dAtA[i] = 0x1a 1190 } 1191 if len(m.Description) > 0 { 1192 i -= len(m.Description) 1193 copy(dAtA[i:], m.Description) 1194 i = encodeVarintProposal(dAtA, i, uint64(len(m.Description))) 1195 i-- 1196 dAtA[i] = 0x12 1197 } 1198 if len(m.Title) > 0 { 1199 i -= len(m.Title) 1200 copy(dAtA[i:], m.Title) 1201 i = encodeVarintProposal(dAtA, i, uint64(len(m.Title))) 1202 i-- 1203 dAtA[i] = 0xa 1204 } 1205 return len(dAtA) - i, nil 1206 } 1207 1208 func (m *MigrateContractProposal) Marshal() (dAtA []byte, err error) { 1209 size := m.Size() 1210 dAtA = make([]byte, size) 1211 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 1212 if err != nil { 1213 return nil, err 1214 } 1215 return dAtA[:n], nil 1216 } 1217 1218 func (m *MigrateContractProposal) MarshalTo(dAtA []byte) (int, error) { 1219 size := m.Size() 1220 return m.MarshalToSizedBuffer(dAtA[:size]) 1221 } 1222 1223 func (m *MigrateContractProposal) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1224 i := len(dAtA) 1225 _ = i 1226 var l int 1227 _ = l 1228 if len(m.Msg) > 0 { 1229 i -= len(m.Msg) 1230 copy(dAtA[i:], m.Msg) 1231 i = encodeVarintProposal(dAtA, i, uint64(len(m.Msg))) 1232 i-- 1233 dAtA[i] = 0x32 1234 } 1235 if m.CodeID != 0 { 1236 i = encodeVarintProposal(dAtA, i, uint64(m.CodeID)) 1237 i-- 1238 dAtA[i] = 0x28 1239 } 1240 if len(m.Contract) > 0 { 1241 i -= len(m.Contract) 1242 copy(dAtA[i:], m.Contract) 1243 i = encodeVarintProposal(dAtA, i, uint64(len(m.Contract))) 1244 i-- 1245 dAtA[i] = 0x22 1246 } 1247 if len(m.Description) > 0 { 1248 i -= len(m.Description) 1249 copy(dAtA[i:], m.Description) 1250 i = encodeVarintProposal(dAtA, i, uint64(len(m.Description))) 1251 i-- 1252 dAtA[i] = 0x12 1253 } 1254 if len(m.Title) > 0 { 1255 i -= len(m.Title) 1256 copy(dAtA[i:], m.Title) 1257 i = encodeVarintProposal(dAtA, i, uint64(len(m.Title))) 1258 i-- 1259 dAtA[i] = 0xa 1260 } 1261 return len(dAtA) - i, nil 1262 } 1263 1264 func (m *SudoContractProposal) Marshal() (dAtA []byte, err error) { 1265 size := m.Size() 1266 dAtA = make([]byte, size) 1267 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 1268 if err != nil { 1269 return nil, err 1270 } 1271 return dAtA[:n], nil 1272 } 1273 1274 func (m *SudoContractProposal) MarshalTo(dAtA []byte) (int, error) { 1275 size := m.Size() 1276 return m.MarshalToSizedBuffer(dAtA[:size]) 1277 } 1278 1279 func (m *SudoContractProposal) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1280 i := len(dAtA) 1281 _ = i 1282 var l int 1283 _ = l 1284 if len(m.Msg) > 0 { 1285 i -= len(m.Msg) 1286 copy(dAtA[i:], m.Msg) 1287 i = encodeVarintProposal(dAtA, i, uint64(len(m.Msg))) 1288 i-- 1289 dAtA[i] = 0x22 1290 } 1291 if len(m.Contract) > 0 { 1292 i -= len(m.Contract) 1293 copy(dAtA[i:], m.Contract) 1294 i = encodeVarintProposal(dAtA, i, uint64(len(m.Contract))) 1295 i-- 1296 dAtA[i] = 0x1a 1297 } 1298 if len(m.Description) > 0 { 1299 i -= len(m.Description) 1300 copy(dAtA[i:], m.Description) 1301 i = encodeVarintProposal(dAtA, i, uint64(len(m.Description))) 1302 i-- 1303 dAtA[i] = 0x12 1304 } 1305 if len(m.Title) > 0 { 1306 i -= len(m.Title) 1307 copy(dAtA[i:], m.Title) 1308 i = encodeVarintProposal(dAtA, i, uint64(len(m.Title))) 1309 i-- 1310 dAtA[i] = 0xa 1311 } 1312 return len(dAtA) - i, nil 1313 } 1314 1315 func (m *ExecuteContractProposal) Marshal() (dAtA []byte, err error) { 1316 size := m.Size() 1317 dAtA = make([]byte, size) 1318 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 1319 if err != nil { 1320 return nil, err 1321 } 1322 return dAtA[:n], nil 1323 } 1324 1325 func (m *ExecuteContractProposal) MarshalTo(dAtA []byte) (int, error) { 1326 size := m.Size() 1327 return m.MarshalToSizedBuffer(dAtA[:size]) 1328 } 1329 1330 func (m *ExecuteContractProposal) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1331 i := len(dAtA) 1332 _ = i 1333 var l int 1334 _ = l 1335 if len(m.Funds) > 0 { 1336 for iNdEx := len(m.Funds) - 1; iNdEx >= 0; iNdEx-- { 1337 { 1338 size, err := m.Funds[iNdEx].MarshalToSizedBuffer(dAtA[:i]) 1339 if err != nil { 1340 return 0, err 1341 } 1342 i -= size 1343 i = encodeVarintProposal(dAtA, i, uint64(size)) 1344 } 1345 i-- 1346 dAtA[i] = 0x32 1347 } 1348 } 1349 if len(m.Msg) > 0 { 1350 i -= len(m.Msg) 1351 copy(dAtA[i:], m.Msg) 1352 i = encodeVarintProposal(dAtA, i, uint64(len(m.Msg))) 1353 i-- 1354 dAtA[i] = 0x2a 1355 } 1356 if len(m.Contract) > 0 { 1357 i -= len(m.Contract) 1358 copy(dAtA[i:], m.Contract) 1359 i = encodeVarintProposal(dAtA, i, uint64(len(m.Contract))) 1360 i-- 1361 dAtA[i] = 0x22 1362 } 1363 if len(m.RunAs) > 0 { 1364 i -= len(m.RunAs) 1365 copy(dAtA[i:], m.RunAs) 1366 i = encodeVarintProposal(dAtA, i, uint64(len(m.RunAs))) 1367 i-- 1368 dAtA[i] = 0x1a 1369 } 1370 if len(m.Description) > 0 { 1371 i -= len(m.Description) 1372 copy(dAtA[i:], m.Description) 1373 i = encodeVarintProposal(dAtA, i, uint64(len(m.Description))) 1374 i-- 1375 dAtA[i] = 0x12 1376 } 1377 if len(m.Title) > 0 { 1378 i -= len(m.Title) 1379 copy(dAtA[i:], m.Title) 1380 i = encodeVarintProposal(dAtA, i, uint64(len(m.Title))) 1381 i-- 1382 dAtA[i] = 0xa 1383 } 1384 return len(dAtA) - i, nil 1385 } 1386 1387 func (m *UpdateAdminProposal) Marshal() (dAtA []byte, err error) { 1388 size := m.Size() 1389 dAtA = make([]byte, size) 1390 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 1391 if err != nil { 1392 return nil, err 1393 } 1394 return dAtA[:n], nil 1395 } 1396 1397 func (m *UpdateAdminProposal) MarshalTo(dAtA []byte) (int, error) { 1398 size := m.Size() 1399 return m.MarshalToSizedBuffer(dAtA[:size]) 1400 } 1401 1402 func (m *UpdateAdminProposal) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1403 i := len(dAtA) 1404 _ = i 1405 var l int 1406 _ = l 1407 if len(m.Contract) > 0 { 1408 i -= len(m.Contract) 1409 copy(dAtA[i:], m.Contract) 1410 i = encodeVarintProposal(dAtA, i, uint64(len(m.Contract))) 1411 i-- 1412 dAtA[i] = 0x22 1413 } 1414 if len(m.NewAdmin) > 0 { 1415 i -= len(m.NewAdmin) 1416 copy(dAtA[i:], m.NewAdmin) 1417 i = encodeVarintProposal(dAtA, i, uint64(len(m.NewAdmin))) 1418 i-- 1419 dAtA[i] = 0x1a 1420 } 1421 if len(m.Description) > 0 { 1422 i -= len(m.Description) 1423 copy(dAtA[i:], m.Description) 1424 i = encodeVarintProposal(dAtA, i, uint64(len(m.Description))) 1425 i-- 1426 dAtA[i] = 0x12 1427 } 1428 if len(m.Title) > 0 { 1429 i -= len(m.Title) 1430 copy(dAtA[i:], m.Title) 1431 i = encodeVarintProposal(dAtA, i, uint64(len(m.Title))) 1432 i-- 1433 dAtA[i] = 0xa 1434 } 1435 return len(dAtA) - i, nil 1436 } 1437 1438 func (m *ClearAdminProposal) Marshal() (dAtA []byte, err error) { 1439 size := m.Size() 1440 dAtA = make([]byte, size) 1441 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 1442 if err != nil { 1443 return nil, err 1444 } 1445 return dAtA[:n], nil 1446 } 1447 1448 func (m *ClearAdminProposal) MarshalTo(dAtA []byte) (int, error) { 1449 size := m.Size() 1450 return m.MarshalToSizedBuffer(dAtA[:size]) 1451 } 1452 1453 func (m *ClearAdminProposal) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1454 i := len(dAtA) 1455 _ = i 1456 var l int 1457 _ = l 1458 if len(m.Contract) > 0 { 1459 i -= len(m.Contract) 1460 copy(dAtA[i:], m.Contract) 1461 i = encodeVarintProposal(dAtA, i, uint64(len(m.Contract))) 1462 i-- 1463 dAtA[i] = 0x1a 1464 } 1465 if len(m.Description) > 0 { 1466 i -= len(m.Description) 1467 copy(dAtA[i:], m.Description) 1468 i = encodeVarintProposal(dAtA, i, uint64(len(m.Description))) 1469 i-- 1470 dAtA[i] = 0x12 1471 } 1472 if len(m.Title) > 0 { 1473 i -= len(m.Title) 1474 copy(dAtA[i:], m.Title) 1475 i = encodeVarintProposal(dAtA, i, uint64(len(m.Title))) 1476 i-- 1477 dAtA[i] = 0xa 1478 } 1479 return len(dAtA) - i, nil 1480 } 1481 1482 func (m *PinCodesProposal) Marshal() (dAtA []byte, err error) { 1483 size := m.Size() 1484 dAtA = make([]byte, size) 1485 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 1486 if err != nil { 1487 return nil, err 1488 } 1489 return dAtA[:n], nil 1490 } 1491 1492 func (m *PinCodesProposal) MarshalTo(dAtA []byte) (int, error) { 1493 size := m.Size() 1494 return m.MarshalToSizedBuffer(dAtA[:size]) 1495 } 1496 1497 func (m *PinCodesProposal) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1498 i := len(dAtA) 1499 _ = i 1500 var l int 1501 _ = l 1502 if len(m.CodeIDs) > 0 { 1503 dAtA3 := make([]byte, len(m.CodeIDs)*10) 1504 var j2 int 1505 for _, num := range m.CodeIDs { 1506 for num >= 1<<7 { 1507 dAtA3[j2] = uint8(uint64(num)&0x7f | 0x80) 1508 num >>= 7 1509 j2++ 1510 } 1511 dAtA3[j2] = uint8(num) 1512 j2++ 1513 } 1514 i -= j2 1515 copy(dAtA[i:], dAtA3[:j2]) 1516 i = encodeVarintProposal(dAtA, i, uint64(j2)) 1517 i-- 1518 dAtA[i] = 0x1a 1519 } 1520 if len(m.Description) > 0 { 1521 i -= len(m.Description) 1522 copy(dAtA[i:], m.Description) 1523 i = encodeVarintProposal(dAtA, i, uint64(len(m.Description))) 1524 i-- 1525 dAtA[i] = 0x12 1526 } 1527 if len(m.Title) > 0 { 1528 i -= len(m.Title) 1529 copy(dAtA[i:], m.Title) 1530 i = encodeVarintProposal(dAtA, i, uint64(len(m.Title))) 1531 i-- 1532 dAtA[i] = 0xa 1533 } 1534 return len(dAtA) - i, nil 1535 } 1536 1537 func (m *UnpinCodesProposal) Marshal() (dAtA []byte, err error) { 1538 size := m.Size() 1539 dAtA = make([]byte, size) 1540 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 1541 if err != nil { 1542 return nil, err 1543 } 1544 return dAtA[:n], nil 1545 } 1546 1547 func (m *UnpinCodesProposal) MarshalTo(dAtA []byte) (int, error) { 1548 size := m.Size() 1549 return m.MarshalToSizedBuffer(dAtA[:size]) 1550 } 1551 1552 func (m *UnpinCodesProposal) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1553 i := len(dAtA) 1554 _ = i 1555 var l int 1556 _ = l 1557 if len(m.CodeIDs) > 0 { 1558 dAtA5 := make([]byte, len(m.CodeIDs)*10) 1559 var j4 int 1560 for _, num := range m.CodeIDs { 1561 for num >= 1<<7 { 1562 dAtA5[j4] = uint8(uint64(num)&0x7f | 0x80) 1563 num >>= 7 1564 j4++ 1565 } 1566 dAtA5[j4] = uint8(num) 1567 j4++ 1568 } 1569 i -= j4 1570 copy(dAtA[i:], dAtA5[:j4]) 1571 i = encodeVarintProposal(dAtA, i, uint64(j4)) 1572 i-- 1573 dAtA[i] = 0x1a 1574 } 1575 if len(m.Description) > 0 { 1576 i -= len(m.Description) 1577 copy(dAtA[i:], m.Description) 1578 i = encodeVarintProposal(dAtA, i, uint64(len(m.Description))) 1579 i-- 1580 dAtA[i] = 0x12 1581 } 1582 if len(m.Title) > 0 { 1583 i -= len(m.Title) 1584 copy(dAtA[i:], m.Title) 1585 i = encodeVarintProposal(dAtA, i, uint64(len(m.Title))) 1586 i-- 1587 dAtA[i] = 0xa 1588 } 1589 return len(dAtA) - i, nil 1590 } 1591 1592 func (m *AccessConfigUpdate) Marshal() (dAtA []byte, err error) { 1593 size := m.Size() 1594 dAtA = make([]byte, size) 1595 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 1596 if err != nil { 1597 return nil, err 1598 } 1599 return dAtA[:n], nil 1600 } 1601 1602 func (m *AccessConfigUpdate) MarshalTo(dAtA []byte) (int, error) { 1603 size := m.Size() 1604 return m.MarshalToSizedBuffer(dAtA[:size]) 1605 } 1606 1607 func (m *AccessConfigUpdate) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1608 i := len(dAtA) 1609 _ = i 1610 var l int 1611 _ = l 1612 { 1613 size, err := m.InstantiatePermission.MarshalToSizedBuffer(dAtA[:i]) 1614 if err != nil { 1615 return 0, err 1616 } 1617 i -= size 1618 i = encodeVarintProposal(dAtA, i, uint64(size)) 1619 } 1620 i-- 1621 dAtA[i] = 0x12 1622 if m.CodeID != 0 { 1623 i = encodeVarintProposal(dAtA, i, uint64(m.CodeID)) 1624 i-- 1625 dAtA[i] = 0x8 1626 } 1627 return len(dAtA) - i, nil 1628 } 1629 1630 func (m *UpdateInstantiateConfigProposal) Marshal() (dAtA []byte, err error) { 1631 size := m.Size() 1632 dAtA = make([]byte, size) 1633 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 1634 if err != nil { 1635 return nil, err 1636 } 1637 return dAtA[:n], nil 1638 } 1639 1640 func (m *UpdateInstantiateConfigProposal) MarshalTo(dAtA []byte) (int, error) { 1641 size := m.Size() 1642 return m.MarshalToSizedBuffer(dAtA[:size]) 1643 } 1644 1645 func (m *UpdateInstantiateConfigProposal) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1646 i := len(dAtA) 1647 _ = i 1648 var l int 1649 _ = l 1650 if len(m.AccessConfigUpdates) > 0 { 1651 for iNdEx := len(m.AccessConfigUpdates) - 1; iNdEx >= 0; iNdEx-- { 1652 { 1653 size, err := m.AccessConfigUpdates[iNdEx].MarshalToSizedBuffer(dAtA[:i]) 1654 if err != nil { 1655 return 0, err 1656 } 1657 i -= size 1658 i = encodeVarintProposal(dAtA, i, uint64(size)) 1659 } 1660 i-- 1661 dAtA[i] = 0x1a 1662 } 1663 } 1664 if len(m.Description) > 0 { 1665 i -= len(m.Description) 1666 copy(dAtA[i:], m.Description) 1667 i = encodeVarintProposal(dAtA, i, uint64(len(m.Description))) 1668 i-- 1669 dAtA[i] = 0x12 1670 } 1671 if len(m.Title) > 0 { 1672 i -= len(m.Title) 1673 copy(dAtA[i:], m.Title) 1674 i = encodeVarintProposal(dAtA, i, uint64(len(m.Title))) 1675 i-- 1676 dAtA[i] = 0xa 1677 } 1678 return len(dAtA) - i, nil 1679 } 1680 1681 func encodeVarintProposal(dAtA []byte, offset int, v uint64) int { 1682 offset -= sovProposal(v) 1683 base := offset 1684 for v >= 1<<7 { 1685 dAtA[offset] = uint8(v&0x7f | 0x80) 1686 v >>= 7 1687 offset++ 1688 } 1689 dAtA[offset] = uint8(v) 1690 return base 1691 } 1692 1693 func (m *StoreCodeProposal) Size() (n int) { 1694 if m == nil { 1695 return 0 1696 } 1697 var l int 1698 _ = l 1699 l = len(m.Title) 1700 if l > 0 { 1701 n += 1 + l + sovProposal(uint64(l)) 1702 } 1703 l = len(m.Description) 1704 if l > 0 { 1705 n += 1 + l + sovProposal(uint64(l)) 1706 } 1707 l = len(m.RunAs) 1708 if l > 0 { 1709 n += 1 + l + sovProposal(uint64(l)) 1710 } 1711 l = len(m.WASMByteCode) 1712 if l > 0 { 1713 n += 1 + l + sovProposal(uint64(l)) 1714 } 1715 if m.InstantiatePermission != nil { 1716 l = m.InstantiatePermission.Size() 1717 n += 1 + l + sovProposal(uint64(l)) 1718 } 1719 return n 1720 } 1721 1722 func (m *InstantiateContractProposal) Size() (n int) { 1723 if m == nil { 1724 return 0 1725 } 1726 var l int 1727 _ = l 1728 l = len(m.Title) 1729 if l > 0 { 1730 n += 1 + l + sovProposal(uint64(l)) 1731 } 1732 l = len(m.Description) 1733 if l > 0 { 1734 n += 1 + l + sovProposal(uint64(l)) 1735 } 1736 l = len(m.RunAs) 1737 if l > 0 { 1738 n += 1 + l + sovProposal(uint64(l)) 1739 } 1740 l = len(m.Admin) 1741 if l > 0 { 1742 n += 1 + l + sovProposal(uint64(l)) 1743 } 1744 if m.CodeID != 0 { 1745 n += 1 + sovProposal(uint64(m.CodeID)) 1746 } 1747 l = len(m.Label) 1748 if l > 0 { 1749 n += 1 + l + sovProposal(uint64(l)) 1750 } 1751 l = len(m.Msg) 1752 if l > 0 { 1753 n += 1 + l + sovProposal(uint64(l)) 1754 } 1755 if len(m.Funds) > 0 { 1756 for _, e := range m.Funds { 1757 l = e.Size() 1758 n += 1 + l + sovProposal(uint64(l)) 1759 } 1760 } 1761 return n 1762 } 1763 1764 func (m *MigrateContractProposal) Size() (n int) { 1765 if m == nil { 1766 return 0 1767 } 1768 var l int 1769 _ = l 1770 l = len(m.Title) 1771 if l > 0 { 1772 n += 1 + l + sovProposal(uint64(l)) 1773 } 1774 l = len(m.Description) 1775 if l > 0 { 1776 n += 1 + l + sovProposal(uint64(l)) 1777 } 1778 l = len(m.Contract) 1779 if l > 0 { 1780 n += 1 + l + sovProposal(uint64(l)) 1781 } 1782 if m.CodeID != 0 { 1783 n += 1 + sovProposal(uint64(m.CodeID)) 1784 } 1785 l = len(m.Msg) 1786 if l > 0 { 1787 n += 1 + l + sovProposal(uint64(l)) 1788 } 1789 return n 1790 } 1791 1792 func (m *SudoContractProposal) Size() (n int) { 1793 if m == nil { 1794 return 0 1795 } 1796 var l int 1797 _ = l 1798 l = len(m.Title) 1799 if l > 0 { 1800 n += 1 + l + sovProposal(uint64(l)) 1801 } 1802 l = len(m.Description) 1803 if l > 0 { 1804 n += 1 + l + sovProposal(uint64(l)) 1805 } 1806 l = len(m.Contract) 1807 if l > 0 { 1808 n += 1 + l + sovProposal(uint64(l)) 1809 } 1810 l = len(m.Msg) 1811 if l > 0 { 1812 n += 1 + l + sovProposal(uint64(l)) 1813 } 1814 return n 1815 } 1816 1817 func (m *ExecuteContractProposal) Size() (n int) { 1818 if m == nil { 1819 return 0 1820 } 1821 var l int 1822 _ = l 1823 l = len(m.Title) 1824 if l > 0 { 1825 n += 1 + l + sovProposal(uint64(l)) 1826 } 1827 l = len(m.Description) 1828 if l > 0 { 1829 n += 1 + l + sovProposal(uint64(l)) 1830 } 1831 l = len(m.RunAs) 1832 if l > 0 { 1833 n += 1 + l + sovProposal(uint64(l)) 1834 } 1835 l = len(m.Contract) 1836 if l > 0 { 1837 n += 1 + l + sovProposal(uint64(l)) 1838 } 1839 l = len(m.Msg) 1840 if l > 0 { 1841 n += 1 + l + sovProposal(uint64(l)) 1842 } 1843 if len(m.Funds) > 0 { 1844 for _, e := range m.Funds { 1845 l = e.Size() 1846 n += 1 + l + sovProposal(uint64(l)) 1847 } 1848 } 1849 return n 1850 } 1851 1852 func (m *UpdateAdminProposal) Size() (n int) { 1853 if m == nil { 1854 return 0 1855 } 1856 var l int 1857 _ = l 1858 l = len(m.Title) 1859 if l > 0 { 1860 n += 1 + l + sovProposal(uint64(l)) 1861 } 1862 l = len(m.Description) 1863 if l > 0 { 1864 n += 1 + l + sovProposal(uint64(l)) 1865 } 1866 l = len(m.NewAdmin) 1867 if l > 0 { 1868 n += 1 + l + sovProposal(uint64(l)) 1869 } 1870 l = len(m.Contract) 1871 if l > 0 { 1872 n += 1 + l + sovProposal(uint64(l)) 1873 } 1874 return n 1875 } 1876 1877 func (m *ClearAdminProposal) Size() (n int) { 1878 if m == nil { 1879 return 0 1880 } 1881 var l int 1882 _ = l 1883 l = len(m.Title) 1884 if l > 0 { 1885 n += 1 + l + sovProposal(uint64(l)) 1886 } 1887 l = len(m.Description) 1888 if l > 0 { 1889 n += 1 + l + sovProposal(uint64(l)) 1890 } 1891 l = len(m.Contract) 1892 if l > 0 { 1893 n += 1 + l + sovProposal(uint64(l)) 1894 } 1895 return n 1896 } 1897 1898 func (m *PinCodesProposal) Size() (n int) { 1899 if m == nil { 1900 return 0 1901 } 1902 var l int 1903 _ = l 1904 l = len(m.Title) 1905 if l > 0 { 1906 n += 1 + l + sovProposal(uint64(l)) 1907 } 1908 l = len(m.Description) 1909 if l > 0 { 1910 n += 1 + l + sovProposal(uint64(l)) 1911 } 1912 if len(m.CodeIDs) > 0 { 1913 l = 0 1914 for _, e := range m.CodeIDs { 1915 l += sovProposal(uint64(e)) 1916 } 1917 n += 1 + sovProposal(uint64(l)) + l 1918 } 1919 return n 1920 } 1921 1922 func (m *UnpinCodesProposal) Size() (n int) { 1923 if m == nil { 1924 return 0 1925 } 1926 var l int 1927 _ = l 1928 l = len(m.Title) 1929 if l > 0 { 1930 n += 1 + l + sovProposal(uint64(l)) 1931 } 1932 l = len(m.Description) 1933 if l > 0 { 1934 n += 1 + l + sovProposal(uint64(l)) 1935 } 1936 if len(m.CodeIDs) > 0 { 1937 l = 0 1938 for _, e := range m.CodeIDs { 1939 l += sovProposal(uint64(e)) 1940 } 1941 n += 1 + sovProposal(uint64(l)) + l 1942 } 1943 return n 1944 } 1945 1946 func (m *AccessConfigUpdate) Size() (n int) { 1947 if m == nil { 1948 return 0 1949 } 1950 var l int 1951 _ = l 1952 if m.CodeID != 0 { 1953 n += 1 + sovProposal(uint64(m.CodeID)) 1954 } 1955 l = m.InstantiatePermission.Size() 1956 n += 1 + l + sovProposal(uint64(l)) 1957 return n 1958 } 1959 1960 func (m *UpdateInstantiateConfigProposal) Size() (n int) { 1961 if m == nil { 1962 return 0 1963 } 1964 var l int 1965 _ = l 1966 l = len(m.Title) 1967 if l > 0 { 1968 n += 1 + l + sovProposal(uint64(l)) 1969 } 1970 l = len(m.Description) 1971 if l > 0 { 1972 n += 1 + l + sovProposal(uint64(l)) 1973 } 1974 if len(m.AccessConfigUpdates) > 0 { 1975 for _, e := range m.AccessConfigUpdates { 1976 l = e.Size() 1977 n += 1 + l + sovProposal(uint64(l)) 1978 } 1979 } 1980 return n 1981 } 1982 1983 func sovProposal(x uint64) (n int) { 1984 return (math_bits.Len64(x|1) + 6) / 7 1985 } 1986 1987 func sozProposal(x uint64) (n int) { 1988 return sovProposal(uint64((x << 1) ^ uint64((int64(x) >> 63)))) 1989 } 1990 1991 func (m *StoreCodeProposal) Unmarshal(dAtA []byte) error { 1992 l := len(dAtA) 1993 iNdEx := 0 1994 for iNdEx < l { 1995 preIndex := iNdEx 1996 var wire uint64 1997 for shift := uint(0); ; shift += 7 { 1998 if shift >= 64 { 1999 return ErrIntOverflowProposal 2000 } 2001 if iNdEx >= l { 2002 return io.ErrUnexpectedEOF 2003 } 2004 b := dAtA[iNdEx] 2005 iNdEx++ 2006 wire |= uint64(b&0x7F) << shift 2007 if b < 0x80 { 2008 break 2009 } 2010 } 2011 fieldNum := int32(wire >> 3) 2012 wireType := int(wire & 0x7) 2013 if wireType == 4 { 2014 return fmt.Errorf("proto: StoreCodeProposal: wiretype end group for non-group") 2015 } 2016 if fieldNum <= 0 { 2017 return fmt.Errorf("proto: StoreCodeProposal: illegal tag %d (wire type %d)", fieldNum, wire) 2018 } 2019 switch fieldNum { 2020 case 1: 2021 if wireType != 2 { 2022 return fmt.Errorf("proto: wrong wireType = %d for field Title", wireType) 2023 } 2024 var stringLen uint64 2025 for shift := uint(0); ; shift += 7 { 2026 if shift >= 64 { 2027 return ErrIntOverflowProposal 2028 } 2029 if iNdEx >= l { 2030 return io.ErrUnexpectedEOF 2031 } 2032 b := dAtA[iNdEx] 2033 iNdEx++ 2034 stringLen |= uint64(b&0x7F) << shift 2035 if b < 0x80 { 2036 break 2037 } 2038 } 2039 intStringLen := int(stringLen) 2040 if intStringLen < 0 { 2041 return ErrInvalidLengthProposal 2042 } 2043 postIndex := iNdEx + intStringLen 2044 if postIndex < 0 { 2045 return ErrInvalidLengthProposal 2046 } 2047 if postIndex > l { 2048 return io.ErrUnexpectedEOF 2049 } 2050 m.Title = string(dAtA[iNdEx:postIndex]) 2051 iNdEx = postIndex 2052 case 2: 2053 if wireType != 2 { 2054 return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) 2055 } 2056 var stringLen uint64 2057 for shift := uint(0); ; shift += 7 { 2058 if shift >= 64 { 2059 return ErrIntOverflowProposal 2060 } 2061 if iNdEx >= l { 2062 return io.ErrUnexpectedEOF 2063 } 2064 b := dAtA[iNdEx] 2065 iNdEx++ 2066 stringLen |= uint64(b&0x7F) << shift 2067 if b < 0x80 { 2068 break 2069 } 2070 } 2071 intStringLen := int(stringLen) 2072 if intStringLen < 0 { 2073 return ErrInvalidLengthProposal 2074 } 2075 postIndex := iNdEx + intStringLen 2076 if postIndex < 0 { 2077 return ErrInvalidLengthProposal 2078 } 2079 if postIndex > l { 2080 return io.ErrUnexpectedEOF 2081 } 2082 m.Description = string(dAtA[iNdEx:postIndex]) 2083 iNdEx = postIndex 2084 case 3: 2085 if wireType != 2 { 2086 return fmt.Errorf("proto: wrong wireType = %d for field RunAs", wireType) 2087 } 2088 var stringLen uint64 2089 for shift := uint(0); ; shift += 7 { 2090 if shift >= 64 { 2091 return ErrIntOverflowProposal 2092 } 2093 if iNdEx >= l { 2094 return io.ErrUnexpectedEOF 2095 } 2096 b := dAtA[iNdEx] 2097 iNdEx++ 2098 stringLen |= uint64(b&0x7F) << shift 2099 if b < 0x80 { 2100 break 2101 } 2102 } 2103 intStringLen := int(stringLen) 2104 if intStringLen < 0 { 2105 return ErrInvalidLengthProposal 2106 } 2107 postIndex := iNdEx + intStringLen 2108 if postIndex < 0 { 2109 return ErrInvalidLengthProposal 2110 } 2111 if postIndex > l { 2112 return io.ErrUnexpectedEOF 2113 } 2114 m.RunAs = string(dAtA[iNdEx:postIndex]) 2115 iNdEx = postIndex 2116 case 4: 2117 if wireType != 2 { 2118 return fmt.Errorf("proto: wrong wireType = %d for field WASMByteCode", wireType) 2119 } 2120 var byteLen int 2121 for shift := uint(0); ; shift += 7 { 2122 if shift >= 64 { 2123 return ErrIntOverflowProposal 2124 } 2125 if iNdEx >= l { 2126 return io.ErrUnexpectedEOF 2127 } 2128 b := dAtA[iNdEx] 2129 iNdEx++ 2130 byteLen |= int(b&0x7F) << shift 2131 if b < 0x80 { 2132 break 2133 } 2134 } 2135 if byteLen < 0 { 2136 return ErrInvalidLengthProposal 2137 } 2138 postIndex := iNdEx + byteLen 2139 if postIndex < 0 { 2140 return ErrInvalidLengthProposal 2141 } 2142 if postIndex > l { 2143 return io.ErrUnexpectedEOF 2144 } 2145 m.WASMByteCode = append(m.WASMByteCode[:0], dAtA[iNdEx:postIndex]...) 2146 if m.WASMByteCode == nil { 2147 m.WASMByteCode = []byte{} 2148 } 2149 iNdEx = postIndex 2150 case 7: 2151 if wireType != 2 { 2152 return fmt.Errorf("proto: wrong wireType = %d for field InstantiatePermission", wireType) 2153 } 2154 var msglen int 2155 for shift := uint(0); ; shift += 7 { 2156 if shift >= 64 { 2157 return ErrIntOverflowProposal 2158 } 2159 if iNdEx >= l { 2160 return io.ErrUnexpectedEOF 2161 } 2162 b := dAtA[iNdEx] 2163 iNdEx++ 2164 msglen |= int(b&0x7F) << shift 2165 if b < 0x80 { 2166 break 2167 } 2168 } 2169 if msglen < 0 { 2170 return ErrInvalidLengthProposal 2171 } 2172 postIndex := iNdEx + msglen 2173 if postIndex < 0 { 2174 return ErrInvalidLengthProposal 2175 } 2176 if postIndex > l { 2177 return io.ErrUnexpectedEOF 2178 } 2179 if m.InstantiatePermission == nil { 2180 m.InstantiatePermission = &AccessConfig{} 2181 } 2182 if err := m.InstantiatePermission.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 2183 return err 2184 } 2185 iNdEx = postIndex 2186 default: 2187 iNdEx = preIndex 2188 skippy, err := skipProposal(dAtA[iNdEx:]) 2189 if err != nil { 2190 return err 2191 } 2192 if (skippy < 0) || (iNdEx+skippy) < 0 { 2193 return ErrInvalidLengthProposal 2194 } 2195 if (iNdEx + skippy) > l { 2196 return io.ErrUnexpectedEOF 2197 } 2198 iNdEx += skippy 2199 } 2200 } 2201 2202 if iNdEx > l { 2203 return io.ErrUnexpectedEOF 2204 } 2205 return nil 2206 } 2207 2208 func (m *InstantiateContractProposal) Unmarshal(dAtA []byte) error { 2209 l := len(dAtA) 2210 iNdEx := 0 2211 for iNdEx < l { 2212 preIndex := iNdEx 2213 var wire uint64 2214 for shift := uint(0); ; shift += 7 { 2215 if shift >= 64 { 2216 return ErrIntOverflowProposal 2217 } 2218 if iNdEx >= l { 2219 return io.ErrUnexpectedEOF 2220 } 2221 b := dAtA[iNdEx] 2222 iNdEx++ 2223 wire |= uint64(b&0x7F) << shift 2224 if b < 0x80 { 2225 break 2226 } 2227 } 2228 fieldNum := int32(wire >> 3) 2229 wireType := int(wire & 0x7) 2230 if wireType == 4 { 2231 return fmt.Errorf("proto: InstantiateContractProposal: wiretype end group for non-group") 2232 } 2233 if fieldNum <= 0 { 2234 return fmt.Errorf("proto: InstantiateContractProposal: illegal tag %d (wire type %d)", fieldNum, wire) 2235 } 2236 switch fieldNum { 2237 case 1: 2238 if wireType != 2 { 2239 return fmt.Errorf("proto: wrong wireType = %d for field Title", wireType) 2240 } 2241 var stringLen uint64 2242 for shift := uint(0); ; shift += 7 { 2243 if shift >= 64 { 2244 return ErrIntOverflowProposal 2245 } 2246 if iNdEx >= l { 2247 return io.ErrUnexpectedEOF 2248 } 2249 b := dAtA[iNdEx] 2250 iNdEx++ 2251 stringLen |= uint64(b&0x7F) << shift 2252 if b < 0x80 { 2253 break 2254 } 2255 } 2256 intStringLen := int(stringLen) 2257 if intStringLen < 0 { 2258 return ErrInvalidLengthProposal 2259 } 2260 postIndex := iNdEx + intStringLen 2261 if postIndex < 0 { 2262 return ErrInvalidLengthProposal 2263 } 2264 if postIndex > l { 2265 return io.ErrUnexpectedEOF 2266 } 2267 m.Title = string(dAtA[iNdEx:postIndex]) 2268 iNdEx = postIndex 2269 case 2: 2270 if wireType != 2 { 2271 return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) 2272 } 2273 var stringLen uint64 2274 for shift := uint(0); ; shift += 7 { 2275 if shift >= 64 { 2276 return ErrIntOverflowProposal 2277 } 2278 if iNdEx >= l { 2279 return io.ErrUnexpectedEOF 2280 } 2281 b := dAtA[iNdEx] 2282 iNdEx++ 2283 stringLen |= uint64(b&0x7F) << shift 2284 if b < 0x80 { 2285 break 2286 } 2287 } 2288 intStringLen := int(stringLen) 2289 if intStringLen < 0 { 2290 return ErrInvalidLengthProposal 2291 } 2292 postIndex := iNdEx + intStringLen 2293 if postIndex < 0 { 2294 return ErrInvalidLengthProposal 2295 } 2296 if postIndex > l { 2297 return io.ErrUnexpectedEOF 2298 } 2299 m.Description = string(dAtA[iNdEx:postIndex]) 2300 iNdEx = postIndex 2301 case 3: 2302 if wireType != 2 { 2303 return fmt.Errorf("proto: wrong wireType = %d for field RunAs", wireType) 2304 } 2305 var stringLen uint64 2306 for shift := uint(0); ; shift += 7 { 2307 if shift >= 64 { 2308 return ErrIntOverflowProposal 2309 } 2310 if iNdEx >= l { 2311 return io.ErrUnexpectedEOF 2312 } 2313 b := dAtA[iNdEx] 2314 iNdEx++ 2315 stringLen |= uint64(b&0x7F) << shift 2316 if b < 0x80 { 2317 break 2318 } 2319 } 2320 intStringLen := int(stringLen) 2321 if intStringLen < 0 { 2322 return ErrInvalidLengthProposal 2323 } 2324 postIndex := iNdEx + intStringLen 2325 if postIndex < 0 { 2326 return ErrInvalidLengthProposal 2327 } 2328 if postIndex > l { 2329 return io.ErrUnexpectedEOF 2330 } 2331 m.RunAs = string(dAtA[iNdEx:postIndex]) 2332 iNdEx = postIndex 2333 case 4: 2334 if wireType != 2 { 2335 return fmt.Errorf("proto: wrong wireType = %d for field Admin", wireType) 2336 } 2337 var stringLen uint64 2338 for shift := uint(0); ; shift += 7 { 2339 if shift >= 64 { 2340 return ErrIntOverflowProposal 2341 } 2342 if iNdEx >= l { 2343 return io.ErrUnexpectedEOF 2344 } 2345 b := dAtA[iNdEx] 2346 iNdEx++ 2347 stringLen |= uint64(b&0x7F) << shift 2348 if b < 0x80 { 2349 break 2350 } 2351 } 2352 intStringLen := int(stringLen) 2353 if intStringLen < 0 { 2354 return ErrInvalidLengthProposal 2355 } 2356 postIndex := iNdEx + intStringLen 2357 if postIndex < 0 { 2358 return ErrInvalidLengthProposal 2359 } 2360 if postIndex > l { 2361 return io.ErrUnexpectedEOF 2362 } 2363 m.Admin = string(dAtA[iNdEx:postIndex]) 2364 iNdEx = postIndex 2365 case 5: 2366 if wireType != 0 { 2367 return fmt.Errorf("proto: wrong wireType = %d for field CodeID", wireType) 2368 } 2369 m.CodeID = 0 2370 for shift := uint(0); ; shift += 7 { 2371 if shift >= 64 { 2372 return ErrIntOverflowProposal 2373 } 2374 if iNdEx >= l { 2375 return io.ErrUnexpectedEOF 2376 } 2377 b := dAtA[iNdEx] 2378 iNdEx++ 2379 m.CodeID |= uint64(b&0x7F) << shift 2380 if b < 0x80 { 2381 break 2382 } 2383 } 2384 case 6: 2385 if wireType != 2 { 2386 return fmt.Errorf("proto: wrong wireType = %d for field Label", wireType) 2387 } 2388 var stringLen uint64 2389 for shift := uint(0); ; shift += 7 { 2390 if shift >= 64 { 2391 return ErrIntOverflowProposal 2392 } 2393 if iNdEx >= l { 2394 return io.ErrUnexpectedEOF 2395 } 2396 b := dAtA[iNdEx] 2397 iNdEx++ 2398 stringLen |= uint64(b&0x7F) << shift 2399 if b < 0x80 { 2400 break 2401 } 2402 } 2403 intStringLen := int(stringLen) 2404 if intStringLen < 0 { 2405 return ErrInvalidLengthProposal 2406 } 2407 postIndex := iNdEx + intStringLen 2408 if postIndex < 0 { 2409 return ErrInvalidLengthProposal 2410 } 2411 if postIndex > l { 2412 return io.ErrUnexpectedEOF 2413 } 2414 m.Label = string(dAtA[iNdEx:postIndex]) 2415 iNdEx = postIndex 2416 case 7: 2417 if wireType != 2 { 2418 return fmt.Errorf("proto: wrong wireType = %d for field Msg", wireType) 2419 } 2420 var byteLen int 2421 for shift := uint(0); ; shift += 7 { 2422 if shift >= 64 { 2423 return ErrIntOverflowProposal 2424 } 2425 if iNdEx >= l { 2426 return io.ErrUnexpectedEOF 2427 } 2428 b := dAtA[iNdEx] 2429 iNdEx++ 2430 byteLen |= int(b&0x7F) << shift 2431 if b < 0x80 { 2432 break 2433 } 2434 } 2435 if byteLen < 0 { 2436 return ErrInvalidLengthProposal 2437 } 2438 postIndex := iNdEx + byteLen 2439 if postIndex < 0 { 2440 return ErrInvalidLengthProposal 2441 } 2442 if postIndex > l { 2443 return io.ErrUnexpectedEOF 2444 } 2445 m.Msg = append(m.Msg[:0], dAtA[iNdEx:postIndex]...) 2446 if m.Msg == nil { 2447 m.Msg = []byte{} 2448 } 2449 iNdEx = postIndex 2450 case 8: 2451 if wireType != 2 { 2452 return fmt.Errorf("proto: wrong wireType = %d for field Funds", wireType) 2453 } 2454 var msglen int 2455 for shift := uint(0); ; shift += 7 { 2456 if shift >= 64 { 2457 return ErrIntOverflowProposal 2458 } 2459 if iNdEx >= l { 2460 return io.ErrUnexpectedEOF 2461 } 2462 b := dAtA[iNdEx] 2463 iNdEx++ 2464 msglen |= int(b&0x7F) << shift 2465 if b < 0x80 { 2466 break 2467 } 2468 } 2469 if msglen < 0 { 2470 return ErrInvalidLengthProposal 2471 } 2472 postIndex := iNdEx + msglen 2473 if postIndex < 0 { 2474 return ErrInvalidLengthProposal 2475 } 2476 if postIndex > l { 2477 return io.ErrUnexpectedEOF 2478 } 2479 m.Funds = append(m.Funds, types.CoinAdapter{}) 2480 if err := m.Funds[len(m.Funds)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 2481 return err 2482 } 2483 iNdEx = postIndex 2484 default: 2485 iNdEx = preIndex 2486 skippy, err := skipProposal(dAtA[iNdEx:]) 2487 if err != nil { 2488 return err 2489 } 2490 if (skippy < 0) || (iNdEx+skippy) < 0 { 2491 return ErrInvalidLengthProposal 2492 } 2493 if (iNdEx + skippy) > l { 2494 return io.ErrUnexpectedEOF 2495 } 2496 iNdEx += skippy 2497 } 2498 } 2499 2500 if iNdEx > l { 2501 return io.ErrUnexpectedEOF 2502 } 2503 return nil 2504 } 2505 2506 func (m *MigrateContractProposal) Unmarshal(dAtA []byte) error { 2507 l := len(dAtA) 2508 iNdEx := 0 2509 for iNdEx < l { 2510 preIndex := iNdEx 2511 var wire uint64 2512 for shift := uint(0); ; shift += 7 { 2513 if shift >= 64 { 2514 return ErrIntOverflowProposal 2515 } 2516 if iNdEx >= l { 2517 return io.ErrUnexpectedEOF 2518 } 2519 b := dAtA[iNdEx] 2520 iNdEx++ 2521 wire |= uint64(b&0x7F) << shift 2522 if b < 0x80 { 2523 break 2524 } 2525 } 2526 fieldNum := int32(wire >> 3) 2527 wireType := int(wire & 0x7) 2528 if wireType == 4 { 2529 return fmt.Errorf("proto: MigrateContractProposal: wiretype end group for non-group") 2530 } 2531 if fieldNum <= 0 { 2532 return fmt.Errorf("proto: MigrateContractProposal: illegal tag %d (wire type %d)", fieldNum, wire) 2533 } 2534 switch fieldNum { 2535 case 1: 2536 if wireType != 2 { 2537 return fmt.Errorf("proto: wrong wireType = %d for field Title", wireType) 2538 } 2539 var stringLen uint64 2540 for shift := uint(0); ; shift += 7 { 2541 if shift >= 64 { 2542 return ErrIntOverflowProposal 2543 } 2544 if iNdEx >= l { 2545 return io.ErrUnexpectedEOF 2546 } 2547 b := dAtA[iNdEx] 2548 iNdEx++ 2549 stringLen |= uint64(b&0x7F) << shift 2550 if b < 0x80 { 2551 break 2552 } 2553 } 2554 intStringLen := int(stringLen) 2555 if intStringLen < 0 { 2556 return ErrInvalidLengthProposal 2557 } 2558 postIndex := iNdEx + intStringLen 2559 if postIndex < 0 { 2560 return ErrInvalidLengthProposal 2561 } 2562 if postIndex > l { 2563 return io.ErrUnexpectedEOF 2564 } 2565 m.Title = string(dAtA[iNdEx:postIndex]) 2566 iNdEx = postIndex 2567 case 2: 2568 if wireType != 2 { 2569 return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) 2570 } 2571 var stringLen uint64 2572 for shift := uint(0); ; shift += 7 { 2573 if shift >= 64 { 2574 return ErrIntOverflowProposal 2575 } 2576 if iNdEx >= l { 2577 return io.ErrUnexpectedEOF 2578 } 2579 b := dAtA[iNdEx] 2580 iNdEx++ 2581 stringLen |= uint64(b&0x7F) << shift 2582 if b < 0x80 { 2583 break 2584 } 2585 } 2586 intStringLen := int(stringLen) 2587 if intStringLen < 0 { 2588 return ErrInvalidLengthProposal 2589 } 2590 postIndex := iNdEx + intStringLen 2591 if postIndex < 0 { 2592 return ErrInvalidLengthProposal 2593 } 2594 if postIndex > l { 2595 return io.ErrUnexpectedEOF 2596 } 2597 m.Description = string(dAtA[iNdEx:postIndex]) 2598 iNdEx = postIndex 2599 case 4: 2600 if wireType != 2 { 2601 return fmt.Errorf("proto: wrong wireType = %d for field Contract", wireType) 2602 } 2603 var stringLen uint64 2604 for shift := uint(0); ; shift += 7 { 2605 if shift >= 64 { 2606 return ErrIntOverflowProposal 2607 } 2608 if iNdEx >= l { 2609 return io.ErrUnexpectedEOF 2610 } 2611 b := dAtA[iNdEx] 2612 iNdEx++ 2613 stringLen |= uint64(b&0x7F) << shift 2614 if b < 0x80 { 2615 break 2616 } 2617 } 2618 intStringLen := int(stringLen) 2619 if intStringLen < 0 { 2620 return ErrInvalidLengthProposal 2621 } 2622 postIndex := iNdEx + intStringLen 2623 if postIndex < 0 { 2624 return ErrInvalidLengthProposal 2625 } 2626 if postIndex > l { 2627 return io.ErrUnexpectedEOF 2628 } 2629 m.Contract = string(dAtA[iNdEx:postIndex]) 2630 iNdEx = postIndex 2631 case 5: 2632 if wireType != 0 { 2633 return fmt.Errorf("proto: wrong wireType = %d for field CodeID", wireType) 2634 } 2635 m.CodeID = 0 2636 for shift := uint(0); ; shift += 7 { 2637 if shift >= 64 { 2638 return ErrIntOverflowProposal 2639 } 2640 if iNdEx >= l { 2641 return io.ErrUnexpectedEOF 2642 } 2643 b := dAtA[iNdEx] 2644 iNdEx++ 2645 m.CodeID |= uint64(b&0x7F) << shift 2646 if b < 0x80 { 2647 break 2648 } 2649 } 2650 case 6: 2651 if wireType != 2 { 2652 return fmt.Errorf("proto: wrong wireType = %d for field Msg", wireType) 2653 } 2654 var byteLen int 2655 for shift := uint(0); ; shift += 7 { 2656 if shift >= 64 { 2657 return ErrIntOverflowProposal 2658 } 2659 if iNdEx >= l { 2660 return io.ErrUnexpectedEOF 2661 } 2662 b := dAtA[iNdEx] 2663 iNdEx++ 2664 byteLen |= int(b&0x7F) << shift 2665 if b < 0x80 { 2666 break 2667 } 2668 } 2669 if byteLen < 0 { 2670 return ErrInvalidLengthProposal 2671 } 2672 postIndex := iNdEx + byteLen 2673 if postIndex < 0 { 2674 return ErrInvalidLengthProposal 2675 } 2676 if postIndex > l { 2677 return io.ErrUnexpectedEOF 2678 } 2679 m.Msg = append(m.Msg[:0], dAtA[iNdEx:postIndex]...) 2680 if m.Msg == nil { 2681 m.Msg = []byte{} 2682 } 2683 iNdEx = postIndex 2684 default: 2685 iNdEx = preIndex 2686 skippy, err := skipProposal(dAtA[iNdEx:]) 2687 if err != nil { 2688 return err 2689 } 2690 if (skippy < 0) || (iNdEx+skippy) < 0 { 2691 return ErrInvalidLengthProposal 2692 } 2693 if (iNdEx + skippy) > l { 2694 return io.ErrUnexpectedEOF 2695 } 2696 iNdEx += skippy 2697 } 2698 } 2699 2700 if iNdEx > l { 2701 return io.ErrUnexpectedEOF 2702 } 2703 return nil 2704 } 2705 2706 func (m *SudoContractProposal) Unmarshal(dAtA []byte) error { 2707 l := len(dAtA) 2708 iNdEx := 0 2709 for iNdEx < l { 2710 preIndex := iNdEx 2711 var wire uint64 2712 for shift := uint(0); ; shift += 7 { 2713 if shift >= 64 { 2714 return ErrIntOverflowProposal 2715 } 2716 if iNdEx >= l { 2717 return io.ErrUnexpectedEOF 2718 } 2719 b := dAtA[iNdEx] 2720 iNdEx++ 2721 wire |= uint64(b&0x7F) << shift 2722 if b < 0x80 { 2723 break 2724 } 2725 } 2726 fieldNum := int32(wire >> 3) 2727 wireType := int(wire & 0x7) 2728 if wireType == 4 { 2729 return fmt.Errorf("proto: SudoContractProposal: wiretype end group for non-group") 2730 } 2731 if fieldNum <= 0 { 2732 return fmt.Errorf("proto: SudoContractProposal: illegal tag %d (wire type %d)", fieldNum, wire) 2733 } 2734 switch fieldNum { 2735 case 1: 2736 if wireType != 2 { 2737 return fmt.Errorf("proto: wrong wireType = %d for field Title", wireType) 2738 } 2739 var stringLen uint64 2740 for shift := uint(0); ; shift += 7 { 2741 if shift >= 64 { 2742 return ErrIntOverflowProposal 2743 } 2744 if iNdEx >= l { 2745 return io.ErrUnexpectedEOF 2746 } 2747 b := dAtA[iNdEx] 2748 iNdEx++ 2749 stringLen |= uint64(b&0x7F) << shift 2750 if b < 0x80 { 2751 break 2752 } 2753 } 2754 intStringLen := int(stringLen) 2755 if intStringLen < 0 { 2756 return ErrInvalidLengthProposal 2757 } 2758 postIndex := iNdEx + intStringLen 2759 if postIndex < 0 { 2760 return ErrInvalidLengthProposal 2761 } 2762 if postIndex > l { 2763 return io.ErrUnexpectedEOF 2764 } 2765 m.Title = string(dAtA[iNdEx:postIndex]) 2766 iNdEx = postIndex 2767 case 2: 2768 if wireType != 2 { 2769 return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) 2770 } 2771 var stringLen uint64 2772 for shift := uint(0); ; shift += 7 { 2773 if shift >= 64 { 2774 return ErrIntOverflowProposal 2775 } 2776 if iNdEx >= l { 2777 return io.ErrUnexpectedEOF 2778 } 2779 b := dAtA[iNdEx] 2780 iNdEx++ 2781 stringLen |= uint64(b&0x7F) << shift 2782 if b < 0x80 { 2783 break 2784 } 2785 } 2786 intStringLen := int(stringLen) 2787 if intStringLen < 0 { 2788 return ErrInvalidLengthProposal 2789 } 2790 postIndex := iNdEx + intStringLen 2791 if postIndex < 0 { 2792 return ErrInvalidLengthProposal 2793 } 2794 if postIndex > l { 2795 return io.ErrUnexpectedEOF 2796 } 2797 m.Description = string(dAtA[iNdEx:postIndex]) 2798 iNdEx = postIndex 2799 case 3: 2800 if wireType != 2 { 2801 return fmt.Errorf("proto: wrong wireType = %d for field Contract", wireType) 2802 } 2803 var stringLen uint64 2804 for shift := uint(0); ; shift += 7 { 2805 if shift >= 64 { 2806 return ErrIntOverflowProposal 2807 } 2808 if iNdEx >= l { 2809 return io.ErrUnexpectedEOF 2810 } 2811 b := dAtA[iNdEx] 2812 iNdEx++ 2813 stringLen |= uint64(b&0x7F) << shift 2814 if b < 0x80 { 2815 break 2816 } 2817 } 2818 intStringLen := int(stringLen) 2819 if intStringLen < 0 { 2820 return ErrInvalidLengthProposal 2821 } 2822 postIndex := iNdEx + intStringLen 2823 if postIndex < 0 { 2824 return ErrInvalidLengthProposal 2825 } 2826 if postIndex > l { 2827 return io.ErrUnexpectedEOF 2828 } 2829 m.Contract = string(dAtA[iNdEx:postIndex]) 2830 iNdEx = postIndex 2831 case 4: 2832 if wireType != 2 { 2833 return fmt.Errorf("proto: wrong wireType = %d for field Msg", wireType) 2834 } 2835 var byteLen int 2836 for shift := uint(0); ; shift += 7 { 2837 if shift >= 64 { 2838 return ErrIntOverflowProposal 2839 } 2840 if iNdEx >= l { 2841 return io.ErrUnexpectedEOF 2842 } 2843 b := dAtA[iNdEx] 2844 iNdEx++ 2845 byteLen |= int(b&0x7F) << shift 2846 if b < 0x80 { 2847 break 2848 } 2849 } 2850 if byteLen < 0 { 2851 return ErrInvalidLengthProposal 2852 } 2853 postIndex := iNdEx + byteLen 2854 if postIndex < 0 { 2855 return ErrInvalidLengthProposal 2856 } 2857 if postIndex > l { 2858 return io.ErrUnexpectedEOF 2859 } 2860 m.Msg = append(m.Msg[:0], dAtA[iNdEx:postIndex]...) 2861 if m.Msg == nil { 2862 m.Msg = []byte{} 2863 } 2864 iNdEx = postIndex 2865 default: 2866 iNdEx = preIndex 2867 skippy, err := skipProposal(dAtA[iNdEx:]) 2868 if err != nil { 2869 return err 2870 } 2871 if (skippy < 0) || (iNdEx+skippy) < 0 { 2872 return ErrInvalidLengthProposal 2873 } 2874 if (iNdEx + skippy) > l { 2875 return io.ErrUnexpectedEOF 2876 } 2877 iNdEx += skippy 2878 } 2879 } 2880 2881 if iNdEx > l { 2882 return io.ErrUnexpectedEOF 2883 } 2884 return nil 2885 } 2886 2887 func (m *ExecuteContractProposal) Unmarshal(dAtA []byte) error { 2888 l := len(dAtA) 2889 iNdEx := 0 2890 for iNdEx < l { 2891 preIndex := iNdEx 2892 var wire uint64 2893 for shift := uint(0); ; shift += 7 { 2894 if shift >= 64 { 2895 return ErrIntOverflowProposal 2896 } 2897 if iNdEx >= l { 2898 return io.ErrUnexpectedEOF 2899 } 2900 b := dAtA[iNdEx] 2901 iNdEx++ 2902 wire |= uint64(b&0x7F) << shift 2903 if b < 0x80 { 2904 break 2905 } 2906 } 2907 fieldNum := int32(wire >> 3) 2908 wireType := int(wire & 0x7) 2909 if wireType == 4 { 2910 return fmt.Errorf("proto: ExecuteContractProposal: wiretype end group for non-group") 2911 } 2912 if fieldNum <= 0 { 2913 return fmt.Errorf("proto: ExecuteContractProposal: illegal tag %d (wire type %d)", fieldNum, wire) 2914 } 2915 switch fieldNum { 2916 case 1: 2917 if wireType != 2 { 2918 return fmt.Errorf("proto: wrong wireType = %d for field Title", wireType) 2919 } 2920 var stringLen uint64 2921 for shift := uint(0); ; shift += 7 { 2922 if shift >= 64 { 2923 return ErrIntOverflowProposal 2924 } 2925 if iNdEx >= l { 2926 return io.ErrUnexpectedEOF 2927 } 2928 b := dAtA[iNdEx] 2929 iNdEx++ 2930 stringLen |= uint64(b&0x7F) << shift 2931 if b < 0x80 { 2932 break 2933 } 2934 } 2935 intStringLen := int(stringLen) 2936 if intStringLen < 0 { 2937 return ErrInvalidLengthProposal 2938 } 2939 postIndex := iNdEx + intStringLen 2940 if postIndex < 0 { 2941 return ErrInvalidLengthProposal 2942 } 2943 if postIndex > l { 2944 return io.ErrUnexpectedEOF 2945 } 2946 m.Title = string(dAtA[iNdEx:postIndex]) 2947 iNdEx = postIndex 2948 case 2: 2949 if wireType != 2 { 2950 return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) 2951 } 2952 var stringLen uint64 2953 for shift := uint(0); ; shift += 7 { 2954 if shift >= 64 { 2955 return ErrIntOverflowProposal 2956 } 2957 if iNdEx >= l { 2958 return io.ErrUnexpectedEOF 2959 } 2960 b := dAtA[iNdEx] 2961 iNdEx++ 2962 stringLen |= uint64(b&0x7F) << shift 2963 if b < 0x80 { 2964 break 2965 } 2966 } 2967 intStringLen := int(stringLen) 2968 if intStringLen < 0 { 2969 return ErrInvalidLengthProposal 2970 } 2971 postIndex := iNdEx + intStringLen 2972 if postIndex < 0 { 2973 return ErrInvalidLengthProposal 2974 } 2975 if postIndex > l { 2976 return io.ErrUnexpectedEOF 2977 } 2978 m.Description = string(dAtA[iNdEx:postIndex]) 2979 iNdEx = postIndex 2980 case 3: 2981 if wireType != 2 { 2982 return fmt.Errorf("proto: wrong wireType = %d for field RunAs", wireType) 2983 } 2984 var stringLen uint64 2985 for shift := uint(0); ; shift += 7 { 2986 if shift >= 64 { 2987 return ErrIntOverflowProposal 2988 } 2989 if iNdEx >= l { 2990 return io.ErrUnexpectedEOF 2991 } 2992 b := dAtA[iNdEx] 2993 iNdEx++ 2994 stringLen |= uint64(b&0x7F) << shift 2995 if b < 0x80 { 2996 break 2997 } 2998 } 2999 intStringLen := int(stringLen) 3000 if intStringLen < 0 { 3001 return ErrInvalidLengthProposal 3002 } 3003 postIndex := iNdEx + intStringLen 3004 if postIndex < 0 { 3005 return ErrInvalidLengthProposal 3006 } 3007 if postIndex > l { 3008 return io.ErrUnexpectedEOF 3009 } 3010 m.RunAs = string(dAtA[iNdEx:postIndex]) 3011 iNdEx = postIndex 3012 case 4: 3013 if wireType != 2 { 3014 return fmt.Errorf("proto: wrong wireType = %d for field Contract", wireType) 3015 } 3016 var stringLen uint64 3017 for shift := uint(0); ; shift += 7 { 3018 if shift >= 64 { 3019 return ErrIntOverflowProposal 3020 } 3021 if iNdEx >= l { 3022 return io.ErrUnexpectedEOF 3023 } 3024 b := dAtA[iNdEx] 3025 iNdEx++ 3026 stringLen |= uint64(b&0x7F) << shift 3027 if b < 0x80 { 3028 break 3029 } 3030 } 3031 intStringLen := int(stringLen) 3032 if intStringLen < 0 { 3033 return ErrInvalidLengthProposal 3034 } 3035 postIndex := iNdEx + intStringLen 3036 if postIndex < 0 { 3037 return ErrInvalidLengthProposal 3038 } 3039 if postIndex > l { 3040 return io.ErrUnexpectedEOF 3041 } 3042 m.Contract = string(dAtA[iNdEx:postIndex]) 3043 iNdEx = postIndex 3044 case 5: 3045 if wireType != 2 { 3046 return fmt.Errorf("proto: wrong wireType = %d for field Msg", wireType) 3047 } 3048 var byteLen int 3049 for shift := uint(0); ; shift += 7 { 3050 if shift >= 64 { 3051 return ErrIntOverflowProposal 3052 } 3053 if iNdEx >= l { 3054 return io.ErrUnexpectedEOF 3055 } 3056 b := dAtA[iNdEx] 3057 iNdEx++ 3058 byteLen |= int(b&0x7F) << shift 3059 if b < 0x80 { 3060 break 3061 } 3062 } 3063 if byteLen < 0 { 3064 return ErrInvalidLengthProposal 3065 } 3066 postIndex := iNdEx + byteLen 3067 if postIndex < 0 { 3068 return ErrInvalidLengthProposal 3069 } 3070 if postIndex > l { 3071 return io.ErrUnexpectedEOF 3072 } 3073 m.Msg = append(m.Msg[:0], dAtA[iNdEx:postIndex]...) 3074 if m.Msg == nil { 3075 m.Msg = []byte{} 3076 } 3077 iNdEx = postIndex 3078 case 6: 3079 if wireType != 2 { 3080 return fmt.Errorf("proto: wrong wireType = %d for field Funds", wireType) 3081 } 3082 var msglen int 3083 for shift := uint(0); ; shift += 7 { 3084 if shift >= 64 { 3085 return ErrIntOverflowProposal 3086 } 3087 if iNdEx >= l { 3088 return io.ErrUnexpectedEOF 3089 } 3090 b := dAtA[iNdEx] 3091 iNdEx++ 3092 msglen |= int(b&0x7F) << shift 3093 if b < 0x80 { 3094 break 3095 } 3096 } 3097 if msglen < 0 { 3098 return ErrInvalidLengthProposal 3099 } 3100 postIndex := iNdEx + msglen 3101 if postIndex < 0 { 3102 return ErrInvalidLengthProposal 3103 } 3104 if postIndex > l { 3105 return io.ErrUnexpectedEOF 3106 } 3107 m.Funds = append(m.Funds, types.CoinAdapter{}) 3108 if err := m.Funds[len(m.Funds)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 3109 return err 3110 } 3111 iNdEx = postIndex 3112 default: 3113 iNdEx = preIndex 3114 skippy, err := skipProposal(dAtA[iNdEx:]) 3115 if err != nil { 3116 return err 3117 } 3118 if (skippy < 0) || (iNdEx+skippy) < 0 { 3119 return ErrInvalidLengthProposal 3120 } 3121 if (iNdEx + skippy) > l { 3122 return io.ErrUnexpectedEOF 3123 } 3124 iNdEx += skippy 3125 } 3126 } 3127 3128 if iNdEx > l { 3129 return io.ErrUnexpectedEOF 3130 } 3131 return nil 3132 } 3133 3134 func (m *UpdateAdminProposal) Unmarshal(dAtA []byte) error { 3135 l := len(dAtA) 3136 iNdEx := 0 3137 for iNdEx < l { 3138 preIndex := iNdEx 3139 var wire uint64 3140 for shift := uint(0); ; shift += 7 { 3141 if shift >= 64 { 3142 return ErrIntOverflowProposal 3143 } 3144 if iNdEx >= l { 3145 return io.ErrUnexpectedEOF 3146 } 3147 b := dAtA[iNdEx] 3148 iNdEx++ 3149 wire |= uint64(b&0x7F) << shift 3150 if b < 0x80 { 3151 break 3152 } 3153 } 3154 fieldNum := int32(wire >> 3) 3155 wireType := int(wire & 0x7) 3156 if wireType == 4 { 3157 return fmt.Errorf("proto: UpdateAdminProposal: wiretype end group for non-group") 3158 } 3159 if fieldNum <= 0 { 3160 return fmt.Errorf("proto: UpdateAdminProposal: illegal tag %d (wire type %d)", fieldNum, wire) 3161 } 3162 switch fieldNum { 3163 case 1: 3164 if wireType != 2 { 3165 return fmt.Errorf("proto: wrong wireType = %d for field Title", wireType) 3166 } 3167 var stringLen uint64 3168 for shift := uint(0); ; shift += 7 { 3169 if shift >= 64 { 3170 return ErrIntOverflowProposal 3171 } 3172 if iNdEx >= l { 3173 return io.ErrUnexpectedEOF 3174 } 3175 b := dAtA[iNdEx] 3176 iNdEx++ 3177 stringLen |= uint64(b&0x7F) << shift 3178 if b < 0x80 { 3179 break 3180 } 3181 } 3182 intStringLen := int(stringLen) 3183 if intStringLen < 0 { 3184 return ErrInvalidLengthProposal 3185 } 3186 postIndex := iNdEx + intStringLen 3187 if postIndex < 0 { 3188 return ErrInvalidLengthProposal 3189 } 3190 if postIndex > l { 3191 return io.ErrUnexpectedEOF 3192 } 3193 m.Title = string(dAtA[iNdEx:postIndex]) 3194 iNdEx = postIndex 3195 case 2: 3196 if wireType != 2 { 3197 return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) 3198 } 3199 var stringLen uint64 3200 for shift := uint(0); ; shift += 7 { 3201 if shift >= 64 { 3202 return ErrIntOverflowProposal 3203 } 3204 if iNdEx >= l { 3205 return io.ErrUnexpectedEOF 3206 } 3207 b := dAtA[iNdEx] 3208 iNdEx++ 3209 stringLen |= uint64(b&0x7F) << shift 3210 if b < 0x80 { 3211 break 3212 } 3213 } 3214 intStringLen := int(stringLen) 3215 if intStringLen < 0 { 3216 return ErrInvalidLengthProposal 3217 } 3218 postIndex := iNdEx + intStringLen 3219 if postIndex < 0 { 3220 return ErrInvalidLengthProposal 3221 } 3222 if postIndex > l { 3223 return io.ErrUnexpectedEOF 3224 } 3225 m.Description = string(dAtA[iNdEx:postIndex]) 3226 iNdEx = postIndex 3227 case 3: 3228 if wireType != 2 { 3229 return fmt.Errorf("proto: wrong wireType = %d for field NewAdmin", wireType) 3230 } 3231 var stringLen uint64 3232 for shift := uint(0); ; shift += 7 { 3233 if shift >= 64 { 3234 return ErrIntOverflowProposal 3235 } 3236 if iNdEx >= l { 3237 return io.ErrUnexpectedEOF 3238 } 3239 b := dAtA[iNdEx] 3240 iNdEx++ 3241 stringLen |= uint64(b&0x7F) << shift 3242 if b < 0x80 { 3243 break 3244 } 3245 } 3246 intStringLen := int(stringLen) 3247 if intStringLen < 0 { 3248 return ErrInvalidLengthProposal 3249 } 3250 postIndex := iNdEx + intStringLen 3251 if postIndex < 0 { 3252 return ErrInvalidLengthProposal 3253 } 3254 if postIndex > l { 3255 return io.ErrUnexpectedEOF 3256 } 3257 m.NewAdmin = string(dAtA[iNdEx:postIndex]) 3258 iNdEx = postIndex 3259 case 4: 3260 if wireType != 2 { 3261 return fmt.Errorf("proto: wrong wireType = %d for field Contract", wireType) 3262 } 3263 var stringLen uint64 3264 for shift := uint(0); ; shift += 7 { 3265 if shift >= 64 { 3266 return ErrIntOverflowProposal 3267 } 3268 if iNdEx >= l { 3269 return io.ErrUnexpectedEOF 3270 } 3271 b := dAtA[iNdEx] 3272 iNdEx++ 3273 stringLen |= uint64(b&0x7F) << shift 3274 if b < 0x80 { 3275 break 3276 } 3277 } 3278 intStringLen := int(stringLen) 3279 if intStringLen < 0 { 3280 return ErrInvalidLengthProposal 3281 } 3282 postIndex := iNdEx + intStringLen 3283 if postIndex < 0 { 3284 return ErrInvalidLengthProposal 3285 } 3286 if postIndex > l { 3287 return io.ErrUnexpectedEOF 3288 } 3289 m.Contract = string(dAtA[iNdEx:postIndex]) 3290 iNdEx = postIndex 3291 default: 3292 iNdEx = preIndex 3293 skippy, err := skipProposal(dAtA[iNdEx:]) 3294 if err != nil { 3295 return err 3296 } 3297 if (skippy < 0) || (iNdEx+skippy) < 0 { 3298 return ErrInvalidLengthProposal 3299 } 3300 if (iNdEx + skippy) > l { 3301 return io.ErrUnexpectedEOF 3302 } 3303 iNdEx += skippy 3304 } 3305 } 3306 3307 if iNdEx > l { 3308 return io.ErrUnexpectedEOF 3309 } 3310 return nil 3311 } 3312 3313 func (m *ClearAdminProposal) Unmarshal(dAtA []byte) error { 3314 l := len(dAtA) 3315 iNdEx := 0 3316 for iNdEx < l { 3317 preIndex := iNdEx 3318 var wire uint64 3319 for shift := uint(0); ; shift += 7 { 3320 if shift >= 64 { 3321 return ErrIntOverflowProposal 3322 } 3323 if iNdEx >= l { 3324 return io.ErrUnexpectedEOF 3325 } 3326 b := dAtA[iNdEx] 3327 iNdEx++ 3328 wire |= uint64(b&0x7F) << shift 3329 if b < 0x80 { 3330 break 3331 } 3332 } 3333 fieldNum := int32(wire >> 3) 3334 wireType := int(wire & 0x7) 3335 if wireType == 4 { 3336 return fmt.Errorf("proto: ClearAdminProposal: wiretype end group for non-group") 3337 } 3338 if fieldNum <= 0 { 3339 return fmt.Errorf("proto: ClearAdminProposal: illegal tag %d (wire type %d)", fieldNum, wire) 3340 } 3341 switch fieldNum { 3342 case 1: 3343 if wireType != 2 { 3344 return fmt.Errorf("proto: wrong wireType = %d for field Title", wireType) 3345 } 3346 var stringLen uint64 3347 for shift := uint(0); ; shift += 7 { 3348 if shift >= 64 { 3349 return ErrIntOverflowProposal 3350 } 3351 if iNdEx >= l { 3352 return io.ErrUnexpectedEOF 3353 } 3354 b := dAtA[iNdEx] 3355 iNdEx++ 3356 stringLen |= uint64(b&0x7F) << shift 3357 if b < 0x80 { 3358 break 3359 } 3360 } 3361 intStringLen := int(stringLen) 3362 if intStringLen < 0 { 3363 return ErrInvalidLengthProposal 3364 } 3365 postIndex := iNdEx + intStringLen 3366 if postIndex < 0 { 3367 return ErrInvalidLengthProposal 3368 } 3369 if postIndex > l { 3370 return io.ErrUnexpectedEOF 3371 } 3372 m.Title = string(dAtA[iNdEx:postIndex]) 3373 iNdEx = postIndex 3374 case 2: 3375 if wireType != 2 { 3376 return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) 3377 } 3378 var stringLen uint64 3379 for shift := uint(0); ; shift += 7 { 3380 if shift >= 64 { 3381 return ErrIntOverflowProposal 3382 } 3383 if iNdEx >= l { 3384 return io.ErrUnexpectedEOF 3385 } 3386 b := dAtA[iNdEx] 3387 iNdEx++ 3388 stringLen |= uint64(b&0x7F) << shift 3389 if b < 0x80 { 3390 break 3391 } 3392 } 3393 intStringLen := int(stringLen) 3394 if intStringLen < 0 { 3395 return ErrInvalidLengthProposal 3396 } 3397 postIndex := iNdEx + intStringLen 3398 if postIndex < 0 { 3399 return ErrInvalidLengthProposal 3400 } 3401 if postIndex > l { 3402 return io.ErrUnexpectedEOF 3403 } 3404 m.Description = string(dAtA[iNdEx:postIndex]) 3405 iNdEx = postIndex 3406 case 3: 3407 if wireType != 2 { 3408 return fmt.Errorf("proto: wrong wireType = %d for field Contract", wireType) 3409 } 3410 var stringLen uint64 3411 for shift := uint(0); ; shift += 7 { 3412 if shift >= 64 { 3413 return ErrIntOverflowProposal 3414 } 3415 if iNdEx >= l { 3416 return io.ErrUnexpectedEOF 3417 } 3418 b := dAtA[iNdEx] 3419 iNdEx++ 3420 stringLen |= uint64(b&0x7F) << shift 3421 if b < 0x80 { 3422 break 3423 } 3424 } 3425 intStringLen := int(stringLen) 3426 if intStringLen < 0 { 3427 return ErrInvalidLengthProposal 3428 } 3429 postIndex := iNdEx + intStringLen 3430 if postIndex < 0 { 3431 return ErrInvalidLengthProposal 3432 } 3433 if postIndex > l { 3434 return io.ErrUnexpectedEOF 3435 } 3436 m.Contract = string(dAtA[iNdEx:postIndex]) 3437 iNdEx = postIndex 3438 default: 3439 iNdEx = preIndex 3440 skippy, err := skipProposal(dAtA[iNdEx:]) 3441 if err != nil { 3442 return err 3443 } 3444 if (skippy < 0) || (iNdEx+skippy) < 0 { 3445 return ErrInvalidLengthProposal 3446 } 3447 if (iNdEx + skippy) > l { 3448 return io.ErrUnexpectedEOF 3449 } 3450 iNdEx += skippy 3451 } 3452 } 3453 3454 if iNdEx > l { 3455 return io.ErrUnexpectedEOF 3456 } 3457 return nil 3458 } 3459 3460 func (m *PinCodesProposal) Unmarshal(dAtA []byte) error { 3461 l := len(dAtA) 3462 iNdEx := 0 3463 for iNdEx < l { 3464 preIndex := iNdEx 3465 var wire uint64 3466 for shift := uint(0); ; shift += 7 { 3467 if shift >= 64 { 3468 return ErrIntOverflowProposal 3469 } 3470 if iNdEx >= l { 3471 return io.ErrUnexpectedEOF 3472 } 3473 b := dAtA[iNdEx] 3474 iNdEx++ 3475 wire |= uint64(b&0x7F) << shift 3476 if b < 0x80 { 3477 break 3478 } 3479 } 3480 fieldNum := int32(wire >> 3) 3481 wireType := int(wire & 0x7) 3482 if wireType == 4 { 3483 return fmt.Errorf("proto: PinCodesProposal: wiretype end group for non-group") 3484 } 3485 if fieldNum <= 0 { 3486 return fmt.Errorf("proto: PinCodesProposal: illegal tag %d (wire type %d)", fieldNum, wire) 3487 } 3488 switch fieldNum { 3489 case 1: 3490 if wireType != 2 { 3491 return fmt.Errorf("proto: wrong wireType = %d for field Title", wireType) 3492 } 3493 var stringLen uint64 3494 for shift := uint(0); ; shift += 7 { 3495 if shift >= 64 { 3496 return ErrIntOverflowProposal 3497 } 3498 if iNdEx >= l { 3499 return io.ErrUnexpectedEOF 3500 } 3501 b := dAtA[iNdEx] 3502 iNdEx++ 3503 stringLen |= uint64(b&0x7F) << shift 3504 if b < 0x80 { 3505 break 3506 } 3507 } 3508 intStringLen := int(stringLen) 3509 if intStringLen < 0 { 3510 return ErrInvalidLengthProposal 3511 } 3512 postIndex := iNdEx + intStringLen 3513 if postIndex < 0 { 3514 return ErrInvalidLengthProposal 3515 } 3516 if postIndex > l { 3517 return io.ErrUnexpectedEOF 3518 } 3519 m.Title = string(dAtA[iNdEx:postIndex]) 3520 iNdEx = postIndex 3521 case 2: 3522 if wireType != 2 { 3523 return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) 3524 } 3525 var stringLen uint64 3526 for shift := uint(0); ; shift += 7 { 3527 if shift >= 64 { 3528 return ErrIntOverflowProposal 3529 } 3530 if iNdEx >= l { 3531 return io.ErrUnexpectedEOF 3532 } 3533 b := dAtA[iNdEx] 3534 iNdEx++ 3535 stringLen |= uint64(b&0x7F) << shift 3536 if b < 0x80 { 3537 break 3538 } 3539 } 3540 intStringLen := int(stringLen) 3541 if intStringLen < 0 { 3542 return ErrInvalidLengthProposal 3543 } 3544 postIndex := iNdEx + intStringLen 3545 if postIndex < 0 { 3546 return ErrInvalidLengthProposal 3547 } 3548 if postIndex > l { 3549 return io.ErrUnexpectedEOF 3550 } 3551 m.Description = string(dAtA[iNdEx:postIndex]) 3552 iNdEx = postIndex 3553 case 3: 3554 if wireType == 0 { 3555 var v uint64 3556 for shift := uint(0); ; shift += 7 { 3557 if shift >= 64 { 3558 return ErrIntOverflowProposal 3559 } 3560 if iNdEx >= l { 3561 return io.ErrUnexpectedEOF 3562 } 3563 b := dAtA[iNdEx] 3564 iNdEx++ 3565 v |= uint64(b&0x7F) << shift 3566 if b < 0x80 { 3567 break 3568 } 3569 } 3570 m.CodeIDs = append(m.CodeIDs, v) 3571 } else if wireType == 2 { 3572 var packedLen int 3573 for shift := uint(0); ; shift += 7 { 3574 if shift >= 64 { 3575 return ErrIntOverflowProposal 3576 } 3577 if iNdEx >= l { 3578 return io.ErrUnexpectedEOF 3579 } 3580 b := dAtA[iNdEx] 3581 iNdEx++ 3582 packedLen |= int(b&0x7F) << shift 3583 if b < 0x80 { 3584 break 3585 } 3586 } 3587 if packedLen < 0 { 3588 return ErrInvalidLengthProposal 3589 } 3590 postIndex := iNdEx + packedLen 3591 if postIndex < 0 { 3592 return ErrInvalidLengthProposal 3593 } 3594 if postIndex > l { 3595 return io.ErrUnexpectedEOF 3596 } 3597 var elementCount int 3598 var count int 3599 for _, integer := range dAtA[iNdEx:postIndex] { 3600 if integer < 128 { 3601 count++ 3602 } 3603 } 3604 elementCount = count 3605 if elementCount != 0 && len(m.CodeIDs) == 0 { 3606 m.CodeIDs = make([]uint64, 0, elementCount) 3607 } 3608 for iNdEx < postIndex { 3609 var v uint64 3610 for shift := uint(0); ; shift += 7 { 3611 if shift >= 64 { 3612 return ErrIntOverflowProposal 3613 } 3614 if iNdEx >= l { 3615 return io.ErrUnexpectedEOF 3616 } 3617 b := dAtA[iNdEx] 3618 iNdEx++ 3619 v |= uint64(b&0x7F) << shift 3620 if b < 0x80 { 3621 break 3622 } 3623 } 3624 m.CodeIDs = append(m.CodeIDs, v) 3625 } 3626 } else { 3627 return fmt.Errorf("proto: wrong wireType = %d for field CodeIDs", wireType) 3628 } 3629 default: 3630 iNdEx = preIndex 3631 skippy, err := skipProposal(dAtA[iNdEx:]) 3632 if err != nil { 3633 return err 3634 } 3635 if (skippy < 0) || (iNdEx+skippy) < 0 { 3636 return ErrInvalidLengthProposal 3637 } 3638 if (iNdEx + skippy) > l { 3639 return io.ErrUnexpectedEOF 3640 } 3641 iNdEx += skippy 3642 } 3643 } 3644 3645 if iNdEx > l { 3646 return io.ErrUnexpectedEOF 3647 } 3648 return nil 3649 } 3650 3651 func (m *UnpinCodesProposal) Unmarshal(dAtA []byte) error { 3652 l := len(dAtA) 3653 iNdEx := 0 3654 for iNdEx < l { 3655 preIndex := iNdEx 3656 var wire uint64 3657 for shift := uint(0); ; shift += 7 { 3658 if shift >= 64 { 3659 return ErrIntOverflowProposal 3660 } 3661 if iNdEx >= l { 3662 return io.ErrUnexpectedEOF 3663 } 3664 b := dAtA[iNdEx] 3665 iNdEx++ 3666 wire |= uint64(b&0x7F) << shift 3667 if b < 0x80 { 3668 break 3669 } 3670 } 3671 fieldNum := int32(wire >> 3) 3672 wireType := int(wire & 0x7) 3673 if wireType == 4 { 3674 return fmt.Errorf("proto: UnpinCodesProposal: wiretype end group for non-group") 3675 } 3676 if fieldNum <= 0 { 3677 return fmt.Errorf("proto: UnpinCodesProposal: illegal tag %d (wire type %d)", fieldNum, wire) 3678 } 3679 switch fieldNum { 3680 case 1: 3681 if wireType != 2 { 3682 return fmt.Errorf("proto: wrong wireType = %d for field Title", wireType) 3683 } 3684 var stringLen uint64 3685 for shift := uint(0); ; shift += 7 { 3686 if shift >= 64 { 3687 return ErrIntOverflowProposal 3688 } 3689 if iNdEx >= l { 3690 return io.ErrUnexpectedEOF 3691 } 3692 b := dAtA[iNdEx] 3693 iNdEx++ 3694 stringLen |= uint64(b&0x7F) << shift 3695 if b < 0x80 { 3696 break 3697 } 3698 } 3699 intStringLen := int(stringLen) 3700 if intStringLen < 0 { 3701 return ErrInvalidLengthProposal 3702 } 3703 postIndex := iNdEx + intStringLen 3704 if postIndex < 0 { 3705 return ErrInvalidLengthProposal 3706 } 3707 if postIndex > l { 3708 return io.ErrUnexpectedEOF 3709 } 3710 m.Title = string(dAtA[iNdEx:postIndex]) 3711 iNdEx = postIndex 3712 case 2: 3713 if wireType != 2 { 3714 return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) 3715 } 3716 var stringLen uint64 3717 for shift := uint(0); ; shift += 7 { 3718 if shift >= 64 { 3719 return ErrIntOverflowProposal 3720 } 3721 if iNdEx >= l { 3722 return io.ErrUnexpectedEOF 3723 } 3724 b := dAtA[iNdEx] 3725 iNdEx++ 3726 stringLen |= uint64(b&0x7F) << shift 3727 if b < 0x80 { 3728 break 3729 } 3730 } 3731 intStringLen := int(stringLen) 3732 if intStringLen < 0 { 3733 return ErrInvalidLengthProposal 3734 } 3735 postIndex := iNdEx + intStringLen 3736 if postIndex < 0 { 3737 return ErrInvalidLengthProposal 3738 } 3739 if postIndex > l { 3740 return io.ErrUnexpectedEOF 3741 } 3742 m.Description = string(dAtA[iNdEx:postIndex]) 3743 iNdEx = postIndex 3744 case 3: 3745 if wireType == 0 { 3746 var v uint64 3747 for shift := uint(0); ; shift += 7 { 3748 if shift >= 64 { 3749 return ErrIntOverflowProposal 3750 } 3751 if iNdEx >= l { 3752 return io.ErrUnexpectedEOF 3753 } 3754 b := dAtA[iNdEx] 3755 iNdEx++ 3756 v |= uint64(b&0x7F) << shift 3757 if b < 0x80 { 3758 break 3759 } 3760 } 3761 m.CodeIDs = append(m.CodeIDs, v) 3762 } else if wireType == 2 { 3763 var packedLen int 3764 for shift := uint(0); ; shift += 7 { 3765 if shift >= 64 { 3766 return ErrIntOverflowProposal 3767 } 3768 if iNdEx >= l { 3769 return io.ErrUnexpectedEOF 3770 } 3771 b := dAtA[iNdEx] 3772 iNdEx++ 3773 packedLen |= int(b&0x7F) << shift 3774 if b < 0x80 { 3775 break 3776 } 3777 } 3778 if packedLen < 0 { 3779 return ErrInvalidLengthProposal 3780 } 3781 postIndex := iNdEx + packedLen 3782 if postIndex < 0 { 3783 return ErrInvalidLengthProposal 3784 } 3785 if postIndex > l { 3786 return io.ErrUnexpectedEOF 3787 } 3788 var elementCount int 3789 var count int 3790 for _, integer := range dAtA[iNdEx:postIndex] { 3791 if integer < 128 { 3792 count++ 3793 } 3794 } 3795 elementCount = count 3796 if elementCount != 0 && len(m.CodeIDs) == 0 { 3797 m.CodeIDs = make([]uint64, 0, elementCount) 3798 } 3799 for iNdEx < postIndex { 3800 var v uint64 3801 for shift := uint(0); ; shift += 7 { 3802 if shift >= 64 { 3803 return ErrIntOverflowProposal 3804 } 3805 if iNdEx >= l { 3806 return io.ErrUnexpectedEOF 3807 } 3808 b := dAtA[iNdEx] 3809 iNdEx++ 3810 v |= uint64(b&0x7F) << shift 3811 if b < 0x80 { 3812 break 3813 } 3814 } 3815 m.CodeIDs = append(m.CodeIDs, v) 3816 } 3817 } else { 3818 return fmt.Errorf("proto: wrong wireType = %d for field CodeIDs", wireType) 3819 } 3820 default: 3821 iNdEx = preIndex 3822 skippy, err := skipProposal(dAtA[iNdEx:]) 3823 if err != nil { 3824 return err 3825 } 3826 if (skippy < 0) || (iNdEx+skippy) < 0 { 3827 return ErrInvalidLengthProposal 3828 } 3829 if (iNdEx + skippy) > l { 3830 return io.ErrUnexpectedEOF 3831 } 3832 iNdEx += skippy 3833 } 3834 } 3835 3836 if iNdEx > l { 3837 return io.ErrUnexpectedEOF 3838 } 3839 return nil 3840 } 3841 3842 func (m *AccessConfigUpdate) Unmarshal(dAtA []byte) error { 3843 l := len(dAtA) 3844 iNdEx := 0 3845 for iNdEx < l { 3846 preIndex := iNdEx 3847 var wire uint64 3848 for shift := uint(0); ; shift += 7 { 3849 if shift >= 64 { 3850 return ErrIntOverflowProposal 3851 } 3852 if iNdEx >= l { 3853 return io.ErrUnexpectedEOF 3854 } 3855 b := dAtA[iNdEx] 3856 iNdEx++ 3857 wire |= uint64(b&0x7F) << shift 3858 if b < 0x80 { 3859 break 3860 } 3861 } 3862 fieldNum := int32(wire >> 3) 3863 wireType := int(wire & 0x7) 3864 if wireType == 4 { 3865 return fmt.Errorf("proto: AccessConfigUpdate: wiretype end group for non-group") 3866 } 3867 if fieldNum <= 0 { 3868 return fmt.Errorf("proto: AccessConfigUpdate: illegal tag %d (wire type %d)", fieldNum, wire) 3869 } 3870 switch fieldNum { 3871 case 1: 3872 if wireType != 0 { 3873 return fmt.Errorf("proto: wrong wireType = %d for field CodeID", wireType) 3874 } 3875 m.CodeID = 0 3876 for shift := uint(0); ; shift += 7 { 3877 if shift >= 64 { 3878 return ErrIntOverflowProposal 3879 } 3880 if iNdEx >= l { 3881 return io.ErrUnexpectedEOF 3882 } 3883 b := dAtA[iNdEx] 3884 iNdEx++ 3885 m.CodeID |= uint64(b&0x7F) << shift 3886 if b < 0x80 { 3887 break 3888 } 3889 } 3890 case 2: 3891 if wireType != 2 { 3892 return fmt.Errorf("proto: wrong wireType = %d for field InstantiatePermission", wireType) 3893 } 3894 var msglen int 3895 for shift := uint(0); ; shift += 7 { 3896 if shift >= 64 { 3897 return ErrIntOverflowProposal 3898 } 3899 if iNdEx >= l { 3900 return io.ErrUnexpectedEOF 3901 } 3902 b := dAtA[iNdEx] 3903 iNdEx++ 3904 msglen |= int(b&0x7F) << shift 3905 if b < 0x80 { 3906 break 3907 } 3908 } 3909 if msglen < 0 { 3910 return ErrInvalidLengthProposal 3911 } 3912 postIndex := iNdEx + msglen 3913 if postIndex < 0 { 3914 return ErrInvalidLengthProposal 3915 } 3916 if postIndex > l { 3917 return io.ErrUnexpectedEOF 3918 } 3919 if err := m.InstantiatePermission.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 3920 return err 3921 } 3922 iNdEx = postIndex 3923 default: 3924 iNdEx = preIndex 3925 skippy, err := skipProposal(dAtA[iNdEx:]) 3926 if err != nil { 3927 return err 3928 } 3929 if (skippy < 0) || (iNdEx+skippy) < 0 { 3930 return ErrInvalidLengthProposal 3931 } 3932 if (iNdEx + skippy) > l { 3933 return io.ErrUnexpectedEOF 3934 } 3935 iNdEx += skippy 3936 } 3937 } 3938 3939 if iNdEx > l { 3940 return io.ErrUnexpectedEOF 3941 } 3942 return nil 3943 } 3944 3945 func (m *UpdateInstantiateConfigProposal) Unmarshal(dAtA []byte) error { 3946 l := len(dAtA) 3947 iNdEx := 0 3948 for iNdEx < l { 3949 preIndex := iNdEx 3950 var wire uint64 3951 for shift := uint(0); ; shift += 7 { 3952 if shift >= 64 { 3953 return ErrIntOverflowProposal 3954 } 3955 if iNdEx >= l { 3956 return io.ErrUnexpectedEOF 3957 } 3958 b := dAtA[iNdEx] 3959 iNdEx++ 3960 wire |= uint64(b&0x7F) << shift 3961 if b < 0x80 { 3962 break 3963 } 3964 } 3965 fieldNum := int32(wire >> 3) 3966 wireType := int(wire & 0x7) 3967 if wireType == 4 { 3968 return fmt.Errorf("proto: UpdateInstantiateConfigProposal: wiretype end group for non-group") 3969 } 3970 if fieldNum <= 0 { 3971 return fmt.Errorf("proto: UpdateInstantiateConfigProposal: illegal tag %d (wire type %d)", fieldNum, wire) 3972 } 3973 switch fieldNum { 3974 case 1: 3975 if wireType != 2 { 3976 return fmt.Errorf("proto: wrong wireType = %d for field Title", wireType) 3977 } 3978 var stringLen uint64 3979 for shift := uint(0); ; shift += 7 { 3980 if shift >= 64 { 3981 return ErrIntOverflowProposal 3982 } 3983 if iNdEx >= l { 3984 return io.ErrUnexpectedEOF 3985 } 3986 b := dAtA[iNdEx] 3987 iNdEx++ 3988 stringLen |= uint64(b&0x7F) << shift 3989 if b < 0x80 { 3990 break 3991 } 3992 } 3993 intStringLen := int(stringLen) 3994 if intStringLen < 0 { 3995 return ErrInvalidLengthProposal 3996 } 3997 postIndex := iNdEx + intStringLen 3998 if postIndex < 0 { 3999 return ErrInvalidLengthProposal 4000 } 4001 if postIndex > l { 4002 return io.ErrUnexpectedEOF 4003 } 4004 m.Title = string(dAtA[iNdEx:postIndex]) 4005 iNdEx = postIndex 4006 case 2: 4007 if wireType != 2 { 4008 return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) 4009 } 4010 var stringLen uint64 4011 for shift := uint(0); ; shift += 7 { 4012 if shift >= 64 { 4013 return ErrIntOverflowProposal 4014 } 4015 if iNdEx >= l { 4016 return io.ErrUnexpectedEOF 4017 } 4018 b := dAtA[iNdEx] 4019 iNdEx++ 4020 stringLen |= uint64(b&0x7F) << shift 4021 if b < 0x80 { 4022 break 4023 } 4024 } 4025 intStringLen := int(stringLen) 4026 if intStringLen < 0 { 4027 return ErrInvalidLengthProposal 4028 } 4029 postIndex := iNdEx + intStringLen 4030 if postIndex < 0 { 4031 return ErrInvalidLengthProposal 4032 } 4033 if postIndex > l { 4034 return io.ErrUnexpectedEOF 4035 } 4036 m.Description = string(dAtA[iNdEx:postIndex]) 4037 iNdEx = postIndex 4038 case 3: 4039 if wireType != 2 { 4040 return fmt.Errorf("proto: wrong wireType = %d for field AccessConfigUpdates", wireType) 4041 } 4042 var msglen int 4043 for shift := uint(0); ; shift += 7 { 4044 if shift >= 64 { 4045 return ErrIntOverflowProposal 4046 } 4047 if iNdEx >= l { 4048 return io.ErrUnexpectedEOF 4049 } 4050 b := dAtA[iNdEx] 4051 iNdEx++ 4052 msglen |= int(b&0x7F) << shift 4053 if b < 0x80 { 4054 break 4055 } 4056 } 4057 if msglen < 0 { 4058 return ErrInvalidLengthProposal 4059 } 4060 postIndex := iNdEx + msglen 4061 if postIndex < 0 { 4062 return ErrInvalidLengthProposal 4063 } 4064 if postIndex > l { 4065 return io.ErrUnexpectedEOF 4066 } 4067 m.AccessConfigUpdates = append(m.AccessConfigUpdates, AccessConfigUpdate{}) 4068 if err := m.AccessConfigUpdates[len(m.AccessConfigUpdates)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 4069 return err 4070 } 4071 iNdEx = postIndex 4072 default: 4073 iNdEx = preIndex 4074 skippy, err := skipProposal(dAtA[iNdEx:]) 4075 if err != nil { 4076 return err 4077 } 4078 if (skippy < 0) || (iNdEx+skippy) < 0 { 4079 return ErrInvalidLengthProposal 4080 } 4081 if (iNdEx + skippy) > l { 4082 return io.ErrUnexpectedEOF 4083 } 4084 iNdEx += skippy 4085 } 4086 } 4087 4088 if iNdEx > l { 4089 return io.ErrUnexpectedEOF 4090 } 4091 return nil 4092 } 4093 4094 func skipProposal(dAtA []byte) (n int, err error) { 4095 l := len(dAtA) 4096 iNdEx := 0 4097 depth := 0 4098 for iNdEx < l { 4099 var wire uint64 4100 for shift := uint(0); ; shift += 7 { 4101 if shift >= 64 { 4102 return 0, ErrIntOverflowProposal 4103 } 4104 if iNdEx >= l { 4105 return 0, io.ErrUnexpectedEOF 4106 } 4107 b := dAtA[iNdEx] 4108 iNdEx++ 4109 wire |= (uint64(b) & 0x7F) << shift 4110 if b < 0x80 { 4111 break 4112 } 4113 } 4114 wireType := int(wire & 0x7) 4115 switch wireType { 4116 case 0: 4117 for shift := uint(0); ; shift += 7 { 4118 if shift >= 64 { 4119 return 0, ErrIntOverflowProposal 4120 } 4121 if iNdEx >= l { 4122 return 0, io.ErrUnexpectedEOF 4123 } 4124 iNdEx++ 4125 if dAtA[iNdEx-1] < 0x80 { 4126 break 4127 } 4128 } 4129 case 1: 4130 iNdEx += 8 4131 case 2: 4132 var length int 4133 for shift := uint(0); ; shift += 7 { 4134 if shift >= 64 { 4135 return 0, ErrIntOverflowProposal 4136 } 4137 if iNdEx >= l { 4138 return 0, io.ErrUnexpectedEOF 4139 } 4140 b := dAtA[iNdEx] 4141 iNdEx++ 4142 length |= (int(b) & 0x7F) << shift 4143 if b < 0x80 { 4144 break 4145 } 4146 } 4147 if length < 0 { 4148 return 0, ErrInvalidLengthProposal 4149 } 4150 iNdEx += length 4151 case 3: 4152 depth++ 4153 case 4: 4154 if depth == 0 { 4155 return 0, ErrUnexpectedEndOfGroupProposal 4156 } 4157 depth-- 4158 case 5: 4159 iNdEx += 4 4160 default: 4161 return 0, fmt.Errorf("proto: illegal wireType %d", wireType) 4162 } 4163 if iNdEx < 0 { 4164 return 0, ErrInvalidLengthProposal 4165 } 4166 if depth == 0 { 4167 return iNdEx, nil 4168 } 4169 } 4170 return 0, io.ErrUnexpectedEOF 4171 } 4172 4173 var ( 4174 ErrInvalidLengthProposal = fmt.Errorf("proto: negative length found during unmarshaling") 4175 ErrIntOverflowProposal = fmt.Errorf("proto: integer overflow") 4176 ErrUnexpectedEndOfGroupProposal = fmt.Errorf("proto: unexpected end of group") 4177 )