github.com/InjectiveLabs/sdk-go@v1.53.0/chain/wasmx/types/events.pb.go (about) 1 // Code generated by protoc-gen-gogo. DO NOT EDIT. 2 // source: injective/wasmx/v1/events.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 EventContractExecution struct { 27 ContractAddress string `protobuf:"bytes,1,opt,name=contract_address,json=contractAddress,proto3" json:"contract_address,omitempty"` 28 Response []byte `protobuf:"bytes,2,opt,name=response,proto3" json:"response,omitempty"` 29 OtherError string `protobuf:"bytes,3,opt,name=other_error,json=otherError,proto3" json:"other_error,omitempty"` 30 ExecutionError string `protobuf:"bytes,4,opt,name=execution_error,json=executionError,proto3" json:"execution_error,omitempty"` 31 } 32 33 func (m *EventContractExecution) Reset() { *m = EventContractExecution{} } 34 func (m *EventContractExecution) String() string { return proto.CompactTextString(m) } 35 func (*EventContractExecution) ProtoMessage() {} 36 func (*EventContractExecution) Descriptor() ([]byte, []int) { 37 return fileDescriptor_f2ba06c5f04cb490, []int{0} 38 } 39 func (m *EventContractExecution) XXX_Unmarshal(b []byte) error { 40 return m.Unmarshal(b) 41 } 42 func (m *EventContractExecution) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 43 if deterministic { 44 return xxx_messageInfo_EventContractExecution.Marshal(b, m, deterministic) 45 } else { 46 b = b[:cap(b)] 47 n, err := m.MarshalToSizedBuffer(b) 48 if err != nil { 49 return nil, err 50 } 51 return b[:n], nil 52 } 53 } 54 func (m *EventContractExecution) XXX_Merge(src proto.Message) { 55 xxx_messageInfo_EventContractExecution.Merge(m, src) 56 } 57 func (m *EventContractExecution) XXX_Size() int { 58 return m.Size() 59 } 60 func (m *EventContractExecution) XXX_DiscardUnknown() { 61 xxx_messageInfo_EventContractExecution.DiscardUnknown(m) 62 } 63 64 var xxx_messageInfo_EventContractExecution proto.InternalMessageInfo 65 66 func (m *EventContractExecution) GetContractAddress() string { 67 if m != nil { 68 return m.ContractAddress 69 } 70 return "" 71 } 72 73 func (m *EventContractExecution) GetResponse() []byte { 74 if m != nil { 75 return m.Response 76 } 77 return nil 78 } 79 80 func (m *EventContractExecution) GetOtherError() string { 81 if m != nil { 82 return m.OtherError 83 } 84 return "" 85 } 86 87 func (m *EventContractExecution) GetExecutionError() string { 88 if m != nil { 89 return m.ExecutionError 90 } 91 return "" 92 } 93 94 type EventContractRegistered struct { 95 ContractAddress string `protobuf:"bytes,1,opt,name=contract_address,json=contractAddress,proto3" json:"contract_address,omitempty"` 96 GasPrice uint64 `protobuf:"varint,3,opt,name=gas_price,json=gasPrice,proto3" json:"gas_price,omitempty"` 97 ShouldPinContract bool `protobuf:"varint,4,opt,name=should_pin_contract,json=shouldPinContract,proto3" json:"should_pin_contract,omitempty"` 98 IsMigrationAllowed bool `protobuf:"varint,5,opt,name=is_migration_allowed,json=isMigrationAllowed,proto3" json:"is_migration_allowed,omitempty"` 99 CodeId uint64 `protobuf:"varint,6,opt,name=code_id,json=codeId,proto3" json:"code_id,omitempty"` 100 AdminAddress string `protobuf:"bytes,7,opt,name=admin_address,json=adminAddress,proto3" json:"admin_address,omitempty"` 101 GranterAddress string `protobuf:"bytes,8,opt,name=granter_address,json=granterAddress,proto3" json:"granter_address,omitempty"` 102 FundingMode FundingMode `protobuf:"varint,9,opt,name=funding_mode,json=fundingMode,proto3,enum=injective.wasmx.v1.FundingMode" json:"funding_mode,omitempty"` 103 } 104 105 func (m *EventContractRegistered) Reset() { *m = EventContractRegistered{} } 106 func (m *EventContractRegistered) String() string { return proto.CompactTextString(m) } 107 func (*EventContractRegistered) ProtoMessage() {} 108 func (*EventContractRegistered) Descriptor() ([]byte, []int) { 109 return fileDescriptor_f2ba06c5f04cb490, []int{1} 110 } 111 func (m *EventContractRegistered) XXX_Unmarshal(b []byte) error { 112 return m.Unmarshal(b) 113 } 114 func (m *EventContractRegistered) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 115 if deterministic { 116 return xxx_messageInfo_EventContractRegistered.Marshal(b, m, deterministic) 117 } else { 118 b = b[:cap(b)] 119 n, err := m.MarshalToSizedBuffer(b) 120 if err != nil { 121 return nil, err 122 } 123 return b[:n], nil 124 } 125 } 126 func (m *EventContractRegistered) XXX_Merge(src proto.Message) { 127 xxx_messageInfo_EventContractRegistered.Merge(m, src) 128 } 129 func (m *EventContractRegistered) XXX_Size() int { 130 return m.Size() 131 } 132 func (m *EventContractRegistered) XXX_DiscardUnknown() { 133 xxx_messageInfo_EventContractRegistered.DiscardUnknown(m) 134 } 135 136 var xxx_messageInfo_EventContractRegistered proto.InternalMessageInfo 137 138 func (m *EventContractRegistered) GetContractAddress() string { 139 if m != nil { 140 return m.ContractAddress 141 } 142 return "" 143 } 144 145 func (m *EventContractRegistered) GetGasPrice() uint64 { 146 if m != nil { 147 return m.GasPrice 148 } 149 return 0 150 } 151 152 func (m *EventContractRegistered) GetShouldPinContract() bool { 153 if m != nil { 154 return m.ShouldPinContract 155 } 156 return false 157 } 158 159 func (m *EventContractRegistered) GetIsMigrationAllowed() bool { 160 if m != nil { 161 return m.IsMigrationAllowed 162 } 163 return false 164 } 165 166 func (m *EventContractRegistered) GetCodeId() uint64 { 167 if m != nil { 168 return m.CodeId 169 } 170 return 0 171 } 172 173 func (m *EventContractRegistered) GetAdminAddress() string { 174 if m != nil { 175 return m.AdminAddress 176 } 177 return "" 178 } 179 180 func (m *EventContractRegistered) GetGranterAddress() string { 181 if m != nil { 182 return m.GranterAddress 183 } 184 return "" 185 } 186 187 func (m *EventContractRegistered) GetFundingMode() FundingMode { 188 if m != nil { 189 return m.FundingMode 190 } 191 return FundingMode_Unspecified 192 } 193 194 type EventContractDeregistered struct { 195 ContractAddress string `protobuf:"bytes,1,opt,name=contract_address,json=contractAddress,proto3" json:"contract_address,omitempty"` 196 } 197 198 func (m *EventContractDeregistered) Reset() { *m = EventContractDeregistered{} } 199 func (m *EventContractDeregistered) String() string { return proto.CompactTextString(m) } 200 func (*EventContractDeregistered) ProtoMessage() {} 201 func (*EventContractDeregistered) Descriptor() ([]byte, []int) { 202 return fileDescriptor_f2ba06c5f04cb490, []int{2} 203 } 204 func (m *EventContractDeregistered) XXX_Unmarshal(b []byte) error { 205 return m.Unmarshal(b) 206 } 207 func (m *EventContractDeregistered) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 208 if deterministic { 209 return xxx_messageInfo_EventContractDeregistered.Marshal(b, m, deterministic) 210 } else { 211 b = b[:cap(b)] 212 n, err := m.MarshalToSizedBuffer(b) 213 if err != nil { 214 return nil, err 215 } 216 return b[:n], nil 217 } 218 } 219 func (m *EventContractDeregistered) XXX_Merge(src proto.Message) { 220 xxx_messageInfo_EventContractDeregistered.Merge(m, src) 221 } 222 func (m *EventContractDeregistered) XXX_Size() int { 223 return m.Size() 224 } 225 func (m *EventContractDeregistered) XXX_DiscardUnknown() { 226 xxx_messageInfo_EventContractDeregistered.DiscardUnknown(m) 227 } 228 229 var xxx_messageInfo_EventContractDeregistered proto.InternalMessageInfo 230 231 func (m *EventContractDeregistered) GetContractAddress() string { 232 if m != nil { 233 return m.ContractAddress 234 } 235 return "" 236 } 237 238 func init() { 239 proto.RegisterType((*EventContractExecution)(nil), "injective.wasmx.v1.EventContractExecution") 240 proto.RegisterType((*EventContractRegistered)(nil), "injective.wasmx.v1.EventContractRegistered") 241 proto.RegisterType((*EventContractDeregistered)(nil), "injective.wasmx.v1.EventContractDeregistered") 242 } 243 244 func init() { proto.RegisterFile("injective/wasmx/v1/events.proto", fileDescriptor_f2ba06c5f04cb490) } 245 246 var fileDescriptor_f2ba06c5f04cb490 = []byte{ 247 // 478 bytes of a gzipped FileDescriptorProto 248 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x92, 0xcf, 0x6e, 0xd3, 0x4c, 249 0x14, 0xc5, 0xe3, 0x7e, 0xfd, 0xd2, 0x64, 0x1a, 0x1a, 0x18, 0x2a, 0x6a, 0x82, 0xe4, 0x84, 0xb0, 250 0x68, 0x58, 0x60, 0x53, 0x78, 0x82, 0x16, 0x52, 0xa9, 0x82, 0x4a, 0x95, 0x97, 0x6c, 0xac, 0x89, 251 0xe7, 0xd6, 0x19, 0x64, 0xcf, 0xb5, 0x66, 0xc6, 0x69, 0x79, 0x0b, 0x5e, 0x83, 0x37, 0x61, 0xd9, 252 0x25, 0x4b, 0x94, 0xec, 0x79, 0x06, 0xe4, 0xf1, 0x1f, 0xa8, 0xe8, 0x06, 0x76, 0x73, 0xcf, 0x39, 253 0x77, 0xee, 0x4f, 0x57, 0x97, 0x8c, 0x85, 0xfc, 0x08, 0xb1, 0x11, 0x2b, 0x08, 0xae, 0x98, 0xce, 254 0xae, 0x83, 0xd5, 0x51, 0x00, 0x2b, 0x90, 0x46, 0xfb, 0xb9, 0x42, 0x83, 0x94, 0xb6, 0x01, 0xdf, 255 0x06, 0xfc, 0xd5, 0xd1, 0xc8, 0xbb, 0xa3, 0xa9, 0x32, 0x6d, 0xcf, 0xe8, 0xe9, 0x1d, 0x7e, 0xae, 256 0x30, 0x47, 0xcd, 0xd2, 0x3a, 0xb2, 0x9f, 0x60, 0x82, 0xf6, 0x19, 0x94, 0xaf, 0x4a, 0x9d, 0x7e, 257 0x71, 0xc8, 0xa3, 0x79, 0x39, 0xfd, 0x0d, 0x4a, 0xa3, 0x58, 0x6c, 0xe6, 0xd7, 0x10, 0x17, 0x46, 258 0xa0, 0xa4, 0xcf, 0xc9, 0xfd, 0xb8, 0x16, 0x23, 0xc6, 0xb9, 0x02, 0xad, 0x5d, 0x67, 0xe2, 0xcc, 259 0xfa, 0xe1, 0xb0, 0xd1, 0x8f, 0x2b, 0x99, 0x8e, 0x48, 0x4f, 0x81, 0xce, 0x51, 0x6a, 0x70, 0xb7, 260 0x26, 0xce, 0x6c, 0x10, 0xb6, 0x35, 0x1d, 0x93, 0x5d, 0x34, 0x4b, 0x50, 0x11, 0x28, 0x85, 0xca, 261 0xfd, 0xcf, 0xfe, 0x40, 0xac, 0x34, 0x2f, 0x15, 0x7a, 0x48, 0x86, 0xd0, 0x0c, 0xad, 0x43, 0xdb, 262 0x36, 0xb4, 0xd7, 0xca, 0x36, 0x38, 0xfd, 0xb1, 0x45, 0x0e, 0x6e, 0xb1, 0x86, 0x90, 0x08, 0x6d, 263 0x40, 0x01, 0xff, 0x1b, 0xd8, 0x27, 0xa4, 0x9f, 0x30, 0x1d, 0xe5, 0x4a, 0xc4, 0x60, 0x71, 0xb6, 264 0xc3, 0x5e, 0xc2, 0xf4, 0x45, 0x59, 0x53, 0x9f, 0x3c, 0xd4, 0x4b, 0x2c, 0x52, 0x1e, 0xe5, 0x42, 265 0x46, 0x4d, 0xab, 0x05, 0xea, 0x85, 0x0f, 0x2a, 0xeb, 0x42, 0xc8, 0x86, 0x80, 0xbe, 0x24, 0xfb, 266 0x42, 0x47, 0x99, 0x48, 0x14, 0xb3, 0xfc, 0x2c, 0x4d, 0xf1, 0x0a, 0xb8, 0xfb, 0xbf, 0x6d, 0xa0, 267 0x42, 0x9f, 0x37, 0xd6, 0x71, 0xe5, 0xd0, 0x03, 0xb2, 0x13, 0x23, 0x87, 0x48, 0x70, 0xb7, 0x6b, 268 0x87, 0x77, 0xcb, 0xf2, 0x8c, 0xd3, 0x67, 0xe4, 0x1e, 0xe3, 0x99, 0x90, 0x2d, 0xff, 0x8e, 0xe5, 269 0x1f, 0x58, 0xb1, 0x81, 0x3f, 0x24, 0xc3, 0x44, 0x31, 0x69, 0x40, 0xb5, 0xb1, 0x5e, 0xb5, 0xac, 270 0x5a, 0x6e, 0x82, 0x27, 0x64, 0x70, 0x59, 0x48, 0x2e, 0x64, 0x12, 0x65, 0xc8, 0xc1, 0xed, 0x4f, 271 0x9c, 0xd9, 0xde, 0xab, 0xb1, 0xff, 0xe7, 0x71, 0xf9, 0xa7, 0x55, 0xee, 0x1c, 0x39, 0x84, 0xbb, 272 0x97, 0xbf, 0x8a, 0xe9, 0x29, 0x79, 0x7c, 0x6b, 0xdf, 0x6f, 0x41, 0xfd, 0xcb, 0xc6, 0x4f, 0xe0, 273 0xeb, 0xda, 0x73, 0x6e, 0xd6, 0x9e, 0xf3, 0x7d, 0xed, 0x39, 0x9f, 0x37, 0x5e, 0xe7, 0x66, 0xe3, 274 0x75, 0xbe, 0x6d, 0xbc, 0xce, 0x87, 0x77, 0x89, 0x30, 0xcb, 0x62, 0xe1, 0xc7, 0x98, 0x05, 0x67, 275 0x0d, 0xd9, 0x7b, 0xb6, 0xd0, 0x41, 0xcb, 0xf9, 0x22, 0x46, 0x05, 0xbf, 0x97, 0x4b, 0x26, 0x64, 276 0x90, 0x21, 0x2f, 0x52, 0xd0, 0xf5, 0xb5, 0x9b, 0x4f, 0x39, 0xe8, 0x45, 0xd7, 0x9e, 0xf4, 0xeb, 277 0x9f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x69, 0x98, 0x56, 0x6d, 0x62, 0x03, 0x00, 0x00, 278 } 279 280 func (m *EventContractExecution) Marshal() (dAtA []byte, err error) { 281 size := m.Size() 282 dAtA = make([]byte, size) 283 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 284 if err != nil { 285 return nil, err 286 } 287 return dAtA[:n], nil 288 } 289 290 func (m *EventContractExecution) MarshalTo(dAtA []byte) (int, error) { 291 size := m.Size() 292 return m.MarshalToSizedBuffer(dAtA[:size]) 293 } 294 295 func (m *EventContractExecution) MarshalToSizedBuffer(dAtA []byte) (int, error) { 296 i := len(dAtA) 297 _ = i 298 var l int 299 _ = l 300 if len(m.ExecutionError) > 0 { 301 i -= len(m.ExecutionError) 302 copy(dAtA[i:], m.ExecutionError) 303 i = encodeVarintEvents(dAtA, i, uint64(len(m.ExecutionError))) 304 i-- 305 dAtA[i] = 0x22 306 } 307 if len(m.OtherError) > 0 { 308 i -= len(m.OtherError) 309 copy(dAtA[i:], m.OtherError) 310 i = encodeVarintEvents(dAtA, i, uint64(len(m.OtherError))) 311 i-- 312 dAtA[i] = 0x1a 313 } 314 if len(m.Response) > 0 { 315 i -= len(m.Response) 316 copy(dAtA[i:], m.Response) 317 i = encodeVarintEvents(dAtA, i, uint64(len(m.Response))) 318 i-- 319 dAtA[i] = 0x12 320 } 321 if len(m.ContractAddress) > 0 { 322 i -= len(m.ContractAddress) 323 copy(dAtA[i:], m.ContractAddress) 324 i = encodeVarintEvents(dAtA, i, uint64(len(m.ContractAddress))) 325 i-- 326 dAtA[i] = 0xa 327 } 328 return len(dAtA) - i, nil 329 } 330 331 func (m *EventContractRegistered) Marshal() (dAtA []byte, err error) { 332 size := m.Size() 333 dAtA = make([]byte, size) 334 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 335 if err != nil { 336 return nil, err 337 } 338 return dAtA[:n], nil 339 } 340 341 func (m *EventContractRegistered) MarshalTo(dAtA []byte) (int, error) { 342 size := m.Size() 343 return m.MarshalToSizedBuffer(dAtA[:size]) 344 } 345 346 func (m *EventContractRegistered) MarshalToSizedBuffer(dAtA []byte) (int, error) { 347 i := len(dAtA) 348 _ = i 349 var l int 350 _ = l 351 if m.FundingMode != 0 { 352 i = encodeVarintEvents(dAtA, i, uint64(m.FundingMode)) 353 i-- 354 dAtA[i] = 0x48 355 } 356 if len(m.GranterAddress) > 0 { 357 i -= len(m.GranterAddress) 358 copy(dAtA[i:], m.GranterAddress) 359 i = encodeVarintEvents(dAtA, i, uint64(len(m.GranterAddress))) 360 i-- 361 dAtA[i] = 0x42 362 } 363 if len(m.AdminAddress) > 0 { 364 i -= len(m.AdminAddress) 365 copy(dAtA[i:], m.AdminAddress) 366 i = encodeVarintEvents(dAtA, i, uint64(len(m.AdminAddress))) 367 i-- 368 dAtA[i] = 0x3a 369 } 370 if m.CodeId != 0 { 371 i = encodeVarintEvents(dAtA, i, uint64(m.CodeId)) 372 i-- 373 dAtA[i] = 0x30 374 } 375 if m.IsMigrationAllowed { 376 i-- 377 if m.IsMigrationAllowed { 378 dAtA[i] = 1 379 } else { 380 dAtA[i] = 0 381 } 382 i-- 383 dAtA[i] = 0x28 384 } 385 if m.ShouldPinContract { 386 i-- 387 if m.ShouldPinContract { 388 dAtA[i] = 1 389 } else { 390 dAtA[i] = 0 391 } 392 i-- 393 dAtA[i] = 0x20 394 } 395 if m.GasPrice != 0 { 396 i = encodeVarintEvents(dAtA, i, uint64(m.GasPrice)) 397 i-- 398 dAtA[i] = 0x18 399 } 400 if len(m.ContractAddress) > 0 { 401 i -= len(m.ContractAddress) 402 copy(dAtA[i:], m.ContractAddress) 403 i = encodeVarintEvents(dAtA, i, uint64(len(m.ContractAddress))) 404 i-- 405 dAtA[i] = 0xa 406 } 407 return len(dAtA) - i, nil 408 } 409 410 func (m *EventContractDeregistered) Marshal() (dAtA []byte, err error) { 411 size := m.Size() 412 dAtA = make([]byte, size) 413 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 414 if err != nil { 415 return nil, err 416 } 417 return dAtA[:n], nil 418 } 419 420 func (m *EventContractDeregistered) MarshalTo(dAtA []byte) (int, error) { 421 size := m.Size() 422 return m.MarshalToSizedBuffer(dAtA[:size]) 423 } 424 425 func (m *EventContractDeregistered) MarshalToSizedBuffer(dAtA []byte) (int, error) { 426 i := len(dAtA) 427 _ = i 428 var l int 429 _ = l 430 if len(m.ContractAddress) > 0 { 431 i -= len(m.ContractAddress) 432 copy(dAtA[i:], m.ContractAddress) 433 i = encodeVarintEvents(dAtA, i, uint64(len(m.ContractAddress))) 434 i-- 435 dAtA[i] = 0xa 436 } 437 return len(dAtA) - i, nil 438 } 439 440 func encodeVarintEvents(dAtA []byte, offset int, v uint64) int { 441 offset -= sovEvents(v) 442 base := offset 443 for v >= 1<<7 { 444 dAtA[offset] = uint8(v&0x7f | 0x80) 445 v >>= 7 446 offset++ 447 } 448 dAtA[offset] = uint8(v) 449 return base 450 } 451 func (m *EventContractExecution) Size() (n int) { 452 if m == nil { 453 return 0 454 } 455 var l int 456 _ = l 457 l = len(m.ContractAddress) 458 if l > 0 { 459 n += 1 + l + sovEvents(uint64(l)) 460 } 461 l = len(m.Response) 462 if l > 0 { 463 n += 1 + l + sovEvents(uint64(l)) 464 } 465 l = len(m.OtherError) 466 if l > 0 { 467 n += 1 + l + sovEvents(uint64(l)) 468 } 469 l = len(m.ExecutionError) 470 if l > 0 { 471 n += 1 + l + sovEvents(uint64(l)) 472 } 473 return n 474 } 475 476 func (m *EventContractRegistered) Size() (n int) { 477 if m == nil { 478 return 0 479 } 480 var l int 481 _ = l 482 l = len(m.ContractAddress) 483 if l > 0 { 484 n += 1 + l + sovEvents(uint64(l)) 485 } 486 if m.GasPrice != 0 { 487 n += 1 + sovEvents(uint64(m.GasPrice)) 488 } 489 if m.ShouldPinContract { 490 n += 2 491 } 492 if m.IsMigrationAllowed { 493 n += 2 494 } 495 if m.CodeId != 0 { 496 n += 1 + sovEvents(uint64(m.CodeId)) 497 } 498 l = len(m.AdminAddress) 499 if l > 0 { 500 n += 1 + l + sovEvents(uint64(l)) 501 } 502 l = len(m.GranterAddress) 503 if l > 0 { 504 n += 1 + l + sovEvents(uint64(l)) 505 } 506 if m.FundingMode != 0 { 507 n += 1 + sovEvents(uint64(m.FundingMode)) 508 } 509 return n 510 } 511 512 func (m *EventContractDeregistered) Size() (n int) { 513 if m == nil { 514 return 0 515 } 516 var l int 517 _ = l 518 l = len(m.ContractAddress) 519 if l > 0 { 520 n += 1 + l + sovEvents(uint64(l)) 521 } 522 return n 523 } 524 525 func sovEvents(x uint64) (n int) { 526 return (math_bits.Len64(x|1) + 6) / 7 527 } 528 func sozEvents(x uint64) (n int) { 529 return sovEvents(uint64((x << 1) ^ uint64((int64(x) >> 63)))) 530 } 531 func (m *EventContractExecution) Unmarshal(dAtA []byte) error { 532 l := len(dAtA) 533 iNdEx := 0 534 for iNdEx < l { 535 preIndex := iNdEx 536 var wire uint64 537 for shift := uint(0); ; shift += 7 { 538 if shift >= 64 { 539 return ErrIntOverflowEvents 540 } 541 if iNdEx >= l { 542 return io.ErrUnexpectedEOF 543 } 544 b := dAtA[iNdEx] 545 iNdEx++ 546 wire |= uint64(b&0x7F) << shift 547 if b < 0x80 { 548 break 549 } 550 } 551 fieldNum := int32(wire >> 3) 552 wireType := int(wire & 0x7) 553 if wireType == 4 { 554 return fmt.Errorf("proto: EventContractExecution: wiretype end group for non-group") 555 } 556 if fieldNum <= 0 { 557 return fmt.Errorf("proto: EventContractExecution: illegal tag %d (wire type %d)", fieldNum, wire) 558 } 559 switch fieldNum { 560 case 1: 561 if wireType != 2 { 562 return fmt.Errorf("proto: wrong wireType = %d for field ContractAddress", wireType) 563 } 564 var stringLen uint64 565 for shift := uint(0); ; shift += 7 { 566 if shift >= 64 { 567 return ErrIntOverflowEvents 568 } 569 if iNdEx >= l { 570 return io.ErrUnexpectedEOF 571 } 572 b := dAtA[iNdEx] 573 iNdEx++ 574 stringLen |= uint64(b&0x7F) << shift 575 if b < 0x80 { 576 break 577 } 578 } 579 intStringLen := int(stringLen) 580 if intStringLen < 0 { 581 return ErrInvalidLengthEvents 582 } 583 postIndex := iNdEx + intStringLen 584 if postIndex < 0 { 585 return ErrInvalidLengthEvents 586 } 587 if postIndex > l { 588 return io.ErrUnexpectedEOF 589 } 590 m.ContractAddress = string(dAtA[iNdEx:postIndex]) 591 iNdEx = postIndex 592 case 2: 593 if wireType != 2 { 594 return fmt.Errorf("proto: wrong wireType = %d for field Response", wireType) 595 } 596 var byteLen int 597 for shift := uint(0); ; shift += 7 { 598 if shift >= 64 { 599 return ErrIntOverflowEvents 600 } 601 if iNdEx >= l { 602 return io.ErrUnexpectedEOF 603 } 604 b := dAtA[iNdEx] 605 iNdEx++ 606 byteLen |= int(b&0x7F) << shift 607 if b < 0x80 { 608 break 609 } 610 } 611 if byteLen < 0 { 612 return ErrInvalidLengthEvents 613 } 614 postIndex := iNdEx + byteLen 615 if postIndex < 0 { 616 return ErrInvalidLengthEvents 617 } 618 if postIndex > l { 619 return io.ErrUnexpectedEOF 620 } 621 m.Response = append(m.Response[:0], dAtA[iNdEx:postIndex]...) 622 if m.Response == nil { 623 m.Response = []byte{} 624 } 625 iNdEx = postIndex 626 case 3: 627 if wireType != 2 { 628 return fmt.Errorf("proto: wrong wireType = %d for field OtherError", wireType) 629 } 630 var stringLen uint64 631 for shift := uint(0); ; shift += 7 { 632 if shift >= 64 { 633 return ErrIntOverflowEvents 634 } 635 if iNdEx >= l { 636 return io.ErrUnexpectedEOF 637 } 638 b := dAtA[iNdEx] 639 iNdEx++ 640 stringLen |= uint64(b&0x7F) << shift 641 if b < 0x80 { 642 break 643 } 644 } 645 intStringLen := int(stringLen) 646 if intStringLen < 0 { 647 return ErrInvalidLengthEvents 648 } 649 postIndex := iNdEx + intStringLen 650 if postIndex < 0 { 651 return ErrInvalidLengthEvents 652 } 653 if postIndex > l { 654 return io.ErrUnexpectedEOF 655 } 656 m.OtherError = string(dAtA[iNdEx:postIndex]) 657 iNdEx = postIndex 658 case 4: 659 if wireType != 2 { 660 return fmt.Errorf("proto: wrong wireType = %d for field ExecutionError", wireType) 661 } 662 var stringLen uint64 663 for shift := uint(0); ; shift += 7 { 664 if shift >= 64 { 665 return ErrIntOverflowEvents 666 } 667 if iNdEx >= l { 668 return io.ErrUnexpectedEOF 669 } 670 b := dAtA[iNdEx] 671 iNdEx++ 672 stringLen |= uint64(b&0x7F) << shift 673 if b < 0x80 { 674 break 675 } 676 } 677 intStringLen := int(stringLen) 678 if intStringLen < 0 { 679 return ErrInvalidLengthEvents 680 } 681 postIndex := iNdEx + intStringLen 682 if postIndex < 0 { 683 return ErrInvalidLengthEvents 684 } 685 if postIndex > l { 686 return io.ErrUnexpectedEOF 687 } 688 m.ExecutionError = string(dAtA[iNdEx:postIndex]) 689 iNdEx = postIndex 690 default: 691 iNdEx = preIndex 692 skippy, err := skipEvents(dAtA[iNdEx:]) 693 if err != nil { 694 return err 695 } 696 if (skippy < 0) || (iNdEx+skippy) < 0 { 697 return ErrInvalidLengthEvents 698 } 699 if (iNdEx + skippy) > l { 700 return io.ErrUnexpectedEOF 701 } 702 iNdEx += skippy 703 } 704 } 705 706 if iNdEx > l { 707 return io.ErrUnexpectedEOF 708 } 709 return nil 710 } 711 func (m *EventContractRegistered) Unmarshal(dAtA []byte) error { 712 l := len(dAtA) 713 iNdEx := 0 714 for iNdEx < l { 715 preIndex := iNdEx 716 var wire uint64 717 for shift := uint(0); ; shift += 7 { 718 if shift >= 64 { 719 return ErrIntOverflowEvents 720 } 721 if iNdEx >= l { 722 return io.ErrUnexpectedEOF 723 } 724 b := dAtA[iNdEx] 725 iNdEx++ 726 wire |= uint64(b&0x7F) << shift 727 if b < 0x80 { 728 break 729 } 730 } 731 fieldNum := int32(wire >> 3) 732 wireType := int(wire & 0x7) 733 if wireType == 4 { 734 return fmt.Errorf("proto: EventContractRegistered: wiretype end group for non-group") 735 } 736 if fieldNum <= 0 { 737 return fmt.Errorf("proto: EventContractRegistered: illegal tag %d (wire type %d)", fieldNum, wire) 738 } 739 switch fieldNum { 740 case 1: 741 if wireType != 2 { 742 return fmt.Errorf("proto: wrong wireType = %d for field ContractAddress", wireType) 743 } 744 var stringLen uint64 745 for shift := uint(0); ; shift += 7 { 746 if shift >= 64 { 747 return ErrIntOverflowEvents 748 } 749 if iNdEx >= l { 750 return io.ErrUnexpectedEOF 751 } 752 b := dAtA[iNdEx] 753 iNdEx++ 754 stringLen |= uint64(b&0x7F) << shift 755 if b < 0x80 { 756 break 757 } 758 } 759 intStringLen := int(stringLen) 760 if intStringLen < 0 { 761 return ErrInvalidLengthEvents 762 } 763 postIndex := iNdEx + intStringLen 764 if postIndex < 0 { 765 return ErrInvalidLengthEvents 766 } 767 if postIndex > l { 768 return io.ErrUnexpectedEOF 769 } 770 m.ContractAddress = string(dAtA[iNdEx:postIndex]) 771 iNdEx = postIndex 772 case 3: 773 if wireType != 0 { 774 return fmt.Errorf("proto: wrong wireType = %d for field GasPrice", wireType) 775 } 776 m.GasPrice = 0 777 for shift := uint(0); ; shift += 7 { 778 if shift >= 64 { 779 return ErrIntOverflowEvents 780 } 781 if iNdEx >= l { 782 return io.ErrUnexpectedEOF 783 } 784 b := dAtA[iNdEx] 785 iNdEx++ 786 m.GasPrice |= uint64(b&0x7F) << shift 787 if b < 0x80 { 788 break 789 } 790 } 791 case 4: 792 if wireType != 0 { 793 return fmt.Errorf("proto: wrong wireType = %d for field ShouldPinContract", wireType) 794 } 795 var v int 796 for shift := uint(0); ; shift += 7 { 797 if shift >= 64 { 798 return ErrIntOverflowEvents 799 } 800 if iNdEx >= l { 801 return io.ErrUnexpectedEOF 802 } 803 b := dAtA[iNdEx] 804 iNdEx++ 805 v |= int(b&0x7F) << shift 806 if b < 0x80 { 807 break 808 } 809 } 810 m.ShouldPinContract = bool(v != 0) 811 case 5: 812 if wireType != 0 { 813 return fmt.Errorf("proto: wrong wireType = %d for field IsMigrationAllowed", wireType) 814 } 815 var v int 816 for shift := uint(0); ; shift += 7 { 817 if shift >= 64 { 818 return ErrIntOverflowEvents 819 } 820 if iNdEx >= l { 821 return io.ErrUnexpectedEOF 822 } 823 b := dAtA[iNdEx] 824 iNdEx++ 825 v |= int(b&0x7F) << shift 826 if b < 0x80 { 827 break 828 } 829 } 830 m.IsMigrationAllowed = bool(v != 0) 831 case 6: 832 if wireType != 0 { 833 return fmt.Errorf("proto: wrong wireType = %d for field CodeId", wireType) 834 } 835 m.CodeId = 0 836 for shift := uint(0); ; shift += 7 { 837 if shift >= 64 { 838 return ErrIntOverflowEvents 839 } 840 if iNdEx >= l { 841 return io.ErrUnexpectedEOF 842 } 843 b := dAtA[iNdEx] 844 iNdEx++ 845 m.CodeId |= uint64(b&0x7F) << shift 846 if b < 0x80 { 847 break 848 } 849 } 850 case 7: 851 if wireType != 2 { 852 return fmt.Errorf("proto: wrong wireType = %d for field AdminAddress", wireType) 853 } 854 var stringLen uint64 855 for shift := uint(0); ; shift += 7 { 856 if shift >= 64 { 857 return ErrIntOverflowEvents 858 } 859 if iNdEx >= l { 860 return io.ErrUnexpectedEOF 861 } 862 b := dAtA[iNdEx] 863 iNdEx++ 864 stringLen |= uint64(b&0x7F) << shift 865 if b < 0x80 { 866 break 867 } 868 } 869 intStringLen := int(stringLen) 870 if intStringLen < 0 { 871 return ErrInvalidLengthEvents 872 } 873 postIndex := iNdEx + intStringLen 874 if postIndex < 0 { 875 return ErrInvalidLengthEvents 876 } 877 if postIndex > l { 878 return io.ErrUnexpectedEOF 879 } 880 m.AdminAddress = string(dAtA[iNdEx:postIndex]) 881 iNdEx = postIndex 882 case 8: 883 if wireType != 2 { 884 return fmt.Errorf("proto: wrong wireType = %d for field GranterAddress", wireType) 885 } 886 var stringLen uint64 887 for shift := uint(0); ; shift += 7 { 888 if shift >= 64 { 889 return ErrIntOverflowEvents 890 } 891 if iNdEx >= l { 892 return io.ErrUnexpectedEOF 893 } 894 b := dAtA[iNdEx] 895 iNdEx++ 896 stringLen |= uint64(b&0x7F) << shift 897 if b < 0x80 { 898 break 899 } 900 } 901 intStringLen := int(stringLen) 902 if intStringLen < 0 { 903 return ErrInvalidLengthEvents 904 } 905 postIndex := iNdEx + intStringLen 906 if postIndex < 0 { 907 return ErrInvalidLengthEvents 908 } 909 if postIndex > l { 910 return io.ErrUnexpectedEOF 911 } 912 m.GranterAddress = string(dAtA[iNdEx:postIndex]) 913 iNdEx = postIndex 914 case 9: 915 if wireType != 0 { 916 return fmt.Errorf("proto: wrong wireType = %d for field FundingMode", wireType) 917 } 918 m.FundingMode = 0 919 for shift := uint(0); ; shift += 7 { 920 if shift >= 64 { 921 return ErrIntOverflowEvents 922 } 923 if iNdEx >= l { 924 return io.ErrUnexpectedEOF 925 } 926 b := dAtA[iNdEx] 927 iNdEx++ 928 m.FundingMode |= FundingMode(b&0x7F) << shift 929 if b < 0x80 { 930 break 931 } 932 } 933 default: 934 iNdEx = preIndex 935 skippy, err := skipEvents(dAtA[iNdEx:]) 936 if err != nil { 937 return err 938 } 939 if (skippy < 0) || (iNdEx+skippy) < 0 { 940 return ErrInvalidLengthEvents 941 } 942 if (iNdEx + skippy) > l { 943 return io.ErrUnexpectedEOF 944 } 945 iNdEx += skippy 946 } 947 } 948 949 if iNdEx > l { 950 return io.ErrUnexpectedEOF 951 } 952 return nil 953 } 954 func (m *EventContractDeregistered) Unmarshal(dAtA []byte) error { 955 l := len(dAtA) 956 iNdEx := 0 957 for iNdEx < l { 958 preIndex := iNdEx 959 var wire uint64 960 for shift := uint(0); ; shift += 7 { 961 if shift >= 64 { 962 return ErrIntOverflowEvents 963 } 964 if iNdEx >= l { 965 return io.ErrUnexpectedEOF 966 } 967 b := dAtA[iNdEx] 968 iNdEx++ 969 wire |= uint64(b&0x7F) << shift 970 if b < 0x80 { 971 break 972 } 973 } 974 fieldNum := int32(wire >> 3) 975 wireType := int(wire & 0x7) 976 if wireType == 4 { 977 return fmt.Errorf("proto: EventContractDeregistered: wiretype end group for non-group") 978 } 979 if fieldNum <= 0 { 980 return fmt.Errorf("proto: EventContractDeregistered: illegal tag %d (wire type %d)", fieldNum, wire) 981 } 982 switch fieldNum { 983 case 1: 984 if wireType != 2 { 985 return fmt.Errorf("proto: wrong wireType = %d for field ContractAddress", wireType) 986 } 987 var stringLen uint64 988 for shift := uint(0); ; shift += 7 { 989 if shift >= 64 { 990 return ErrIntOverflowEvents 991 } 992 if iNdEx >= l { 993 return io.ErrUnexpectedEOF 994 } 995 b := dAtA[iNdEx] 996 iNdEx++ 997 stringLen |= uint64(b&0x7F) << shift 998 if b < 0x80 { 999 break 1000 } 1001 } 1002 intStringLen := int(stringLen) 1003 if intStringLen < 0 { 1004 return ErrInvalidLengthEvents 1005 } 1006 postIndex := iNdEx + intStringLen 1007 if postIndex < 0 { 1008 return ErrInvalidLengthEvents 1009 } 1010 if postIndex > l { 1011 return io.ErrUnexpectedEOF 1012 } 1013 m.ContractAddress = string(dAtA[iNdEx:postIndex]) 1014 iNdEx = postIndex 1015 default: 1016 iNdEx = preIndex 1017 skippy, err := skipEvents(dAtA[iNdEx:]) 1018 if err != nil { 1019 return err 1020 } 1021 if (skippy < 0) || (iNdEx+skippy) < 0 { 1022 return ErrInvalidLengthEvents 1023 } 1024 if (iNdEx + skippy) > l { 1025 return io.ErrUnexpectedEOF 1026 } 1027 iNdEx += skippy 1028 } 1029 } 1030 1031 if iNdEx > l { 1032 return io.ErrUnexpectedEOF 1033 } 1034 return nil 1035 } 1036 func skipEvents(dAtA []byte) (n int, err error) { 1037 l := len(dAtA) 1038 iNdEx := 0 1039 depth := 0 1040 for iNdEx < l { 1041 var wire uint64 1042 for shift := uint(0); ; shift += 7 { 1043 if shift >= 64 { 1044 return 0, ErrIntOverflowEvents 1045 } 1046 if iNdEx >= l { 1047 return 0, io.ErrUnexpectedEOF 1048 } 1049 b := dAtA[iNdEx] 1050 iNdEx++ 1051 wire |= (uint64(b) & 0x7F) << shift 1052 if b < 0x80 { 1053 break 1054 } 1055 } 1056 wireType := int(wire & 0x7) 1057 switch wireType { 1058 case 0: 1059 for shift := uint(0); ; shift += 7 { 1060 if shift >= 64 { 1061 return 0, ErrIntOverflowEvents 1062 } 1063 if iNdEx >= l { 1064 return 0, io.ErrUnexpectedEOF 1065 } 1066 iNdEx++ 1067 if dAtA[iNdEx-1] < 0x80 { 1068 break 1069 } 1070 } 1071 case 1: 1072 iNdEx += 8 1073 case 2: 1074 var length int 1075 for shift := uint(0); ; shift += 7 { 1076 if shift >= 64 { 1077 return 0, ErrIntOverflowEvents 1078 } 1079 if iNdEx >= l { 1080 return 0, io.ErrUnexpectedEOF 1081 } 1082 b := dAtA[iNdEx] 1083 iNdEx++ 1084 length |= (int(b) & 0x7F) << shift 1085 if b < 0x80 { 1086 break 1087 } 1088 } 1089 if length < 0 { 1090 return 0, ErrInvalidLengthEvents 1091 } 1092 iNdEx += length 1093 case 3: 1094 depth++ 1095 case 4: 1096 if depth == 0 { 1097 return 0, ErrUnexpectedEndOfGroupEvents 1098 } 1099 depth-- 1100 case 5: 1101 iNdEx += 4 1102 default: 1103 return 0, fmt.Errorf("proto: illegal wireType %d", wireType) 1104 } 1105 if iNdEx < 0 { 1106 return 0, ErrInvalidLengthEvents 1107 } 1108 if depth == 0 { 1109 return iNdEx, nil 1110 } 1111 } 1112 return 0, io.ErrUnexpectedEOF 1113 } 1114 1115 var ( 1116 ErrInvalidLengthEvents = fmt.Errorf("proto: negative length found during unmarshaling") 1117 ErrIntOverflowEvents = fmt.Errorf("proto: integer overflow") 1118 ErrUnexpectedEndOfGroupEvents = fmt.Errorf("proto: unexpected end of group") 1119 )