@myx-trade/sdk 0.1.244 → 0.1.245-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1462,7 +1462,9 @@ var ARB_TEST_SEPOLIA = {
1462
1462
  DATA_PROVIDER: "0x1E1487d92f6FDbeEa8C2b48610CDCfbCC9c40fa3",
1463
1463
  ORACLE_RESERVE: "0xb5f9C48815ab45BdC080523cF82Aaa2F7892b578",
1464
1464
  FORWARDER: "0xc5A9f5786Ec4EBf5eeaD5C9263dD6105189C05F9",
1465
- TRADING_ROUTER: "0x9B9359C2a5C1B103cC5bf66bDB0B78370dc4E706"
1465
+ TRADING_ROUTER: "0x9B9359C2a5C1B103cC5bf66bDB0B78370dc4E706",
1466
+ REIMBURSEMENT: "0x4583A223299b94B95d6937bEF6753afee2b8f81A",
1467
+ DISPUTE_COURT: "0xc6b8b22F0b06caae5C823926205a38276C65718f"
1466
1468
  };
1467
1469
 
1468
1470
  // src/config/address/LINEA_SEPOLIA.ts
@@ -1485,7 +1487,9 @@ var LINEA_SEPOLIA = {
1485
1487
  DATA_PROVIDER: "0x0A64788b7FB6499fd2eFbb26A5D05e7C6B919db3",
1486
1488
  ORACLE_RESERVE: "0xA4da3417Ae7697A4fa494Bec49b37F0Fb08E86e9",
1487
1489
  FORWARDER: "0x702c06d4bb20Ee82Cf3DE8f5611FE3a86067e937",
1488
- TRADING_ROUTER: "0x97656464d608A7d1Ac5B6C42655C6806A16aF5C4"
1490
+ TRADING_ROUTER: "0x97656464d608A7d1Ac5B6C42655C6806A16aF5C4",
1491
+ REIMBURSEMENT: "0x427E0C7E84D8D75f971c62D0688009B421598cCb",
1492
+ DISPUTE_COURT: "0x2f2dec0Cf321a9dA64BEf7dB0b84d998E37dBB11"
1489
1493
  };
1490
1494
 
1491
1495
  // src/config/address/BSC_TEST_NET.ts
@@ -1508,7 +1512,9 @@ var BSC_TEST_NET = {
1508
1512
  DATA_PROVIDER: "0x827c4D63eCafE28bC7f1aFF460f9A14b4938d76e",
1509
1513
  ORACLE_RESERVE: "0xCF72C9fB77cF051F079151d5955753A5b93F4E92",
1510
1514
  FORWARDER: "0x2912Ae76E175776B44E3a0f67E60F2624AEeED03",
1511
- TRADING_ROUTER: "0x0000000000000000000000000000000000000000"
1515
+ TRADING_ROUTER: "0x0000000000000000000000000000000000000000",
1516
+ REIMBURSEMENT: "0x0000000000000000000000000000000000000000",
1517
+ DISPUTE_COURT: "0x0000000000000000000000000000000000000000"
1512
1518
  };
1513
1519
 
1514
1520
  // src/config/address.ts
@@ -1839,7 +1845,7 @@ var RotationProvider = class extends import_providers.BaseProvider {
1839
1845
  // package.json
1840
1846
  var package_default = {
1841
1847
  name: "@myx-trade/sdk",
1842
- version: "0.1.244",
1848
+ version: "0.1.245-beta.0",
1843
1849
  private: false,
1844
1850
  publishConfig: {
1845
1851
  access: "public"
@@ -10826,43 +10832,1963 @@ var Forwarder_default = [
10826
10832
  },
10827
10833
  {
10828
10834
  type: "function",
10829
- name: "trustedForwarder",
10830
- constant: true,
10831
- stateMutability: "view",
10835
+ name: "trustedForwarder",
10836
+ constant: true,
10837
+ stateMutability: "view",
10838
+ payable: false,
10839
+ inputs: [],
10840
+ outputs: [
10841
+ {
10842
+ type: "address"
10843
+ }
10844
+ ]
10845
+ },
10846
+ {
10847
+ type: "function",
10848
+ name: "updateMaxRelayFee",
10849
+ constant: false,
10850
+ payable: false,
10851
+ inputs: [
10852
+ {
10853
+ type: "uint256",
10854
+ name: "_maxRelayFee"
10855
+ }
10856
+ ],
10857
+ outputs: []
10858
+ },
10859
+ {
10860
+ type: "function",
10861
+ name: "updateRelayInfo",
10862
+ constant: false,
10863
+ payable: false,
10864
+ inputs: [
10865
+ {
10866
+ type: "uint256",
10867
+ name: "_relayFee"
10868
+ },
10869
+ {
10870
+ type: "uint256",
10871
+ name: "_relayGas"
10872
+ }
10873
+ ],
10874
+ outputs: []
10875
+ },
10876
+ {
10877
+ type: "function",
10878
+ name: "upgradeTo",
10879
+ constant: false,
10880
+ stateMutability: "payable",
10881
+ payable: true,
10882
+ inputs: [
10883
+ {
10884
+ type: "address",
10885
+ name: "newImplementation"
10886
+ },
10887
+ {
10888
+ type: "bytes",
10889
+ name: "data"
10890
+ }
10891
+ ],
10892
+ outputs: []
10893
+ },
10894
+ {
10895
+ type: "function",
10896
+ name: "upgradeToAndCall",
10897
+ constant: false,
10898
+ stateMutability: "payable",
10899
+ payable: true,
10900
+ inputs: [
10901
+ {
10902
+ type: "address",
10903
+ name: "newImplementation"
10904
+ },
10905
+ {
10906
+ type: "bytes",
10907
+ name: "data"
10908
+ }
10909
+ ],
10910
+ outputs: []
10911
+ },
10912
+ {
10913
+ type: "function",
10914
+ name: "verify",
10915
+ constant: true,
10916
+ stateMutability: "view",
10917
+ payable: false,
10918
+ inputs: [
10919
+ {
10920
+ type: "tuple",
10921
+ name: "request",
10922
+ components: [
10923
+ {
10924
+ type: "address",
10925
+ name: "from"
10926
+ },
10927
+ {
10928
+ type: "address",
10929
+ name: "to"
10930
+ },
10931
+ {
10932
+ type: "uint256",
10933
+ name: "value"
10934
+ },
10935
+ {
10936
+ type: "uint256",
10937
+ name: "gas"
10938
+ },
10939
+ {
10940
+ type: "uint48",
10941
+ name: "deadline"
10942
+ },
10943
+ {
10944
+ type: "bytes",
10945
+ name: "data"
10946
+ },
10947
+ {
10948
+ type: "bytes",
10949
+ name: "signature"
10950
+ }
10951
+ ]
10952
+ }
10953
+ ],
10954
+ outputs: [
10955
+ {
10956
+ type: "bool"
10957
+ }
10958
+ ]
10959
+ }
10960
+ ];
10961
+
10962
+ // src/abi/Reimbursement.json
10963
+ var Reimbursement_default = [
10964
+ {
10965
+ type: "error",
10966
+ name: "AddressEmptyCode",
10967
+ inputs: [
10968
+ {
10969
+ type: "address",
10970
+ name: "target"
10971
+ }
10972
+ ]
10973
+ },
10974
+ {
10975
+ type: "error",
10976
+ name: "AlreadyClaimed",
10977
+ inputs: [
10978
+ {
10979
+ type: "uint256",
10980
+ name: "caseId"
10981
+ },
10982
+ {
10983
+ type: "address",
10984
+ name: "user"
10985
+ }
10986
+ ]
10987
+ },
10988
+ {
10989
+ type: "error",
10990
+ name: "ERC1967InvalidImplementation",
10991
+ inputs: [
10992
+ {
10993
+ type: "address",
10994
+ name: "implementation"
10995
+ }
10996
+ ]
10997
+ },
10998
+ {
10999
+ type: "error",
11000
+ name: "ERC1967NonPayable",
11001
+ inputs: []
11002
+ },
11003
+ {
11004
+ type: "error",
11005
+ name: "FailedCall",
11006
+ inputs: []
11007
+ },
11008
+ {
11009
+ type: "error",
11010
+ name: "InvalidAmount",
11011
+ inputs: [
11012
+ {
11013
+ type: "uint256",
11014
+ name: "caseId"
11015
+ },
11016
+ {
11017
+ type: "address",
11018
+ name: "user"
11019
+ }
11020
+ ]
11021
+ },
11022
+ {
11023
+ type: "error",
11024
+ name: "InvalidInitialization",
11025
+ inputs: []
11026
+ },
11027
+ {
11028
+ type: "error",
11029
+ name: "MerkleTreeVerificationFailed",
11030
+ inputs: [
11031
+ {
11032
+ type: "uint256",
11033
+ name: "caseId"
11034
+ },
11035
+ {
11036
+ type: "address",
11037
+ name: "user"
11038
+ }
11039
+ ]
11040
+ },
11041
+ {
11042
+ type: "error",
11043
+ name: "NotAddressManager",
11044
+ inputs: []
11045
+ },
11046
+ {
11047
+ type: "error",
11048
+ name: "NotDependencyManager",
11049
+ inputs: []
11050
+ },
11051
+ {
11052
+ type: "error",
11053
+ name: "NotInitializing",
11054
+ inputs: []
11055
+ },
11056
+ {
11057
+ type: "error",
11058
+ name: "NotProxyAdmin",
11059
+ inputs: []
11060
+ },
11061
+ {
11062
+ type: "error",
11063
+ name: "PermissionDenied",
11064
+ inputs: [
11065
+ {
11066
+ type: "address",
11067
+ name: "caller"
11068
+ },
11069
+ {
11070
+ type: "address",
11071
+ name: "target"
11072
+ }
11073
+ ]
11074
+ },
11075
+ {
11076
+ type: "error",
11077
+ name: "ReimbursementValidity",
11078
+ inputs: [
11079
+ {
11080
+ type: "uint256",
11081
+ name: "caseId"
11082
+ }
11083
+ ]
11084
+ },
11085
+ {
11086
+ type: "error",
11087
+ name: "SafeERC20FailedOperation",
11088
+ inputs: [
11089
+ {
11090
+ type: "address",
11091
+ name: "token"
11092
+ }
11093
+ ]
11094
+ },
11095
+ {
11096
+ type: "error",
11097
+ name: "UUPSUnauthorizedCallContext",
11098
+ inputs: []
11099
+ },
11100
+ {
11101
+ type: "error",
11102
+ name: "UUPSUnsupportedProxiableUUID",
11103
+ inputs: [
11104
+ {
11105
+ type: "bytes32",
11106
+ name: "slot"
11107
+ }
11108
+ ]
11109
+ },
11110
+ {
11111
+ type: "event",
11112
+ anonymous: false,
11113
+ name: "Initialized",
11114
+ inputs: [
11115
+ {
11116
+ type: "uint64",
11117
+ name: "version",
11118
+ indexed: false
11119
+ }
11120
+ ]
11121
+ },
11122
+ {
11123
+ type: "event",
11124
+ anonymous: false,
11125
+ name: "ReimbursementClaimed",
11126
+ inputs: [
11127
+ {
11128
+ type: "uint256",
11129
+ name: "caseId",
11130
+ indexed: false
11131
+ },
11132
+ {
11133
+ type: "address",
11134
+ name: "user",
11135
+ indexed: false
11136
+ },
11137
+ {
11138
+ type: "uint256",
11139
+ name: "baseAmount",
11140
+ indexed: false
11141
+ },
11142
+ {
11143
+ type: "uint256",
11144
+ name: "quoteAmount",
11145
+ indexed: false
11146
+ }
11147
+ ]
11148
+ },
11149
+ {
11150
+ type: "event",
11151
+ anonymous: false,
11152
+ name: "ReimbursementInfoSet",
11153
+ inputs: [
11154
+ {
11155
+ type: "uint256",
11156
+ name: "caseId",
11157
+ indexed: false
11158
+ },
11159
+ {
11160
+ type: "bytes32",
11161
+ name: "merkleRoot",
11162
+ indexed: false
11163
+ },
11164
+ {
11165
+ type: "address",
11166
+ name: "baseToken",
11167
+ indexed: false
11168
+ },
11169
+ {
11170
+ type: "address",
11171
+ name: "quoteToken",
11172
+ indexed: false
11173
+ },
11174
+ {
11175
+ type: "uint256",
11176
+ name: "totalBaseAmount",
11177
+ indexed: false
11178
+ },
11179
+ {
11180
+ type: "uint256",
11181
+ name: "totalQuoteAmount",
11182
+ indexed: false
11183
+ },
11184
+ {
11185
+ type: "uint256",
11186
+ name: "claimedBaseAmount",
11187
+ indexed: false
11188
+ },
11189
+ {
11190
+ type: "uint256",
11191
+ name: "claimedQuoteAmount",
11192
+ indexed: false
11193
+ },
11194
+ {
11195
+ type: "uint256",
11196
+ name: "expireTime",
11197
+ indexed: false
11198
+ }
11199
+ ]
11200
+ },
11201
+ {
11202
+ type: "event",
11203
+ anonymous: false,
11204
+ name: "Upgraded",
11205
+ inputs: [
11206
+ {
11207
+ type: "address",
11208
+ name: "implementation",
11209
+ indexed: true
11210
+ }
11211
+ ]
11212
+ },
11213
+ {
11214
+ type: "function",
11215
+ name: "UPGRADE_INTERFACE_VERSION",
11216
+ constant: true,
11217
+ stateMutability: "view",
11218
+ payable: false,
11219
+ inputs: [],
11220
+ outputs: [
11221
+ {
11222
+ type: "string"
11223
+ }
11224
+ ]
11225
+ },
11226
+ {
11227
+ type: "function",
11228
+ name: "claimReimbursement",
11229
+ constant: false,
11230
+ payable: false,
11231
+ inputs: [
11232
+ {
11233
+ type: "uint256",
11234
+ name: "caseId"
11235
+ },
11236
+ {
11237
+ type: "uint256",
11238
+ name: "baseAmount"
11239
+ },
11240
+ {
11241
+ type: "uint256",
11242
+ name: "quoteAmount"
11243
+ },
11244
+ {
11245
+ type: "bytes32[]",
11246
+ name: "merkleProof"
11247
+ }
11248
+ ],
11249
+ outputs: []
11250
+ },
11251
+ {
11252
+ type: "function",
11253
+ name: "getAddressManager",
11254
+ constant: true,
11255
+ stateMutability: "view",
11256
+ payable: false,
11257
+ inputs: [],
11258
+ outputs: [
11259
+ {
11260
+ type: "address"
11261
+ }
11262
+ ]
11263
+ },
11264
+ {
11265
+ type: "function",
11266
+ name: "getDependencyAddress",
11267
+ constant: true,
11268
+ stateMutability: "view",
11269
+ payable: false,
11270
+ inputs: [
11271
+ {
11272
+ type: "bytes32",
11273
+ name: "identifier"
11274
+ }
11275
+ ],
11276
+ outputs: [
11277
+ {
11278
+ type: "address"
11279
+ }
11280
+ ]
11281
+ },
11282
+ {
11283
+ type: "function",
11284
+ name: "getImplementation",
11285
+ constant: true,
11286
+ stateMutability: "view",
11287
+ payable: false,
11288
+ inputs: [],
11289
+ outputs: [
11290
+ {
11291
+ type: "address"
11292
+ }
11293
+ ]
11294
+ },
11295
+ {
11296
+ type: "function",
11297
+ name: "getReimbursementInfo",
11298
+ constant: true,
11299
+ stateMutability: "view",
11300
+ payable: false,
11301
+ inputs: [
11302
+ {
11303
+ type: "uint256",
11304
+ name: "caseId"
11305
+ }
11306
+ ],
11307
+ outputs: [
11308
+ {
11309
+ type: "tuple",
11310
+ components: [
11311
+ {
11312
+ type: "bytes32",
11313
+ name: "merkleRoot"
11314
+ },
11315
+ {
11316
+ type: "address",
11317
+ name: "baseToken"
11318
+ },
11319
+ {
11320
+ type: "address",
11321
+ name: "quoteToken"
11322
+ },
11323
+ {
11324
+ type: "uint256",
11325
+ name: "totalBaseAmount"
11326
+ },
11327
+ {
11328
+ type: "uint256",
11329
+ name: "totalQuoteAmount"
11330
+ },
11331
+ {
11332
+ type: "uint256",
11333
+ name: "claimedBaseAmount"
11334
+ },
11335
+ {
11336
+ type: "uint256",
11337
+ name: "claimedQuoteAmount"
11338
+ },
11339
+ {
11340
+ type: "uint256",
11341
+ name: "expireTime"
11342
+ }
11343
+ ]
11344
+ }
11345
+ ]
11346
+ },
11347
+ {
11348
+ type: "function",
11349
+ name: "initialize",
11350
+ constant: false,
11351
+ payable: false,
11352
+ inputs: [
11353
+ {
11354
+ type: "address",
11355
+ name: "addressManager"
11356
+ }
11357
+ ],
11358
+ outputs: []
11359
+ },
11360
+ {
11361
+ type: "function",
11362
+ name: "proxiableUUID",
11363
+ constant: true,
11364
+ stateMutability: "view",
11365
+ payable: false,
11366
+ inputs: [],
11367
+ outputs: [
11368
+ {
11369
+ type: "bytes32"
11370
+ }
11371
+ ]
11372
+ },
11373
+ {
11374
+ type: "function",
11375
+ name: "setReimbursementInfo",
11376
+ constant: false,
11377
+ payable: false,
11378
+ inputs: [
11379
+ {
11380
+ type: "uint256",
11381
+ name: "caseId"
11382
+ },
11383
+ {
11384
+ type: "tuple",
11385
+ name: "reimbursementInfo",
11386
+ components: [
11387
+ {
11388
+ type: "bytes32",
11389
+ name: "merkleRoot"
11390
+ },
11391
+ {
11392
+ type: "address",
11393
+ name: "baseToken"
11394
+ },
11395
+ {
11396
+ type: "address",
11397
+ name: "quoteToken"
11398
+ },
11399
+ {
11400
+ type: "uint256",
11401
+ name: "totalBaseAmount"
11402
+ },
11403
+ {
11404
+ type: "uint256",
11405
+ name: "totalQuoteAmount"
11406
+ },
11407
+ {
11408
+ type: "uint256",
11409
+ name: "claimedBaseAmount"
11410
+ },
11411
+ {
11412
+ type: "uint256",
11413
+ name: "claimedQuoteAmount"
11414
+ },
11415
+ {
11416
+ type: "uint256",
11417
+ name: "expireTime"
11418
+ }
11419
+ ]
11420
+ }
11421
+ ],
11422
+ outputs: []
11423
+ },
11424
+ {
11425
+ type: "function",
11426
+ name: "upgradeTo",
11427
+ constant: false,
11428
+ stateMutability: "payable",
11429
+ payable: true,
11430
+ inputs: [
11431
+ {
11432
+ type: "address",
11433
+ name: "newImplementation"
11434
+ },
11435
+ {
11436
+ type: "bytes",
11437
+ name: "data"
11438
+ }
11439
+ ],
11440
+ outputs: []
11441
+ },
11442
+ {
11443
+ type: "function",
11444
+ name: "upgradeToAndCall",
11445
+ constant: false,
11446
+ stateMutability: "payable",
11447
+ payable: true,
11448
+ inputs: [
11449
+ {
11450
+ type: "address",
11451
+ name: "newImplementation"
11452
+ },
11453
+ {
11454
+ type: "bytes",
11455
+ name: "data"
11456
+ }
11457
+ ],
11458
+ outputs: []
11459
+ }
11460
+ ];
11461
+
11462
+ // src/abi/DisputeCourt.json
11463
+ var DisputeCourt_default = [
11464
+ {
11465
+ type: "constructor",
11466
+ payable: false,
11467
+ inputs: []
11468
+ },
11469
+ {
11470
+ type: "error",
11471
+ name: "AddressEmptyCode",
11472
+ inputs: [
11473
+ {
11474
+ type: "address",
11475
+ name: "target"
11476
+ }
11477
+ ]
11478
+ },
11479
+ {
11480
+ type: "error",
11481
+ name: "AlreadyVoted",
11482
+ inputs: []
11483
+ },
11484
+ {
11485
+ type: "error",
11486
+ name: "BondNotReleased",
11487
+ inputs: []
11488
+ },
11489
+ {
11490
+ type: "error",
11491
+ name: "CaseAppealNotFinished",
11492
+ inputs: []
11493
+ },
11494
+ {
11495
+ type: "error",
11496
+ name: "CaseDeadlineNotReached",
11497
+ inputs: []
11498
+ },
11499
+ {
11500
+ type: "error",
11501
+ name: "CaseDeadlineReached",
11502
+ inputs: []
11503
+ },
11504
+ {
11505
+ type: "error",
11506
+ name: "CaseNotAccepted",
11507
+ inputs: []
11508
+ },
11509
+ {
11510
+ type: "error",
11511
+ name: "CaseNotExist",
11512
+ inputs: [
11513
+ {
11514
+ type: "uint256",
11515
+ name: "caseId"
11516
+ }
11517
+ ]
11518
+ },
11519
+ {
11520
+ type: "error",
11521
+ name: "CaseRespondentAppealed",
11522
+ inputs: [
11523
+ {
11524
+ type: "uint256",
11525
+ name: "caseId"
11526
+ },
11527
+ {
11528
+ type: "address",
11529
+ name: "respondent"
11530
+ }
11531
+ ]
11532
+ },
11533
+ {
11534
+ type: "error",
11535
+ name: "ChainIdMismatch",
11536
+ inputs: []
11537
+ },
11538
+ {
11539
+ type: "error",
11540
+ name: "DisputeNotAllowed",
11541
+ inputs: []
11542
+ },
11543
+ {
11544
+ type: "error",
11545
+ name: "ERC1967InvalidImplementation",
11546
+ inputs: [
11547
+ {
11548
+ type: "address",
11549
+ name: "implementation"
11550
+ }
11551
+ ]
11552
+ },
11553
+ {
11554
+ type: "error",
11555
+ name: "ERC1967NonPayable",
11556
+ inputs: []
11557
+ },
11558
+ {
11559
+ type: "error",
11560
+ name: "FailedCall",
11561
+ inputs: []
11562
+ },
11563
+ {
11564
+ type: "error",
11565
+ name: "InvalidAccountNonce",
11566
+ inputs: [
11567
+ {
11568
+ type: "address",
11569
+ name: "account"
11570
+ },
11571
+ {
11572
+ type: "uint256",
11573
+ name: "currentNonce"
11574
+ }
11575
+ ]
11576
+ },
11577
+ {
11578
+ type: "error",
11579
+ name: "InvalidContractAddress",
11580
+ inputs: []
11581
+ },
11582
+ {
11583
+ type: "error",
11584
+ name: "InvalidFunctionSignature",
11585
+ inputs: []
11586
+ },
11587
+ {
11588
+ type: "error",
11589
+ name: "InvalidInitialization",
11590
+ inputs: []
11591
+ },
11592
+ {
11593
+ type: "error",
11594
+ name: "InvalidParameter",
11595
+ inputs: []
11596
+ },
11597
+ {
11598
+ type: "error",
11599
+ name: "InvalidPayloadLength",
11600
+ inputs: [
11601
+ {
11602
+ type: "uint256",
11603
+ name: "received"
11604
+ },
11605
+ {
11606
+ type: "uint256",
11607
+ name: "expected"
11608
+ }
11609
+ ]
11610
+ },
11611
+ {
11612
+ type: "error",
11613
+ name: "InvalidPoolToken",
11614
+ inputs: []
11615
+ },
11616
+ {
11617
+ type: "error",
11618
+ name: "InvalidProfitAmount",
11619
+ inputs: []
11620
+ },
11621
+ {
11622
+ type: "error",
11623
+ name: "InvalidResponseVersion",
11624
+ inputs: []
11625
+ },
11626
+ {
11627
+ type: "error",
11628
+ name: "InvalidSourceChain",
11629
+ inputs: []
11630
+ },
11631
+ {
11632
+ type: "error",
11633
+ name: "NoChainResponse",
11634
+ inputs: []
11635
+ },
11636
+ {
11637
+ type: "error",
11638
+ name: "NotAddressManager",
11639
+ inputs: []
11640
+ },
11641
+ {
11642
+ type: "error",
11643
+ name: "NotCaseRespondent",
11644
+ inputs: [
11645
+ {
11646
+ type: "uint256",
11647
+ name: "caseId"
11648
+ },
11649
+ {
11650
+ type: "address",
11651
+ name: "respondent"
11652
+ }
11653
+ ]
11654
+ },
11655
+ {
11656
+ type: "error",
11657
+ name: "NotDependencyManager",
11658
+ inputs: []
11659
+ },
11660
+ {
11661
+ type: "error",
11662
+ name: "NotInitializing",
11663
+ inputs: []
11664
+ },
11665
+ {
11666
+ type: "error",
11667
+ name: "NotProxyAdmin",
11668
+ inputs: []
11669
+ },
11670
+ {
11671
+ type: "error",
11672
+ name: "NumberOfResponsesMismatch",
11673
+ inputs: []
11674
+ },
11675
+ {
11676
+ type: "error",
11677
+ name: "OnlyRelayer",
11678
+ inputs: []
11679
+ },
11680
+ {
11681
+ type: "error",
11682
+ name: "PermissionDenied",
11683
+ inputs: [
11684
+ {
11685
+ type: "address",
11686
+ name: "caller"
11687
+ },
11688
+ {
11689
+ type: "address",
11690
+ name: "target"
11691
+ }
11692
+ ]
11693
+ },
11694
+ {
11695
+ type: "error",
11696
+ name: "RequestTypeMismatch",
11697
+ inputs: []
11698
+ },
11699
+ {
11700
+ type: "error",
11701
+ name: "RiskCloseNotCompleted",
11702
+ inputs: []
11703
+ },
11704
+ {
11705
+ type: "error",
11706
+ name: "SafeERC20FailedOperation",
11707
+ inputs: [
11708
+ {
11709
+ type: "address",
11710
+ name: "token"
11711
+ }
11712
+ ]
11713
+ },
11714
+ {
11715
+ type: "error",
11716
+ name: "SignatureExpired",
11717
+ inputs: []
11718
+ },
11719
+ {
11720
+ type: "error",
11721
+ name: "UUPSUnauthorizedCallContext",
11722
+ inputs: []
11723
+ },
11724
+ {
11725
+ type: "error",
11726
+ name: "UUPSUnsupportedProxiableUUID",
11727
+ inputs: [
11728
+ {
11729
+ type: "bytes32",
11730
+ name: "slot"
11731
+ }
11732
+ ]
11733
+ },
11734
+ {
11735
+ type: "error",
11736
+ name: "UnexpectedCaseState",
11737
+ inputs: []
11738
+ },
11739
+ {
11740
+ type: "error",
11741
+ name: "UnexpectedCaseType",
11742
+ inputs: []
11743
+ },
11744
+ {
11745
+ type: "error",
11746
+ name: "UnexpectedNumberOfResults",
11747
+ inputs: []
11748
+ },
11749
+ {
11750
+ type: "error",
11751
+ name: "UnsupportedQueryType",
11752
+ inputs: [
11753
+ {
11754
+ type: "uint8",
11755
+ name: "received"
11756
+ }
11757
+ ]
11758
+ },
11759
+ {
11760
+ type: "error",
11761
+ name: "UntrustfulVoting",
11762
+ inputs: []
11763
+ },
11764
+ {
11765
+ type: "error",
11766
+ name: "VerificationFailed",
11767
+ inputs: []
11768
+ },
11769
+ {
11770
+ type: "error",
11771
+ name: "VersionMismatch",
11772
+ inputs: []
11773
+ },
11774
+ {
11775
+ type: "error",
11776
+ name: "WrongQueryType",
11777
+ inputs: [
11778
+ {
11779
+ type: "uint8",
11780
+ name: "received"
11781
+ },
11782
+ {
11783
+ type: "uint8",
11784
+ name: "expected"
11785
+ }
11786
+ ]
11787
+ },
11788
+ {
11789
+ type: "error",
11790
+ name: "ZeroQueries",
11791
+ inputs: []
11792
+ },
11793
+ {
11794
+ type: "event",
11795
+ anonymous: false,
11796
+ name: "AppealCanceled",
11797
+ inputs: [
11798
+ {
11799
+ type: "uint256",
11800
+ name: "caseId",
11801
+ indexed: false
11802
+ },
11803
+ {
11804
+ type: "uint256",
11805
+ name: "appealCaseId",
11806
+ indexed: false
11807
+ },
11808
+ {
11809
+ type: "address",
11810
+ name: "complainant",
11811
+ indexed: false
11812
+ },
11813
+ {
11814
+ type: "bool",
11815
+ name: "isMalicious",
11816
+ indexed: false
11817
+ }
11818
+ ]
11819
+ },
11820
+ {
11821
+ type: "event",
11822
+ anonymous: false,
11823
+ name: "AppealFiled",
11824
+ inputs: [
11825
+ {
11826
+ type: "uint256",
11827
+ name: "caseId",
11828
+ indexed: false
11829
+ },
11830
+ {
11831
+ type: "uint256",
11832
+ name: "appealCaseId",
11833
+ indexed: false
11834
+ },
11835
+ {
11836
+ type: "address",
11837
+ name: "respondent",
11838
+ indexed: false
11839
+ },
11840
+ {
11841
+ type: "address",
11842
+ name: "appealToken",
11843
+ indexed: false
11844
+ },
11845
+ {
11846
+ type: "uint256",
11847
+ name: "appealBond",
11848
+ indexed: false
11849
+ },
11850
+ {
11851
+ type: "uint64",
11852
+ name: "appealDeadline",
11853
+ indexed: false
11854
+ }
11855
+ ]
11856
+ },
11857
+ {
11858
+ type: "event",
11859
+ anonymous: false,
11860
+ name: "AppealResolved",
11861
+ inputs: [
11862
+ {
11863
+ type: "uint256",
11864
+ name: "caseId",
11865
+ indexed: false
11866
+ },
11867
+ {
11868
+ type: "uint256",
11869
+ name: "appealCaseId",
11870
+ indexed: false
11871
+ },
11872
+ {
11873
+ type: "uint8",
11874
+ name: "resolution",
11875
+ indexed: false
11876
+ },
11877
+ {
11878
+ type: "address",
11879
+ name: "complainant",
11880
+ indexed: false
11881
+ }
11882
+ ]
11883
+ },
11884
+ {
11885
+ type: "event",
11886
+ anonymous: false,
11887
+ name: "BondClaimed",
11888
+ inputs: [
11889
+ {
11890
+ type: "uint256",
11891
+ name: "caseId",
11892
+ indexed: false
11893
+ },
11894
+ {
11895
+ type: "address",
11896
+ name: "user",
11897
+ indexed: false
11898
+ },
11899
+ {
11900
+ type: "address",
11901
+ name: "token",
11902
+ indexed: false
11903
+ },
11904
+ {
11905
+ type: "uint256",
11906
+ name: "amount",
11907
+ indexed: false
11908
+ }
11909
+ ]
11910
+ },
11911
+ {
11912
+ type: "event",
11913
+ anonymous: false,
11914
+ name: "CaseAppealsResolved",
11915
+ inputs: [
11916
+ {
11917
+ type: "uint256",
11918
+ name: "caseId",
11919
+ indexed: false
11920
+ }
11921
+ ]
11922
+ },
11923
+ {
11924
+ type: "event",
11925
+ anonymous: false,
11926
+ name: "CaseRiskClosed",
11927
+ inputs: [
11928
+ {
11929
+ type: "uint256",
11930
+ name: "caseId",
11931
+ indexed: false
11932
+ }
11933
+ ]
11934
+ },
11935
+ {
11936
+ type: "event",
11937
+ anonymous: false,
11938
+ name: "DisputeCanceled",
11939
+ inputs: [
11940
+ {
11941
+ type: "uint256",
11942
+ name: "caseId",
11943
+ indexed: false
11944
+ },
11945
+ {
11946
+ type: "address",
11947
+ name: "complainant",
11948
+ indexed: false
11949
+ },
11950
+ {
11951
+ type: "bool",
11952
+ name: "isMalicious",
11953
+ indexed: false
11954
+ }
11955
+ ]
11956
+ },
11957
+ {
11958
+ type: "event",
11959
+ anonymous: false,
11960
+ name: "DisputeConfigurationUpdated",
11961
+ inputs: [
11962
+ {
11963
+ type: "tuple",
11964
+ name: "newDisputeConfigration",
11965
+ indexed: false,
11966
+ components: [
11967
+ {
11968
+ type: "address",
11969
+ name: "appealToken"
11970
+ },
11971
+ {
11972
+ type: "uint64",
11973
+ name: "disputeBondUsd"
11974
+ },
11975
+ {
11976
+ type: "uint64",
11977
+ name: "appealBondUsd"
11978
+ },
11979
+ {
11980
+ type: "uint64",
11981
+ name: "disputeThresholdUsd"
11982
+ },
11983
+ {
11984
+ type: "uint64",
11985
+ name: "caseDuration"
11986
+ },
11987
+ {
11988
+ type: "uint64",
11989
+ name: "voteDuration"
11990
+ },
11991
+ {
11992
+ type: "uint64",
11993
+ name: "resolveDuration"
11994
+ },
11995
+ {
11996
+ type: "uint32",
11997
+ name: "voteCountRate"
11998
+ },
11999
+ {
12000
+ type: "uint32",
12001
+ name: "effectiveVoteRate"
12002
+ }
12003
+ ]
12004
+ }
12005
+ ]
12006
+ },
12007
+ {
12008
+ type: "event",
12009
+ anonymous: false,
12010
+ name: "DisputeFiled",
12011
+ inputs: [
12012
+ {
12013
+ type: "uint256",
12014
+ name: "caseId",
12015
+ indexed: false
12016
+ },
12017
+ {
12018
+ type: "bytes32",
12019
+ name: "poolId",
12020
+ indexed: false
12021
+ },
12022
+ {
12023
+ type: "address",
12024
+ name: "complainant",
12025
+ indexed: false
12026
+ },
12027
+ {
12028
+ type: "address",
12029
+ name: "poolToken",
12030
+ indexed: false
12031
+ },
12032
+ {
12033
+ type: "uint256",
12034
+ name: "disputeBond",
12035
+ indexed: false
12036
+ },
12037
+ {
12038
+ type: "uint64",
12039
+ name: "caseDeadline",
12040
+ indexed: false
12041
+ }
12042
+ ]
12043
+ },
12044
+ {
12045
+ type: "event",
12046
+ anonymous: false,
12047
+ name: "DisputeResolved",
12048
+ inputs: [
12049
+ {
12050
+ type: "uint256",
12051
+ name: "caseId",
12052
+ indexed: false
12053
+ },
12054
+ {
12055
+ type: "uint8",
12056
+ name: "resolution",
12057
+ indexed: false
12058
+ },
12059
+ {
12060
+ type: "uint64",
12061
+ name: "appealDeadline",
12062
+ indexed: false
12063
+ }
12064
+ ]
12065
+ },
12066
+ {
12067
+ type: "event",
12068
+ anonymous: false,
12069
+ name: "ForfeitBondsClaimed",
12070
+ inputs: [
12071
+ {
12072
+ type: "address",
12073
+ name: "receiver",
12074
+ indexed: false
12075
+ },
12076
+ {
12077
+ type: "address",
12078
+ name: "token",
12079
+ indexed: false
12080
+ },
12081
+ {
12082
+ type: "uint256",
12083
+ name: "amount",
12084
+ indexed: false
12085
+ }
12086
+ ]
12087
+ },
12088
+ {
12089
+ type: "event",
12090
+ anonymous: false,
12091
+ name: "Initialized",
12092
+ inputs: [
12093
+ {
12094
+ type: "uint64",
12095
+ name: "version",
12096
+ indexed: false
12097
+ }
12098
+ ]
12099
+ },
12100
+ {
12101
+ type: "event",
12102
+ anonymous: false,
12103
+ name: "ReimbursementProcessed",
12104
+ inputs: [
12105
+ {
12106
+ type: "uint256",
12107
+ name: "caseId",
12108
+ indexed: false
12109
+ },
12110
+ {
12111
+ type: "tuple",
12112
+ name: "reimbursementInfo",
12113
+ indexed: false,
12114
+ components: [
12115
+ {
12116
+ type: "bytes32",
12117
+ name: "merkleRoot"
12118
+ },
12119
+ {
12120
+ type: "address",
12121
+ name: "baseToken"
12122
+ },
12123
+ {
12124
+ type: "address",
12125
+ name: "quoteToken"
12126
+ },
12127
+ {
12128
+ type: "uint256",
12129
+ name: "totalBaseAmount"
12130
+ },
12131
+ {
12132
+ type: "uint256",
12133
+ name: "totalQuoteAmount"
12134
+ },
12135
+ {
12136
+ type: "uint256",
12137
+ name: "claimedBaseAmount"
12138
+ },
12139
+ {
12140
+ type: "uint256",
12141
+ name: "claimedQuoteAmount"
12142
+ },
12143
+ {
12144
+ type: "uint256",
12145
+ name: "expireTime"
12146
+ }
12147
+ ]
12148
+ }
12149
+ ]
12150
+ },
12151
+ {
12152
+ type: "event",
12153
+ anonymous: false,
12154
+ name: "Upgraded",
12155
+ inputs: [
12156
+ {
12157
+ type: "address",
12158
+ name: "implementation",
12159
+ indexed: true
12160
+ }
12161
+ ]
12162
+ },
12163
+ {
12164
+ type: "event",
12165
+ anonymous: false,
12166
+ name: "Voted",
12167
+ inputs: [
12168
+ {
12169
+ type: "uint256",
12170
+ name: "caseId",
12171
+ indexed: false
12172
+ },
12173
+ {
12174
+ type: "address",
12175
+ name: "voter",
12176
+ indexed: false
12177
+ },
12178
+ {
12179
+ type: "uint8",
12180
+ name: "voteOption",
12181
+ indexed: false
12182
+ }
12183
+ ]
12184
+ },
12185
+ {
12186
+ type: "event",
12187
+ anonymous: false,
12188
+ name: "VotingOpened",
12189
+ inputs: [
12190
+ {
12191
+ type: "uint256",
12192
+ name: "caseId",
12193
+ indexed: false
12194
+ },
12195
+ {
12196
+ type: "uint256",
12197
+ name: "evidenceId",
12198
+ indexed: false
12199
+ },
12200
+ {
12201
+ type: "uint64",
12202
+ name: "voteDeadline",
12203
+ indexed: false
12204
+ },
12205
+ {
12206
+ type: "address[]",
12207
+ name: "respondents",
12208
+ indexed: false
12209
+ }
12210
+ ]
12211
+ },
12212
+ {
12213
+ type: "event",
12214
+ anonymous: false,
12215
+ name: "WormholeConfigurationUpdated",
12216
+ inputs: [
12217
+ {
12218
+ type: "tuple",
12219
+ name: "newWormholeConfiguration",
12220
+ indexed: false,
12221
+ components: [
12222
+ {
12223
+ type: "address",
12224
+ name: "wormhole"
12225
+ },
12226
+ {
12227
+ type: "address",
12228
+ name: "staker"
12229
+ },
12230
+ {
12231
+ type: "bytes4",
12232
+ name: "selector"
12233
+ }
12234
+ ]
12235
+ }
12236
+ ]
12237
+ },
12238
+ {
12239
+ type: "function",
12240
+ name: "UPGRADE_INTERFACE_VERSION",
12241
+ constant: true,
12242
+ stateMutability: "view",
12243
+ payable: false,
12244
+ inputs: [],
12245
+ outputs: [
12246
+ {
12247
+ type: "string"
12248
+ }
12249
+ ]
12250
+ },
12251
+ {
12252
+ type: "function",
12253
+ name: "appeal",
12254
+ constant: false,
12255
+ payable: false,
12256
+ inputs: [
12257
+ {
12258
+ type: "uint256",
12259
+ name: "caseId"
12260
+ }
12261
+ ],
12262
+ outputs: []
12263
+ },
12264
+ {
12265
+ type: "function",
12266
+ name: "canRiskControlClose",
12267
+ constant: true,
12268
+ stateMutability: "view",
12269
+ payable: false,
12270
+ inputs: [
12271
+ {
12272
+ type: "uint256",
12273
+ name: "caseId"
12274
+ }
12275
+ ],
12276
+ outputs: [
12277
+ {
12278
+ type: "bool"
12279
+ }
12280
+ ]
12281
+ },
12282
+ {
12283
+ type: "function",
12284
+ name: "cancelAppeal",
12285
+ constant: false,
12286
+ payable: false,
12287
+ inputs: [
12288
+ {
12289
+ type: "uint256",
12290
+ name: "caseId"
12291
+ },
12292
+ {
12293
+ type: "uint256",
12294
+ name: "appealCaseId"
12295
+ },
12296
+ {
12297
+ type: "bool",
12298
+ name: "isMalicious"
12299
+ }
12300
+ ],
12301
+ outputs: []
12302
+ },
12303
+ {
12304
+ type: "function",
12305
+ name: "cancelDispute",
12306
+ constant: false,
12307
+ payable: false,
12308
+ inputs: [
12309
+ {
12310
+ type: "uint256",
12311
+ name: "caseId"
12312
+ },
12313
+ {
12314
+ type: "bool",
12315
+ name: "isMalicious"
12316
+ }
12317
+ ],
12318
+ outputs: []
12319
+ },
12320
+ {
12321
+ type: "function",
12322
+ name: "caseIdSequencer",
12323
+ constant: true,
12324
+ stateMutability: "view",
12325
+ payable: false,
12326
+ inputs: [],
12327
+ outputs: [
12328
+ {
12329
+ type: "uint256"
12330
+ }
12331
+ ]
12332
+ },
12333
+ {
12334
+ type: "function",
12335
+ name: "claimBond",
12336
+ constant: false,
12337
+ payable: false,
12338
+ inputs: [
12339
+ {
12340
+ type: "uint256",
12341
+ name: "caseId"
12342
+ }
12343
+ ],
12344
+ outputs: []
12345
+ },
12346
+ {
12347
+ type: "function",
12348
+ name: "claimForfeitBonds",
12349
+ constant: false,
12350
+ payable: false,
12351
+ inputs: [
12352
+ {
12353
+ type: "address",
12354
+ name: "receiver"
12355
+ }
12356
+ ],
12357
+ outputs: []
12358
+ },
12359
+ {
12360
+ type: "function",
12361
+ name: "fileDispute",
12362
+ constant: false,
12363
+ stateMutability: "payable",
12364
+ payable: true,
12365
+ inputs: [
12366
+ {
12367
+ type: "tuple[]",
12368
+ name: "prices",
12369
+ components: [
12370
+ {
12371
+ type: "bytes32",
12372
+ name: "poolId"
12373
+ },
12374
+ {
12375
+ type: "uint8",
12376
+ name: "oracleType"
12377
+ },
12378
+ {
12379
+ type: "uint256",
12380
+ name: "referencePrice"
12381
+ },
12382
+ {
12383
+ type: "bytes",
12384
+ name: "oracleUpdateData"
12385
+ },
12386
+ {
12387
+ type: "uint64",
12388
+ name: "publishTime"
12389
+ }
12390
+ ]
12391
+ },
12392
+ {
12393
+ type: "bytes32",
12394
+ name: "poolId"
12395
+ },
12396
+ {
12397
+ type: "address",
12398
+ name: "poolToken"
12399
+ }
12400
+ ],
12401
+ outputs: []
12402
+ },
12403
+ {
12404
+ type: "function",
12405
+ name: "getAddressManager",
12406
+ constant: true,
12407
+ stateMutability: "view",
12408
+ payable: false,
12409
+ inputs: [],
12410
+ outputs: [
12411
+ {
12412
+ type: "address"
12413
+ }
12414
+ ]
12415
+ },
12416
+ {
12417
+ type: "function",
12418
+ name: "getDependencyAddress",
12419
+ constant: true,
12420
+ stateMutability: "view",
12421
+ payable: false,
12422
+ inputs: [
12423
+ {
12424
+ type: "bytes32",
12425
+ name: "identifier"
12426
+ }
12427
+ ],
12428
+ outputs: [
12429
+ {
12430
+ type: "address"
12431
+ }
12432
+ ]
12433
+ },
12434
+ {
12435
+ type: "function",
12436
+ name: "getDisputeConfiguration",
12437
+ constant: true,
12438
+ stateMutability: "view",
12439
+ payable: false,
12440
+ inputs: [],
12441
+ outputs: [
12442
+ {
12443
+ type: "tuple",
12444
+ components: [
12445
+ {
12446
+ type: "address",
12447
+ name: "appealToken"
12448
+ },
12449
+ {
12450
+ type: "uint64",
12451
+ name: "disputeBondUsd"
12452
+ },
12453
+ {
12454
+ type: "uint64",
12455
+ name: "appealBondUsd"
12456
+ },
12457
+ {
12458
+ type: "uint64",
12459
+ name: "disputeThresholdUsd"
12460
+ },
12461
+ {
12462
+ type: "uint64",
12463
+ name: "caseDuration"
12464
+ },
12465
+ {
12466
+ type: "uint64",
12467
+ name: "voteDuration"
12468
+ },
12469
+ {
12470
+ type: "uint64",
12471
+ name: "resolveDuration"
12472
+ },
12473
+ {
12474
+ type: "uint32",
12475
+ name: "voteCountRate"
12476
+ },
12477
+ {
12478
+ type: "uint32",
12479
+ name: "effectiveVoteRate"
12480
+ }
12481
+ ]
12482
+ }
12483
+ ]
12484
+ },
12485
+ {
12486
+ type: "function",
12487
+ name: "getImplementation",
12488
+ constant: true,
12489
+ stateMutability: "view",
12490
+ payable: false,
12491
+ inputs: [],
12492
+ outputs: [
12493
+ {
12494
+ type: "address"
12495
+ }
12496
+ ]
12497
+ },
12498
+ {
12499
+ type: "function",
12500
+ name: "initialize",
12501
+ constant: false,
12502
+ payable: false,
12503
+ inputs: [
12504
+ {
12505
+ type: "address",
12506
+ name: "addressManager"
12507
+ }
12508
+ ],
12509
+ outputs: []
12510
+ },
12511
+ {
12512
+ type: "function",
12513
+ name: "isCaseRespondents",
12514
+ constant: true,
12515
+ stateMutability: "view",
12516
+ payable: false,
12517
+ inputs: [
12518
+ {
12519
+ type: "uint256",
12520
+ name: "caseId"
12521
+ },
12522
+ {
12523
+ type: "address",
12524
+ name: "account"
12525
+ }
12526
+ ],
12527
+ outputs: [
12528
+ {
12529
+ type: "bool"
12530
+ }
12531
+ ]
12532
+ },
12533
+ {
12534
+ type: "function",
12535
+ name: "nonces",
12536
+ constant: true,
12537
+ stateMutability: "view",
12538
+ payable: false,
12539
+ inputs: [
12540
+ {
12541
+ type: "address",
12542
+ name: "owner"
12543
+ }
12544
+ ],
12545
+ outputs: [
12546
+ {
12547
+ type: "uint256"
12548
+ }
12549
+ ]
12550
+ },
12551
+ {
12552
+ type: "function",
12553
+ name: "openVoting",
12554
+ constant: false,
12555
+ payable: false,
12556
+ inputs: [
12557
+ {
12558
+ type: "uint256",
12559
+ name: "caseId"
12560
+ },
12561
+ {
12562
+ type: "uint256",
12563
+ name: "evidenceId"
12564
+ },
12565
+ {
12566
+ type: "address[]",
12567
+ name: "respondents"
12568
+ }
12569
+ ],
12570
+ outputs: []
12571
+ },
12572
+ {
12573
+ type: "function",
12574
+ name: "processReimbursement",
12575
+ constant: false,
12576
+ payable: false,
12577
+ inputs: [
12578
+ {
12579
+ type: "uint256",
12580
+ name: "caseId"
12581
+ },
12582
+ {
12583
+ type: "tuple",
12584
+ name: "reimbursementInfo",
12585
+ components: [
12586
+ {
12587
+ type: "bytes32",
12588
+ name: "merkleRoot"
12589
+ },
12590
+ {
12591
+ type: "address",
12592
+ name: "baseToken"
12593
+ },
12594
+ {
12595
+ type: "address",
12596
+ name: "quoteToken"
12597
+ },
12598
+ {
12599
+ type: "uint256",
12600
+ name: "totalBaseAmount"
12601
+ },
12602
+ {
12603
+ type: "uint256",
12604
+ name: "totalQuoteAmount"
12605
+ },
12606
+ {
12607
+ type: "uint256",
12608
+ name: "claimedBaseAmount"
12609
+ },
12610
+ {
12611
+ type: "uint256",
12612
+ name: "claimedQuoteAmount"
12613
+ },
12614
+ {
12615
+ type: "uint256",
12616
+ name: "expireTime"
12617
+ }
12618
+ ]
12619
+ },
12620
+ {
12621
+ type: "bytes32[]",
12622
+ name: "zeroMerkleProof"
12623
+ }
12624
+ ],
12625
+ outputs: []
12626
+ },
12627
+ {
12628
+ type: "function",
12629
+ name: "proxiableUUID",
12630
+ constant: true,
12631
+ stateMutability: "view",
12632
+ payable: false,
12633
+ inputs: [],
12634
+ outputs: [
12635
+ {
12636
+ type: "bytes32"
12637
+ }
12638
+ ]
12639
+ },
12640
+ {
12641
+ type: "function",
12642
+ name: "resolveCaseAppeals",
12643
+ constant: false,
12644
+ payable: false,
12645
+ inputs: [
12646
+ {
12647
+ type: "uint256",
12648
+ name: "caseId"
12649
+ },
12650
+ {
12651
+ type: "bytes",
12652
+ name: "response"
12653
+ },
12654
+ {
12655
+ type: "tuple[]",
12656
+ name: "guardianSignatures",
12657
+ components: [
12658
+ {
12659
+ type: "bytes32",
12660
+ name: "r"
12661
+ },
12662
+ {
12663
+ type: "bytes32",
12664
+ name: "s"
12665
+ },
12666
+ {
12667
+ type: "uint8",
12668
+ name: "v"
12669
+ },
12670
+ {
12671
+ type: "uint8",
12672
+ name: "guardianIndex"
12673
+ }
12674
+ ]
12675
+ }
12676
+ ],
12677
+ outputs: []
12678
+ },
12679
+ {
12680
+ type: "function",
12681
+ name: "resolveDispute",
12682
+ constant: false,
10832
12683
  payable: false,
10833
- inputs: [],
10834
- outputs: [
12684
+ inputs: [
10835
12685
  {
10836
- type: "address"
12686
+ type: "uint256",
12687
+ name: "caseId"
12688
+ },
12689
+ {
12690
+ type: "bytes",
12691
+ name: "response"
12692
+ },
12693
+ {
12694
+ type: "tuple[]",
12695
+ name: "guardianSignatures",
12696
+ components: [
12697
+ {
12698
+ type: "bytes32",
12699
+ name: "r"
12700
+ },
12701
+ {
12702
+ type: "bytes32",
12703
+ name: "s"
12704
+ },
12705
+ {
12706
+ type: "uint8",
12707
+ name: "v"
12708
+ },
12709
+ {
12710
+ type: "uint8",
12711
+ name: "guardianIndex"
12712
+ }
12713
+ ]
10837
12714
  }
10838
- ]
12715
+ ],
12716
+ outputs: []
10839
12717
  },
10840
12718
  {
10841
12719
  type: "function",
10842
- name: "updateMaxRelayFee",
12720
+ name: "updateDisputeConfiguration",
10843
12721
  constant: false,
10844
12722
  payable: false,
10845
12723
  inputs: [
10846
12724
  {
10847
- type: "uint256",
10848
- name: "_maxRelayFee"
12725
+ type: "tuple",
12726
+ name: "disputeConfiguration",
12727
+ components: [
12728
+ {
12729
+ type: "address",
12730
+ name: "appealToken"
12731
+ },
12732
+ {
12733
+ type: "uint64",
12734
+ name: "disputeBondUsd"
12735
+ },
12736
+ {
12737
+ type: "uint64",
12738
+ name: "appealBondUsd"
12739
+ },
12740
+ {
12741
+ type: "uint64",
12742
+ name: "disputeThresholdUsd"
12743
+ },
12744
+ {
12745
+ type: "uint64",
12746
+ name: "caseDuration"
12747
+ },
12748
+ {
12749
+ type: "uint64",
12750
+ name: "voteDuration"
12751
+ },
12752
+ {
12753
+ type: "uint64",
12754
+ name: "resolveDuration"
12755
+ },
12756
+ {
12757
+ type: "uint32",
12758
+ name: "voteCountRate"
12759
+ },
12760
+ {
12761
+ type: "uint32",
12762
+ name: "effectiveVoteRate"
12763
+ }
12764
+ ]
10849
12765
  }
10850
12766
  ],
10851
12767
  outputs: []
10852
12768
  },
10853
12769
  {
10854
12770
  type: "function",
10855
- name: "updateRelayInfo",
12771
+ name: "updateWormholeConfiguration",
10856
12772
  constant: false,
10857
12773
  payable: false,
10858
12774
  inputs: [
10859
12775
  {
10860
- type: "uint256",
10861
- name: "_relayFee"
10862
- },
10863
- {
10864
- type: "uint256",
10865
- name: "_relayGas"
12776
+ type: "tuple",
12777
+ name: "wormholeConfiguration",
12778
+ components: [
12779
+ {
12780
+ type: "address",
12781
+ name: "wormhole"
12782
+ },
12783
+ {
12784
+ type: "address",
12785
+ name: "staker"
12786
+ },
12787
+ {
12788
+ type: "bytes4",
12789
+ name: "selector"
12790
+ }
12791
+ ]
10866
12792
  }
10867
12793
  ],
10868
12794
  outputs: []
@@ -10905,62 +12831,59 @@ var Forwarder_default = [
10905
12831
  },
10906
12832
  {
10907
12833
  type: "function",
10908
- name: "verify",
10909
- constant: true,
10910
- stateMutability: "view",
12834
+ name: "vote",
12835
+ constant: false,
10911
12836
  payable: false,
10912
12837
  inputs: [
10913
12838
  {
10914
- type: "tuple",
10915
- name: "request",
10916
- components: [
10917
- {
10918
- type: "address",
10919
- name: "from"
10920
- },
10921
- {
10922
- type: "address",
10923
- name: "to"
10924
- },
10925
- {
10926
- type: "uint256",
10927
- name: "value"
10928
- },
10929
- {
10930
- type: "uint256",
10931
- name: "gas"
10932
- },
10933
- {
10934
- type: "uint48",
10935
- name: "deadline"
10936
- },
10937
- {
10938
- type: "bytes",
10939
- name: "data"
10940
- },
10941
- {
10942
- type: "bytes",
10943
- name: "signature"
10944
- }
10945
- ]
10946
- }
10947
- ],
10948
- outputs: [
12839
+ type: "uint256",
12840
+ name: "caseId"
12841
+ },
10949
12842
  {
10950
- type: "bool"
12843
+ type: "address",
12844
+ name: "validator"
12845
+ },
12846
+ {
12847
+ type: "uint8",
12848
+ name: "voteOption"
12849
+ },
12850
+ {
12851
+ type: "uint256",
12852
+ name: "deadline"
12853
+ },
12854
+ {
12855
+ type: "uint8",
12856
+ name: "v"
12857
+ },
12858
+ {
12859
+ type: "bytes32",
12860
+ name: "r"
12861
+ },
12862
+ {
12863
+ type: "bytes32",
12864
+ name: "s"
10951
12865
  }
10952
- ]
12866
+ ],
12867
+ outputs: []
10953
12868
  }
10954
12869
  ];
10955
12870
 
10956
12871
  // src/web3/providers.ts
10957
12872
  var getTokenContract = async (chainId, tokenAddress) => {
10958
12873
  const provider = getJSONProvider(chainId);
10959
- return getContract(tokenAddress, IERC20Metadata_default, provider);
12874
+ return getContract(
12875
+ tokenAddress,
12876
+ IERC20Metadata_default,
12877
+ provider
12878
+ );
10960
12879
  };
10961
12880
  var getERC20Contract = async (chainId, tokenAddress) => {
10962
12881
  const provider = await getSignerProvider(chainId);
10963
- return getContract(tokenAddress, IERC20Metadata_default, provider);
12882
+ return getContract(
12883
+ tokenAddress,
12884
+ IERC20Metadata_default,
12885
+ provider
12886
+ );
10964
12887
  };
10965
12888
  var getAccount = async (chainId) => {
10966
12889
  const provider = await getSignerProvider(chainId);
@@ -10971,13 +12894,21 @@ var getLiquidityRouterContract = async (chainId) => {
10971
12894
  const addresses = address_default[chainId];
10972
12895
  const address = addresses.LIQUIDITY_ROUTER;
10973
12896
  const provider = await getSignerProvider(chainId);
10974
- return getContract(address, LiquidityRouter_default, provider);
12897
+ return getContract(
12898
+ address,
12899
+ LiquidityRouter_default,
12900
+ provider
12901
+ );
10975
12902
  };
10976
12903
  var getPoolManagerContract = async (chainId, type = 1 /* Signer */) => {
10977
12904
  const addresses = address_default[chainId];
10978
12905
  const address = addresses.POOL_MANAGER;
10979
12906
  const provider = type === 0 /* JSON */ ? getJSONProvider(chainId) : await getSignerProvider(chainId);
10980
- return getContract(address, PoolManager_default, provider);
12907
+ return getContract(
12908
+ address,
12909
+ PoolManager_default,
12910
+ provider
12911
+ );
10981
12912
  };
10982
12913
  var getQuotePoolContract = async (chainId, type = 0 /* JSON */) => {
10983
12914
  const addresses = address_default[chainId];
@@ -11014,13 +12945,21 @@ var getMarketManageContract = async (chainId, type = 0 /* JSON */) => {
11014
12945
  const address = addresses.MARKET_MANAGER;
11015
12946
  console.log(addresses.MARKET_MANAGER);
11016
12947
  const provider = type === 0 /* JSON */ ? getJSONProvider(chainId) : await getSignerProvider(chainId);
11017
- return getContract(address, MarketManager_default, provider);
12948
+ return getContract(
12949
+ address,
12950
+ MarketManager_default,
12951
+ provider
12952
+ );
11018
12953
  };
11019
12954
  var getDataProviderContract = async (chainId, type = 0 /* JSON */) => {
11020
12955
  const addresses = address_default[chainId];
11021
12956
  const address = addresses.DATA_PROVIDER;
11022
12957
  const provider = type === 0 /* JSON */ ? getJSONProvider(chainId) : await getSignerProvider(chainId);
11023
- return getContract(address, DataProvider_default, provider);
12958
+ return getContract(
12959
+ address,
12960
+ DataProvider_default,
12961
+ provider
12962
+ );
11024
12963
  };
11025
12964
  var getForwarderContract = async (chainId, type = 0 /* JSON */) => {
11026
12965
  const addresses = address_default[chainId];
@@ -11028,6 +12967,26 @@ var getForwarderContract = async (chainId, type = 0 /* JSON */) => {
11028
12967
  const provider = type === 0 /* JSON */ ? getJSONProvider(chainId) : await getSignerProvider(chainId);
11029
12968
  return getContract(address, Forwarder_default, provider);
11030
12969
  };
12970
+ var getReimbursementContract = async (chainId, type = 0 /* JSON */) => {
12971
+ const addresses = address_default[chainId];
12972
+ const address = addresses.REIMBURSEMENT;
12973
+ const provider = type === 0 /* JSON */ ? getJSONProvider(chainId) : await getSignerProvider(chainId);
12974
+ return getContract(
12975
+ address,
12976
+ Reimbursement_default,
12977
+ provider
12978
+ );
12979
+ };
12980
+ var getDisputeCourtContract = async (chainId, type = 0 /* JSON */) => {
12981
+ const addresses = address_default[chainId];
12982
+ const address = addresses.DISPUTE_COURT;
12983
+ const provider = type === 0 /* JSON */ ? getJSONProvider(chainId) : await getSignerProvider(chainId);
12984
+ return getContract(
12985
+ address,
12986
+ DisputeCourt_default,
12987
+ provider
12988
+ );
12989
+ };
11031
12990
 
11032
12991
  // src/config/error.ts
11033
12992
  var import_ethers_decode_error = require("ethers-decode-error");
@@ -13631,7 +15590,9 @@ var ARB_BETA_SEPOLIA = {
13631
15590
  DATA_PROVIDER: "0x19dD80bF40Af2d891F270085D9B1C49730a5a6B0",
13632
15591
  ORACLE_RESERVE: "0x3e0d8fAd0a5245D0b2C9d893fE155397a307577C",
13633
15592
  FORWARDER: "0xf58CAEDf8A76331848ef51108ea102D920Dcf785",
13634
- TRADING_ROUTER: "0x0000000000000000000000000000000000000000"
15593
+ TRADING_ROUTER: "0x0000000000000000000000000000000000000000",
15594
+ REIMBURSEMENT: "0x0000000000000000000000000000000000000000",
15595
+ DISPUTE_COURT: "0x0000000000000000000000000000000000000000"
13635
15596
  };
13636
15597
 
13637
15598
  // src/config/address/LINEA_BETA_SEPOLIA.ts
@@ -13654,7 +15615,9 @@ var LINEA_BETA_SEPOLIA = {
13654
15615
  ORACLE_RESERVE: "0xB3D5a67223905FE73a0749e7A03525838063C54C",
13655
15616
  USDC: "0xD984fd34f91F92DA0586e1bE82E262fF27DC431b",
13656
15617
  FORWARDER: "0x6C40462A4d45BA4119af59Fb9e41b8eaC9293962",
13657
- TRADING_ROUTER: "0x0000000000000000000000000000000000000000"
15618
+ TRADING_ROUTER: "0x0000000000000000000000000000000000000000",
15619
+ REIMBURSEMENT: "0x0000000000000000000000000000000000000000",
15620
+ DISPUTE_COURT: "0x0000000000000000000000000000000000000000"
13658
15621
  };
13659
15622
 
13660
15623
  // src/config/address/BSC_BETA_NET.ts
@@ -19558,7 +21521,7 @@ var Utils = class {
19558
21521
  }
19559
21522
  return null;
19560
21523
  }
19561
- async getApproveQuoteAmount(address, chainId, quoteAddress, spenderAddress) {
21524
+ async getApproveQuoteAmount(account, chainId, tokenAddress, spenderAddress) {
19562
21525
  try {
19563
21526
  const erc20Abi = [
19564
21527
  "function allowance(address owner, address spender) external view returns (uint256)"
@@ -19566,11 +21529,11 @@ var Utils = class {
19566
21529
  const spender = spenderAddress ?? getContractAddressByChainId(chainId).Account;
19567
21530
  const provider = await getJSONProvider(chainId);
19568
21531
  const tokenContract = new import_ethers25.ethers.Contract(
19569
- quoteAddress,
21532
+ tokenAddress,
19570
21533
  erc20Abi,
19571
21534
  provider
19572
21535
  );
19573
- const allowance = await tokenContract.allowance(address, spender);
21536
+ const allowance = await tokenContract.allowance(account, spender);
19574
21537
  return {
19575
21538
  code: 0,
19576
21539
  data: allowance.toString()
@@ -19580,12 +21543,12 @@ var Utils = class {
19580
21543
  throw typeof error === "string" ? error : await getErrorTextFormError(error);
19581
21544
  }
19582
21545
  }
19583
- async needsApproval(address, chainId, quoteAddress, requiredAmount, spenderAddress) {
21546
+ async needsApproval(account, chainId, tokenAddress, requiredAmount, spenderAddress) {
19584
21547
  try {
19585
21548
  const currentAllowanceRes = await this.getApproveQuoteAmount(
19586
- address,
21549
+ account,
19587
21550
  chainId,
19588
- quoteAddress,
21551
+ tokenAddress,
19589
21552
  spenderAddress
19590
21553
  );
19591
21554
  const currentAllowance = currentAllowanceRes.data;
@@ -19693,15 +21656,24 @@ var Utils = class {
19693
21656
  return priceData;
19694
21657
  } catch (error) {
19695
21658
  this.logger.error("Error getting oracle price:", error);
19696
- return {
19697
- price: "0",
19698
- vaa: "",
19699
- publishTime: 0,
19700
- poolId: "",
19701
- value: 0
19702
- };
21659
+ throw error;
19703
21660
  }
19704
21661
  }
21662
+ async buildUpdatePriceParams(poolId, chainId) {
21663
+ const priceData = await this.getOraclePrice(poolId, chainId);
21664
+ if (!priceData) throw new Error("Failed to get price data");
21665
+ return [
21666
+ {
21667
+ poolId,
21668
+ referencePrice: import_ethers25.ethers.parseUnits(priceData.price, 30),
21669
+ oracleUpdateData: priceData.vaa,
21670
+ publishTime: priceData.publishTime,
21671
+ oracleType: priceData.oracleType,
21672
+ value: priceData.value,
21673
+ price: priceData.price
21674
+ }
21675
+ ];
21676
+ }
19705
21677
  transferKlineResolutionToInterval(resolution) {
19706
21678
  switch (resolution) {
19707
21679
  case "1m":
@@ -19822,10 +21794,12 @@ var Utils = class {
19822
21794
  }
19823
21795
  return JSON.stringify(error);
19824
21796
  }
19825
- async getGasPriceByRatio(chainId) {
21797
+ async getGasPriceByRatio() {
21798
+ const chainId = this.configManager.getConfig().chainId;
19826
21799
  return (await bigintTradingGasPriceWithRatio(chainId)).gasPrice;
19827
21800
  }
19828
- async getGasLimitByRatio(chainId, gasLimit) {
21801
+ async getGasLimitByRatio(gasLimit) {
21802
+ const chainId = this.configManager.getConfig().chainId;
19829
21803
  return bigintTradingGasToRatioCalculator(gasLimit, chainId);
19830
21804
  }
19831
21805
  };
@@ -21675,6 +23649,172 @@ var BaseMyxClient = class {
21675
23649
  }
21676
23650
  };
21677
23651
 
23652
+ // src/manager/appeal/index.ts
23653
+ var Appeal = class extends BaseMyxClient {
23654
+ constructor(client2) {
23655
+ super(client2);
23656
+ }
23657
+ async getDisputeCourtContract() {
23658
+ const contract = await getDisputeCourtContract(this.config.chainId);
23659
+ return this.connectContract(contract);
23660
+ }
23661
+ async getReimbursementContract() {
23662
+ const contract = await getReimbursementContract(this.config.chainId);
23663
+ return this.connectContract(contract);
23664
+ }
23665
+ /**
23666
+ * submit appeal
23667
+ * @param poolId - the pool id
23668
+ * @param poolToken - the pool token
23669
+ * @returns the transaction receipt
23670
+ */
23671
+ async submitAppeal(poolId, lpToken, lpAmount) {
23672
+ const account = await this.config.signer?.getAddress() ?? "";
23673
+ const needApprove = await this.client.utils.needsApproval(
23674
+ account,
23675
+ this.config.chainId,
23676
+ lpToken,
23677
+ lpAmount,
23678
+ this.getAddressConfig().DISPUTE_COURT
23679
+ );
23680
+ this.client.logger.debug("need-approve", needApprove);
23681
+ if (needApprove) {
23682
+ await this.client.utils.approveAuthorization({
23683
+ chainId: this.config.chainId,
23684
+ quoteAddress: lpToken,
23685
+ spenderAddress: this.getAddressConfig().DISPUTE_COURT
23686
+ });
23687
+ }
23688
+ const contract = await this.getDisputeCourtContract();
23689
+ const prices = await this.client.utils.buildUpdatePriceParams(
23690
+ poolId,
23691
+ this.config.chainId
23692
+ );
23693
+ const value = BigInt(prices[0].value.toString() || "1");
23694
+ const _gasLimit = await contract.fileDispute.estimateGas(
23695
+ prices,
23696
+ poolId,
23697
+ lpToken,
23698
+ {
23699
+ value
23700
+ }
23701
+ );
23702
+ const gasLimit = await this.client.utils.getGasLimitByRatio(_gasLimit);
23703
+ const gasPrice = await this.client.utils.getGasPriceByRatio();
23704
+ this.client.logger.debug("txParams", {
23705
+ gasLimit,
23706
+ gasPrice,
23707
+ value
23708
+ });
23709
+ const tx = await contract.fileDispute(prices, poolId, lpToken, {
23710
+ value
23711
+ // gasLimit,
23712
+ // gasPrice,
23713
+ });
23714
+ const receipt = await tx.wait();
23715
+ return receipt;
23716
+ }
23717
+ /**
23718
+ * vote for appeal
23719
+ * @param caseId - the case id
23720
+ * @param isFor - true if for the appeal, false if against the appeal
23721
+ * @returns the transaction receipt
23722
+ */
23723
+ async voteForAppeal({
23724
+ caseId,
23725
+ validator,
23726
+ isFor,
23727
+ deadline,
23728
+ v,
23729
+ r,
23730
+ s
23731
+ }) {
23732
+ const contract = await this.getDisputeCourtContract();
23733
+ const _gasLimit = await contract.vote.estimateGas(
23734
+ caseId,
23735
+ validator,
23736
+ isFor ? 1 : 0,
23737
+ deadline,
23738
+ v,
23739
+ r,
23740
+ s
23741
+ );
23742
+ const gasLimit = await this.client.utils.getGasLimitByRatio(_gasLimit);
23743
+ const gasPrice = await this.client.utils.getGasPriceByRatio();
23744
+ const tx = await contract.vote(
23745
+ caseId,
23746
+ validator,
23747
+ isFor ? 1 : 0,
23748
+ deadline,
23749
+ v,
23750
+ r,
23751
+ s,
23752
+ {
23753
+ gasLimit,
23754
+ gasPrice
23755
+ }
23756
+ );
23757
+ const receipt = await tx.wait();
23758
+ return receipt;
23759
+ }
23760
+ /**
23761
+ * claim appeal margin
23762
+ * @param caseId - the case id
23763
+ * @returns the transaction receipt
23764
+ */
23765
+ async claimAppealMargin(caseId) {
23766
+ const contract = await this.getDisputeCourtContract();
23767
+ const _gasLimit = await contract.claimBond.estimateGas(caseId);
23768
+ const gasLimit = await this.client.utils.getGasLimitByRatio(_gasLimit);
23769
+ const gasPrice = await this.client.utils.getGasPriceByRatio();
23770
+ const tx = await contract.claimBond(caseId, {
23771
+ gasLimit,
23772
+ gasPrice
23773
+ });
23774
+ const receipt = await tx.wait();
23775
+ return receipt;
23776
+ }
23777
+ /**
23778
+ * claim reimbursement
23779
+ * @param caseId - the case id
23780
+ * @param baseAmount - the base amount
23781
+ * @param quoteAmount - the quote amount
23782
+ * @param merkleProof - the merkle proof
23783
+ * @returns the transaction receipt
23784
+ */
23785
+ async claimReimbursement(caseId, baseAmount, quoteAmount, merkleProof) {
23786
+ const contract = await this.getReimbursementContract();
23787
+ const _gasLimit = await contract.claimReimbursement.estimateGas(
23788
+ caseId,
23789
+ baseAmount,
23790
+ quoteAmount,
23791
+ merkleProof
23792
+ );
23793
+ const gasLimit = await this.client.utils.getGasLimitByRatio(_gasLimit);
23794
+ const gasPrice = await this.client.utils.getGasPriceByRatio();
23795
+ const tx = await contract.claimReimbursement(
23796
+ caseId,
23797
+ baseAmount,
23798
+ quoteAmount,
23799
+ merkleProof,
23800
+ {
23801
+ gasLimit,
23802
+ gasPrice
23803
+ }
23804
+ );
23805
+ const receipt = await tx.wait();
23806
+ return receipt;
23807
+ }
23808
+ /**
23809
+ * get dispute configuration
23810
+ */
23811
+ async getDisputeConfiguration() {
23812
+ const contract = await this.getDisputeCourtContract();
23813
+ const configuration = await contract.getDisputeConfiguration();
23814
+ return configuration;
23815
+ }
23816
+ };
23817
+
21678
23818
  // src/manager/referrals/index.tsx
21679
23819
  var Referrals = class extends BaseMyxClient {
21680
23820
  constructor(client2) {
@@ -21687,13 +23827,8 @@ var Referrals = class extends BaseMyxClient {
21687
23827
  const _gasLimit = await brokerContract.claimRebate.estimateGas(
21688
23828
  tokenAddress
21689
23829
  );
21690
- const gasLimit = await this.client.utils.getGasLimitByRatio(
21691
- this.config.chainId,
21692
- _gasLimit
21693
- );
21694
- const gasPrice = await this.client.utils.getGasPriceByRatio(
21695
- this.config.chainId
21696
- );
23830
+ const gasLimit = await this.client.utils.getGasLimitByRatio(_gasLimit);
23831
+ const gasPrice = await this.client.utils.getGasPriceByRatio();
21697
23832
  const tx = await brokerContract.claimRebate(tokenAddress, {
21698
23833
  gasPrice,
21699
23834
  gasLimit
@@ -21752,6 +23887,7 @@ var MyxClient = class {
21752
23887
  this.api
21753
23888
  );
21754
23889
  this.subscription = new SubScription(this.configManager, this.logger);
23890
+ this.appeal = new Appeal(this);
21755
23891
  this.referrals = new Referrals(this);
21756
23892
  }
21757
23893
  /**