github.com/fibonacci-chain/fbc@v0.0.0-20231124064014-c7636198c1e9/x/wasm/types/tx.pb.go (about) 1 // Code generated by protoc-gen-gogo. DO NOT EDIT. 2 // source: cosmwasm/wasm/v1/tx.proto 3 4 package types 5 6 import ( 7 context "context" 8 fmt "fmt" 9 io "io" 10 math "math" 11 math_bits "math/bits" 12 13 _ "github.com/gogo/protobuf/gogoproto" 14 grpc1 "github.com/gogo/protobuf/grpc" 15 proto "github.com/gogo/protobuf/proto" 16 github_com_cosmos_cosmos_sdk_types "github.com/fibonacci-chain/fbc/libs/cosmos-sdk/types" 17 types "github.com/fibonacci-chain/fbc/libs/cosmos-sdk/types" 18 grpc "google.golang.org/grpc" 19 codes "google.golang.org/grpc/codes" 20 status "google.golang.org/grpc/status" 21 ) 22 23 // Reference imports to suppress errors if they are not otherwise used. 24 var _ = proto.Marshal 25 26 var ( 27 _ = fmt.Errorf 28 _ = math.Inf 29 ) 30 31 // This is a compile-time assertion to ensure that this generated file 32 // is compatible with the proto package it is being compiled against. 33 // A compilation error at this line likely means your copy of the 34 // proto package needs to be updated. 35 const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package 36 37 // MsgStoreCode submit Wasm code to the system 38 type MsgStoreCode struct { 39 // Sender is the that actor that signed the messages 40 Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` 41 // WASMByteCode can be raw or gzip compressed 42 WASMByteCode []byte `protobuf:"bytes,2,opt,name=wasm_byte_code,json=wasmByteCode,proto3" json:"wasm_byte_code,omitempty"` 43 // InstantiatePermission access control to apply on contract creation, 44 // optional 45 InstantiatePermission *AccessConfig `protobuf:"bytes,5,opt,name=instantiate_permission,json=instantiatePermission,proto3" json:"instantiate_permission,omitempty"` 46 } 47 48 func (m *MsgStoreCode) Reset() { *m = MsgStoreCode{} } 49 func (m *MsgStoreCode) String() string { return proto.CompactTextString(m) } 50 func (*MsgStoreCode) ProtoMessage() {} 51 func (*MsgStoreCode) Descriptor() ([]byte, []int) { 52 return fileDescriptor_4f74d82755520264, []int{0} 53 } 54 55 func (m *MsgStoreCode) XXX_Unmarshal(b []byte) error { 56 return m.Unmarshal(b) 57 } 58 59 func (m *MsgStoreCode) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 60 if deterministic { 61 return xxx_messageInfo_MsgStoreCode.Marshal(b, m, deterministic) 62 } else { 63 b = b[:cap(b)] 64 n, err := m.MarshalToSizedBuffer(b) 65 if err != nil { 66 return nil, err 67 } 68 return b[:n], nil 69 } 70 } 71 72 func (m *MsgStoreCode) XXX_Merge(src proto.Message) { 73 xxx_messageInfo_MsgStoreCode.Merge(m, src) 74 } 75 76 func (m *MsgStoreCode) XXX_Size() int { 77 return m.Size() 78 } 79 80 func (m *MsgStoreCode) XXX_DiscardUnknown() { 81 xxx_messageInfo_MsgStoreCode.DiscardUnknown(m) 82 } 83 84 var xxx_messageInfo_MsgStoreCode proto.InternalMessageInfo 85 86 // MsgStoreCodeResponse returns store result data. 87 type MsgStoreCodeResponse struct { 88 // CodeID is the reference to the stored WASM code 89 CodeID uint64 `protobuf:"varint,1,opt,name=code_id,json=codeId,proto3" json:"code_id,omitempty"` 90 } 91 92 func (m *MsgStoreCodeResponse) Reset() { *m = MsgStoreCodeResponse{} } 93 func (m *MsgStoreCodeResponse) String() string { return proto.CompactTextString(m) } 94 func (*MsgStoreCodeResponse) ProtoMessage() {} 95 func (*MsgStoreCodeResponse) Descriptor() ([]byte, []int) { 96 return fileDescriptor_4f74d82755520264, []int{1} 97 } 98 99 func (m *MsgStoreCodeResponse) XXX_Unmarshal(b []byte) error { 100 return m.Unmarshal(b) 101 } 102 103 func (m *MsgStoreCodeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 104 if deterministic { 105 return xxx_messageInfo_MsgStoreCodeResponse.Marshal(b, m, deterministic) 106 } else { 107 b = b[:cap(b)] 108 n, err := m.MarshalToSizedBuffer(b) 109 if err != nil { 110 return nil, err 111 } 112 return b[:n], nil 113 } 114 } 115 116 func (m *MsgStoreCodeResponse) XXX_Merge(src proto.Message) { 117 xxx_messageInfo_MsgStoreCodeResponse.Merge(m, src) 118 } 119 120 func (m *MsgStoreCodeResponse) XXX_Size() int { 121 return m.Size() 122 } 123 124 func (m *MsgStoreCodeResponse) XXX_DiscardUnknown() { 125 xxx_messageInfo_MsgStoreCodeResponse.DiscardUnknown(m) 126 } 127 128 var xxx_messageInfo_MsgStoreCodeResponse proto.InternalMessageInfo 129 130 // MsgInstantiateContract create a new smart contract instance for the given 131 // code id. 132 type MsgInstantiateContract struct { 133 // Sender is the that actor that signed the messages 134 Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` 135 // Admin is an optional address that can execute migrations 136 Admin string `protobuf:"bytes,2,opt,name=admin,proto3" json:"admin,omitempty"` 137 // CodeID is the reference to the stored WASM code 138 CodeID uint64 `protobuf:"varint,3,opt,name=code_id,json=codeId,proto3" json:"code_id,omitempty"` 139 // Label is optional metadata to be stored with a contract instance. 140 Label string `protobuf:"bytes,4,opt,name=label,proto3" json:"label,omitempty"` 141 // Msg json encoded message to be passed to the contract on instantiation 142 Msg RawContractMessage `protobuf:"bytes,5,opt,name=msg,proto3,casttype=RawContractMessage" json:"msg,omitempty"` 143 // Funds coins that are transferred to the contract on instantiation 144 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"` 145 } 146 147 func (m *MsgInstantiateContract) Reset() { *m = MsgInstantiateContract{} } 148 func (m *MsgInstantiateContract) String() string { return proto.CompactTextString(m) } 149 func (*MsgInstantiateContract) ProtoMessage() {} 150 func (*MsgInstantiateContract) Descriptor() ([]byte, []int) { 151 return fileDescriptor_4f74d82755520264, []int{2} 152 } 153 154 func (m *MsgInstantiateContract) XXX_Unmarshal(b []byte) error { 155 return m.Unmarshal(b) 156 } 157 158 func (m *MsgInstantiateContract) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 159 if deterministic { 160 return xxx_messageInfo_MsgInstantiateContract.Marshal(b, m, deterministic) 161 } else { 162 b = b[:cap(b)] 163 n, err := m.MarshalToSizedBuffer(b) 164 if err != nil { 165 return nil, err 166 } 167 return b[:n], nil 168 } 169 } 170 171 func (m *MsgInstantiateContract) XXX_Merge(src proto.Message) { 172 xxx_messageInfo_MsgInstantiateContract.Merge(m, src) 173 } 174 175 func (m *MsgInstantiateContract) XXX_Size() int { 176 return m.Size() 177 } 178 179 func (m *MsgInstantiateContract) XXX_DiscardUnknown() { 180 xxx_messageInfo_MsgInstantiateContract.DiscardUnknown(m) 181 } 182 183 var xxx_messageInfo_MsgInstantiateContract proto.InternalMessageInfo 184 185 // MsgInstantiateContractResponse return instantiation result data 186 type MsgInstantiateContractResponse struct { 187 // Address is the bech32 address of the new contract instance. 188 Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` 189 // Data contains base64-encoded bytes to returned from the contract 190 Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` 191 } 192 193 func (m *MsgInstantiateContractResponse) Reset() { *m = MsgInstantiateContractResponse{} } 194 func (m *MsgInstantiateContractResponse) String() string { return proto.CompactTextString(m) } 195 func (*MsgInstantiateContractResponse) ProtoMessage() {} 196 func (*MsgInstantiateContractResponse) Descriptor() ([]byte, []int) { 197 return fileDescriptor_4f74d82755520264, []int{3} 198 } 199 200 func (m *MsgInstantiateContractResponse) XXX_Unmarshal(b []byte) error { 201 return m.Unmarshal(b) 202 } 203 204 func (m *MsgInstantiateContractResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 205 if deterministic { 206 return xxx_messageInfo_MsgInstantiateContractResponse.Marshal(b, m, deterministic) 207 } else { 208 b = b[:cap(b)] 209 n, err := m.MarshalToSizedBuffer(b) 210 if err != nil { 211 return nil, err 212 } 213 return b[:n], nil 214 } 215 } 216 217 func (m *MsgInstantiateContractResponse) XXX_Merge(src proto.Message) { 218 xxx_messageInfo_MsgInstantiateContractResponse.Merge(m, src) 219 } 220 221 func (m *MsgInstantiateContractResponse) XXX_Size() int { 222 return m.Size() 223 } 224 225 func (m *MsgInstantiateContractResponse) XXX_DiscardUnknown() { 226 xxx_messageInfo_MsgInstantiateContractResponse.DiscardUnknown(m) 227 } 228 229 var xxx_messageInfo_MsgInstantiateContractResponse proto.InternalMessageInfo 230 231 // MsgExecuteContract submits the given message data to a smart contract 232 type MsgExecuteContract struct { 233 // Sender is the that actor that signed the messages 234 Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` 235 // Contract is the address of the smart contract 236 Contract string `protobuf:"bytes,2,opt,name=contract,proto3" json:"contract,omitempty"` 237 // Msg json encoded message to be passed to the contract 238 Msg RawContractMessage `protobuf:"bytes,3,opt,name=msg,proto3,casttype=RawContractMessage" json:"msg,omitempty"` 239 // Funds coins that are transferred to the contract on execution 240 Funds github_com_cosmos_cosmos_sdk_types.CoinAdapters `protobuf:"bytes,5,rep,name=funds,proto3,castrepeated=github.com/fibonacci-chain/fbc/libs/cosmos-sdk/types.Coins" json:"funds"` 241 } 242 243 func (m *MsgExecuteContract) Reset() { *m = MsgExecuteContract{} } 244 func (m *MsgExecuteContract) String() string { return proto.CompactTextString(m) } 245 func (*MsgExecuteContract) ProtoMessage() {} 246 func (*MsgExecuteContract) Descriptor() ([]byte, []int) { 247 return fileDescriptor_4f74d82755520264, []int{4} 248 } 249 250 func (m *MsgExecuteContract) XXX_Unmarshal(b []byte) error { 251 return m.Unmarshal(b) 252 } 253 254 func (m *MsgExecuteContract) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 255 if deterministic { 256 return xxx_messageInfo_MsgExecuteContract.Marshal(b, m, deterministic) 257 } else { 258 b = b[:cap(b)] 259 n, err := m.MarshalToSizedBuffer(b) 260 if err != nil { 261 return nil, err 262 } 263 return b[:n], nil 264 } 265 } 266 267 func (m *MsgExecuteContract) XXX_Merge(src proto.Message) { 268 xxx_messageInfo_MsgExecuteContract.Merge(m, src) 269 } 270 271 func (m *MsgExecuteContract) XXX_Size() int { 272 return m.Size() 273 } 274 275 func (m *MsgExecuteContract) XXX_DiscardUnknown() { 276 xxx_messageInfo_MsgExecuteContract.DiscardUnknown(m) 277 } 278 279 var xxx_messageInfo_MsgExecuteContract proto.InternalMessageInfo 280 281 // MsgExecuteContractResponse returns execution result data. 282 type MsgExecuteContractResponse struct { 283 // Data contains base64-encoded bytes to returned from the contract 284 Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` 285 } 286 287 func (m *MsgExecuteContractResponse) Reset() { *m = MsgExecuteContractResponse{} } 288 func (m *MsgExecuteContractResponse) String() string { return proto.CompactTextString(m) } 289 func (*MsgExecuteContractResponse) ProtoMessage() {} 290 func (*MsgExecuteContractResponse) Descriptor() ([]byte, []int) { 291 return fileDescriptor_4f74d82755520264, []int{5} 292 } 293 294 func (m *MsgExecuteContractResponse) XXX_Unmarshal(b []byte) error { 295 return m.Unmarshal(b) 296 } 297 298 func (m *MsgExecuteContractResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 299 if deterministic { 300 return xxx_messageInfo_MsgExecuteContractResponse.Marshal(b, m, deterministic) 301 } else { 302 b = b[:cap(b)] 303 n, err := m.MarshalToSizedBuffer(b) 304 if err != nil { 305 return nil, err 306 } 307 return b[:n], nil 308 } 309 } 310 311 func (m *MsgExecuteContractResponse) XXX_Merge(src proto.Message) { 312 xxx_messageInfo_MsgExecuteContractResponse.Merge(m, src) 313 } 314 315 func (m *MsgExecuteContractResponse) XXX_Size() int { 316 return m.Size() 317 } 318 319 func (m *MsgExecuteContractResponse) XXX_DiscardUnknown() { 320 xxx_messageInfo_MsgExecuteContractResponse.DiscardUnknown(m) 321 } 322 323 var xxx_messageInfo_MsgExecuteContractResponse proto.InternalMessageInfo 324 325 // MsgMigrateContract runs a code upgrade/ downgrade for a smart contract 326 type MsgMigrateContract struct { 327 // Sender is the that actor that signed the messages 328 Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` 329 // Contract is the address of the smart contract 330 Contract string `protobuf:"bytes,2,opt,name=contract,proto3" json:"contract,omitempty"` 331 // CodeID references the new WASM code 332 CodeID uint64 `protobuf:"varint,3,opt,name=code_id,json=codeId,proto3" json:"code_id,omitempty"` 333 // Msg json encoded message to be passed to the contract on migration 334 Msg RawContractMessage `protobuf:"bytes,4,opt,name=msg,proto3,casttype=RawContractMessage" json:"msg,omitempty"` 335 } 336 337 func (m *MsgMigrateContract) Reset() { *m = MsgMigrateContract{} } 338 func (m *MsgMigrateContract) String() string { return proto.CompactTextString(m) } 339 func (*MsgMigrateContract) ProtoMessage() {} 340 func (*MsgMigrateContract) Descriptor() ([]byte, []int) { 341 return fileDescriptor_4f74d82755520264, []int{6} 342 } 343 344 func (m *MsgMigrateContract) XXX_Unmarshal(b []byte) error { 345 return m.Unmarshal(b) 346 } 347 348 func (m *MsgMigrateContract) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 349 if deterministic { 350 return xxx_messageInfo_MsgMigrateContract.Marshal(b, m, deterministic) 351 } else { 352 b = b[:cap(b)] 353 n, err := m.MarshalToSizedBuffer(b) 354 if err != nil { 355 return nil, err 356 } 357 return b[:n], nil 358 } 359 } 360 361 func (m *MsgMigrateContract) XXX_Merge(src proto.Message) { 362 xxx_messageInfo_MsgMigrateContract.Merge(m, src) 363 } 364 365 func (m *MsgMigrateContract) XXX_Size() int { 366 return m.Size() 367 } 368 369 func (m *MsgMigrateContract) XXX_DiscardUnknown() { 370 xxx_messageInfo_MsgMigrateContract.DiscardUnknown(m) 371 } 372 373 var xxx_messageInfo_MsgMigrateContract proto.InternalMessageInfo 374 375 // MsgMigrateContractResponse returns contract migration result data. 376 type MsgMigrateContractResponse struct { 377 // Data contains same raw bytes returned as data from the wasm contract. 378 // (May be empty) 379 Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` 380 } 381 382 func (m *MsgMigrateContractResponse) Reset() { *m = MsgMigrateContractResponse{} } 383 func (m *MsgMigrateContractResponse) String() string { return proto.CompactTextString(m) } 384 func (*MsgMigrateContractResponse) ProtoMessage() {} 385 func (*MsgMigrateContractResponse) Descriptor() ([]byte, []int) { 386 return fileDescriptor_4f74d82755520264, []int{7} 387 } 388 389 func (m *MsgMigrateContractResponse) XXX_Unmarshal(b []byte) error { 390 return m.Unmarshal(b) 391 } 392 393 func (m *MsgMigrateContractResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 394 if deterministic { 395 return xxx_messageInfo_MsgMigrateContractResponse.Marshal(b, m, deterministic) 396 } else { 397 b = b[:cap(b)] 398 n, err := m.MarshalToSizedBuffer(b) 399 if err != nil { 400 return nil, err 401 } 402 return b[:n], nil 403 } 404 } 405 406 func (m *MsgMigrateContractResponse) XXX_Merge(src proto.Message) { 407 xxx_messageInfo_MsgMigrateContractResponse.Merge(m, src) 408 } 409 410 func (m *MsgMigrateContractResponse) XXX_Size() int { 411 return m.Size() 412 } 413 414 func (m *MsgMigrateContractResponse) XXX_DiscardUnknown() { 415 xxx_messageInfo_MsgMigrateContractResponse.DiscardUnknown(m) 416 } 417 418 var xxx_messageInfo_MsgMigrateContractResponse proto.InternalMessageInfo 419 420 // MsgUpdateAdmin sets a new admin for a smart contract 421 type MsgUpdateAdmin struct { 422 // Sender is the that actor that signed the messages 423 Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` 424 // NewAdmin address to be set 425 NewAdmin string `protobuf:"bytes,2,opt,name=new_admin,json=newAdmin,proto3" json:"new_admin,omitempty"` 426 // Contract is the address of the smart contract 427 Contract string `protobuf:"bytes,3,opt,name=contract,proto3" json:"contract,omitempty"` 428 } 429 430 func (m *MsgUpdateAdmin) Reset() { *m = MsgUpdateAdmin{} } 431 func (m *MsgUpdateAdmin) String() string { return proto.CompactTextString(m) } 432 func (*MsgUpdateAdmin) ProtoMessage() {} 433 func (*MsgUpdateAdmin) Descriptor() ([]byte, []int) { 434 return fileDescriptor_4f74d82755520264, []int{8} 435 } 436 437 func (m *MsgUpdateAdmin) XXX_Unmarshal(b []byte) error { 438 return m.Unmarshal(b) 439 } 440 441 func (m *MsgUpdateAdmin) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 442 if deterministic { 443 return xxx_messageInfo_MsgUpdateAdmin.Marshal(b, m, deterministic) 444 } else { 445 b = b[:cap(b)] 446 n, err := m.MarshalToSizedBuffer(b) 447 if err != nil { 448 return nil, err 449 } 450 return b[:n], nil 451 } 452 } 453 454 func (m *MsgUpdateAdmin) XXX_Merge(src proto.Message) { 455 xxx_messageInfo_MsgUpdateAdmin.Merge(m, src) 456 } 457 458 func (m *MsgUpdateAdmin) XXX_Size() int { 459 return m.Size() 460 } 461 462 func (m *MsgUpdateAdmin) XXX_DiscardUnknown() { 463 xxx_messageInfo_MsgUpdateAdmin.DiscardUnknown(m) 464 } 465 466 var xxx_messageInfo_MsgUpdateAdmin proto.InternalMessageInfo 467 468 // MsgUpdateAdminResponse returns empty data 469 type MsgUpdateAdminResponse struct{} 470 471 func (m *MsgUpdateAdminResponse) Reset() { *m = MsgUpdateAdminResponse{} } 472 func (m *MsgUpdateAdminResponse) String() string { return proto.CompactTextString(m) } 473 func (*MsgUpdateAdminResponse) ProtoMessage() {} 474 func (*MsgUpdateAdminResponse) Descriptor() ([]byte, []int) { 475 return fileDescriptor_4f74d82755520264, []int{9} 476 } 477 478 func (m *MsgUpdateAdminResponse) XXX_Unmarshal(b []byte) error { 479 return m.Unmarshal(b) 480 } 481 482 func (m *MsgUpdateAdminResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 483 if deterministic { 484 return xxx_messageInfo_MsgUpdateAdminResponse.Marshal(b, m, deterministic) 485 } else { 486 b = b[:cap(b)] 487 n, err := m.MarshalToSizedBuffer(b) 488 if err != nil { 489 return nil, err 490 } 491 return b[:n], nil 492 } 493 } 494 495 func (m *MsgUpdateAdminResponse) XXX_Merge(src proto.Message) { 496 xxx_messageInfo_MsgUpdateAdminResponse.Merge(m, src) 497 } 498 499 func (m *MsgUpdateAdminResponse) XXX_Size() int { 500 return m.Size() 501 } 502 503 func (m *MsgUpdateAdminResponse) XXX_DiscardUnknown() { 504 xxx_messageInfo_MsgUpdateAdminResponse.DiscardUnknown(m) 505 } 506 507 var xxx_messageInfo_MsgUpdateAdminResponse proto.InternalMessageInfo 508 509 // MsgClearAdmin removes any admin stored for a smart contract 510 type MsgClearAdmin struct { 511 // Sender is the that actor that signed the messages 512 Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` 513 // Contract is the address of the smart contract 514 Contract string `protobuf:"bytes,3,opt,name=contract,proto3" json:"contract,omitempty"` 515 } 516 517 func (m *MsgClearAdmin) Reset() { *m = MsgClearAdmin{} } 518 func (m *MsgClearAdmin) String() string { return proto.CompactTextString(m) } 519 func (*MsgClearAdmin) ProtoMessage() {} 520 func (*MsgClearAdmin) Descriptor() ([]byte, []int) { 521 return fileDescriptor_4f74d82755520264, []int{10} 522 } 523 524 func (m *MsgClearAdmin) XXX_Unmarshal(b []byte) error { 525 return m.Unmarshal(b) 526 } 527 528 func (m *MsgClearAdmin) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 529 if deterministic { 530 return xxx_messageInfo_MsgClearAdmin.Marshal(b, m, deterministic) 531 } else { 532 b = b[:cap(b)] 533 n, err := m.MarshalToSizedBuffer(b) 534 if err != nil { 535 return nil, err 536 } 537 return b[:n], nil 538 } 539 } 540 541 func (m *MsgClearAdmin) XXX_Merge(src proto.Message) { 542 xxx_messageInfo_MsgClearAdmin.Merge(m, src) 543 } 544 545 func (m *MsgClearAdmin) XXX_Size() int { 546 return m.Size() 547 } 548 549 func (m *MsgClearAdmin) XXX_DiscardUnknown() { 550 xxx_messageInfo_MsgClearAdmin.DiscardUnknown(m) 551 } 552 553 var xxx_messageInfo_MsgClearAdmin proto.InternalMessageInfo 554 555 // MsgClearAdminResponse returns empty data 556 type MsgClearAdminResponse struct{} 557 558 func (m *MsgClearAdminResponse) Reset() { *m = MsgClearAdminResponse{} } 559 func (m *MsgClearAdminResponse) String() string { return proto.CompactTextString(m) } 560 func (*MsgClearAdminResponse) ProtoMessage() {} 561 func (*MsgClearAdminResponse) Descriptor() ([]byte, []int) { 562 return fileDescriptor_4f74d82755520264, []int{11} 563 } 564 565 func (m *MsgClearAdminResponse) XXX_Unmarshal(b []byte) error { 566 return m.Unmarshal(b) 567 } 568 569 func (m *MsgClearAdminResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 570 if deterministic { 571 return xxx_messageInfo_MsgClearAdminResponse.Marshal(b, m, deterministic) 572 } else { 573 b = b[:cap(b)] 574 n, err := m.MarshalToSizedBuffer(b) 575 if err != nil { 576 return nil, err 577 } 578 return b[:n], nil 579 } 580 } 581 582 func (m *MsgClearAdminResponse) XXX_Merge(src proto.Message) { 583 xxx_messageInfo_MsgClearAdminResponse.Merge(m, src) 584 } 585 586 func (m *MsgClearAdminResponse) XXX_Size() int { 587 return m.Size() 588 } 589 590 func (m *MsgClearAdminResponse) XXX_DiscardUnknown() { 591 xxx_messageInfo_MsgClearAdminResponse.DiscardUnknown(m) 592 } 593 594 var xxx_messageInfo_MsgClearAdminResponse proto.InternalMessageInfo 595 596 func init() { 597 proto.RegisterType((*MsgStoreCode)(nil), "cosmwasm.wasm.v1.MsgStoreCode") 598 proto.RegisterType((*MsgStoreCodeResponse)(nil), "cosmwasm.wasm.v1.MsgStoreCodeResponse") 599 proto.RegisterType((*MsgInstantiateContract)(nil), "cosmwasm.wasm.v1.MsgInstantiateContract") 600 proto.RegisterType((*MsgInstantiateContractResponse)(nil), "cosmwasm.wasm.v1.MsgInstantiateContractResponse") 601 proto.RegisterType((*MsgExecuteContract)(nil), "cosmwasm.wasm.v1.MsgExecuteContract") 602 proto.RegisterType((*MsgExecuteContractResponse)(nil), "cosmwasm.wasm.v1.MsgExecuteContractResponse") 603 proto.RegisterType((*MsgMigrateContract)(nil), "cosmwasm.wasm.v1.MsgMigrateContract") 604 proto.RegisterType((*MsgMigrateContractResponse)(nil), "cosmwasm.wasm.v1.MsgMigrateContractResponse") 605 proto.RegisterType((*MsgUpdateAdmin)(nil), "cosmwasm.wasm.v1.MsgUpdateAdmin") 606 proto.RegisterType((*MsgUpdateAdminResponse)(nil), "cosmwasm.wasm.v1.MsgUpdateAdminResponse") 607 proto.RegisterType((*MsgClearAdmin)(nil), "cosmwasm.wasm.v1.MsgClearAdmin") 608 proto.RegisterType((*MsgClearAdminResponse)(nil), "cosmwasm.wasm.v1.MsgClearAdminResponse") 609 } 610 611 func init() { proto.RegisterFile("cosmwasm/wasm/v1/tx.proto", fileDescriptor_4f74d82755520264) } 612 613 var fileDescriptor_4f74d82755520264 = []byte{ 614 // 759 bytes of a gzipped FileDescriptorProto 615 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x55, 0xcd, 0x6e, 0xd3, 0x4a, 616 0x14, 0x8e, 0x1b, 0x27, 0x4d, 0x4e, 0x73, 0x7b, 0x23, 0xdf, 0x36, 0x37, 0xf5, 0xbd, 0x72, 0xa2, 617 0x80, 0x8a, 0x17, 0x60, 0x37, 0x45, 0x62, 0xc3, 0xaa, 0x49, 0x59, 0xb4, 0x92, 0x11, 0x72, 0x55, 618 0x2a, 0xd8, 0x44, 0x13, 0x7b, 0x6a, 0x2c, 0x1a, 0x4f, 0xf0, 0x71, 0x9b, 0xf6, 0x25, 0x10, 0x3b, 619 0xde, 0x81, 0xb7, 0x60, 0xd7, 0x15, 0xea, 0x06, 0x89, 0x55, 0x80, 0xf4, 0x2d, 0x58, 0x21, 0xff, 620 0xa5, 0x6e, 0xea, 0xa4, 0x41, 0x88, 0x4d, 0x32, 0xc7, 0xf3, 0x7d, 0xe7, 0xcc, 0xf9, 0xf4, 0xcd, 621 0x19, 0x58, 0x33, 0x18, 0xf6, 0x06, 0x04, 0x7b, 0x6a, 0xf0, 0x73, 0xd2, 0x54, 0xbd, 0x53, 0xa5, 622 0xef, 0x32, 0x8f, 0x09, 0xe5, 0x78, 0x4b, 0x09, 0x7e, 0x4e, 0x9a, 0xa2, 0xe4, 0x7f, 0x61, 0xa8, 623 0x76, 0x09, 0x52, 0xf5, 0xa4, 0xd9, 0xa5, 0x1e, 0x69, 0xaa, 0x06, 0xb3, 0x9d, 0x90, 0x21, 0xae, 624 0x58, 0xcc, 0x62, 0xc1, 0x52, 0xf5, 0x57, 0xd1, 0xd7, 0xff, 0x6f, 0x96, 0x38, 0xeb, 0x53, 0x0c, 625 0x77, 0x1b, 0x1f, 0x39, 0x28, 0x69, 0x68, 0xed, 0x79, 0xcc, 0xa5, 0x6d, 0x66, 0x52, 0xa1, 0x02, 626 0x79, 0xa4, 0x8e, 0x49, 0xdd, 0x2a, 0x57, 0xe7, 0xe4, 0xa2, 0x1e, 0x45, 0xc2, 0x23, 0x58, 0xf6, 627 0xf9, 0x9d, 0xee, 0x99, 0x47, 0x3b, 0x06, 0x33, 0x69, 0x75, 0xa1, 0xce, 0xc9, 0xa5, 0x56, 0x79, 628 0x34, 0xac, 0x95, 0x0e, 0xb6, 0xf6, 0xb4, 0xd6, 0x99, 0x17, 0x64, 0xd0, 0x4b, 0x3e, 0x2e, 0x8e, 629 0x84, 0x7d, 0xa8, 0xd8, 0x0e, 0x7a, 0xc4, 0xf1, 0x6c, 0xe2, 0xd1, 0x4e, 0x9f, 0xba, 0x3d, 0x1b, 630 0xd1, 0x66, 0x4e, 0x35, 0x57, 0xe7, 0xe4, 0xa5, 0x4d, 0x49, 0x99, 0xec, 0x53, 0xd9, 0x32, 0x0c, 631 0x8a, 0xd8, 0x66, 0xce, 0xa1, 0x6d, 0xe9, 0xab, 0x09, 0xf6, 0xb3, 0x31, 0x79, 0x97, 0x2f, 0x64, 632 0xcb, 0xfc, 0x2e, 0x5f, 0xe0, 0xcb, 0xb9, 0xc6, 0x63, 0x58, 0x49, 0xb6, 0xa0, 0x53, 0xec, 0x33, 633 0x07, 0xa9, 0x70, 0x07, 0x16, 0xfd, 0x83, 0x76, 0x6c, 0x33, 0xe8, 0x85, 0x6f, 0xc1, 0x68, 0x58, 634 0xcb, 0xfb, 0x90, 0x9d, 0x6d, 0x3d, 0xef, 0x6f, 0xed, 0x98, 0x8d, 0xb7, 0x0b, 0x50, 0xd1, 0xd0, 635 0xda, 0xb9, 0xaa, 0xd2, 0x66, 0x8e, 0xe7, 0x12, 0xc3, 0x9b, 0x2a, 0xc5, 0x0a, 0xe4, 0x88, 0xd9, 636 0xb3, 0x9d, 0x40, 0x81, 0xa2, 0x1e, 0x06, 0xc9, 0x6a, 0xd9, 0x69, 0xd5, 0x7c, 0xea, 0x11, 0xe9, 637 0xd2, 0xa3, 0x2a, 0x1f, 0x52, 0x83, 0x40, 0x90, 0x21, 0xdb, 0x43, 0x2b, 0x10, 0xa4, 0xd4, 0xaa, 638 0xfc, 0x18, 0xd6, 0x04, 0x9d, 0x0c, 0xe2, 0x63, 0x68, 0x14, 0x91, 0x58, 0x54, 0xf7, 0x21, 0x02, 639 0x81, 0xdc, 0xe1, 0xb1, 0x63, 0x62, 0x35, 0x5f, 0xcf, 0xca, 0x4b, 0x9b, 0x6b, 0x4a, 0x68, 0x09, 640 0xc5, 0xb7, 0x84, 0x12, 0x59, 0x42, 0x69, 0x33, 0xdb, 0x69, 0x6d, 0x9c, 0x0f, 0x6b, 0x99, 0x0f, 641 0x5f, 0x6b, 0xb2, 0x65, 0x7b, 0xaf, 0x8e, 0xbb, 0x8a, 0xc1, 0x7a, 0x6a, 0xe4, 0x9f, 0xf0, 0xef, 642 0x01, 0x9a, 0xaf, 0x23, 0x2b, 0xf8, 0x04, 0xd4, 0xc3, 0xcc, 0x8d, 0xa7, 0x20, 0xa5, 0xeb, 0x31, 643 0xd6, 0xb5, 0x0a, 0x8b, 0xc4, 0x34, 0x5d, 0x8a, 0x18, 0x09, 0x13, 0x87, 0x82, 0x00, 0xbc, 0x49, 644 0x3c, 0x12, 0x5a, 0x43, 0x0f, 0xd6, 0x8d, 0xcf, 0x1c, 0x08, 0x1a, 0x5a, 0x4f, 0x4e, 0xa9, 0x71, 645 0x3c, 0x87, 0xb8, 0x22, 0x14, 0x8c, 0x08, 0x13, 0xe9, 0x3b, 0x8e, 0x63, 0x9d, 0xb2, 0xbf, 0xa0, 646 0x53, 0xee, 0x8f, 0xe9, 0xb4, 0x01, 0xe2, 0xcd, 0xb6, 0xc6, 0x1a, 0xc5, 0x4a, 0x70, 0x09, 0x25, 647 0xde, 0x87, 0x4a, 0x68, 0xb6, 0xe5, 0x92, 0xdf, 0x54, 0x62, 0x2e, 0xb3, 0x45, 0x72, 0xf1, 0xb7, 648 0xca, 0x15, 0xf5, 0x32, 0x71, 0xb0, 0x99, 0xbd, 0x10, 0x58, 0xd6, 0xd0, 0xda, 0xef, 0x9b, 0xc4, 649 0xa3, 0x5b, 0x81, 0xff, 0xa7, 0xb5, 0xf1, 0x1f, 0x14, 0x1d, 0x3a, 0xe8, 0x24, 0x6f, 0x4c, 0xc1, 650 0xa1, 0x83, 0x90, 0x94, 0xec, 0x31, 0x7b, 0xbd, 0xc7, 0x46, 0x35, 0xb8, 0x98, 0x89, 0x12, 0xf1, 651 0x81, 0x1a, 0x6d, 0xf8, 0x4b, 0x43, 0xab, 0x7d, 0x44, 0x89, 0x3b, 0xbb, 0xf6, 0xac, 0xf4, 0xff, 652 0xc2, 0xea, 0xb5, 0x24, 0x71, 0xf6, 0xcd, 0x4f, 0x3c, 0x64, 0x35, 0xb4, 0x84, 0x3d, 0x28, 0x5e, 653 0x8d, 0xc5, 0x94, 0x31, 0x95, 0x9c, 0x39, 0xe2, 0xfa, 0xec, 0xfd, 0xb1, 0x96, 0x6f, 0xe0, 0x9f, 654 0xb4, 0x51, 0x23, 0xa7, 0xd2, 0x53, 0x90, 0xe2, 0xc6, 0xbc, 0xc8, 0x71, 0x49, 0x0a, 0x7f, 0x4f, 655 0x5e, 0xbe, 0xbb, 0xa9, 0x49, 0x26, 0x50, 0xe2, 0xfd, 0x79, 0x50, 0xc9, 0x32, 0x93, 0xce, 0x4e, 656 0x2f, 0x33, 0x81, 0x9a, 0x52, 0x66, 0x9a, 0x19, 0x5f, 0xc0, 0x52, 0xd2, 0x75, 0xf5, 0x54, 0x72, 657 0x02, 0x21, 0xca, 0xb7, 0x21, 0xc6, 0xa9, 0x9f, 0x03, 0x24, 0x3c, 0x55, 0x4b, 0xe5, 0x5d, 0x01, 658 0xc4, 0x7b, 0xb7, 0x00, 0xe2, 0xbc, 0xad, 0xed, 0xf3, 0xef, 0x52, 0xe6, 0x7c, 0x24, 0x71, 0x17, 659 0x23, 0x89, 0xfb, 0x36, 0x92, 0xb8, 0x77, 0x97, 0x52, 0xe6, 0xe2, 0x52, 0xca, 0x7c, 0xb9, 0x94, 660 0x32, 0x2f, 0xd7, 0x13, 0x83, 0xa7, 0xcd, 0xb0, 0x77, 0x10, 0x3f, 0xd5, 0xa6, 0x7a, 0x1a, 0x3e, 661 0xd9, 0xc1, 0xf0, 0xe9, 0xe6, 0x83, 0x07, 0xfb, 0xe1, 0xcf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x56, 662 0xd2, 0x4b, 0x17, 0x33, 0x08, 0x00, 0x00, 663 } 664 665 // Reference imports to suppress errors if they are not otherwise used. 666 var _ context.Context 667 var _ grpc.ClientConn 668 669 // This is a compile-time assertion to ensure that this generated file 670 // is compatible with the grpc package it is being compiled against. 671 const _ = grpc.SupportPackageIsVersion4 672 673 // MsgClient is the client API for Msg service. 674 // 675 // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. 676 type MsgClient interface { 677 // StoreCode to submit Wasm code to the system 678 StoreCode(ctx context.Context, in *MsgStoreCode, opts ...grpc.CallOption) (*MsgStoreCodeResponse, error) 679 // Instantiate creates a new smart contract instance for the given code id. 680 InstantiateContract(ctx context.Context, in *MsgInstantiateContract, opts ...grpc.CallOption) (*MsgInstantiateContractResponse, error) 681 // Execute submits the given message data to a smart contract 682 ExecuteContract(ctx context.Context, in *MsgExecuteContract, opts ...grpc.CallOption) (*MsgExecuteContractResponse, error) 683 // Migrate runs a code upgrade/ downgrade for a smart contract 684 MigrateContract(ctx context.Context, in *MsgMigrateContract, opts ...grpc.CallOption) (*MsgMigrateContractResponse, error) 685 // UpdateAdmin sets a new admin for a smart contract 686 UpdateAdmin(ctx context.Context, in *MsgUpdateAdmin, opts ...grpc.CallOption) (*MsgUpdateAdminResponse, error) 687 // ClearAdmin removes any admin stored for a smart contract 688 ClearAdmin(ctx context.Context, in *MsgClearAdmin, opts ...grpc.CallOption) (*MsgClearAdminResponse, error) 689 } 690 691 type msgClient struct { 692 cc grpc1.ClientConn 693 } 694 695 func NewMsgClient(cc grpc1.ClientConn) MsgClient { 696 return &msgClient{cc} 697 } 698 699 func (c *msgClient) StoreCode(ctx context.Context, in *MsgStoreCode, opts ...grpc.CallOption) (*MsgStoreCodeResponse, error) { 700 out := new(MsgStoreCodeResponse) 701 err := c.cc.Invoke(ctx, "/cosmwasm.wasm.v1.Msg/StoreCode", in, out, opts...) 702 if err != nil { 703 return nil, err 704 } 705 return out, nil 706 } 707 708 func (c *msgClient) InstantiateContract(ctx context.Context, in *MsgInstantiateContract, opts ...grpc.CallOption) (*MsgInstantiateContractResponse, error) { 709 out := new(MsgInstantiateContractResponse) 710 err := c.cc.Invoke(ctx, "/cosmwasm.wasm.v1.Msg/InstantiateContract", in, out, opts...) 711 if err != nil { 712 return nil, err 713 } 714 return out, nil 715 } 716 717 func (c *msgClient) ExecuteContract(ctx context.Context, in *MsgExecuteContract, opts ...grpc.CallOption) (*MsgExecuteContractResponse, error) { 718 out := new(MsgExecuteContractResponse) 719 err := c.cc.Invoke(ctx, "/cosmwasm.wasm.v1.Msg/ExecuteContract", in, out, opts...) 720 if err != nil { 721 return nil, err 722 } 723 return out, nil 724 } 725 726 func (c *msgClient) MigrateContract(ctx context.Context, in *MsgMigrateContract, opts ...grpc.CallOption) (*MsgMigrateContractResponse, error) { 727 out := new(MsgMigrateContractResponse) 728 err := c.cc.Invoke(ctx, "/cosmwasm.wasm.v1.Msg/MigrateContract", in, out, opts...) 729 if err != nil { 730 return nil, err 731 } 732 return out, nil 733 } 734 735 func (c *msgClient) UpdateAdmin(ctx context.Context, in *MsgUpdateAdmin, opts ...grpc.CallOption) (*MsgUpdateAdminResponse, error) { 736 out := new(MsgUpdateAdminResponse) 737 err := c.cc.Invoke(ctx, "/cosmwasm.wasm.v1.Msg/UpdateAdmin", in, out, opts...) 738 if err != nil { 739 return nil, err 740 } 741 return out, nil 742 } 743 744 func (c *msgClient) ClearAdmin(ctx context.Context, in *MsgClearAdmin, opts ...grpc.CallOption) (*MsgClearAdminResponse, error) { 745 out := new(MsgClearAdminResponse) 746 err := c.cc.Invoke(ctx, "/cosmwasm.wasm.v1.Msg/ClearAdmin", in, out, opts...) 747 if err != nil { 748 return nil, err 749 } 750 return out, nil 751 } 752 753 // MsgServer is the server API for Msg service. 754 type MsgServer interface { 755 // StoreCode to submit Wasm code to the system 756 StoreCode(context.Context, *MsgStoreCode) (*MsgStoreCodeResponse, error) 757 // Instantiate creates a new smart contract instance for the given code id. 758 InstantiateContract(context.Context, *MsgInstantiateContract) (*MsgInstantiateContractResponse, error) 759 // Execute submits the given message data to a smart contract 760 ExecuteContract(context.Context, *MsgExecuteContract) (*MsgExecuteContractResponse, error) 761 // Migrate runs a code upgrade/ downgrade for a smart contract 762 MigrateContract(context.Context, *MsgMigrateContract) (*MsgMigrateContractResponse, error) 763 // UpdateAdmin sets a new admin for a smart contract 764 UpdateAdmin(context.Context, *MsgUpdateAdmin) (*MsgUpdateAdminResponse, error) 765 // ClearAdmin removes any admin stored for a smart contract 766 ClearAdmin(context.Context, *MsgClearAdmin) (*MsgClearAdminResponse, error) 767 } 768 769 // UnimplementedMsgServer can be embedded to have forward compatible implementations. 770 type UnimplementedMsgServer struct{} 771 772 func (*UnimplementedMsgServer) StoreCode(ctx context.Context, req *MsgStoreCode) (*MsgStoreCodeResponse, error) { 773 return nil, status.Errorf(codes.Unimplemented, "method StoreCode not implemented") 774 } 775 776 func (*UnimplementedMsgServer) InstantiateContract(ctx context.Context, req *MsgInstantiateContract) (*MsgInstantiateContractResponse, error) { 777 return nil, status.Errorf(codes.Unimplemented, "method InstantiateContract not implemented") 778 } 779 780 func (*UnimplementedMsgServer) ExecuteContract(ctx context.Context, req *MsgExecuteContract) (*MsgExecuteContractResponse, error) { 781 return nil, status.Errorf(codes.Unimplemented, "method ExecuteContract not implemented") 782 } 783 784 func (*UnimplementedMsgServer) MigrateContract(ctx context.Context, req *MsgMigrateContract) (*MsgMigrateContractResponse, error) { 785 return nil, status.Errorf(codes.Unimplemented, "method MigrateContract not implemented") 786 } 787 788 func (*UnimplementedMsgServer) UpdateAdmin(ctx context.Context, req *MsgUpdateAdmin) (*MsgUpdateAdminResponse, error) { 789 return nil, status.Errorf(codes.Unimplemented, "method UpdateAdmin not implemented") 790 } 791 792 func (*UnimplementedMsgServer) ClearAdmin(ctx context.Context, req *MsgClearAdmin) (*MsgClearAdminResponse, error) { 793 return nil, status.Errorf(codes.Unimplemented, "method ClearAdmin not implemented") 794 } 795 796 func RegisterMsgServer(s grpc1.Server, srv MsgServer) { 797 s.RegisterService(&_Msg_serviceDesc, srv) 798 } 799 800 func _Msg_StoreCode_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 801 in := new(MsgStoreCode) 802 if err := dec(in); err != nil { 803 return nil, err 804 } 805 if interceptor == nil { 806 return srv.(MsgServer).StoreCode(ctx, in) 807 } 808 info := &grpc.UnaryServerInfo{ 809 Server: srv, 810 FullMethod: "/cosmwasm.wasm.v1.Msg/StoreCode", 811 } 812 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 813 return srv.(MsgServer).StoreCode(ctx, req.(*MsgStoreCode)) 814 } 815 return interceptor(ctx, in, info, handler) 816 } 817 818 func _Msg_InstantiateContract_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 819 in := new(MsgInstantiateContract) 820 if err := dec(in); err != nil { 821 return nil, err 822 } 823 if interceptor == nil { 824 return srv.(MsgServer).InstantiateContract(ctx, in) 825 } 826 info := &grpc.UnaryServerInfo{ 827 Server: srv, 828 FullMethod: "/cosmwasm.wasm.v1.Msg/InstantiateContract", 829 } 830 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 831 return srv.(MsgServer).InstantiateContract(ctx, req.(*MsgInstantiateContract)) 832 } 833 return interceptor(ctx, in, info, handler) 834 } 835 836 func _Msg_ExecuteContract_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 837 in := new(MsgExecuteContract) 838 if err := dec(in); err != nil { 839 return nil, err 840 } 841 if interceptor == nil { 842 return srv.(MsgServer).ExecuteContract(ctx, in) 843 } 844 info := &grpc.UnaryServerInfo{ 845 Server: srv, 846 FullMethod: "/cosmwasm.wasm.v1.Msg/ExecuteContract", 847 } 848 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 849 return srv.(MsgServer).ExecuteContract(ctx, req.(*MsgExecuteContract)) 850 } 851 return interceptor(ctx, in, info, handler) 852 } 853 854 func _Msg_MigrateContract_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 855 in := new(MsgMigrateContract) 856 if err := dec(in); err != nil { 857 return nil, err 858 } 859 if interceptor == nil { 860 return srv.(MsgServer).MigrateContract(ctx, in) 861 } 862 info := &grpc.UnaryServerInfo{ 863 Server: srv, 864 FullMethod: "/cosmwasm.wasm.v1.Msg/MigrateContract", 865 } 866 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 867 return srv.(MsgServer).MigrateContract(ctx, req.(*MsgMigrateContract)) 868 } 869 return interceptor(ctx, in, info, handler) 870 } 871 872 func _Msg_UpdateAdmin_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 873 in := new(MsgUpdateAdmin) 874 if err := dec(in); err != nil { 875 return nil, err 876 } 877 if interceptor == nil { 878 return srv.(MsgServer).UpdateAdmin(ctx, in) 879 } 880 info := &grpc.UnaryServerInfo{ 881 Server: srv, 882 FullMethod: "/cosmwasm.wasm.v1.Msg/UpdateAdmin", 883 } 884 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 885 return srv.(MsgServer).UpdateAdmin(ctx, req.(*MsgUpdateAdmin)) 886 } 887 return interceptor(ctx, in, info, handler) 888 } 889 890 func _Msg_ClearAdmin_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 891 in := new(MsgClearAdmin) 892 if err := dec(in); err != nil { 893 return nil, err 894 } 895 if interceptor == nil { 896 return srv.(MsgServer).ClearAdmin(ctx, in) 897 } 898 info := &grpc.UnaryServerInfo{ 899 Server: srv, 900 FullMethod: "/cosmwasm.wasm.v1.Msg/ClearAdmin", 901 } 902 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 903 return srv.(MsgServer).ClearAdmin(ctx, req.(*MsgClearAdmin)) 904 } 905 return interceptor(ctx, in, info, handler) 906 } 907 908 var _Msg_serviceDesc = grpc.ServiceDesc{ 909 ServiceName: "cosmwasm.wasm.v1.Msg", 910 HandlerType: (*MsgServer)(nil), 911 Methods: []grpc.MethodDesc{ 912 { 913 MethodName: "StoreCode", 914 Handler: _Msg_StoreCode_Handler, 915 }, 916 { 917 MethodName: "InstantiateContract", 918 Handler: _Msg_InstantiateContract_Handler, 919 }, 920 { 921 MethodName: "ExecuteContract", 922 Handler: _Msg_ExecuteContract_Handler, 923 }, 924 { 925 MethodName: "MigrateContract", 926 Handler: _Msg_MigrateContract_Handler, 927 }, 928 { 929 MethodName: "UpdateAdmin", 930 Handler: _Msg_UpdateAdmin_Handler, 931 }, 932 { 933 MethodName: "ClearAdmin", 934 Handler: _Msg_ClearAdmin_Handler, 935 }, 936 }, 937 Streams: []grpc.StreamDesc{}, 938 Metadata: "cosmwasm/wasm/v1/tx.proto", 939 } 940 941 func (m *MsgStoreCode) Marshal() (dAtA []byte, err error) { 942 size := m.Size() 943 dAtA = make([]byte, size) 944 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 945 if err != nil { 946 return nil, err 947 } 948 return dAtA[:n], nil 949 } 950 951 func (m *MsgStoreCode) MarshalTo(dAtA []byte) (int, error) { 952 size := m.Size() 953 return m.MarshalToSizedBuffer(dAtA[:size]) 954 } 955 956 func (m *MsgStoreCode) MarshalToSizedBuffer(dAtA []byte) (int, error) { 957 i := len(dAtA) 958 _ = i 959 var l int 960 _ = l 961 if m.InstantiatePermission != nil { 962 { 963 size, err := m.InstantiatePermission.MarshalToSizedBuffer(dAtA[:i]) 964 if err != nil { 965 return 0, err 966 } 967 i -= size 968 i = encodeVarintTx(dAtA, i, uint64(size)) 969 } 970 i-- 971 dAtA[i] = 0x2a 972 } 973 if len(m.WASMByteCode) > 0 { 974 i -= len(m.WASMByteCode) 975 copy(dAtA[i:], m.WASMByteCode) 976 i = encodeVarintTx(dAtA, i, uint64(len(m.WASMByteCode))) 977 i-- 978 dAtA[i] = 0x12 979 } 980 if len(m.Sender) > 0 { 981 i -= len(m.Sender) 982 copy(dAtA[i:], m.Sender) 983 i = encodeVarintTx(dAtA, i, uint64(len(m.Sender))) 984 i-- 985 dAtA[i] = 0xa 986 } 987 return len(dAtA) - i, nil 988 } 989 990 func (m *MsgStoreCodeResponse) Marshal() (dAtA []byte, err error) { 991 size := m.Size() 992 dAtA = make([]byte, size) 993 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 994 if err != nil { 995 return nil, err 996 } 997 return dAtA[:n], nil 998 } 999 1000 func (m *MsgStoreCodeResponse) MarshalTo(dAtA []byte) (int, error) { 1001 size := m.Size() 1002 return m.MarshalToSizedBuffer(dAtA[:size]) 1003 } 1004 1005 func (m *MsgStoreCodeResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1006 i := len(dAtA) 1007 _ = i 1008 var l int 1009 _ = l 1010 if m.CodeID != 0 { 1011 i = encodeVarintTx(dAtA, i, uint64(m.CodeID)) 1012 i-- 1013 dAtA[i] = 0x8 1014 } 1015 return len(dAtA) - i, nil 1016 } 1017 1018 func (m *MsgInstantiateContract) Marshal() (dAtA []byte, err error) { 1019 size := m.Size() 1020 dAtA = make([]byte, size) 1021 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 1022 if err != nil { 1023 return nil, err 1024 } 1025 return dAtA[:n], nil 1026 } 1027 1028 func (m *MsgInstantiateContract) MarshalTo(dAtA []byte) (int, error) { 1029 size := m.Size() 1030 return m.MarshalToSizedBuffer(dAtA[:size]) 1031 } 1032 1033 func (m *MsgInstantiateContract) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1034 i := len(dAtA) 1035 _ = i 1036 var l int 1037 _ = l 1038 if len(m.Funds) > 0 { 1039 for iNdEx := len(m.Funds) - 1; iNdEx >= 0; iNdEx-- { 1040 { 1041 size, err := m.Funds[iNdEx].MarshalToSizedBuffer(dAtA[:i]) 1042 if err != nil { 1043 return 0, err 1044 } 1045 i -= size 1046 i = encodeVarintTx(dAtA, i, uint64(size)) 1047 } 1048 i-- 1049 dAtA[i] = 0x32 1050 } 1051 } 1052 if len(m.Msg) > 0 { 1053 i -= len(m.Msg) 1054 copy(dAtA[i:], m.Msg) 1055 i = encodeVarintTx(dAtA, i, uint64(len(m.Msg))) 1056 i-- 1057 dAtA[i] = 0x2a 1058 } 1059 if len(m.Label) > 0 { 1060 i -= len(m.Label) 1061 copy(dAtA[i:], m.Label) 1062 i = encodeVarintTx(dAtA, i, uint64(len(m.Label))) 1063 i-- 1064 dAtA[i] = 0x22 1065 } 1066 if m.CodeID != 0 { 1067 i = encodeVarintTx(dAtA, i, uint64(m.CodeID)) 1068 i-- 1069 dAtA[i] = 0x18 1070 } 1071 if len(m.Admin) > 0 { 1072 i -= len(m.Admin) 1073 copy(dAtA[i:], m.Admin) 1074 i = encodeVarintTx(dAtA, i, uint64(len(m.Admin))) 1075 i-- 1076 dAtA[i] = 0x12 1077 } 1078 if len(m.Sender) > 0 { 1079 i -= len(m.Sender) 1080 copy(dAtA[i:], m.Sender) 1081 i = encodeVarintTx(dAtA, i, uint64(len(m.Sender))) 1082 i-- 1083 dAtA[i] = 0xa 1084 } 1085 return len(dAtA) - i, nil 1086 } 1087 1088 func (m *MsgInstantiateContractResponse) Marshal() (dAtA []byte, err error) { 1089 size := m.Size() 1090 dAtA = make([]byte, size) 1091 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 1092 if err != nil { 1093 return nil, err 1094 } 1095 return dAtA[:n], nil 1096 } 1097 1098 func (m *MsgInstantiateContractResponse) MarshalTo(dAtA []byte) (int, error) { 1099 size := m.Size() 1100 return m.MarshalToSizedBuffer(dAtA[:size]) 1101 } 1102 1103 func (m *MsgInstantiateContractResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1104 i := len(dAtA) 1105 _ = i 1106 var l int 1107 _ = l 1108 if len(m.Data) > 0 { 1109 i -= len(m.Data) 1110 copy(dAtA[i:], m.Data) 1111 i = encodeVarintTx(dAtA, i, uint64(len(m.Data))) 1112 i-- 1113 dAtA[i] = 0x12 1114 } 1115 if len(m.Address) > 0 { 1116 i -= len(m.Address) 1117 copy(dAtA[i:], m.Address) 1118 i = encodeVarintTx(dAtA, i, uint64(len(m.Address))) 1119 i-- 1120 dAtA[i] = 0xa 1121 } 1122 return len(dAtA) - i, nil 1123 } 1124 1125 func (m *MsgExecuteContract) Marshal() (dAtA []byte, err error) { 1126 size := m.Size() 1127 dAtA = make([]byte, size) 1128 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 1129 if err != nil { 1130 return nil, err 1131 } 1132 return dAtA[:n], nil 1133 } 1134 1135 func (m *MsgExecuteContract) MarshalTo(dAtA []byte) (int, error) { 1136 size := m.Size() 1137 return m.MarshalToSizedBuffer(dAtA[:size]) 1138 } 1139 1140 func (m *MsgExecuteContract) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1141 i := len(dAtA) 1142 _ = i 1143 var l int 1144 _ = l 1145 if len(m.Funds) > 0 { 1146 for iNdEx := len(m.Funds) - 1; iNdEx >= 0; iNdEx-- { 1147 { 1148 size, err := m.Funds[iNdEx].MarshalToSizedBuffer(dAtA[:i]) 1149 if err != nil { 1150 return 0, err 1151 } 1152 i -= size 1153 i = encodeVarintTx(dAtA, i, uint64(size)) 1154 } 1155 i-- 1156 dAtA[i] = 0x2a 1157 } 1158 } 1159 if len(m.Msg) > 0 { 1160 i -= len(m.Msg) 1161 copy(dAtA[i:], m.Msg) 1162 i = encodeVarintTx(dAtA, i, uint64(len(m.Msg))) 1163 i-- 1164 dAtA[i] = 0x1a 1165 } 1166 if len(m.Contract) > 0 { 1167 i -= len(m.Contract) 1168 copy(dAtA[i:], m.Contract) 1169 i = encodeVarintTx(dAtA, i, uint64(len(m.Contract))) 1170 i-- 1171 dAtA[i] = 0x12 1172 } 1173 if len(m.Sender) > 0 { 1174 i -= len(m.Sender) 1175 copy(dAtA[i:], m.Sender) 1176 i = encodeVarintTx(dAtA, i, uint64(len(m.Sender))) 1177 i-- 1178 dAtA[i] = 0xa 1179 } 1180 return len(dAtA) - i, nil 1181 } 1182 1183 func (m *MsgExecuteContractResponse) Marshal() (dAtA []byte, err error) { 1184 size := m.Size() 1185 dAtA = make([]byte, size) 1186 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 1187 if err != nil { 1188 return nil, err 1189 } 1190 return dAtA[:n], nil 1191 } 1192 1193 func (m *MsgExecuteContractResponse) MarshalTo(dAtA []byte) (int, error) { 1194 size := m.Size() 1195 return m.MarshalToSizedBuffer(dAtA[:size]) 1196 } 1197 1198 func (m *MsgExecuteContractResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1199 i := len(dAtA) 1200 _ = i 1201 var l int 1202 _ = l 1203 if len(m.Data) > 0 { 1204 i -= len(m.Data) 1205 copy(dAtA[i:], m.Data) 1206 i = encodeVarintTx(dAtA, i, uint64(len(m.Data))) 1207 i-- 1208 dAtA[i] = 0xa 1209 } 1210 return len(dAtA) - i, nil 1211 } 1212 1213 func (m *MsgMigrateContract) Marshal() (dAtA []byte, err error) { 1214 size := m.Size() 1215 dAtA = make([]byte, size) 1216 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 1217 if err != nil { 1218 return nil, err 1219 } 1220 return dAtA[:n], nil 1221 } 1222 1223 func (m *MsgMigrateContract) MarshalTo(dAtA []byte) (int, error) { 1224 size := m.Size() 1225 return m.MarshalToSizedBuffer(dAtA[:size]) 1226 } 1227 1228 func (m *MsgMigrateContract) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1229 i := len(dAtA) 1230 _ = i 1231 var l int 1232 _ = l 1233 if len(m.Msg) > 0 { 1234 i -= len(m.Msg) 1235 copy(dAtA[i:], m.Msg) 1236 i = encodeVarintTx(dAtA, i, uint64(len(m.Msg))) 1237 i-- 1238 dAtA[i] = 0x22 1239 } 1240 if m.CodeID != 0 { 1241 i = encodeVarintTx(dAtA, i, uint64(m.CodeID)) 1242 i-- 1243 dAtA[i] = 0x18 1244 } 1245 if len(m.Contract) > 0 { 1246 i -= len(m.Contract) 1247 copy(dAtA[i:], m.Contract) 1248 i = encodeVarintTx(dAtA, i, uint64(len(m.Contract))) 1249 i-- 1250 dAtA[i] = 0x12 1251 } 1252 if len(m.Sender) > 0 { 1253 i -= len(m.Sender) 1254 copy(dAtA[i:], m.Sender) 1255 i = encodeVarintTx(dAtA, i, uint64(len(m.Sender))) 1256 i-- 1257 dAtA[i] = 0xa 1258 } 1259 return len(dAtA) - i, nil 1260 } 1261 1262 func (m *MsgMigrateContractResponse) Marshal() (dAtA []byte, err error) { 1263 size := m.Size() 1264 dAtA = make([]byte, size) 1265 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 1266 if err != nil { 1267 return nil, err 1268 } 1269 return dAtA[:n], nil 1270 } 1271 1272 func (m *MsgMigrateContractResponse) MarshalTo(dAtA []byte) (int, error) { 1273 size := m.Size() 1274 return m.MarshalToSizedBuffer(dAtA[:size]) 1275 } 1276 1277 func (m *MsgMigrateContractResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1278 i := len(dAtA) 1279 _ = i 1280 var l int 1281 _ = l 1282 if len(m.Data) > 0 { 1283 i -= len(m.Data) 1284 copy(dAtA[i:], m.Data) 1285 i = encodeVarintTx(dAtA, i, uint64(len(m.Data))) 1286 i-- 1287 dAtA[i] = 0xa 1288 } 1289 return len(dAtA) - i, nil 1290 } 1291 1292 func (m *MsgUpdateAdmin) Marshal() (dAtA []byte, err error) { 1293 size := m.Size() 1294 dAtA = make([]byte, size) 1295 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 1296 if err != nil { 1297 return nil, err 1298 } 1299 return dAtA[:n], nil 1300 } 1301 1302 func (m *MsgUpdateAdmin) MarshalTo(dAtA []byte) (int, error) { 1303 size := m.Size() 1304 return m.MarshalToSizedBuffer(dAtA[:size]) 1305 } 1306 1307 func (m *MsgUpdateAdmin) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1308 i := len(dAtA) 1309 _ = i 1310 var l int 1311 _ = l 1312 if len(m.Contract) > 0 { 1313 i -= len(m.Contract) 1314 copy(dAtA[i:], m.Contract) 1315 i = encodeVarintTx(dAtA, i, uint64(len(m.Contract))) 1316 i-- 1317 dAtA[i] = 0x1a 1318 } 1319 if len(m.NewAdmin) > 0 { 1320 i -= len(m.NewAdmin) 1321 copy(dAtA[i:], m.NewAdmin) 1322 i = encodeVarintTx(dAtA, i, uint64(len(m.NewAdmin))) 1323 i-- 1324 dAtA[i] = 0x12 1325 } 1326 if len(m.Sender) > 0 { 1327 i -= len(m.Sender) 1328 copy(dAtA[i:], m.Sender) 1329 i = encodeVarintTx(dAtA, i, uint64(len(m.Sender))) 1330 i-- 1331 dAtA[i] = 0xa 1332 } 1333 return len(dAtA) - i, nil 1334 } 1335 1336 func (m *MsgUpdateAdminResponse) Marshal() (dAtA []byte, err error) { 1337 size := m.Size() 1338 dAtA = make([]byte, size) 1339 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 1340 if err != nil { 1341 return nil, err 1342 } 1343 return dAtA[:n], nil 1344 } 1345 1346 func (m *MsgUpdateAdminResponse) MarshalTo(dAtA []byte) (int, error) { 1347 size := m.Size() 1348 return m.MarshalToSizedBuffer(dAtA[:size]) 1349 } 1350 1351 func (m *MsgUpdateAdminResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1352 i := len(dAtA) 1353 _ = i 1354 var l int 1355 _ = l 1356 return len(dAtA) - i, nil 1357 } 1358 1359 func (m *MsgClearAdmin) Marshal() (dAtA []byte, err error) { 1360 size := m.Size() 1361 dAtA = make([]byte, size) 1362 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 1363 if err != nil { 1364 return nil, err 1365 } 1366 return dAtA[:n], nil 1367 } 1368 1369 func (m *MsgClearAdmin) MarshalTo(dAtA []byte) (int, error) { 1370 size := m.Size() 1371 return m.MarshalToSizedBuffer(dAtA[:size]) 1372 } 1373 1374 func (m *MsgClearAdmin) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1375 i := len(dAtA) 1376 _ = i 1377 var l int 1378 _ = l 1379 if len(m.Contract) > 0 { 1380 i -= len(m.Contract) 1381 copy(dAtA[i:], m.Contract) 1382 i = encodeVarintTx(dAtA, i, uint64(len(m.Contract))) 1383 i-- 1384 dAtA[i] = 0x1a 1385 } 1386 if len(m.Sender) > 0 { 1387 i -= len(m.Sender) 1388 copy(dAtA[i:], m.Sender) 1389 i = encodeVarintTx(dAtA, i, uint64(len(m.Sender))) 1390 i-- 1391 dAtA[i] = 0xa 1392 } 1393 return len(dAtA) - i, nil 1394 } 1395 1396 func (m *MsgClearAdminResponse) Marshal() (dAtA []byte, err error) { 1397 size := m.Size() 1398 dAtA = make([]byte, size) 1399 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 1400 if err != nil { 1401 return nil, err 1402 } 1403 return dAtA[:n], nil 1404 } 1405 1406 func (m *MsgClearAdminResponse) MarshalTo(dAtA []byte) (int, error) { 1407 size := m.Size() 1408 return m.MarshalToSizedBuffer(dAtA[:size]) 1409 } 1410 1411 func (m *MsgClearAdminResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1412 i := len(dAtA) 1413 _ = i 1414 var l int 1415 _ = l 1416 return len(dAtA) - i, nil 1417 } 1418 1419 func encodeVarintTx(dAtA []byte, offset int, v uint64) int { 1420 offset -= sovTx(v) 1421 base := offset 1422 for v >= 1<<7 { 1423 dAtA[offset] = uint8(v&0x7f | 0x80) 1424 v >>= 7 1425 offset++ 1426 } 1427 dAtA[offset] = uint8(v) 1428 return base 1429 } 1430 1431 func (m *MsgStoreCode) Size() (n int) { 1432 if m == nil { 1433 return 0 1434 } 1435 var l int 1436 _ = l 1437 l = len(m.Sender) 1438 if l > 0 { 1439 n += 1 + l + sovTx(uint64(l)) 1440 } 1441 l = len(m.WASMByteCode) 1442 if l > 0 { 1443 n += 1 + l + sovTx(uint64(l)) 1444 } 1445 if m.InstantiatePermission != nil { 1446 l = m.InstantiatePermission.Size() 1447 n += 1 + l + sovTx(uint64(l)) 1448 } 1449 return n 1450 } 1451 1452 func (m *MsgStoreCodeResponse) Size() (n int) { 1453 if m == nil { 1454 return 0 1455 } 1456 var l int 1457 _ = l 1458 if m.CodeID != 0 { 1459 n += 1 + sovTx(uint64(m.CodeID)) 1460 } 1461 return n 1462 } 1463 1464 func (m *MsgInstantiateContract) Size() (n int) { 1465 if m == nil { 1466 return 0 1467 } 1468 var l int 1469 _ = l 1470 l = len(m.Sender) 1471 if l > 0 { 1472 n += 1 + l + sovTx(uint64(l)) 1473 } 1474 l = len(m.Admin) 1475 if l > 0 { 1476 n += 1 + l + sovTx(uint64(l)) 1477 } 1478 if m.CodeID != 0 { 1479 n += 1 + sovTx(uint64(m.CodeID)) 1480 } 1481 l = len(m.Label) 1482 if l > 0 { 1483 n += 1 + l + sovTx(uint64(l)) 1484 } 1485 l = len(m.Msg) 1486 if l > 0 { 1487 n += 1 + l + sovTx(uint64(l)) 1488 } 1489 if len(m.Funds) > 0 { 1490 for _, e := range m.Funds { 1491 l = e.Size() 1492 n += 1 + l + sovTx(uint64(l)) 1493 } 1494 } 1495 return n 1496 } 1497 1498 func (m *MsgInstantiateContractResponse) Size() (n int) { 1499 if m == nil { 1500 return 0 1501 } 1502 var l int 1503 _ = l 1504 l = len(m.Address) 1505 if l > 0 { 1506 n += 1 + l + sovTx(uint64(l)) 1507 } 1508 l = len(m.Data) 1509 if l > 0 { 1510 n += 1 + l + sovTx(uint64(l)) 1511 } 1512 return n 1513 } 1514 1515 func (m *MsgExecuteContract) Size() (n int) { 1516 if m == nil { 1517 return 0 1518 } 1519 var l int 1520 _ = l 1521 l = len(m.Sender) 1522 if l > 0 { 1523 n += 1 + l + sovTx(uint64(l)) 1524 } 1525 l = len(m.Contract) 1526 if l > 0 { 1527 n += 1 + l + sovTx(uint64(l)) 1528 } 1529 l = len(m.Msg) 1530 if l > 0 { 1531 n += 1 + l + sovTx(uint64(l)) 1532 } 1533 if len(m.Funds) > 0 { 1534 for _, e := range m.Funds { 1535 l = e.Size() 1536 n += 1 + l + sovTx(uint64(l)) 1537 } 1538 } 1539 return n 1540 } 1541 1542 func (m *MsgExecuteContractResponse) Size() (n int) { 1543 if m == nil { 1544 return 0 1545 } 1546 var l int 1547 _ = l 1548 l = len(m.Data) 1549 if l > 0 { 1550 n += 1 + l + sovTx(uint64(l)) 1551 } 1552 return n 1553 } 1554 1555 func (m *MsgMigrateContract) Size() (n int) { 1556 if m == nil { 1557 return 0 1558 } 1559 var l int 1560 _ = l 1561 l = len(m.Sender) 1562 if l > 0 { 1563 n += 1 + l + sovTx(uint64(l)) 1564 } 1565 l = len(m.Contract) 1566 if l > 0 { 1567 n += 1 + l + sovTx(uint64(l)) 1568 } 1569 if m.CodeID != 0 { 1570 n += 1 + sovTx(uint64(m.CodeID)) 1571 } 1572 l = len(m.Msg) 1573 if l > 0 { 1574 n += 1 + l + sovTx(uint64(l)) 1575 } 1576 return n 1577 } 1578 1579 func (m *MsgMigrateContractResponse) Size() (n int) { 1580 if m == nil { 1581 return 0 1582 } 1583 var l int 1584 _ = l 1585 l = len(m.Data) 1586 if l > 0 { 1587 n += 1 + l + sovTx(uint64(l)) 1588 } 1589 return n 1590 } 1591 1592 func (m *MsgUpdateAdmin) Size() (n int) { 1593 if m == nil { 1594 return 0 1595 } 1596 var l int 1597 _ = l 1598 l = len(m.Sender) 1599 if l > 0 { 1600 n += 1 + l + sovTx(uint64(l)) 1601 } 1602 l = len(m.NewAdmin) 1603 if l > 0 { 1604 n += 1 + l + sovTx(uint64(l)) 1605 } 1606 l = len(m.Contract) 1607 if l > 0 { 1608 n += 1 + l + sovTx(uint64(l)) 1609 } 1610 return n 1611 } 1612 1613 func (m *MsgUpdateAdminResponse) Size() (n int) { 1614 if m == nil { 1615 return 0 1616 } 1617 var l int 1618 _ = l 1619 return n 1620 } 1621 1622 func (m *MsgClearAdmin) Size() (n int) { 1623 if m == nil { 1624 return 0 1625 } 1626 var l int 1627 _ = l 1628 l = len(m.Sender) 1629 if l > 0 { 1630 n += 1 + l + sovTx(uint64(l)) 1631 } 1632 l = len(m.Contract) 1633 if l > 0 { 1634 n += 1 + l + sovTx(uint64(l)) 1635 } 1636 return n 1637 } 1638 1639 func (m *MsgClearAdminResponse) Size() (n int) { 1640 if m == nil { 1641 return 0 1642 } 1643 var l int 1644 _ = l 1645 return n 1646 } 1647 1648 func sovTx(x uint64) (n int) { 1649 return (math_bits.Len64(x|1) + 6) / 7 1650 } 1651 1652 func sozTx(x uint64) (n int) { 1653 return sovTx(uint64((x << 1) ^ uint64((int64(x) >> 63)))) 1654 } 1655 1656 func (m *MsgStoreCode) Unmarshal(dAtA []byte) error { 1657 l := len(dAtA) 1658 iNdEx := 0 1659 for iNdEx < l { 1660 preIndex := iNdEx 1661 var wire uint64 1662 for shift := uint(0); ; shift += 7 { 1663 if shift >= 64 { 1664 return ErrIntOverflowTx 1665 } 1666 if iNdEx >= l { 1667 return io.ErrUnexpectedEOF 1668 } 1669 b := dAtA[iNdEx] 1670 iNdEx++ 1671 wire |= uint64(b&0x7F) << shift 1672 if b < 0x80 { 1673 break 1674 } 1675 } 1676 fieldNum := int32(wire >> 3) 1677 wireType := int(wire & 0x7) 1678 if wireType == 4 { 1679 return fmt.Errorf("proto: MsgStoreCode: wiretype end group for non-group") 1680 } 1681 if fieldNum <= 0 { 1682 return fmt.Errorf("proto: MsgStoreCode: illegal tag %d (wire type %d)", fieldNum, wire) 1683 } 1684 switch fieldNum { 1685 case 1: 1686 if wireType != 2 { 1687 return fmt.Errorf("proto: wrong wireType = %d for field Sender", wireType) 1688 } 1689 var stringLen uint64 1690 for shift := uint(0); ; shift += 7 { 1691 if shift >= 64 { 1692 return ErrIntOverflowTx 1693 } 1694 if iNdEx >= l { 1695 return io.ErrUnexpectedEOF 1696 } 1697 b := dAtA[iNdEx] 1698 iNdEx++ 1699 stringLen |= uint64(b&0x7F) << shift 1700 if b < 0x80 { 1701 break 1702 } 1703 } 1704 intStringLen := int(stringLen) 1705 if intStringLen < 0 { 1706 return ErrInvalidLengthTx 1707 } 1708 postIndex := iNdEx + intStringLen 1709 if postIndex < 0 { 1710 return ErrInvalidLengthTx 1711 } 1712 if postIndex > l { 1713 return io.ErrUnexpectedEOF 1714 } 1715 m.Sender = string(dAtA[iNdEx:postIndex]) 1716 iNdEx = postIndex 1717 case 2: 1718 if wireType != 2 { 1719 return fmt.Errorf("proto: wrong wireType = %d for field WASMByteCode", wireType) 1720 } 1721 var byteLen int 1722 for shift := uint(0); ; shift += 7 { 1723 if shift >= 64 { 1724 return ErrIntOverflowTx 1725 } 1726 if iNdEx >= l { 1727 return io.ErrUnexpectedEOF 1728 } 1729 b := dAtA[iNdEx] 1730 iNdEx++ 1731 byteLen |= int(b&0x7F) << shift 1732 if b < 0x80 { 1733 break 1734 } 1735 } 1736 if byteLen < 0 { 1737 return ErrInvalidLengthTx 1738 } 1739 postIndex := iNdEx + byteLen 1740 if postIndex < 0 { 1741 return ErrInvalidLengthTx 1742 } 1743 if postIndex > l { 1744 return io.ErrUnexpectedEOF 1745 } 1746 m.WASMByteCode = append(m.WASMByteCode[:0], dAtA[iNdEx:postIndex]...) 1747 if m.WASMByteCode == nil { 1748 m.WASMByteCode = []byte{} 1749 } 1750 iNdEx = postIndex 1751 case 5: 1752 if wireType != 2 { 1753 return fmt.Errorf("proto: wrong wireType = %d for field InstantiatePermission", wireType) 1754 } 1755 var msglen int 1756 for shift := uint(0); ; shift += 7 { 1757 if shift >= 64 { 1758 return ErrIntOverflowTx 1759 } 1760 if iNdEx >= l { 1761 return io.ErrUnexpectedEOF 1762 } 1763 b := dAtA[iNdEx] 1764 iNdEx++ 1765 msglen |= int(b&0x7F) << shift 1766 if b < 0x80 { 1767 break 1768 } 1769 } 1770 if msglen < 0 { 1771 return ErrInvalidLengthTx 1772 } 1773 postIndex := iNdEx + msglen 1774 if postIndex < 0 { 1775 return ErrInvalidLengthTx 1776 } 1777 if postIndex > l { 1778 return io.ErrUnexpectedEOF 1779 } 1780 if m.InstantiatePermission == nil { 1781 m.InstantiatePermission = &AccessConfig{} 1782 } 1783 if err := m.InstantiatePermission.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 1784 return err 1785 } 1786 iNdEx = postIndex 1787 default: 1788 iNdEx = preIndex 1789 skippy, err := skipTx(dAtA[iNdEx:]) 1790 if err != nil { 1791 return err 1792 } 1793 if (skippy < 0) || (iNdEx+skippy) < 0 { 1794 return ErrInvalidLengthTx 1795 } 1796 if (iNdEx + skippy) > l { 1797 return io.ErrUnexpectedEOF 1798 } 1799 iNdEx += skippy 1800 } 1801 } 1802 1803 if iNdEx > l { 1804 return io.ErrUnexpectedEOF 1805 } 1806 return nil 1807 } 1808 1809 func (m *MsgStoreCodeResponse) Unmarshal(dAtA []byte) error { 1810 l := len(dAtA) 1811 iNdEx := 0 1812 for iNdEx < l { 1813 preIndex := iNdEx 1814 var wire uint64 1815 for shift := uint(0); ; shift += 7 { 1816 if shift >= 64 { 1817 return ErrIntOverflowTx 1818 } 1819 if iNdEx >= l { 1820 return io.ErrUnexpectedEOF 1821 } 1822 b := dAtA[iNdEx] 1823 iNdEx++ 1824 wire |= uint64(b&0x7F) << shift 1825 if b < 0x80 { 1826 break 1827 } 1828 } 1829 fieldNum := int32(wire >> 3) 1830 wireType := int(wire & 0x7) 1831 if wireType == 4 { 1832 return fmt.Errorf("proto: MsgStoreCodeResponse: wiretype end group for non-group") 1833 } 1834 if fieldNum <= 0 { 1835 return fmt.Errorf("proto: MsgStoreCodeResponse: illegal tag %d (wire type %d)", fieldNum, wire) 1836 } 1837 switch fieldNum { 1838 case 1: 1839 if wireType != 0 { 1840 return fmt.Errorf("proto: wrong wireType = %d for field CodeID", wireType) 1841 } 1842 m.CodeID = 0 1843 for shift := uint(0); ; shift += 7 { 1844 if shift >= 64 { 1845 return ErrIntOverflowTx 1846 } 1847 if iNdEx >= l { 1848 return io.ErrUnexpectedEOF 1849 } 1850 b := dAtA[iNdEx] 1851 iNdEx++ 1852 m.CodeID |= uint64(b&0x7F) << shift 1853 if b < 0x80 { 1854 break 1855 } 1856 } 1857 default: 1858 iNdEx = preIndex 1859 skippy, err := skipTx(dAtA[iNdEx:]) 1860 if err != nil { 1861 return err 1862 } 1863 if (skippy < 0) || (iNdEx+skippy) < 0 { 1864 return ErrInvalidLengthTx 1865 } 1866 if (iNdEx + skippy) > l { 1867 return io.ErrUnexpectedEOF 1868 } 1869 iNdEx += skippy 1870 } 1871 } 1872 1873 if iNdEx > l { 1874 return io.ErrUnexpectedEOF 1875 } 1876 return nil 1877 } 1878 1879 func (m *MsgInstantiateContract) Unmarshal(dAtA []byte) error { 1880 l := len(dAtA) 1881 iNdEx := 0 1882 for iNdEx < l { 1883 preIndex := iNdEx 1884 var wire uint64 1885 for shift := uint(0); ; shift += 7 { 1886 if shift >= 64 { 1887 return ErrIntOverflowTx 1888 } 1889 if iNdEx >= l { 1890 return io.ErrUnexpectedEOF 1891 } 1892 b := dAtA[iNdEx] 1893 iNdEx++ 1894 wire |= uint64(b&0x7F) << shift 1895 if b < 0x80 { 1896 break 1897 } 1898 } 1899 fieldNum := int32(wire >> 3) 1900 wireType := int(wire & 0x7) 1901 if wireType == 4 { 1902 return fmt.Errorf("proto: MsgInstantiateContract: wiretype end group for non-group") 1903 } 1904 if fieldNum <= 0 { 1905 return fmt.Errorf("proto: MsgInstantiateContract: illegal tag %d (wire type %d)", fieldNum, wire) 1906 } 1907 switch fieldNum { 1908 case 1: 1909 if wireType != 2 { 1910 return fmt.Errorf("proto: wrong wireType = %d for field Sender", wireType) 1911 } 1912 var stringLen uint64 1913 for shift := uint(0); ; shift += 7 { 1914 if shift >= 64 { 1915 return ErrIntOverflowTx 1916 } 1917 if iNdEx >= l { 1918 return io.ErrUnexpectedEOF 1919 } 1920 b := dAtA[iNdEx] 1921 iNdEx++ 1922 stringLen |= uint64(b&0x7F) << shift 1923 if b < 0x80 { 1924 break 1925 } 1926 } 1927 intStringLen := int(stringLen) 1928 if intStringLen < 0 { 1929 return ErrInvalidLengthTx 1930 } 1931 postIndex := iNdEx + intStringLen 1932 if postIndex < 0 { 1933 return ErrInvalidLengthTx 1934 } 1935 if postIndex > l { 1936 return io.ErrUnexpectedEOF 1937 } 1938 m.Sender = string(dAtA[iNdEx:postIndex]) 1939 iNdEx = postIndex 1940 case 2: 1941 if wireType != 2 { 1942 return fmt.Errorf("proto: wrong wireType = %d for field Admin", wireType) 1943 } 1944 var stringLen uint64 1945 for shift := uint(0); ; shift += 7 { 1946 if shift >= 64 { 1947 return ErrIntOverflowTx 1948 } 1949 if iNdEx >= l { 1950 return io.ErrUnexpectedEOF 1951 } 1952 b := dAtA[iNdEx] 1953 iNdEx++ 1954 stringLen |= uint64(b&0x7F) << shift 1955 if b < 0x80 { 1956 break 1957 } 1958 } 1959 intStringLen := int(stringLen) 1960 if intStringLen < 0 { 1961 return ErrInvalidLengthTx 1962 } 1963 postIndex := iNdEx + intStringLen 1964 if postIndex < 0 { 1965 return ErrInvalidLengthTx 1966 } 1967 if postIndex > l { 1968 return io.ErrUnexpectedEOF 1969 } 1970 m.Admin = string(dAtA[iNdEx:postIndex]) 1971 iNdEx = postIndex 1972 case 3: 1973 if wireType != 0 { 1974 return fmt.Errorf("proto: wrong wireType = %d for field CodeID", wireType) 1975 } 1976 m.CodeID = 0 1977 for shift := uint(0); ; shift += 7 { 1978 if shift >= 64 { 1979 return ErrIntOverflowTx 1980 } 1981 if iNdEx >= l { 1982 return io.ErrUnexpectedEOF 1983 } 1984 b := dAtA[iNdEx] 1985 iNdEx++ 1986 m.CodeID |= uint64(b&0x7F) << shift 1987 if b < 0x80 { 1988 break 1989 } 1990 } 1991 case 4: 1992 if wireType != 2 { 1993 return fmt.Errorf("proto: wrong wireType = %d for field Label", wireType) 1994 } 1995 var stringLen uint64 1996 for shift := uint(0); ; shift += 7 { 1997 if shift >= 64 { 1998 return ErrIntOverflowTx 1999 } 2000 if iNdEx >= l { 2001 return io.ErrUnexpectedEOF 2002 } 2003 b := dAtA[iNdEx] 2004 iNdEx++ 2005 stringLen |= uint64(b&0x7F) << shift 2006 if b < 0x80 { 2007 break 2008 } 2009 } 2010 intStringLen := int(stringLen) 2011 if intStringLen < 0 { 2012 return ErrInvalidLengthTx 2013 } 2014 postIndex := iNdEx + intStringLen 2015 if postIndex < 0 { 2016 return ErrInvalidLengthTx 2017 } 2018 if postIndex > l { 2019 return io.ErrUnexpectedEOF 2020 } 2021 m.Label = string(dAtA[iNdEx:postIndex]) 2022 iNdEx = postIndex 2023 case 5: 2024 if wireType != 2 { 2025 return fmt.Errorf("proto: wrong wireType = %d for field Msg", wireType) 2026 } 2027 var byteLen int 2028 for shift := uint(0); ; shift += 7 { 2029 if shift >= 64 { 2030 return ErrIntOverflowTx 2031 } 2032 if iNdEx >= l { 2033 return io.ErrUnexpectedEOF 2034 } 2035 b := dAtA[iNdEx] 2036 iNdEx++ 2037 byteLen |= int(b&0x7F) << shift 2038 if b < 0x80 { 2039 break 2040 } 2041 } 2042 if byteLen < 0 { 2043 return ErrInvalidLengthTx 2044 } 2045 postIndex := iNdEx + byteLen 2046 if postIndex < 0 { 2047 return ErrInvalidLengthTx 2048 } 2049 if postIndex > l { 2050 return io.ErrUnexpectedEOF 2051 } 2052 m.Msg = append(m.Msg[:0], dAtA[iNdEx:postIndex]...) 2053 if m.Msg == nil { 2054 m.Msg = []byte{} 2055 } 2056 iNdEx = postIndex 2057 case 6: 2058 if wireType != 2 { 2059 return fmt.Errorf("proto: wrong wireType = %d for field Funds", wireType) 2060 } 2061 var msglen int 2062 for shift := uint(0); ; shift += 7 { 2063 if shift >= 64 { 2064 return ErrIntOverflowTx 2065 } 2066 if iNdEx >= l { 2067 return io.ErrUnexpectedEOF 2068 } 2069 b := dAtA[iNdEx] 2070 iNdEx++ 2071 msglen |= int(b&0x7F) << shift 2072 if b < 0x80 { 2073 break 2074 } 2075 } 2076 if msglen < 0 { 2077 return ErrInvalidLengthTx 2078 } 2079 postIndex := iNdEx + msglen 2080 if postIndex < 0 { 2081 return ErrInvalidLengthTx 2082 } 2083 if postIndex > l { 2084 return io.ErrUnexpectedEOF 2085 } 2086 m.Funds = append(m.Funds, types.CoinAdapter{}) 2087 if err := m.Funds[len(m.Funds)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 2088 return err 2089 } 2090 iNdEx = postIndex 2091 default: 2092 iNdEx = preIndex 2093 skippy, err := skipTx(dAtA[iNdEx:]) 2094 if err != nil { 2095 return err 2096 } 2097 if (skippy < 0) || (iNdEx+skippy) < 0 { 2098 return ErrInvalidLengthTx 2099 } 2100 if (iNdEx + skippy) > l { 2101 return io.ErrUnexpectedEOF 2102 } 2103 iNdEx += skippy 2104 } 2105 } 2106 2107 if iNdEx > l { 2108 return io.ErrUnexpectedEOF 2109 } 2110 return nil 2111 } 2112 2113 func (m *MsgInstantiateContractResponse) Unmarshal(dAtA []byte) error { 2114 l := len(dAtA) 2115 iNdEx := 0 2116 for iNdEx < l { 2117 preIndex := iNdEx 2118 var wire uint64 2119 for shift := uint(0); ; shift += 7 { 2120 if shift >= 64 { 2121 return ErrIntOverflowTx 2122 } 2123 if iNdEx >= l { 2124 return io.ErrUnexpectedEOF 2125 } 2126 b := dAtA[iNdEx] 2127 iNdEx++ 2128 wire |= uint64(b&0x7F) << shift 2129 if b < 0x80 { 2130 break 2131 } 2132 } 2133 fieldNum := int32(wire >> 3) 2134 wireType := int(wire & 0x7) 2135 if wireType == 4 { 2136 return fmt.Errorf("proto: MsgInstantiateContractResponse: wiretype end group for non-group") 2137 } 2138 if fieldNum <= 0 { 2139 return fmt.Errorf("proto: MsgInstantiateContractResponse: illegal tag %d (wire type %d)", fieldNum, wire) 2140 } 2141 switch fieldNum { 2142 case 1: 2143 if wireType != 2 { 2144 return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) 2145 } 2146 var stringLen uint64 2147 for shift := uint(0); ; shift += 7 { 2148 if shift >= 64 { 2149 return ErrIntOverflowTx 2150 } 2151 if iNdEx >= l { 2152 return io.ErrUnexpectedEOF 2153 } 2154 b := dAtA[iNdEx] 2155 iNdEx++ 2156 stringLen |= uint64(b&0x7F) << shift 2157 if b < 0x80 { 2158 break 2159 } 2160 } 2161 intStringLen := int(stringLen) 2162 if intStringLen < 0 { 2163 return ErrInvalidLengthTx 2164 } 2165 postIndex := iNdEx + intStringLen 2166 if postIndex < 0 { 2167 return ErrInvalidLengthTx 2168 } 2169 if postIndex > l { 2170 return io.ErrUnexpectedEOF 2171 } 2172 m.Address = string(dAtA[iNdEx:postIndex]) 2173 iNdEx = postIndex 2174 case 2: 2175 if wireType != 2 { 2176 return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) 2177 } 2178 var byteLen int 2179 for shift := uint(0); ; shift += 7 { 2180 if shift >= 64 { 2181 return ErrIntOverflowTx 2182 } 2183 if iNdEx >= l { 2184 return io.ErrUnexpectedEOF 2185 } 2186 b := dAtA[iNdEx] 2187 iNdEx++ 2188 byteLen |= int(b&0x7F) << shift 2189 if b < 0x80 { 2190 break 2191 } 2192 } 2193 if byteLen < 0 { 2194 return ErrInvalidLengthTx 2195 } 2196 postIndex := iNdEx + byteLen 2197 if postIndex < 0 { 2198 return ErrInvalidLengthTx 2199 } 2200 if postIndex > l { 2201 return io.ErrUnexpectedEOF 2202 } 2203 m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...) 2204 if m.Data == nil { 2205 m.Data = []byte{} 2206 } 2207 iNdEx = postIndex 2208 default: 2209 iNdEx = preIndex 2210 skippy, err := skipTx(dAtA[iNdEx:]) 2211 if err != nil { 2212 return err 2213 } 2214 if (skippy < 0) || (iNdEx+skippy) < 0 { 2215 return ErrInvalidLengthTx 2216 } 2217 if (iNdEx + skippy) > l { 2218 return io.ErrUnexpectedEOF 2219 } 2220 iNdEx += skippy 2221 } 2222 } 2223 2224 if iNdEx > l { 2225 return io.ErrUnexpectedEOF 2226 } 2227 return nil 2228 } 2229 2230 func (m *MsgExecuteContract) Unmarshal(dAtA []byte) error { 2231 l := len(dAtA) 2232 iNdEx := 0 2233 for iNdEx < l { 2234 preIndex := iNdEx 2235 var wire uint64 2236 for shift := uint(0); ; shift += 7 { 2237 if shift >= 64 { 2238 return ErrIntOverflowTx 2239 } 2240 if iNdEx >= l { 2241 return io.ErrUnexpectedEOF 2242 } 2243 b := dAtA[iNdEx] 2244 iNdEx++ 2245 wire |= uint64(b&0x7F) << shift 2246 if b < 0x80 { 2247 break 2248 } 2249 } 2250 fieldNum := int32(wire >> 3) 2251 wireType := int(wire & 0x7) 2252 if wireType == 4 { 2253 return fmt.Errorf("proto: MsgExecuteContract: wiretype end group for non-group") 2254 } 2255 if fieldNum <= 0 { 2256 return fmt.Errorf("proto: MsgExecuteContract: illegal tag %d (wire type %d)", fieldNum, wire) 2257 } 2258 switch fieldNum { 2259 case 1: 2260 if wireType != 2 { 2261 return fmt.Errorf("proto: wrong wireType = %d for field Sender", wireType) 2262 } 2263 var stringLen uint64 2264 for shift := uint(0); ; shift += 7 { 2265 if shift >= 64 { 2266 return ErrIntOverflowTx 2267 } 2268 if iNdEx >= l { 2269 return io.ErrUnexpectedEOF 2270 } 2271 b := dAtA[iNdEx] 2272 iNdEx++ 2273 stringLen |= uint64(b&0x7F) << shift 2274 if b < 0x80 { 2275 break 2276 } 2277 } 2278 intStringLen := int(stringLen) 2279 if intStringLen < 0 { 2280 return ErrInvalidLengthTx 2281 } 2282 postIndex := iNdEx + intStringLen 2283 if postIndex < 0 { 2284 return ErrInvalidLengthTx 2285 } 2286 if postIndex > l { 2287 return io.ErrUnexpectedEOF 2288 } 2289 m.Sender = string(dAtA[iNdEx:postIndex]) 2290 iNdEx = postIndex 2291 case 2: 2292 if wireType != 2 { 2293 return fmt.Errorf("proto: wrong wireType = %d for field Contract", wireType) 2294 } 2295 var stringLen uint64 2296 for shift := uint(0); ; shift += 7 { 2297 if shift >= 64 { 2298 return ErrIntOverflowTx 2299 } 2300 if iNdEx >= l { 2301 return io.ErrUnexpectedEOF 2302 } 2303 b := dAtA[iNdEx] 2304 iNdEx++ 2305 stringLen |= uint64(b&0x7F) << shift 2306 if b < 0x80 { 2307 break 2308 } 2309 } 2310 intStringLen := int(stringLen) 2311 if intStringLen < 0 { 2312 return ErrInvalidLengthTx 2313 } 2314 postIndex := iNdEx + intStringLen 2315 if postIndex < 0 { 2316 return ErrInvalidLengthTx 2317 } 2318 if postIndex > l { 2319 return io.ErrUnexpectedEOF 2320 } 2321 m.Contract = string(dAtA[iNdEx:postIndex]) 2322 iNdEx = postIndex 2323 case 3: 2324 if wireType != 2 { 2325 return fmt.Errorf("proto: wrong wireType = %d for field Msg", wireType) 2326 } 2327 var byteLen int 2328 for shift := uint(0); ; shift += 7 { 2329 if shift >= 64 { 2330 return ErrIntOverflowTx 2331 } 2332 if iNdEx >= l { 2333 return io.ErrUnexpectedEOF 2334 } 2335 b := dAtA[iNdEx] 2336 iNdEx++ 2337 byteLen |= int(b&0x7F) << shift 2338 if b < 0x80 { 2339 break 2340 } 2341 } 2342 if byteLen < 0 { 2343 return ErrInvalidLengthTx 2344 } 2345 postIndex := iNdEx + byteLen 2346 if postIndex < 0 { 2347 return ErrInvalidLengthTx 2348 } 2349 if postIndex > l { 2350 return io.ErrUnexpectedEOF 2351 } 2352 m.Msg = append(m.Msg[:0], dAtA[iNdEx:postIndex]...) 2353 if m.Msg == nil { 2354 m.Msg = []byte{} 2355 } 2356 iNdEx = postIndex 2357 case 5: 2358 if wireType != 2 { 2359 return fmt.Errorf("proto: wrong wireType = %d for field Funds", wireType) 2360 } 2361 var msglen int 2362 for shift := uint(0); ; shift += 7 { 2363 if shift >= 64 { 2364 return ErrIntOverflowTx 2365 } 2366 if iNdEx >= l { 2367 return io.ErrUnexpectedEOF 2368 } 2369 b := dAtA[iNdEx] 2370 iNdEx++ 2371 msglen |= int(b&0x7F) << shift 2372 if b < 0x80 { 2373 break 2374 } 2375 } 2376 if msglen < 0 { 2377 return ErrInvalidLengthTx 2378 } 2379 postIndex := iNdEx + msglen 2380 if postIndex < 0 { 2381 return ErrInvalidLengthTx 2382 } 2383 if postIndex > l { 2384 return io.ErrUnexpectedEOF 2385 } 2386 m.Funds = append(m.Funds, types.CoinAdapter{}) 2387 if err := m.Funds[len(m.Funds)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 2388 return err 2389 } 2390 iNdEx = postIndex 2391 default: 2392 iNdEx = preIndex 2393 skippy, err := skipTx(dAtA[iNdEx:]) 2394 if err != nil { 2395 return err 2396 } 2397 if (skippy < 0) || (iNdEx+skippy) < 0 { 2398 return ErrInvalidLengthTx 2399 } 2400 if (iNdEx + skippy) > l { 2401 return io.ErrUnexpectedEOF 2402 } 2403 iNdEx += skippy 2404 } 2405 } 2406 2407 if iNdEx > l { 2408 return io.ErrUnexpectedEOF 2409 } 2410 return nil 2411 } 2412 2413 func (m *MsgExecuteContractResponse) Unmarshal(dAtA []byte) error { 2414 l := len(dAtA) 2415 iNdEx := 0 2416 for iNdEx < l { 2417 preIndex := iNdEx 2418 var wire uint64 2419 for shift := uint(0); ; shift += 7 { 2420 if shift >= 64 { 2421 return ErrIntOverflowTx 2422 } 2423 if iNdEx >= l { 2424 return io.ErrUnexpectedEOF 2425 } 2426 b := dAtA[iNdEx] 2427 iNdEx++ 2428 wire |= uint64(b&0x7F) << shift 2429 if b < 0x80 { 2430 break 2431 } 2432 } 2433 fieldNum := int32(wire >> 3) 2434 wireType := int(wire & 0x7) 2435 if wireType == 4 { 2436 return fmt.Errorf("proto: MsgExecuteContractResponse: wiretype end group for non-group") 2437 } 2438 if fieldNum <= 0 { 2439 return fmt.Errorf("proto: MsgExecuteContractResponse: illegal tag %d (wire type %d)", fieldNum, wire) 2440 } 2441 switch fieldNum { 2442 case 1: 2443 if wireType != 2 { 2444 return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) 2445 } 2446 var byteLen int 2447 for shift := uint(0); ; shift += 7 { 2448 if shift >= 64 { 2449 return ErrIntOverflowTx 2450 } 2451 if iNdEx >= l { 2452 return io.ErrUnexpectedEOF 2453 } 2454 b := dAtA[iNdEx] 2455 iNdEx++ 2456 byteLen |= int(b&0x7F) << shift 2457 if b < 0x80 { 2458 break 2459 } 2460 } 2461 if byteLen < 0 { 2462 return ErrInvalidLengthTx 2463 } 2464 postIndex := iNdEx + byteLen 2465 if postIndex < 0 { 2466 return ErrInvalidLengthTx 2467 } 2468 if postIndex > l { 2469 return io.ErrUnexpectedEOF 2470 } 2471 m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...) 2472 if m.Data == nil { 2473 m.Data = []byte{} 2474 } 2475 iNdEx = postIndex 2476 default: 2477 iNdEx = preIndex 2478 skippy, err := skipTx(dAtA[iNdEx:]) 2479 if err != nil { 2480 return err 2481 } 2482 if (skippy < 0) || (iNdEx+skippy) < 0 { 2483 return ErrInvalidLengthTx 2484 } 2485 if (iNdEx + skippy) > l { 2486 return io.ErrUnexpectedEOF 2487 } 2488 iNdEx += skippy 2489 } 2490 } 2491 2492 if iNdEx > l { 2493 return io.ErrUnexpectedEOF 2494 } 2495 return nil 2496 } 2497 2498 func (m *MsgMigrateContract) Unmarshal(dAtA []byte) error { 2499 l := len(dAtA) 2500 iNdEx := 0 2501 for iNdEx < l { 2502 preIndex := iNdEx 2503 var wire uint64 2504 for shift := uint(0); ; shift += 7 { 2505 if shift >= 64 { 2506 return ErrIntOverflowTx 2507 } 2508 if iNdEx >= l { 2509 return io.ErrUnexpectedEOF 2510 } 2511 b := dAtA[iNdEx] 2512 iNdEx++ 2513 wire |= uint64(b&0x7F) << shift 2514 if b < 0x80 { 2515 break 2516 } 2517 } 2518 fieldNum := int32(wire >> 3) 2519 wireType := int(wire & 0x7) 2520 if wireType == 4 { 2521 return fmt.Errorf("proto: MsgMigrateContract: wiretype end group for non-group") 2522 } 2523 if fieldNum <= 0 { 2524 return fmt.Errorf("proto: MsgMigrateContract: illegal tag %d (wire type %d)", fieldNum, wire) 2525 } 2526 switch fieldNum { 2527 case 1: 2528 if wireType != 2 { 2529 return fmt.Errorf("proto: wrong wireType = %d for field Sender", wireType) 2530 } 2531 var stringLen uint64 2532 for shift := uint(0); ; shift += 7 { 2533 if shift >= 64 { 2534 return ErrIntOverflowTx 2535 } 2536 if iNdEx >= l { 2537 return io.ErrUnexpectedEOF 2538 } 2539 b := dAtA[iNdEx] 2540 iNdEx++ 2541 stringLen |= uint64(b&0x7F) << shift 2542 if b < 0x80 { 2543 break 2544 } 2545 } 2546 intStringLen := int(stringLen) 2547 if intStringLen < 0 { 2548 return ErrInvalidLengthTx 2549 } 2550 postIndex := iNdEx + intStringLen 2551 if postIndex < 0 { 2552 return ErrInvalidLengthTx 2553 } 2554 if postIndex > l { 2555 return io.ErrUnexpectedEOF 2556 } 2557 m.Sender = string(dAtA[iNdEx:postIndex]) 2558 iNdEx = postIndex 2559 case 2: 2560 if wireType != 2 { 2561 return fmt.Errorf("proto: wrong wireType = %d for field Contract", wireType) 2562 } 2563 var stringLen uint64 2564 for shift := uint(0); ; shift += 7 { 2565 if shift >= 64 { 2566 return ErrIntOverflowTx 2567 } 2568 if iNdEx >= l { 2569 return io.ErrUnexpectedEOF 2570 } 2571 b := dAtA[iNdEx] 2572 iNdEx++ 2573 stringLen |= uint64(b&0x7F) << shift 2574 if b < 0x80 { 2575 break 2576 } 2577 } 2578 intStringLen := int(stringLen) 2579 if intStringLen < 0 { 2580 return ErrInvalidLengthTx 2581 } 2582 postIndex := iNdEx + intStringLen 2583 if postIndex < 0 { 2584 return ErrInvalidLengthTx 2585 } 2586 if postIndex > l { 2587 return io.ErrUnexpectedEOF 2588 } 2589 m.Contract = string(dAtA[iNdEx:postIndex]) 2590 iNdEx = postIndex 2591 case 3: 2592 if wireType != 0 { 2593 return fmt.Errorf("proto: wrong wireType = %d for field CodeID", wireType) 2594 } 2595 m.CodeID = 0 2596 for shift := uint(0); ; shift += 7 { 2597 if shift >= 64 { 2598 return ErrIntOverflowTx 2599 } 2600 if iNdEx >= l { 2601 return io.ErrUnexpectedEOF 2602 } 2603 b := dAtA[iNdEx] 2604 iNdEx++ 2605 m.CodeID |= uint64(b&0x7F) << shift 2606 if b < 0x80 { 2607 break 2608 } 2609 } 2610 case 4: 2611 if wireType != 2 { 2612 return fmt.Errorf("proto: wrong wireType = %d for field Msg", wireType) 2613 } 2614 var byteLen int 2615 for shift := uint(0); ; shift += 7 { 2616 if shift >= 64 { 2617 return ErrIntOverflowTx 2618 } 2619 if iNdEx >= l { 2620 return io.ErrUnexpectedEOF 2621 } 2622 b := dAtA[iNdEx] 2623 iNdEx++ 2624 byteLen |= int(b&0x7F) << shift 2625 if b < 0x80 { 2626 break 2627 } 2628 } 2629 if byteLen < 0 { 2630 return ErrInvalidLengthTx 2631 } 2632 postIndex := iNdEx + byteLen 2633 if postIndex < 0 { 2634 return ErrInvalidLengthTx 2635 } 2636 if postIndex > l { 2637 return io.ErrUnexpectedEOF 2638 } 2639 m.Msg = append(m.Msg[:0], dAtA[iNdEx:postIndex]...) 2640 if m.Msg == nil { 2641 m.Msg = []byte{} 2642 } 2643 iNdEx = postIndex 2644 default: 2645 iNdEx = preIndex 2646 skippy, err := skipTx(dAtA[iNdEx:]) 2647 if err != nil { 2648 return err 2649 } 2650 if (skippy < 0) || (iNdEx+skippy) < 0 { 2651 return ErrInvalidLengthTx 2652 } 2653 if (iNdEx + skippy) > l { 2654 return io.ErrUnexpectedEOF 2655 } 2656 iNdEx += skippy 2657 } 2658 } 2659 2660 if iNdEx > l { 2661 return io.ErrUnexpectedEOF 2662 } 2663 return nil 2664 } 2665 2666 func (m *MsgMigrateContractResponse) Unmarshal(dAtA []byte) error { 2667 l := len(dAtA) 2668 iNdEx := 0 2669 for iNdEx < l { 2670 preIndex := iNdEx 2671 var wire uint64 2672 for shift := uint(0); ; shift += 7 { 2673 if shift >= 64 { 2674 return ErrIntOverflowTx 2675 } 2676 if iNdEx >= l { 2677 return io.ErrUnexpectedEOF 2678 } 2679 b := dAtA[iNdEx] 2680 iNdEx++ 2681 wire |= uint64(b&0x7F) << shift 2682 if b < 0x80 { 2683 break 2684 } 2685 } 2686 fieldNum := int32(wire >> 3) 2687 wireType := int(wire & 0x7) 2688 if wireType == 4 { 2689 return fmt.Errorf("proto: MsgMigrateContractResponse: wiretype end group for non-group") 2690 } 2691 if fieldNum <= 0 { 2692 return fmt.Errorf("proto: MsgMigrateContractResponse: illegal tag %d (wire type %d)", fieldNum, wire) 2693 } 2694 switch fieldNum { 2695 case 1: 2696 if wireType != 2 { 2697 return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) 2698 } 2699 var byteLen int 2700 for shift := uint(0); ; shift += 7 { 2701 if shift >= 64 { 2702 return ErrIntOverflowTx 2703 } 2704 if iNdEx >= l { 2705 return io.ErrUnexpectedEOF 2706 } 2707 b := dAtA[iNdEx] 2708 iNdEx++ 2709 byteLen |= int(b&0x7F) << shift 2710 if b < 0x80 { 2711 break 2712 } 2713 } 2714 if byteLen < 0 { 2715 return ErrInvalidLengthTx 2716 } 2717 postIndex := iNdEx + byteLen 2718 if postIndex < 0 { 2719 return ErrInvalidLengthTx 2720 } 2721 if postIndex > l { 2722 return io.ErrUnexpectedEOF 2723 } 2724 m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...) 2725 if m.Data == nil { 2726 m.Data = []byte{} 2727 } 2728 iNdEx = postIndex 2729 default: 2730 iNdEx = preIndex 2731 skippy, err := skipTx(dAtA[iNdEx:]) 2732 if err != nil { 2733 return err 2734 } 2735 if (skippy < 0) || (iNdEx+skippy) < 0 { 2736 return ErrInvalidLengthTx 2737 } 2738 if (iNdEx + skippy) > l { 2739 return io.ErrUnexpectedEOF 2740 } 2741 iNdEx += skippy 2742 } 2743 } 2744 2745 if iNdEx > l { 2746 return io.ErrUnexpectedEOF 2747 } 2748 return nil 2749 } 2750 2751 func (m *MsgUpdateAdmin) Unmarshal(dAtA []byte) error { 2752 l := len(dAtA) 2753 iNdEx := 0 2754 for iNdEx < l { 2755 preIndex := iNdEx 2756 var wire uint64 2757 for shift := uint(0); ; shift += 7 { 2758 if shift >= 64 { 2759 return ErrIntOverflowTx 2760 } 2761 if iNdEx >= l { 2762 return io.ErrUnexpectedEOF 2763 } 2764 b := dAtA[iNdEx] 2765 iNdEx++ 2766 wire |= uint64(b&0x7F) << shift 2767 if b < 0x80 { 2768 break 2769 } 2770 } 2771 fieldNum := int32(wire >> 3) 2772 wireType := int(wire & 0x7) 2773 if wireType == 4 { 2774 return fmt.Errorf("proto: MsgUpdateAdmin: wiretype end group for non-group") 2775 } 2776 if fieldNum <= 0 { 2777 return fmt.Errorf("proto: MsgUpdateAdmin: illegal tag %d (wire type %d)", fieldNum, wire) 2778 } 2779 switch fieldNum { 2780 case 1: 2781 if wireType != 2 { 2782 return fmt.Errorf("proto: wrong wireType = %d for field Sender", wireType) 2783 } 2784 var stringLen uint64 2785 for shift := uint(0); ; shift += 7 { 2786 if shift >= 64 { 2787 return ErrIntOverflowTx 2788 } 2789 if iNdEx >= l { 2790 return io.ErrUnexpectedEOF 2791 } 2792 b := dAtA[iNdEx] 2793 iNdEx++ 2794 stringLen |= uint64(b&0x7F) << shift 2795 if b < 0x80 { 2796 break 2797 } 2798 } 2799 intStringLen := int(stringLen) 2800 if intStringLen < 0 { 2801 return ErrInvalidLengthTx 2802 } 2803 postIndex := iNdEx + intStringLen 2804 if postIndex < 0 { 2805 return ErrInvalidLengthTx 2806 } 2807 if postIndex > l { 2808 return io.ErrUnexpectedEOF 2809 } 2810 m.Sender = string(dAtA[iNdEx:postIndex]) 2811 iNdEx = postIndex 2812 case 2: 2813 if wireType != 2 { 2814 return fmt.Errorf("proto: wrong wireType = %d for field NewAdmin", wireType) 2815 } 2816 var stringLen uint64 2817 for shift := uint(0); ; shift += 7 { 2818 if shift >= 64 { 2819 return ErrIntOverflowTx 2820 } 2821 if iNdEx >= l { 2822 return io.ErrUnexpectedEOF 2823 } 2824 b := dAtA[iNdEx] 2825 iNdEx++ 2826 stringLen |= uint64(b&0x7F) << shift 2827 if b < 0x80 { 2828 break 2829 } 2830 } 2831 intStringLen := int(stringLen) 2832 if intStringLen < 0 { 2833 return ErrInvalidLengthTx 2834 } 2835 postIndex := iNdEx + intStringLen 2836 if postIndex < 0 { 2837 return ErrInvalidLengthTx 2838 } 2839 if postIndex > l { 2840 return io.ErrUnexpectedEOF 2841 } 2842 m.NewAdmin = string(dAtA[iNdEx:postIndex]) 2843 iNdEx = postIndex 2844 case 3: 2845 if wireType != 2 { 2846 return fmt.Errorf("proto: wrong wireType = %d for field Contract", wireType) 2847 } 2848 var stringLen uint64 2849 for shift := uint(0); ; shift += 7 { 2850 if shift >= 64 { 2851 return ErrIntOverflowTx 2852 } 2853 if iNdEx >= l { 2854 return io.ErrUnexpectedEOF 2855 } 2856 b := dAtA[iNdEx] 2857 iNdEx++ 2858 stringLen |= uint64(b&0x7F) << shift 2859 if b < 0x80 { 2860 break 2861 } 2862 } 2863 intStringLen := int(stringLen) 2864 if intStringLen < 0 { 2865 return ErrInvalidLengthTx 2866 } 2867 postIndex := iNdEx + intStringLen 2868 if postIndex < 0 { 2869 return ErrInvalidLengthTx 2870 } 2871 if postIndex > l { 2872 return io.ErrUnexpectedEOF 2873 } 2874 m.Contract = string(dAtA[iNdEx:postIndex]) 2875 iNdEx = postIndex 2876 default: 2877 iNdEx = preIndex 2878 skippy, err := skipTx(dAtA[iNdEx:]) 2879 if err != nil { 2880 return err 2881 } 2882 if (skippy < 0) || (iNdEx+skippy) < 0 { 2883 return ErrInvalidLengthTx 2884 } 2885 if (iNdEx + skippy) > l { 2886 return io.ErrUnexpectedEOF 2887 } 2888 iNdEx += skippy 2889 } 2890 } 2891 2892 if iNdEx > l { 2893 return io.ErrUnexpectedEOF 2894 } 2895 return nil 2896 } 2897 2898 func (m *MsgUpdateAdminResponse) Unmarshal(dAtA []byte) error { 2899 l := len(dAtA) 2900 iNdEx := 0 2901 for iNdEx < l { 2902 preIndex := iNdEx 2903 var wire uint64 2904 for shift := uint(0); ; shift += 7 { 2905 if shift >= 64 { 2906 return ErrIntOverflowTx 2907 } 2908 if iNdEx >= l { 2909 return io.ErrUnexpectedEOF 2910 } 2911 b := dAtA[iNdEx] 2912 iNdEx++ 2913 wire |= uint64(b&0x7F) << shift 2914 if b < 0x80 { 2915 break 2916 } 2917 } 2918 fieldNum := int32(wire >> 3) 2919 wireType := int(wire & 0x7) 2920 if wireType == 4 { 2921 return fmt.Errorf("proto: MsgUpdateAdminResponse: wiretype end group for non-group") 2922 } 2923 if fieldNum <= 0 { 2924 return fmt.Errorf("proto: MsgUpdateAdminResponse: illegal tag %d (wire type %d)", fieldNum, wire) 2925 } 2926 switch fieldNum { 2927 default: 2928 iNdEx = preIndex 2929 skippy, err := skipTx(dAtA[iNdEx:]) 2930 if err != nil { 2931 return err 2932 } 2933 if (skippy < 0) || (iNdEx+skippy) < 0 { 2934 return ErrInvalidLengthTx 2935 } 2936 if (iNdEx + skippy) > l { 2937 return io.ErrUnexpectedEOF 2938 } 2939 iNdEx += skippy 2940 } 2941 } 2942 2943 if iNdEx > l { 2944 return io.ErrUnexpectedEOF 2945 } 2946 return nil 2947 } 2948 2949 func (m *MsgClearAdmin) Unmarshal(dAtA []byte) error { 2950 l := len(dAtA) 2951 iNdEx := 0 2952 for iNdEx < l { 2953 preIndex := iNdEx 2954 var wire uint64 2955 for shift := uint(0); ; shift += 7 { 2956 if shift >= 64 { 2957 return ErrIntOverflowTx 2958 } 2959 if iNdEx >= l { 2960 return io.ErrUnexpectedEOF 2961 } 2962 b := dAtA[iNdEx] 2963 iNdEx++ 2964 wire |= uint64(b&0x7F) << shift 2965 if b < 0x80 { 2966 break 2967 } 2968 } 2969 fieldNum := int32(wire >> 3) 2970 wireType := int(wire & 0x7) 2971 if wireType == 4 { 2972 return fmt.Errorf("proto: MsgClearAdmin: wiretype end group for non-group") 2973 } 2974 if fieldNum <= 0 { 2975 return fmt.Errorf("proto: MsgClearAdmin: illegal tag %d (wire type %d)", fieldNum, wire) 2976 } 2977 switch fieldNum { 2978 case 1: 2979 if wireType != 2 { 2980 return fmt.Errorf("proto: wrong wireType = %d for field Sender", wireType) 2981 } 2982 var stringLen uint64 2983 for shift := uint(0); ; shift += 7 { 2984 if shift >= 64 { 2985 return ErrIntOverflowTx 2986 } 2987 if iNdEx >= l { 2988 return io.ErrUnexpectedEOF 2989 } 2990 b := dAtA[iNdEx] 2991 iNdEx++ 2992 stringLen |= uint64(b&0x7F) << shift 2993 if b < 0x80 { 2994 break 2995 } 2996 } 2997 intStringLen := int(stringLen) 2998 if intStringLen < 0 { 2999 return ErrInvalidLengthTx 3000 } 3001 postIndex := iNdEx + intStringLen 3002 if postIndex < 0 { 3003 return ErrInvalidLengthTx 3004 } 3005 if postIndex > l { 3006 return io.ErrUnexpectedEOF 3007 } 3008 m.Sender = string(dAtA[iNdEx:postIndex]) 3009 iNdEx = postIndex 3010 case 3: 3011 if wireType != 2 { 3012 return fmt.Errorf("proto: wrong wireType = %d for field Contract", wireType) 3013 } 3014 var stringLen uint64 3015 for shift := uint(0); ; shift += 7 { 3016 if shift >= 64 { 3017 return ErrIntOverflowTx 3018 } 3019 if iNdEx >= l { 3020 return io.ErrUnexpectedEOF 3021 } 3022 b := dAtA[iNdEx] 3023 iNdEx++ 3024 stringLen |= uint64(b&0x7F) << shift 3025 if b < 0x80 { 3026 break 3027 } 3028 } 3029 intStringLen := int(stringLen) 3030 if intStringLen < 0 { 3031 return ErrInvalidLengthTx 3032 } 3033 postIndex := iNdEx + intStringLen 3034 if postIndex < 0 { 3035 return ErrInvalidLengthTx 3036 } 3037 if postIndex > l { 3038 return io.ErrUnexpectedEOF 3039 } 3040 m.Contract = string(dAtA[iNdEx:postIndex]) 3041 iNdEx = postIndex 3042 default: 3043 iNdEx = preIndex 3044 skippy, err := skipTx(dAtA[iNdEx:]) 3045 if err != nil { 3046 return err 3047 } 3048 if (skippy < 0) || (iNdEx+skippy) < 0 { 3049 return ErrInvalidLengthTx 3050 } 3051 if (iNdEx + skippy) > l { 3052 return io.ErrUnexpectedEOF 3053 } 3054 iNdEx += skippy 3055 } 3056 } 3057 3058 if iNdEx > l { 3059 return io.ErrUnexpectedEOF 3060 } 3061 return nil 3062 } 3063 3064 func (m *MsgClearAdminResponse) Unmarshal(dAtA []byte) error { 3065 l := len(dAtA) 3066 iNdEx := 0 3067 for iNdEx < l { 3068 preIndex := iNdEx 3069 var wire uint64 3070 for shift := uint(0); ; shift += 7 { 3071 if shift >= 64 { 3072 return ErrIntOverflowTx 3073 } 3074 if iNdEx >= l { 3075 return io.ErrUnexpectedEOF 3076 } 3077 b := dAtA[iNdEx] 3078 iNdEx++ 3079 wire |= uint64(b&0x7F) << shift 3080 if b < 0x80 { 3081 break 3082 } 3083 } 3084 fieldNum := int32(wire >> 3) 3085 wireType := int(wire & 0x7) 3086 if wireType == 4 { 3087 return fmt.Errorf("proto: MsgClearAdminResponse: wiretype end group for non-group") 3088 } 3089 if fieldNum <= 0 { 3090 return fmt.Errorf("proto: MsgClearAdminResponse: illegal tag %d (wire type %d)", fieldNum, wire) 3091 } 3092 switch fieldNum { 3093 default: 3094 iNdEx = preIndex 3095 skippy, err := skipTx(dAtA[iNdEx:]) 3096 if err != nil { 3097 return err 3098 } 3099 if (skippy < 0) || (iNdEx+skippy) < 0 { 3100 return ErrInvalidLengthTx 3101 } 3102 if (iNdEx + skippy) > l { 3103 return io.ErrUnexpectedEOF 3104 } 3105 iNdEx += skippy 3106 } 3107 } 3108 3109 if iNdEx > l { 3110 return io.ErrUnexpectedEOF 3111 } 3112 return nil 3113 } 3114 3115 func skipTx(dAtA []byte) (n int, err error) { 3116 l := len(dAtA) 3117 iNdEx := 0 3118 depth := 0 3119 for iNdEx < l { 3120 var wire uint64 3121 for shift := uint(0); ; shift += 7 { 3122 if shift >= 64 { 3123 return 0, ErrIntOverflowTx 3124 } 3125 if iNdEx >= l { 3126 return 0, io.ErrUnexpectedEOF 3127 } 3128 b := dAtA[iNdEx] 3129 iNdEx++ 3130 wire |= (uint64(b) & 0x7F) << shift 3131 if b < 0x80 { 3132 break 3133 } 3134 } 3135 wireType := int(wire & 0x7) 3136 switch wireType { 3137 case 0: 3138 for shift := uint(0); ; shift += 7 { 3139 if shift >= 64 { 3140 return 0, ErrIntOverflowTx 3141 } 3142 if iNdEx >= l { 3143 return 0, io.ErrUnexpectedEOF 3144 } 3145 iNdEx++ 3146 if dAtA[iNdEx-1] < 0x80 { 3147 break 3148 } 3149 } 3150 case 1: 3151 iNdEx += 8 3152 case 2: 3153 var length int 3154 for shift := uint(0); ; shift += 7 { 3155 if shift >= 64 { 3156 return 0, ErrIntOverflowTx 3157 } 3158 if iNdEx >= l { 3159 return 0, io.ErrUnexpectedEOF 3160 } 3161 b := dAtA[iNdEx] 3162 iNdEx++ 3163 length |= (int(b) & 0x7F) << shift 3164 if b < 0x80 { 3165 break 3166 } 3167 } 3168 if length < 0 { 3169 return 0, ErrInvalidLengthTx 3170 } 3171 iNdEx += length 3172 case 3: 3173 depth++ 3174 case 4: 3175 if depth == 0 { 3176 return 0, ErrUnexpectedEndOfGroupTx 3177 } 3178 depth-- 3179 case 5: 3180 iNdEx += 4 3181 default: 3182 return 0, fmt.Errorf("proto: illegal wireType %d", wireType) 3183 } 3184 if iNdEx < 0 { 3185 return 0, ErrInvalidLengthTx 3186 } 3187 if depth == 0 { 3188 return iNdEx, nil 3189 } 3190 } 3191 return 0, io.ErrUnexpectedEOF 3192 } 3193 3194 var ( 3195 ErrInvalidLengthTx = fmt.Errorf("proto: negative length found during unmarshaling") 3196 ErrIntOverflowTx = fmt.Errorf("proto: integer overflow") 3197 ErrUnexpectedEndOfGroupTx = fmt.Errorf("proto: unexpected end of group") 3198 )