github.com/InjectiveLabs/sdk-go@v1.53.0/chain/wasmx/types/genesis.pb.go (about) 1 // Code generated by protoc-gen-gogo. DO NOT EDIT. 2 // source: injective/wasmx/v1/genesis.proto 3 4 package types 5 6 import ( 7 fmt "fmt" 8 _ "github.com/cosmos/gogoproto/gogoproto" 9 proto "github.com/cosmos/gogoproto/proto" 10 io "io" 11 math "math" 12 math_bits "math/bits" 13 ) 14 15 // Reference imports to suppress errors if they are not otherwise used. 16 var _ = proto.Marshal 17 var _ = fmt.Errorf 18 var _ = math.Inf 19 20 // This is a compile-time assertion to ensure that this generated file 21 // is compatible with the proto package it is being compiled against. 22 // A compilation error at this line likely means your copy of the 23 // proto package needs to be updated. 24 const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package 25 26 type RegisteredContractWithAddress struct { 27 Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` 28 RegisteredContract *RegisteredContract `protobuf:"bytes,2,opt,name=registered_contract,json=registeredContract,proto3" json:"registered_contract,omitempty"` 29 } 30 31 func (m *RegisteredContractWithAddress) Reset() { *m = RegisteredContractWithAddress{} } 32 func (m *RegisteredContractWithAddress) String() string { return proto.CompactTextString(m) } 33 func (*RegisteredContractWithAddress) ProtoMessage() {} 34 func (*RegisteredContractWithAddress) Descriptor() ([]byte, []int) { 35 return fileDescriptor_8642938473ffc6e5, []int{0} 36 } 37 func (m *RegisteredContractWithAddress) XXX_Unmarshal(b []byte) error { 38 return m.Unmarshal(b) 39 } 40 func (m *RegisteredContractWithAddress) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 41 if deterministic { 42 return xxx_messageInfo_RegisteredContractWithAddress.Marshal(b, m, deterministic) 43 } else { 44 b = b[:cap(b)] 45 n, err := m.MarshalToSizedBuffer(b) 46 if err != nil { 47 return nil, err 48 } 49 return b[:n], nil 50 } 51 } 52 func (m *RegisteredContractWithAddress) XXX_Merge(src proto.Message) { 53 xxx_messageInfo_RegisteredContractWithAddress.Merge(m, src) 54 } 55 func (m *RegisteredContractWithAddress) XXX_Size() int { 56 return m.Size() 57 } 58 func (m *RegisteredContractWithAddress) XXX_DiscardUnknown() { 59 xxx_messageInfo_RegisteredContractWithAddress.DiscardUnknown(m) 60 } 61 62 var xxx_messageInfo_RegisteredContractWithAddress proto.InternalMessageInfo 63 64 func (m *RegisteredContractWithAddress) GetAddress() string { 65 if m != nil { 66 return m.Address 67 } 68 return "" 69 } 70 71 func (m *RegisteredContractWithAddress) GetRegisteredContract() *RegisteredContract { 72 if m != nil { 73 return m.RegisteredContract 74 } 75 return nil 76 } 77 78 // GenesisState defines the wasmx module's genesis state. 79 type GenesisState struct { 80 // params defines all the parameters of related to wasmx. 81 Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"` 82 // registered_contracts is an array containing the genesis registered 83 // contracts 84 RegisteredContracts []RegisteredContractWithAddress `protobuf:"bytes,2,rep,name=registered_contracts,json=registeredContracts,proto3" json:"registered_contracts"` 85 } 86 87 func (m *GenesisState) Reset() { *m = GenesisState{} } 88 func (m *GenesisState) String() string { return proto.CompactTextString(m) } 89 func (*GenesisState) ProtoMessage() {} 90 func (*GenesisState) Descriptor() ([]byte, []int) { 91 return fileDescriptor_8642938473ffc6e5, []int{1} 92 } 93 func (m *GenesisState) XXX_Unmarshal(b []byte) error { 94 return m.Unmarshal(b) 95 } 96 func (m *GenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 97 if deterministic { 98 return xxx_messageInfo_GenesisState.Marshal(b, m, deterministic) 99 } else { 100 b = b[:cap(b)] 101 n, err := m.MarshalToSizedBuffer(b) 102 if err != nil { 103 return nil, err 104 } 105 return b[:n], nil 106 } 107 } 108 func (m *GenesisState) XXX_Merge(src proto.Message) { 109 xxx_messageInfo_GenesisState.Merge(m, src) 110 } 111 func (m *GenesisState) XXX_Size() int { 112 return m.Size() 113 } 114 func (m *GenesisState) XXX_DiscardUnknown() { 115 xxx_messageInfo_GenesisState.DiscardUnknown(m) 116 } 117 118 var xxx_messageInfo_GenesisState proto.InternalMessageInfo 119 120 func (m *GenesisState) GetParams() Params { 121 if m != nil { 122 return m.Params 123 } 124 return Params{} 125 } 126 127 func (m *GenesisState) GetRegisteredContracts() []RegisteredContractWithAddress { 128 if m != nil { 129 return m.RegisteredContracts 130 } 131 return nil 132 } 133 134 func init() { 135 proto.RegisterType((*RegisteredContractWithAddress)(nil), "injective.wasmx.v1.RegisteredContractWithAddress") 136 proto.RegisterType((*GenesisState)(nil), "injective.wasmx.v1.GenesisState") 137 } 138 139 func init() { proto.RegisterFile("injective/wasmx/v1/genesis.proto", fileDescriptor_8642938473ffc6e5) } 140 141 var fileDescriptor_8642938473ffc6e5 = []byte{ 142 // 319 bytes of a gzipped FileDescriptorProto 143 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x51, 0xb1, 0x4e, 0xc3, 0x30, 144 0x10, 0x8d, 0x0b, 0x2a, 0xc2, 0x65, 0x72, 0x3b, 0x44, 0x95, 0x30, 0x51, 0x07, 0xd4, 0x05, 0x5b, 145 0x2d, 0x0b, 0x2b, 0x65, 0x40, 0x08, 0x06, 0x14, 0x86, 0x4a, 0x2c, 0xc8, 0x4d, 0x4e, 0xa9, 0x2b, 146 0x12, 0x57, 0xb6, 0x5b, 0xe0, 0x2f, 0x10, 0xdf, 0xc2, 0x47, 0x74, 0xec, 0xc8, 0x84, 0x50, 0xf3, 147 0x23, 0x88, 0x24, 0x8d, 0x2a, 0x25, 0x03, 0xdb, 0xbb, 0xf3, 0x7b, 0xf7, 0x9e, 0xef, 0xb0, 0x27, 148 0x93, 0x19, 0x04, 0x56, 0x2e, 0x81, 0xbf, 0x08, 0x13, 0xbf, 0xf2, 0xe5, 0x80, 0x47, 0x90, 0x80, 149 0x91, 0x86, 0xcd, 0xb5, 0xb2, 0x8a, 0x90, 0x92, 0xc1, 0x32, 0x06, 0x5b, 0x0e, 0xba, 0xb4, 0x46, 150 0x95, 0x3f, 0x66, 0x9a, 0x6e, 0x27, 0x52, 0x91, 0xca, 0x20, 0xff, 0x43, 0x79, 0xb7, 0xf7, 0x81, 151 0xf0, 0xb1, 0x0f, 0x91, 0x34, 0x16, 0x34, 0x84, 0x57, 0x2a, 0xb1, 0x5a, 0x04, 0x76, 0x2c, 0xed, 152 0xf4, 0x32, 0x0c, 0x35, 0x18, 0x43, 0x5c, 0x7c, 0x20, 0x72, 0xe8, 0x22, 0x0f, 0xf5, 0x0f, 0xfd, 153 0x6d, 0x49, 0xc6, 0xb8, 0xad, 0x4b, 0xe9, 0x53, 0x50, 0x68, 0xdd, 0x86, 0x87, 0xfa, 0xad, 0xe1, 154 0x29, 0xab, 0x66, 0x64, 0x55, 0x27, 0x9f, 0xe8, 0x4a, 0xaf, 0xf7, 0x89, 0xf0, 0xd1, 0x75, 0xfe, 155 0xe1, 0x07, 0x2b, 0x2c, 0x90, 0x0b, 0xdc, 0x9c, 0x0b, 0x2d, 0xe2, 0x3c, 0x42, 0x6b, 0xd8, 0xad, 156 0x1b, 0x7e, 0x9f, 0x31, 0x46, 0xfb, 0xab, 0xef, 0x13, 0xc7, 0x2f, 0xf8, 0x64, 0x86, 0x3b, 0x35, 157 0x19, 0x8d, 0xdb, 0xf0, 0xf6, 0xfa, 0xad, 0xe1, 0xe0, 0x7f, 0x21, 0x77, 0xd6, 0x51, 0x8c, 0x6f, 158 0x57, 0x53, 0x9b, 0x11, 0xac, 0x36, 0x14, 0xad, 0x37, 0x14, 0xfd, 0x6c, 0x28, 0x7a, 0x4f, 0xa9, 159 0xb3, 0x4e, 0xa9, 0xf3, 0x95, 0x52, 0xe7, 0xf1, 0x36, 0x92, 0x76, 0xba, 0x98, 0xb0, 0x40, 0xc5, 160 0xfc, 0x66, 0xeb, 0x78, 0x27, 0x26, 0x86, 0x97, 0xfe, 0x67, 0x81, 0xd2, 0xb0, 0x5b, 0x4e, 0x85, 161 0x4c, 0x78, 0xac, 0xc2, 0xc5, 0x33, 0x98, 0xe2, 0xa2, 0xf6, 0x6d, 0x0e, 0x66, 0xd2, 0xcc, 0x2e, 162 0x77, 0xfe, 0x1b, 0x00, 0x00, 0xff, 0xff, 0x76, 0xe6, 0x73, 0x45, 0x27, 0x02, 0x00, 0x00, 163 } 164 165 func (m *RegisteredContractWithAddress) Marshal() (dAtA []byte, err error) { 166 size := m.Size() 167 dAtA = make([]byte, size) 168 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 169 if err != nil { 170 return nil, err 171 } 172 return dAtA[:n], nil 173 } 174 175 func (m *RegisteredContractWithAddress) MarshalTo(dAtA []byte) (int, error) { 176 size := m.Size() 177 return m.MarshalToSizedBuffer(dAtA[:size]) 178 } 179 180 func (m *RegisteredContractWithAddress) MarshalToSizedBuffer(dAtA []byte) (int, error) { 181 i := len(dAtA) 182 _ = i 183 var l int 184 _ = l 185 if m.RegisteredContract != nil { 186 { 187 size, err := m.RegisteredContract.MarshalToSizedBuffer(dAtA[:i]) 188 if err != nil { 189 return 0, err 190 } 191 i -= size 192 i = encodeVarintGenesis(dAtA, i, uint64(size)) 193 } 194 i-- 195 dAtA[i] = 0x12 196 } 197 if len(m.Address) > 0 { 198 i -= len(m.Address) 199 copy(dAtA[i:], m.Address) 200 i = encodeVarintGenesis(dAtA, i, uint64(len(m.Address))) 201 i-- 202 dAtA[i] = 0xa 203 } 204 return len(dAtA) - i, nil 205 } 206 207 func (m *GenesisState) Marshal() (dAtA []byte, err error) { 208 size := m.Size() 209 dAtA = make([]byte, size) 210 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 211 if err != nil { 212 return nil, err 213 } 214 return dAtA[:n], nil 215 } 216 217 func (m *GenesisState) MarshalTo(dAtA []byte) (int, error) { 218 size := m.Size() 219 return m.MarshalToSizedBuffer(dAtA[:size]) 220 } 221 222 func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) { 223 i := len(dAtA) 224 _ = i 225 var l int 226 _ = l 227 if len(m.RegisteredContracts) > 0 { 228 for iNdEx := len(m.RegisteredContracts) - 1; iNdEx >= 0; iNdEx-- { 229 { 230 size, err := m.RegisteredContracts[iNdEx].MarshalToSizedBuffer(dAtA[:i]) 231 if err != nil { 232 return 0, err 233 } 234 i -= size 235 i = encodeVarintGenesis(dAtA, i, uint64(size)) 236 } 237 i-- 238 dAtA[i] = 0x12 239 } 240 } 241 { 242 size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) 243 if err != nil { 244 return 0, err 245 } 246 i -= size 247 i = encodeVarintGenesis(dAtA, i, uint64(size)) 248 } 249 i-- 250 dAtA[i] = 0xa 251 return len(dAtA) - i, nil 252 } 253 254 func encodeVarintGenesis(dAtA []byte, offset int, v uint64) int { 255 offset -= sovGenesis(v) 256 base := offset 257 for v >= 1<<7 { 258 dAtA[offset] = uint8(v&0x7f | 0x80) 259 v >>= 7 260 offset++ 261 } 262 dAtA[offset] = uint8(v) 263 return base 264 } 265 func (m *RegisteredContractWithAddress) Size() (n int) { 266 if m == nil { 267 return 0 268 } 269 var l int 270 _ = l 271 l = len(m.Address) 272 if l > 0 { 273 n += 1 + l + sovGenesis(uint64(l)) 274 } 275 if m.RegisteredContract != nil { 276 l = m.RegisteredContract.Size() 277 n += 1 + l + sovGenesis(uint64(l)) 278 } 279 return n 280 } 281 282 func (m *GenesisState) Size() (n int) { 283 if m == nil { 284 return 0 285 } 286 var l int 287 _ = l 288 l = m.Params.Size() 289 n += 1 + l + sovGenesis(uint64(l)) 290 if len(m.RegisteredContracts) > 0 { 291 for _, e := range m.RegisteredContracts { 292 l = e.Size() 293 n += 1 + l + sovGenesis(uint64(l)) 294 } 295 } 296 return n 297 } 298 299 func sovGenesis(x uint64) (n int) { 300 return (math_bits.Len64(x|1) + 6) / 7 301 } 302 func sozGenesis(x uint64) (n int) { 303 return sovGenesis(uint64((x << 1) ^ uint64((int64(x) >> 63)))) 304 } 305 func (m *RegisteredContractWithAddress) Unmarshal(dAtA []byte) error { 306 l := len(dAtA) 307 iNdEx := 0 308 for iNdEx < l { 309 preIndex := iNdEx 310 var wire uint64 311 for shift := uint(0); ; shift += 7 { 312 if shift >= 64 { 313 return ErrIntOverflowGenesis 314 } 315 if iNdEx >= l { 316 return io.ErrUnexpectedEOF 317 } 318 b := dAtA[iNdEx] 319 iNdEx++ 320 wire |= uint64(b&0x7F) << shift 321 if b < 0x80 { 322 break 323 } 324 } 325 fieldNum := int32(wire >> 3) 326 wireType := int(wire & 0x7) 327 if wireType == 4 { 328 return fmt.Errorf("proto: RegisteredContractWithAddress: wiretype end group for non-group") 329 } 330 if fieldNum <= 0 { 331 return fmt.Errorf("proto: RegisteredContractWithAddress: illegal tag %d (wire type %d)", fieldNum, wire) 332 } 333 switch fieldNum { 334 case 1: 335 if wireType != 2 { 336 return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) 337 } 338 var stringLen uint64 339 for shift := uint(0); ; shift += 7 { 340 if shift >= 64 { 341 return ErrIntOverflowGenesis 342 } 343 if iNdEx >= l { 344 return io.ErrUnexpectedEOF 345 } 346 b := dAtA[iNdEx] 347 iNdEx++ 348 stringLen |= uint64(b&0x7F) << shift 349 if b < 0x80 { 350 break 351 } 352 } 353 intStringLen := int(stringLen) 354 if intStringLen < 0 { 355 return ErrInvalidLengthGenesis 356 } 357 postIndex := iNdEx + intStringLen 358 if postIndex < 0 { 359 return ErrInvalidLengthGenesis 360 } 361 if postIndex > l { 362 return io.ErrUnexpectedEOF 363 } 364 m.Address = string(dAtA[iNdEx:postIndex]) 365 iNdEx = postIndex 366 case 2: 367 if wireType != 2 { 368 return fmt.Errorf("proto: wrong wireType = %d for field RegisteredContract", wireType) 369 } 370 var msglen int 371 for shift := uint(0); ; shift += 7 { 372 if shift >= 64 { 373 return ErrIntOverflowGenesis 374 } 375 if iNdEx >= l { 376 return io.ErrUnexpectedEOF 377 } 378 b := dAtA[iNdEx] 379 iNdEx++ 380 msglen |= int(b&0x7F) << shift 381 if b < 0x80 { 382 break 383 } 384 } 385 if msglen < 0 { 386 return ErrInvalidLengthGenesis 387 } 388 postIndex := iNdEx + msglen 389 if postIndex < 0 { 390 return ErrInvalidLengthGenesis 391 } 392 if postIndex > l { 393 return io.ErrUnexpectedEOF 394 } 395 if m.RegisteredContract == nil { 396 m.RegisteredContract = &RegisteredContract{} 397 } 398 if err := m.RegisteredContract.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 399 return err 400 } 401 iNdEx = postIndex 402 default: 403 iNdEx = preIndex 404 skippy, err := skipGenesis(dAtA[iNdEx:]) 405 if err != nil { 406 return err 407 } 408 if (skippy < 0) || (iNdEx+skippy) < 0 { 409 return ErrInvalidLengthGenesis 410 } 411 if (iNdEx + skippy) > l { 412 return io.ErrUnexpectedEOF 413 } 414 iNdEx += skippy 415 } 416 } 417 418 if iNdEx > l { 419 return io.ErrUnexpectedEOF 420 } 421 return nil 422 } 423 func (m *GenesisState) Unmarshal(dAtA []byte) error { 424 l := len(dAtA) 425 iNdEx := 0 426 for iNdEx < l { 427 preIndex := iNdEx 428 var wire uint64 429 for shift := uint(0); ; shift += 7 { 430 if shift >= 64 { 431 return ErrIntOverflowGenesis 432 } 433 if iNdEx >= l { 434 return io.ErrUnexpectedEOF 435 } 436 b := dAtA[iNdEx] 437 iNdEx++ 438 wire |= uint64(b&0x7F) << shift 439 if b < 0x80 { 440 break 441 } 442 } 443 fieldNum := int32(wire >> 3) 444 wireType := int(wire & 0x7) 445 if wireType == 4 { 446 return fmt.Errorf("proto: GenesisState: wiretype end group for non-group") 447 } 448 if fieldNum <= 0 { 449 return fmt.Errorf("proto: GenesisState: illegal tag %d (wire type %d)", fieldNum, wire) 450 } 451 switch fieldNum { 452 case 1: 453 if wireType != 2 { 454 return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) 455 } 456 var msglen int 457 for shift := uint(0); ; shift += 7 { 458 if shift >= 64 { 459 return ErrIntOverflowGenesis 460 } 461 if iNdEx >= l { 462 return io.ErrUnexpectedEOF 463 } 464 b := dAtA[iNdEx] 465 iNdEx++ 466 msglen |= int(b&0x7F) << shift 467 if b < 0x80 { 468 break 469 } 470 } 471 if msglen < 0 { 472 return ErrInvalidLengthGenesis 473 } 474 postIndex := iNdEx + msglen 475 if postIndex < 0 { 476 return ErrInvalidLengthGenesis 477 } 478 if postIndex > l { 479 return io.ErrUnexpectedEOF 480 } 481 if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 482 return err 483 } 484 iNdEx = postIndex 485 case 2: 486 if wireType != 2 { 487 return fmt.Errorf("proto: wrong wireType = %d for field RegisteredContracts", wireType) 488 } 489 var msglen int 490 for shift := uint(0); ; shift += 7 { 491 if shift >= 64 { 492 return ErrIntOverflowGenesis 493 } 494 if iNdEx >= l { 495 return io.ErrUnexpectedEOF 496 } 497 b := dAtA[iNdEx] 498 iNdEx++ 499 msglen |= int(b&0x7F) << shift 500 if b < 0x80 { 501 break 502 } 503 } 504 if msglen < 0 { 505 return ErrInvalidLengthGenesis 506 } 507 postIndex := iNdEx + msglen 508 if postIndex < 0 { 509 return ErrInvalidLengthGenesis 510 } 511 if postIndex > l { 512 return io.ErrUnexpectedEOF 513 } 514 m.RegisteredContracts = append(m.RegisteredContracts, RegisteredContractWithAddress{}) 515 if err := m.RegisteredContracts[len(m.RegisteredContracts)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 516 return err 517 } 518 iNdEx = postIndex 519 default: 520 iNdEx = preIndex 521 skippy, err := skipGenesis(dAtA[iNdEx:]) 522 if err != nil { 523 return err 524 } 525 if (skippy < 0) || (iNdEx+skippy) < 0 { 526 return ErrInvalidLengthGenesis 527 } 528 if (iNdEx + skippy) > l { 529 return io.ErrUnexpectedEOF 530 } 531 iNdEx += skippy 532 } 533 } 534 535 if iNdEx > l { 536 return io.ErrUnexpectedEOF 537 } 538 return nil 539 } 540 func skipGenesis(dAtA []byte) (n int, err error) { 541 l := len(dAtA) 542 iNdEx := 0 543 depth := 0 544 for iNdEx < l { 545 var wire uint64 546 for shift := uint(0); ; shift += 7 { 547 if shift >= 64 { 548 return 0, ErrIntOverflowGenesis 549 } 550 if iNdEx >= l { 551 return 0, io.ErrUnexpectedEOF 552 } 553 b := dAtA[iNdEx] 554 iNdEx++ 555 wire |= (uint64(b) & 0x7F) << shift 556 if b < 0x80 { 557 break 558 } 559 } 560 wireType := int(wire & 0x7) 561 switch wireType { 562 case 0: 563 for shift := uint(0); ; shift += 7 { 564 if shift >= 64 { 565 return 0, ErrIntOverflowGenesis 566 } 567 if iNdEx >= l { 568 return 0, io.ErrUnexpectedEOF 569 } 570 iNdEx++ 571 if dAtA[iNdEx-1] < 0x80 { 572 break 573 } 574 } 575 case 1: 576 iNdEx += 8 577 case 2: 578 var length int 579 for shift := uint(0); ; shift += 7 { 580 if shift >= 64 { 581 return 0, ErrIntOverflowGenesis 582 } 583 if iNdEx >= l { 584 return 0, io.ErrUnexpectedEOF 585 } 586 b := dAtA[iNdEx] 587 iNdEx++ 588 length |= (int(b) & 0x7F) << shift 589 if b < 0x80 { 590 break 591 } 592 } 593 if length < 0 { 594 return 0, ErrInvalidLengthGenesis 595 } 596 iNdEx += length 597 case 3: 598 depth++ 599 case 4: 600 if depth == 0 { 601 return 0, ErrUnexpectedEndOfGroupGenesis 602 } 603 depth-- 604 case 5: 605 iNdEx += 4 606 default: 607 return 0, fmt.Errorf("proto: illegal wireType %d", wireType) 608 } 609 if iNdEx < 0 { 610 return 0, ErrInvalidLengthGenesis 611 } 612 if depth == 0 { 613 return iNdEx, nil 614 } 615 } 616 return 0, io.ErrUnexpectedEOF 617 } 618 619 var ( 620 ErrInvalidLengthGenesis = fmt.Errorf("proto: negative length found during unmarshaling") 621 ErrIntOverflowGenesis = fmt.Errorf("proto: integer overflow") 622 ErrUnexpectedEndOfGroupGenesis = fmt.Errorf("proto: unexpected end of group") 623 )