github.com/InjectiveLabs/sdk-go@v1.53.0/chain/peggy/types/params.pb.go (about) 1 // Code generated by protoc-gen-gogo. DO NOT EDIT. 2 // source: injective/peggy/v1/params.proto 3 4 package types 5 6 import ( 7 cosmossdk_io_math "cosmossdk.io/math" 8 fmt "fmt" 9 types "github.com/cosmos/cosmos-sdk/types" 10 _ "github.com/cosmos/cosmos-sdk/types/tx/amino" 11 _ "github.com/cosmos/gogoproto/gogoproto" 12 proto "github.com/cosmos/gogoproto/proto" 13 io "io" 14 math "math" 15 math_bits "math/bits" 16 ) 17 18 // Reference imports to suppress errors if they are not otherwise used. 19 var _ = proto.Marshal 20 var _ = fmt.Errorf 21 var _ = math.Inf 22 23 // This is a compile-time assertion to ensure that this generated file 24 // is compatible with the proto package it is being compiled against. 25 // A compilation error at this line likely means your copy of the 26 // proto package needs to be updated. 27 const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package 28 29 type Params struct { 30 PeggyId string `protobuf:"bytes,1,opt,name=peggy_id,json=peggyId,proto3" json:"peggy_id,omitempty"` 31 ContractSourceHash string `protobuf:"bytes,2,opt,name=contract_source_hash,json=contractSourceHash,proto3" json:"contract_source_hash,omitempty"` 32 BridgeEthereumAddress string `protobuf:"bytes,3,opt,name=bridge_ethereum_address,json=bridgeEthereumAddress,proto3" json:"bridge_ethereum_address,omitempty"` 33 BridgeChainId uint64 `protobuf:"varint,4,opt,name=bridge_chain_id,json=bridgeChainId,proto3" json:"bridge_chain_id,omitempty"` 34 SignedValsetsWindow uint64 `protobuf:"varint,5,opt,name=signed_valsets_window,json=signedValsetsWindow,proto3" json:"signed_valsets_window,omitempty"` 35 SignedBatchesWindow uint64 `protobuf:"varint,6,opt,name=signed_batches_window,json=signedBatchesWindow,proto3" json:"signed_batches_window,omitempty"` 36 SignedClaimsWindow uint64 `protobuf:"varint,7,opt,name=signed_claims_window,json=signedClaimsWindow,proto3" json:"signed_claims_window,omitempty"` 37 TargetBatchTimeout uint64 `protobuf:"varint,8,opt,name=target_batch_timeout,json=targetBatchTimeout,proto3" json:"target_batch_timeout,omitempty"` 38 AverageBlockTime uint64 `protobuf:"varint,9,opt,name=average_block_time,json=averageBlockTime,proto3" json:"average_block_time,omitempty"` 39 AverageEthereumBlockTime uint64 `protobuf:"varint,10,opt,name=average_ethereum_block_time,json=averageEthereumBlockTime,proto3" json:"average_ethereum_block_time,omitempty"` 40 SlashFractionValset cosmossdk_io_math.LegacyDec `protobuf:"bytes,11,opt,name=slash_fraction_valset,json=slashFractionValset,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"slash_fraction_valset"` 41 SlashFractionBatch cosmossdk_io_math.LegacyDec `protobuf:"bytes,12,opt,name=slash_fraction_batch,json=slashFractionBatch,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"slash_fraction_batch"` 42 SlashFractionClaim cosmossdk_io_math.LegacyDec `protobuf:"bytes,13,opt,name=slash_fraction_claim,json=slashFractionClaim,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"slash_fraction_claim"` 43 SlashFractionConflictingClaim cosmossdk_io_math.LegacyDec `protobuf:"bytes,14,opt,name=slash_fraction_conflicting_claim,json=slashFractionConflictingClaim,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"slash_fraction_conflicting_claim"` 44 UnbondSlashingValsetsWindow uint64 `protobuf:"varint,15,opt,name=unbond_slashing_valsets_window,json=unbondSlashingValsetsWindow,proto3" json:"unbond_slashing_valsets_window,omitempty"` 45 SlashFractionBadEthSignature cosmossdk_io_math.LegacyDec `protobuf:"bytes,16,opt,name=slash_fraction_bad_eth_signature,json=slashFractionBadEthSignature,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"slash_fraction_bad_eth_signature"` 46 CosmosCoinDenom string `protobuf:"bytes,17,opt,name=cosmos_coin_denom,json=cosmosCoinDenom,proto3" json:"cosmos_coin_denom,omitempty"` 47 CosmosCoinErc20Contract string `protobuf:"bytes,18,opt,name=cosmos_coin_erc20_contract,json=cosmosCoinErc20Contract,proto3" json:"cosmos_coin_erc20_contract,omitempty"` 48 ClaimSlashingEnabled bool `protobuf:"varint,19,opt,name=claim_slashing_enabled,json=claimSlashingEnabled,proto3" json:"claim_slashing_enabled,omitempty"` 49 BridgeContractStartHeight uint64 `protobuf:"varint,20,opt,name=bridge_contract_start_height,json=bridgeContractStartHeight,proto3" json:"bridge_contract_start_height,omitempty"` 50 ValsetReward types.Coin `protobuf:"bytes,21,opt,name=valset_reward,json=valsetReward,proto3" json:"valset_reward"` 51 Admins []string `protobuf:"bytes,22,rep,name=admins,proto3" json:"admins,omitempty"` 52 } 53 54 func (m *Params) Reset() { *m = Params{} } 55 func (m *Params) String() string { return proto.CompactTextString(m) } 56 func (*Params) ProtoMessage() {} 57 func (*Params) Descriptor() ([]byte, []int) { 58 return fileDescriptor_f21ffdf8d29783da, []int{0} 59 } 60 func (m *Params) XXX_Unmarshal(b []byte) error { 61 return m.Unmarshal(b) 62 } 63 func (m *Params) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 64 if deterministic { 65 return xxx_messageInfo_Params.Marshal(b, m, deterministic) 66 } else { 67 b = b[:cap(b)] 68 n, err := m.MarshalToSizedBuffer(b) 69 if err != nil { 70 return nil, err 71 } 72 return b[:n], nil 73 } 74 } 75 func (m *Params) XXX_Merge(src proto.Message) { 76 xxx_messageInfo_Params.Merge(m, src) 77 } 78 func (m *Params) XXX_Size() int { 79 return m.Size() 80 } 81 func (m *Params) XXX_DiscardUnknown() { 82 xxx_messageInfo_Params.DiscardUnknown(m) 83 } 84 85 var xxx_messageInfo_Params proto.InternalMessageInfo 86 87 func (m *Params) GetPeggyId() string { 88 if m != nil { 89 return m.PeggyId 90 } 91 return "" 92 } 93 94 func (m *Params) GetContractSourceHash() string { 95 if m != nil { 96 return m.ContractSourceHash 97 } 98 return "" 99 } 100 101 func (m *Params) GetBridgeEthereumAddress() string { 102 if m != nil { 103 return m.BridgeEthereumAddress 104 } 105 return "" 106 } 107 108 func (m *Params) GetBridgeChainId() uint64 { 109 if m != nil { 110 return m.BridgeChainId 111 } 112 return 0 113 } 114 115 func (m *Params) GetSignedValsetsWindow() uint64 { 116 if m != nil { 117 return m.SignedValsetsWindow 118 } 119 return 0 120 } 121 122 func (m *Params) GetSignedBatchesWindow() uint64 { 123 if m != nil { 124 return m.SignedBatchesWindow 125 } 126 return 0 127 } 128 129 func (m *Params) GetSignedClaimsWindow() uint64 { 130 if m != nil { 131 return m.SignedClaimsWindow 132 } 133 return 0 134 } 135 136 func (m *Params) GetTargetBatchTimeout() uint64 { 137 if m != nil { 138 return m.TargetBatchTimeout 139 } 140 return 0 141 } 142 143 func (m *Params) GetAverageBlockTime() uint64 { 144 if m != nil { 145 return m.AverageBlockTime 146 } 147 return 0 148 } 149 150 func (m *Params) GetAverageEthereumBlockTime() uint64 { 151 if m != nil { 152 return m.AverageEthereumBlockTime 153 } 154 return 0 155 } 156 157 func (m *Params) GetUnbondSlashingValsetsWindow() uint64 { 158 if m != nil { 159 return m.UnbondSlashingValsetsWindow 160 } 161 return 0 162 } 163 164 func (m *Params) GetCosmosCoinDenom() string { 165 if m != nil { 166 return m.CosmosCoinDenom 167 } 168 return "" 169 } 170 171 func (m *Params) GetCosmosCoinErc20Contract() string { 172 if m != nil { 173 return m.CosmosCoinErc20Contract 174 } 175 return "" 176 } 177 178 func (m *Params) GetClaimSlashingEnabled() bool { 179 if m != nil { 180 return m.ClaimSlashingEnabled 181 } 182 return false 183 } 184 185 func (m *Params) GetBridgeContractStartHeight() uint64 { 186 if m != nil { 187 return m.BridgeContractStartHeight 188 } 189 return 0 190 } 191 192 func (m *Params) GetValsetReward() types.Coin { 193 if m != nil { 194 return m.ValsetReward 195 } 196 return types.Coin{} 197 } 198 199 func (m *Params) GetAdmins() []string { 200 if m != nil { 201 return m.Admins 202 } 203 return nil 204 } 205 206 func init() { 207 proto.RegisterType((*Params)(nil), "injective.peggy.v1.Params") 208 } 209 210 func init() { proto.RegisterFile("injective/peggy/v1/params.proto", fileDescriptor_f21ffdf8d29783da) } 211 212 var fileDescriptor_f21ffdf8d29783da = []byte{ 213 // 803 bytes of a gzipped FileDescriptorProto 214 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x95, 0x41, 0x6f, 0x23, 0x35, 215 0x14, 0xc7, 0x33, 0x6c, 0xe9, 0xb6, 0xde, 0x96, 0x6e, 0xdd, 0xa4, 0xeb, 0xb6, 0x4b, 0x1a, 0x81, 216 0x84, 0xa2, 0x15, 0xcc, 0xb4, 0x05, 0x71, 0x00, 0x21, 0x44, 0xd2, 0xa2, 0xad, 0xd8, 0x03, 0x4a, 217 0x81, 0x95, 0xb8, 0x58, 0x9e, 0xb1, 0x77, 0xc6, 0x74, 0xc6, 0xae, 0xc6, 0x4e, 0xaa, 0xde, 0x38, 218 0x73, 0xe2, 0xa3, 0xf0, 0x31, 0xf6, 0xb8, 0x47, 0x84, 0xd0, 0x0a, 0xb5, 0x07, 0x24, 0x3e, 0x05, 219 0xf2, 0xb3, 0x27, 0x49, 0x03, 0x87, 0x6a, 0x2f, 0x55, 0xed, 0xdf, 0xff, 0xff, 0x9e, 0xf3, 0xec, 220 0xfc, 0x83, 0xf6, 0xa5, 0xfa, 0x49, 0x64, 0x56, 0x4e, 0x44, 0x72, 0x21, 0xf2, 0xfc, 0x2a, 0x99, 221 0x1c, 0x26, 0x17, 0xac, 0x66, 0x95, 0x89, 0x2f, 0x6a, 0x6d, 0x35, 0xc6, 0x53, 0x41, 0x0c, 0x82, 222 0x78, 0x72, 0xb8, 0xdb, 0xce, 0x75, 0xae, 0x01, 0x27, 0xee, 0x3f, 0xaf, 0xdc, 0xed, 0x66, 0xda, 223 0x54, 0xda, 0x24, 0x29, 0x33, 0x22, 0x99, 0x1c, 0xa6, 0xc2, 0xb2, 0xc3, 0x24, 0xd3, 0x52, 0x05, 224 0xbe, 0xc9, 0x2a, 0xa9, 0x74, 0x02, 0x7f, 0xfd, 0xd6, 0x7b, 0xff, 0x20, 0xb4, 0x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xf7, 0x6f, 0x4f, 0xd6, 0x7c, 0xa4, 0xfb, 0x84, 0x1d, 259 0x88, 0x97, 0xd7, 0xdd, 0xe8, 0xd5, 0x75, 0x37, 0xfa, 0xeb, 0xba, 0x1b, 0xfd, 0x7a, 0xd3, 0x6d, 260 0xbd, 0xba, 0xe9, 0xb6, 0x7e, 0xbf, 0xe9, 0xb6, 0x7e, 0xfc, 0x26, 0x97, 0xb6, 0x18, 0xa7, 0x71, 261 0xa6, 0xab, 0xe4, 0xb4, 0x89, 0xfb, 0x67, 0x2c, 0x35, 0xc9, 0x34, 0xfc, 0x3f, 0xca, 0x74, 0x2d, 262 0xe6, 0x97, 0x2e, 0x09, 0x93, 0x4a, 0xf3, 0x71, 0x29, 0x4c, 0xf8, 0xe9, 0xb0, 0x57, 0x17, 0xc2, 263 0xa4, 0xcb, 0x10, 0xed, 0x1f, 0xff, 0x1b, 0x00, 0x00, 0xff, 0xff, 0x8b, 0xfa, 0xa0, 0xe8, 0x5a, 264 0x06, 0x00, 0x00, 265 } 266 267 func (m *Params) Marshal() (dAtA []byte, err error) { 268 size := m.Size() 269 dAtA = make([]byte, size) 270 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 271 if err != nil { 272 return nil, err 273 } 274 return dAtA[:n], nil 275 } 276 277 func (m *Params) MarshalTo(dAtA []byte) (int, error) { 278 size := m.Size() 279 return m.MarshalToSizedBuffer(dAtA[:size]) 280 } 281 282 func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) { 283 i := len(dAtA) 284 _ = i 285 var l int 286 _ = l 287 if len(m.Admins) > 0 { 288 for iNdEx := len(m.Admins) - 1; iNdEx >= 0; iNdEx-- { 289 i -= len(m.Admins[iNdEx]) 290 copy(dAtA[i:], m.Admins[iNdEx]) 291 i = encodeVarintParams(dAtA, i, uint64(len(m.Admins[iNdEx]))) 292 i-- 293 dAtA[i] = 0x1 294 i-- 295 dAtA[i] = 0xb2 296 } 297 } 298 { 299 size, err := m.ValsetReward.MarshalToSizedBuffer(dAtA[:i]) 300 if err != nil { 301 return 0, err 302 } 303 i -= size 304 i = encodeVarintParams(dAtA, i, uint64(size)) 305 } 306 i-- 307 dAtA[i] = 0x1 308 i-- 309 dAtA[i] = 0xaa 310 if m.BridgeContractStartHeight != 0 { 311 i = encodeVarintParams(dAtA, i, uint64(m.BridgeContractStartHeight)) 312 i-- 313 dAtA[i] = 0x1 314 i-- 315 dAtA[i] = 0xa0 316 } 317 if m.ClaimSlashingEnabled { 318 i-- 319 if m.ClaimSlashingEnabled { 320 dAtA[i] = 1 321 } else { 322 dAtA[i] = 0 323 } 324 i-- 325 dAtA[i] = 0x1 326 i-- 327 dAtA[i] = 0x98 328 } 329 if len(m.CosmosCoinErc20Contract) > 0 { 330 i -= len(m.CosmosCoinErc20Contract) 331 copy(dAtA[i:], m.CosmosCoinErc20Contract) 332 i = encodeVarintParams(dAtA, i, uint64(len(m.CosmosCoinErc20Contract))) 333 i-- 334 dAtA[i] = 0x1 335 i-- 336 dAtA[i] = 0x92 337 } 338 if len(m.CosmosCoinDenom) > 0 { 339 i -= len(m.CosmosCoinDenom) 340 copy(dAtA[i:], m.CosmosCoinDenom) 341 i = encodeVarintParams(dAtA, i, uint64(len(m.CosmosCoinDenom))) 342 i-- 343 dAtA[i] = 0x1 344 i-- 345 dAtA[i] = 0x8a 346 } 347 { 348 size := m.SlashFractionBadEthSignature.Size() 349 i -= size 350 if _, err := m.SlashFractionBadEthSignature.MarshalTo(dAtA[i:]); err != nil { 351 return 0, err 352 } 353 i = encodeVarintParams(dAtA, i, uint64(size)) 354 } 355 i-- 356 dAtA[i] = 0x1 357 i-- 358 dAtA[i] = 0x82 359 if m.UnbondSlashingValsetsWindow != 0 { 360 i = encodeVarintParams(dAtA, i, uint64(m.UnbondSlashingValsetsWindow)) 361 i-- 362 dAtA[i] = 0x78 363 } 364 { 365 size := m.SlashFractionConflictingClaim.Size() 366 i -= size 367 if _, err := m.SlashFractionConflictingClaim.MarshalTo(dAtA[i:]); err != nil { 368 return 0, err 369 } 370 i = encodeVarintParams(dAtA, i, uint64(size)) 371 } 372 i-- 373 dAtA[i] = 0x72 374 { 375 size := m.SlashFractionClaim.Size() 376 i -= size 377 if _, err := m.SlashFractionClaim.MarshalTo(dAtA[i:]); err != nil { 378 return 0, err 379 } 380 i = encodeVarintParams(dAtA, i, uint64(size)) 381 } 382 i-- 383 dAtA[i] = 0x6a 384 { 385 size := m.SlashFractionBatch.Size() 386 i -= size 387 if _, err := m.SlashFractionBatch.MarshalTo(dAtA[i:]); err != nil { 388 return 0, err 389 } 390 i = encodeVarintParams(dAtA, i, uint64(size)) 391 } 392 i-- 393 dAtA[i] = 0x62 394 { 395 size := m.SlashFractionValset.Size() 396 i -= size 397 if _, err := m.SlashFractionValset.MarshalTo(dAtA[i:]); err != nil { 398 return 0, err 399 } 400 i = encodeVarintParams(dAtA, i, uint64(size)) 401 } 402 i-- 403 dAtA[i] = 0x5a 404 if m.AverageEthereumBlockTime != 0 { 405 i = encodeVarintParams(dAtA, i, uint64(m.AverageEthereumBlockTime)) 406 i-- 407 dAtA[i] = 0x50 408 } 409 if m.AverageBlockTime != 0 { 410 i = encodeVarintParams(dAtA, i, uint64(m.AverageBlockTime)) 411 i-- 412 dAtA[i] = 0x48 413 } 414 if m.TargetBatchTimeout != 0 { 415 i = encodeVarintParams(dAtA, i, uint64(m.TargetBatchTimeout)) 416 i-- 417 dAtA[i] = 0x40 418 } 419 if m.SignedClaimsWindow != 0 { 420 i = encodeVarintParams(dAtA, i, uint64(m.SignedClaimsWindow)) 421 i-- 422 dAtA[i] = 0x38 423 } 424 if m.SignedBatchesWindow != 0 { 425 i = encodeVarintParams(dAtA, i, uint64(m.SignedBatchesWindow)) 426 i-- 427 dAtA[i] = 0x30 428 } 429 if m.SignedValsetsWindow != 0 { 430 i = encodeVarintParams(dAtA, i, uint64(m.SignedValsetsWindow)) 431 i-- 432 dAtA[i] = 0x28 433 } 434 if m.BridgeChainId != 0 { 435 i = encodeVarintParams(dAtA, i, uint64(m.BridgeChainId)) 436 i-- 437 dAtA[i] = 0x20 438 } 439 if len(m.BridgeEthereumAddress) > 0 { 440 i -= len(m.BridgeEthereumAddress) 441 copy(dAtA[i:], m.BridgeEthereumAddress) 442 i = encodeVarintParams(dAtA, i, uint64(len(m.BridgeEthereumAddress))) 443 i-- 444 dAtA[i] = 0x1a 445 } 446 if len(m.ContractSourceHash) > 0 { 447 i -= len(m.ContractSourceHash) 448 copy(dAtA[i:], m.ContractSourceHash) 449 i = encodeVarintParams(dAtA, i, uint64(len(m.ContractSourceHash))) 450 i-- 451 dAtA[i] = 0x12 452 } 453 if len(m.PeggyId) > 0 { 454 i -= len(m.PeggyId) 455 copy(dAtA[i:], m.PeggyId) 456 i = encodeVarintParams(dAtA, i, uint64(len(m.PeggyId))) 457 i-- 458 dAtA[i] = 0xa 459 } 460 return len(dAtA) - i, nil 461 } 462 463 func encodeVarintParams(dAtA []byte, offset int, v uint64) int { 464 offset -= sovParams(v) 465 base := offset 466 for v >= 1<<7 { 467 dAtA[offset] = uint8(v&0x7f | 0x80) 468 v >>= 7 469 offset++ 470 } 471 dAtA[offset] = uint8(v) 472 return base 473 } 474 func (m *Params) Size() (n int) { 475 if m == nil { 476 return 0 477 } 478 var l int 479 _ = l 480 l = len(m.PeggyId) 481 if l > 0 { 482 n += 1 + l + sovParams(uint64(l)) 483 } 484 l = len(m.ContractSourceHash) 485 if l > 0 { 486 n += 1 + l + sovParams(uint64(l)) 487 } 488 l = len(m.BridgeEthereumAddress) 489 if l > 0 { 490 n += 1 + l + sovParams(uint64(l)) 491 } 492 if m.BridgeChainId != 0 { 493 n += 1 + sovParams(uint64(m.BridgeChainId)) 494 } 495 if m.SignedValsetsWindow != 0 { 496 n += 1 + sovParams(uint64(m.SignedValsetsWindow)) 497 } 498 if m.SignedBatchesWindow != 0 { 499 n += 1 + sovParams(uint64(m.SignedBatchesWindow)) 500 } 501 if m.SignedClaimsWindow != 0 { 502 n += 1 + sovParams(uint64(m.SignedClaimsWindow)) 503 } 504 if m.TargetBatchTimeout != 0 { 505 n += 1 + sovParams(uint64(m.TargetBatchTimeout)) 506 } 507 if m.AverageBlockTime != 0 { 508 n += 1 + sovParams(uint64(m.AverageBlockTime)) 509 } 510 if m.AverageEthereumBlockTime != 0 { 511 n += 1 + sovParams(uint64(m.AverageEthereumBlockTime)) 512 } 513 l = m.SlashFractionValset.Size() 514 n += 1 + l + sovParams(uint64(l)) 515 l = m.SlashFractionBatch.Size() 516 n += 1 + l + sovParams(uint64(l)) 517 l = m.SlashFractionClaim.Size() 518 n += 1 + l + sovParams(uint64(l)) 519 l = m.SlashFractionConflictingClaim.Size() 520 n += 1 + l + sovParams(uint64(l)) 521 if m.UnbondSlashingValsetsWindow != 0 { 522 n += 1 + sovParams(uint64(m.UnbondSlashingValsetsWindow)) 523 } 524 l = m.SlashFractionBadEthSignature.Size() 525 n += 2 + l + sovParams(uint64(l)) 526 l = len(m.CosmosCoinDenom) 527 if l > 0 { 528 n += 2 + l + sovParams(uint64(l)) 529 } 530 l = len(m.CosmosCoinErc20Contract) 531 if l > 0 { 532 n += 2 + l + sovParams(uint64(l)) 533 } 534 if m.ClaimSlashingEnabled { 535 n += 3 536 } 537 if m.BridgeContractStartHeight != 0 { 538 n += 2 + sovParams(uint64(m.BridgeContractStartHeight)) 539 } 540 l = m.ValsetReward.Size() 541 n += 2 + l + sovParams(uint64(l)) 542 if len(m.Admins) > 0 { 543 for _, s := range m.Admins { 544 l = len(s) 545 n += 2 + l + sovParams(uint64(l)) 546 } 547 } 548 return n 549 } 550 551 func sovParams(x uint64) (n int) { 552 return (math_bits.Len64(x|1) + 6) / 7 553 } 554 func sozParams(x uint64) (n int) { 555 return sovParams(uint64((x << 1) ^ uint64((int64(x) >> 63)))) 556 } 557 func (m *Params) Unmarshal(dAtA []byte) error { 558 l := len(dAtA) 559 iNdEx := 0 560 for iNdEx < l { 561 preIndex := iNdEx 562 var wire uint64 563 for shift := uint(0); ; shift += 7 { 564 if shift >= 64 { 565 return ErrIntOverflowParams 566 } 567 if iNdEx >= l { 568 return io.ErrUnexpectedEOF 569 } 570 b := dAtA[iNdEx] 571 iNdEx++ 572 wire |= uint64(b&0x7F) << shift 573 if b < 0x80 { 574 break 575 } 576 } 577 fieldNum := int32(wire >> 3) 578 wireType := int(wire & 0x7) 579 if wireType == 4 { 580 return fmt.Errorf("proto: Params: wiretype end group for non-group") 581 } 582 if fieldNum <= 0 { 583 return fmt.Errorf("proto: Params: illegal tag %d (wire type %d)", fieldNum, wire) 584 } 585 switch fieldNum { 586 case 1: 587 if wireType != 2 { 588 return fmt.Errorf("proto: wrong wireType = %d for field PeggyId", wireType) 589 } 590 var stringLen uint64 591 for shift := uint(0); ; shift += 7 { 592 if shift >= 64 { 593 return ErrIntOverflowParams 594 } 595 if iNdEx >= l { 596 return io.ErrUnexpectedEOF 597 } 598 b := dAtA[iNdEx] 599 iNdEx++ 600 stringLen |= uint64(b&0x7F) << shift 601 if b < 0x80 { 602 break 603 } 604 } 605 intStringLen := int(stringLen) 606 if intStringLen < 0 { 607 return ErrInvalidLengthParams 608 } 609 postIndex := iNdEx + intStringLen 610 if postIndex < 0 { 611 return ErrInvalidLengthParams 612 } 613 if postIndex > l { 614 return io.ErrUnexpectedEOF 615 } 616 m.PeggyId = string(dAtA[iNdEx:postIndex]) 617 iNdEx = postIndex 618 case 2: 619 if wireType != 2 { 620 return fmt.Errorf("proto: wrong wireType = %d for field ContractSourceHash", wireType) 621 } 622 var stringLen uint64 623 for shift := uint(0); ; shift += 7 { 624 if shift >= 64 { 625 return ErrIntOverflowParams 626 } 627 if iNdEx >= l { 628 return io.ErrUnexpectedEOF 629 } 630 b := dAtA[iNdEx] 631 iNdEx++ 632 stringLen |= uint64(b&0x7F) << shift 633 if b < 0x80 { 634 break 635 } 636 } 637 intStringLen := int(stringLen) 638 if intStringLen < 0 { 639 return ErrInvalidLengthParams 640 } 641 postIndex := iNdEx + intStringLen 642 if postIndex < 0 { 643 return ErrInvalidLengthParams 644 } 645 if postIndex > l { 646 return io.ErrUnexpectedEOF 647 } 648 m.ContractSourceHash = string(dAtA[iNdEx:postIndex]) 649 iNdEx = postIndex 650 case 3: 651 if wireType != 2 { 652 return fmt.Errorf("proto: wrong wireType = %d for field BridgeEthereumAddress", wireType) 653 } 654 var stringLen uint64 655 for shift := uint(0); ; shift += 7 { 656 if shift >= 64 { 657 return ErrIntOverflowParams 658 } 659 if iNdEx >= l { 660 return io.ErrUnexpectedEOF 661 } 662 b := dAtA[iNdEx] 663 iNdEx++ 664 stringLen |= uint64(b&0x7F) << shift 665 if b < 0x80 { 666 break 667 } 668 } 669 intStringLen := int(stringLen) 670 if intStringLen < 0 { 671 return ErrInvalidLengthParams 672 } 673 postIndex := iNdEx + intStringLen 674 if postIndex < 0 { 675 return ErrInvalidLengthParams 676 } 677 if postIndex > l { 678 return io.ErrUnexpectedEOF 679 } 680 m.BridgeEthereumAddress = string(dAtA[iNdEx:postIndex]) 681 iNdEx = postIndex 682 case 4: 683 if wireType != 0 { 684 return fmt.Errorf("proto: wrong wireType = %d for field BridgeChainId", wireType) 685 } 686 m.BridgeChainId = 0 687 for shift := uint(0); ; shift += 7 { 688 if shift >= 64 { 689 return ErrIntOverflowParams 690 } 691 if iNdEx >= l { 692 return io.ErrUnexpectedEOF 693 } 694 b := dAtA[iNdEx] 695 iNdEx++ 696 m.BridgeChainId |= uint64(b&0x7F) << shift 697 if b < 0x80 { 698 break 699 } 700 } 701 case 5: 702 if wireType != 0 { 703 return fmt.Errorf("proto: wrong wireType = %d for field SignedValsetsWindow", wireType) 704 } 705 m.SignedValsetsWindow = 0 706 for shift := uint(0); ; shift += 7 { 707 if shift >= 64 { 708 return ErrIntOverflowParams 709 } 710 if iNdEx >= l { 711 return io.ErrUnexpectedEOF 712 } 713 b := dAtA[iNdEx] 714 iNdEx++ 715 m.SignedValsetsWindow |= uint64(b&0x7F) << shift 716 if b < 0x80 { 717 break 718 } 719 } 720 case 6: 721 if wireType != 0 { 722 return fmt.Errorf("proto: wrong wireType = %d for field SignedBatchesWindow", wireType) 723 } 724 m.SignedBatchesWindow = 0 725 for shift := uint(0); ; shift += 7 { 726 if shift >= 64 { 727 return ErrIntOverflowParams 728 } 729 if iNdEx >= l { 730 return io.ErrUnexpectedEOF 731 } 732 b := dAtA[iNdEx] 733 iNdEx++ 734 m.SignedBatchesWindow |= uint64(b&0x7F) << shift 735 if b < 0x80 { 736 break 737 } 738 } 739 case 7: 740 if wireType != 0 { 741 return fmt.Errorf("proto: wrong wireType = %d for field SignedClaimsWindow", wireType) 742 } 743 m.SignedClaimsWindow = 0 744 for shift := uint(0); ; shift += 7 { 745 if shift >= 64 { 746 return ErrIntOverflowParams 747 } 748 if iNdEx >= l { 749 return io.ErrUnexpectedEOF 750 } 751 b := dAtA[iNdEx] 752 iNdEx++ 753 m.SignedClaimsWindow |= uint64(b&0x7F) << shift 754 if b < 0x80 { 755 break 756 } 757 } 758 case 8: 759 if wireType != 0 { 760 return fmt.Errorf("proto: wrong wireType = %d for field TargetBatchTimeout", wireType) 761 } 762 m.TargetBatchTimeout = 0 763 for shift := uint(0); ; shift += 7 { 764 if shift >= 64 { 765 return ErrIntOverflowParams 766 } 767 if iNdEx >= l { 768 return io.ErrUnexpectedEOF 769 } 770 b := dAtA[iNdEx] 771 iNdEx++ 772 m.TargetBatchTimeout |= uint64(b&0x7F) << shift 773 if b < 0x80 { 774 break 775 } 776 } 777 case 9: 778 if wireType != 0 { 779 return fmt.Errorf("proto: wrong wireType = %d for field AverageBlockTime", wireType) 780 } 781 m.AverageBlockTime = 0 782 for shift := uint(0); ; shift += 7 { 783 if shift >= 64 { 784 return ErrIntOverflowParams 785 } 786 if iNdEx >= l { 787 return io.ErrUnexpectedEOF 788 } 789 b := dAtA[iNdEx] 790 iNdEx++ 791 m.AverageBlockTime |= uint64(b&0x7F) << shift 792 if b < 0x80 { 793 break 794 } 795 } 796 case 10: 797 if wireType != 0 { 798 return fmt.Errorf("proto: wrong wireType = %d for field AverageEthereumBlockTime", wireType) 799 } 800 m.AverageEthereumBlockTime = 0 801 for shift := uint(0); ; shift += 7 { 802 if shift >= 64 { 803 return ErrIntOverflowParams 804 } 805 if iNdEx >= l { 806 return io.ErrUnexpectedEOF 807 } 808 b := dAtA[iNdEx] 809 iNdEx++ 810 m.AverageEthereumBlockTime |= uint64(b&0x7F) << shift 811 if b < 0x80 { 812 break 813 } 814 } 815 case 11: 816 if wireType != 2 { 817 return fmt.Errorf("proto: wrong wireType = %d for field SlashFractionValset", wireType) 818 } 819 var byteLen int 820 for shift := uint(0); ; shift += 7 { 821 if shift >= 64 { 822 return ErrIntOverflowParams 823 } 824 if iNdEx >= l { 825 return io.ErrUnexpectedEOF 826 } 827 b := dAtA[iNdEx] 828 iNdEx++ 829 byteLen |= int(b&0x7F) << shift 830 if b < 0x80 { 831 break 832 } 833 } 834 if byteLen < 0 { 835 return ErrInvalidLengthParams 836 } 837 postIndex := iNdEx + byteLen 838 if postIndex < 0 { 839 return ErrInvalidLengthParams 840 } 841 if postIndex > l { 842 return io.ErrUnexpectedEOF 843 } 844 if err := m.SlashFractionValset.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 845 return err 846 } 847 iNdEx = postIndex 848 case 12: 849 if wireType != 2 { 850 return fmt.Errorf("proto: wrong wireType = %d for field SlashFractionBatch", wireType) 851 } 852 var byteLen int 853 for shift := uint(0); ; shift += 7 { 854 if shift >= 64 { 855 return ErrIntOverflowParams 856 } 857 if iNdEx >= l { 858 return io.ErrUnexpectedEOF 859 } 860 b := dAtA[iNdEx] 861 iNdEx++ 862 byteLen |= int(b&0x7F) << shift 863 if b < 0x80 { 864 break 865 } 866 } 867 if byteLen < 0 { 868 return ErrInvalidLengthParams 869 } 870 postIndex := iNdEx + byteLen 871 if postIndex < 0 { 872 return ErrInvalidLengthParams 873 } 874 if postIndex > l { 875 return io.ErrUnexpectedEOF 876 } 877 if err := m.SlashFractionBatch.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 878 return err 879 } 880 iNdEx = postIndex 881 case 13: 882 if wireType != 2 { 883 return fmt.Errorf("proto: wrong wireType = %d for field SlashFractionClaim", wireType) 884 } 885 var byteLen int 886 for shift := uint(0); ; shift += 7 { 887 if shift >= 64 { 888 return ErrIntOverflowParams 889 } 890 if iNdEx >= l { 891 return io.ErrUnexpectedEOF 892 } 893 b := dAtA[iNdEx] 894 iNdEx++ 895 byteLen |= int(b&0x7F) << shift 896 if b < 0x80 { 897 break 898 } 899 } 900 if byteLen < 0 { 901 return ErrInvalidLengthParams 902 } 903 postIndex := iNdEx + byteLen 904 if postIndex < 0 { 905 return ErrInvalidLengthParams 906 } 907 if postIndex > l { 908 return io.ErrUnexpectedEOF 909 } 910 if err := m.SlashFractionClaim.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 911 return err 912 } 913 iNdEx = postIndex 914 case 14: 915 if wireType != 2 { 916 return fmt.Errorf("proto: wrong wireType = %d for field SlashFractionConflictingClaim", wireType) 917 } 918 var byteLen int 919 for shift := uint(0); ; shift += 7 { 920 if shift >= 64 { 921 return ErrIntOverflowParams 922 } 923 if iNdEx >= l { 924 return io.ErrUnexpectedEOF 925 } 926 b := dAtA[iNdEx] 927 iNdEx++ 928 byteLen |= int(b&0x7F) << shift 929 if b < 0x80 { 930 break 931 } 932 } 933 if byteLen < 0 { 934 return ErrInvalidLengthParams 935 } 936 postIndex := iNdEx + byteLen 937 if postIndex < 0 { 938 return ErrInvalidLengthParams 939 } 940 if postIndex > l { 941 return io.ErrUnexpectedEOF 942 } 943 if err := m.SlashFractionConflictingClaim.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 944 return err 945 } 946 iNdEx = postIndex 947 case 15: 948 if wireType != 0 { 949 return fmt.Errorf("proto: wrong wireType = %d for field UnbondSlashingValsetsWindow", wireType) 950 } 951 m.UnbondSlashingValsetsWindow = 0 952 for shift := uint(0); ; shift += 7 { 953 if shift >= 64 { 954 return ErrIntOverflowParams 955 } 956 if iNdEx >= l { 957 return io.ErrUnexpectedEOF 958 } 959 b := dAtA[iNdEx] 960 iNdEx++ 961 m.UnbondSlashingValsetsWindow |= uint64(b&0x7F) << shift 962 if b < 0x80 { 963 break 964 } 965 } 966 case 16: 967 if wireType != 2 { 968 return fmt.Errorf("proto: wrong wireType = %d for field SlashFractionBadEthSignature", wireType) 969 } 970 var byteLen int 971 for shift := uint(0); ; shift += 7 { 972 if shift >= 64 { 973 return ErrIntOverflowParams 974 } 975 if iNdEx >= l { 976 return io.ErrUnexpectedEOF 977 } 978 b := dAtA[iNdEx] 979 iNdEx++ 980 byteLen |= int(b&0x7F) << shift 981 if b < 0x80 { 982 break 983 } 984 } 985 if byteLen < 0 { 986 return ErrInvalidLengthParams 987 } 988 postIndex := iNdEx + byteLen 989 if postIndex < 0 { 990 return ErrInvalidLengthParams 991 } 992 if postIndex > l { 993 return io.ErrUnexpectedEOF 994 } 995 if err := m.SlashFractionBadEthSignature.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 996 return err 997 } 998 iNdEx = postIndex 999 case 17: 1000 if wireType != 2 { 1001 return fmt.Errorf("proto: wrong wireType = %d for field CosmosCoinDenom", wireType) 1002 } 1003 var stringLen uint64 1004 for shift := uint(0); ; shift += 7 { 1005 if shift >= 64 { 1006 return ErrIntOverflowParams 1007 } 1008 if iNdEx >= l { 1009 return io.ErrUnexpectedEOF 1010 } 1011 b := dAtA[iNdEx] 1012 iNdEx++ 1013 stringLen |= uint64(b&0x7F) << shift 1014 if b < 0x80 { 1015 break 1016 } 1017 } 1018 intStringLen := int(stringLen) 1019 if intStringLen < 0 { 1020 return ErrInvalidLengthParams 1021 } 1022 postIndex := iNdEx + intStringLen 1023 if postIndex < 0 { 1024 return ErrInvalidLengthParams 1025 } 1026 if postIndex > l { 1027 return io.ErrUnexpectedEOF 1028 } 1029 m.CosmosCoinDenom = string(dAtA[iNdEx:postIndex]) 1030 iNdEx = postIndex 1031 case 18: 1032 if wireType != 2 { 1033 return fmt.Errorf("proto: wrong wireType = %d for field CosmosCoinErc20Contract", wireType) 1034 } 1035 var stringLen uint64 1036 for shift := uint(0); ; shift += 7 { 1037 if shift >= 64 { 1038 return ErrIntOverflowParams 1039 } 1040 if iNdEx >= l { 1041 return io.ErrUnexpectedEOF 1042 } 1043 b := dAtA[iNdEx] 1044 iNdEx++ 1045 stringLen |= uint64(b&0x7F) << shift 1046 if b < 0x80 { 1047 break 1048 } 1049 } 1050 intStringLen := int(stringLen) 1051 if intStringLen < 0 { 1052 return ErrInvalidLengthParams 1053 } 1054 postIndex := iNdEx + intStringLen 1055 if postIndex < 0 { 1056 return ErrInvalidLengthParams 1057 } 1058 if postIndex > l { 1059 return io.ErrUnexpectedEOF 1060 } 1061 m.CosmosCoinErc20Contract = string(dAtA[iNdEx:postIndex]) 1062 iNdEx = postIndex 1063 case 19: 1064 if wireType != 0 { 1065 return fmt.Errorf("proto: wrong wireType = %d for field ClaimSlashingEnabled", wireType) 1066 } 1067 var v int 1068 for shift := uint(0); ; shift += 7 { 1069 if shift >= 64 { 1070 return ErrIntOverflowParams 1071 } 1072 if iNdEx >= l { 1073 return io.ErrUnexpectedEOF 1074 } 1075 b := dAtA[iNdEx] 1076 iNdEx++ 1077 v |= int(b&0x7F) << shift 1078 if b < 0x80 { 1079 break 1080 } 1081 } 1082 m.ClaimSlashingEnabled = bool(v != 0) 1083 case 20: 1084 if wireType != 0 { 1085 return fmt.Errorf("proto: wrong wireType = %d for field BridgeContractStartHeight", wireType) 1086 } 1087 m.BridgeContractStartHeight = 0 1088 for shift := uint(0); ; shift += 7 { 1089 if shift >= 64 { 1090 return ErrIntOverflowParams 1091 } 1092 if iNdEx >= l { 1093 return io.ErrUnexpectedEOF 1094 } 1095 b := dAtA[iNdEx] 1096 iNdEx++ 1097 m.BridgeContractStartHeight |= uint64(b&0x7F) << shift 1098 if b < 0x80 { 1099 break 1100 } 1101 } 1102 case 21: 1103 if wireType != 2 { 1104 return fmt.Errorf("proto: wrong wireType = %d for field ValsetReward", wireType) 1105 } 1106 var msglen int 1107 for shift := uint(0); ; shift += 7 { 1108 if shift >= 64 { 1109 return ErrIntOverflowParams 1110 } 1111 if iNdEx >= l { 1112 return io.ErrUnexpectedEOF 1113 } 1114 b := dAtA[iNdEx] 1115 iNdEx++ 1116 msglen |= int(b&0x7F) << shift 1117 if b < 0x80 { 1118 break 1119 } 1120 } 1121 if msglen < 0 { 1122 return ErrInvalidLengthParams 1123 } 1124 postIndex := iNdEx + msglen 1125 if postIndex < 0 { 1126 return ErrInvalidLengthParams 1127 } 1128 if postIndex > l { 1129 return io.ErrUnexpectedEOF 1130 } 1131 if err := m.ValsetReward.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 1132 return err 1133 } 1134 iNdEx = postIndex 1135 case 22: 1136 if wireType != 2 { 1137 return fmt.Errorf("proto: wrong wireType = %d for field Admins", wireType) 1138 } 1139 var stringLen uint64 1140 for shift := uint(0); ; shift += 7 { 1141 if shift >= 64 { 1142 return ErrIntOverflowParams 1143 } 1144 if iNdEx >= l { 1145 return io.ErrUnexpectedEOF 1146 } 1147 b := dAtA[iNdEx] 1148 iNdEx++ 1149 stringLen |= uint64(b&0x7F) << shift 1150 if b < 0x80 { 1151 break 1152 } 1153 } 1154 intStringLen := int(stringLen) 1155 if intStringLen < 0 { 1156 return ErrInvalidLengthParams 1157 } 1158 postIndex := iNdEx + intStringLen 1159 if postIndex < 0 { 1160 return ErrInvalidLengthParams 1161 } 1162 if postIndex > l { 1163 return io.ErrUnexpectedEOF 1164 } 1165 m.Admins = append(m.Admins, string(dAtA[iNdEx:postIndex])) 1166 iNdEx = postIndex 1167 default: 1168 iNdEx = preIndex 1169 skippy, err := skipParams(dAtA[iNdEx:]) 1170 if err != nil { 1171 return err 1172 } 1173 if (skippy < 0) || (iNdEx+skippy) < 0 { 1174 return ErrInvalidLengthParams 1175 } 1176 if (iNdEx + skippy) > l { 1177 return io.ErrUnexpectedEOF 1178 } 1179 iNdEx += skippy 1180 } 1181 } 1182 1183 if iNdEx > l { 1184 return io.ErrUnexpectedEOF 1185 } 1186 return nil 1187 } 1188 func skipParams(dAtA []byte) (n int, err error) { 1189 l := len(dAtA) 1190 iNdEx := 0 1191 depth := 0 1192 for iNdEx < l { 1193 var wire uint64 1194 for shift := uint(0); ; shift += 7 { 1195 if shift >= 64 { 1196 return 0, ErrIntOverflowParams 1197 } 1198 if iNdEx >= l { 1199 return 0, io.ErrUnexpectedEOF 1200 } 1201 b := dAtA[iNdEx] 1202 iNdEx++ 1203 wire |= (uint64(b) & 0x7F) << shift 1204 if b < 0x80 { 1205 break 1206 } 1207 } 1208 wireType := int(wire & 0x7) 1209 switch wireType { 1210 case 0: 1211 for shift := uint(0); ; shift += 7 { 1212 if shift >= 64 { 1213 return 0, ErrIntOverflowParams 1214 } 1215 if iNdEx >= l { 1216 return 0, io.ErrUnexpectedEOF 1217 } 1218 iNdEx++ 1219 if dAtA[iNdEx-1] < 0x80 { 1220 break 1221 } 1222 } 1223 case 1: 1224 iNdEx += 8 1225 case 2: 1226 var length int 1227 for shift := uint(0); ; shift += 7 { 1228 if shift >= 64 { 1229 return 0, ErrIntOverflowParams 1230 } 1231 if iNdEx >= l { 1232 return 0, io.ErrUnexpectedEOF 1233 } 1234 b := dAtA[iNdEx] 1235 iNdEx++ 1236 length |= (int(b) & 0x7F) << shift 1237 if b < 0x80 { 1238 break 1239 } 1240 } 1241 if length < 0 { 1242 return 0, ErrInvalidLengthParams 1243 } 1244 iNdEx += length 1245 case 3: 1246 depth++ 1247 case 4: 1248 if depth == 0 { 1249 return 0, ErrUnexpectedEndOfGroupParams 1250 } 1251 depth-- 1252 case 5: 1253 iNdEx += 4 1254 default: 1255 return 0, fmt.Errorf("proto: illegal wireType %d", wireType) 1256 } 1257 if iNdEx < 0 { 1258 return 0, ErrInvalidLengthParams 1259 } 1260 if depth == 0 { 1261 return iNdEx, nil 1262 } 1263 } 1264 return 0, io.ErrUnexpectedEOF 1265 } 1266 1267 var ( 1268 ErrInvalidLengthParams = fmt.Errorf("proto: negative length found during unmarshaling") 1269 ErrIntOverflowParams = fmt.Errorf("proto: integer overflow") 1270 ErrUnexpectedEndOfGroupParams = fmt.Errorf("proto: unexpected end of group") 1271 )