@myx-trade/sdk 0.1.249 → 0.1.250-beta.1
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.d.mts +451 -188
- package/dist/index.d.ts +451 -188
- package/dist/index.js +2843 -322
- package/dist/index.mjs +2833 -322
- package/package.json +18 -21
package/dist/index.mjs
CHANGED
|
@@ -1380,7 +1380,9 @@ var ARB_TEST_SEPOLIA = {
|
|
|
1380
1380
|
DATA_PROVIDER: "0x1E1487d92f6FDbeEa8C2b48610CDCfbCC9c40fa3",
|
|
1381
1381
|
ORACLE_RESERVE: "0xb5f9C48815ab45BdC080523cF82Aaa2F7892b578",
|
|
1382
1382
|
FORWARDER: "0xc5A9f5786Ec4EBf5eeaD5C9263dD6105189C05F9",
|
|
1383
|
-
TRADING_ROUTER: "0x9B9359C2a5C1B103cC5bf66bDB0B78370dc4E706"
|
|
1383
|
+
TRADING_ROUTER: "0x9B9359C2a5C1B103cC5bf66bDB0B78370dc4E706",
|
|
1384
|
+
REIMBURSEMENT: "0x4583A223299b94B95d6937bEF6753afee2b8f81A",
|
|
1385
|
+
DISPUTE_COURT: "0xc6b8b22F0b06caae5C823926205a38276C65718f"
|
|
1384
1386
|
};
|
|
1385
1387
|
|
|
1386
1388
|
// src/config/address/LINEA_SEPOLIA.ts
|
|
@@ -1403,7 +1405,9 @@ var LINEA_SEPOLIA = {
|
|
|
1403
1405
|
DATA_PROVIDER: "0x0A64788b7FB6499fd2eFbb26A5D05e7C6B919db3",
|
|
1404
1406
|
ORACLE_RESERVE: "0xA4da3417Ae7697A4fa494Bec49b37F0Fb08E86e9",
|
|
1405
1407
|
FORWARDER: "0x702c06d4bb20Ee82Cf3DE8f5611FE3a86067e937",
|
|
1406
|
-
TRADING_ROUTER: "0x97656464d608A7d1Ac5B6C42655C6806A16aF5C4"
|
|
1408
|
+
TRADING_ROUTER: "0x97656464d608A7d1Ac5B6C42655C6806A16aF5C4",
|
|
1409
|
+
REIMBURSEMENT: "0x427E0C7E84D8D75f971c62D0688009B421598cCb",
|
|
1410
|
+
DISPUTE_COURT: "0x2f2dec0Cf321a9dA64BEf7dB0b84d998E37dBB11"
|
|
1407
1411
|
};
|
|
1408
1412
|
|
|
1409
1413
|
// src/config/address/BSC_TEST_NET.ts
|
|
@@ -1426,7 +1430,9 @@ var BSC_TEST_NET = {
|
|
|
1426
1430
|
DATA_PROVIDER: "0x827c4D63eCafE28bC7f1aFF460f9A14b4938d76e",
|
|
1427
1431
|
ORACLE_RESERVE: "0xCF72C9fB77cF051F079151d5955753A5b93F4E92",
|
|
1428
1432
|
FORWARDER: "0x2912Ae76E175776B44E3a0f67E60F2624AEeED03",
|
|
1429
|
-
TRADING_ROUTER: "0x0000000000000000000000000000000000000000"
|
|
1433
|
+
TRADING_ROUTER: "0x0000000000000000000000000000000000000000",
|
|
1434
|
+
REIMBURSEMENT: "0x0000000000000000000000000000000000000000",
|
|
1435
|
+
DISPUTE_COURT: "0x0000000000000000000000000000000000000000"
|
|
1430
1436
|
};
|
|
1431
1437
|
|
|
1432
1438
|
// src/config/address.ts
|
|
@@ -1775,7 +1781,7 @@ var RotationProvider = class extends BaseProvider {
|
|
|
1775
1781
|
// package.json
|
|
1776
1782
|
var package_default = {
|
|
1777
1783
|
name: "@myx-trade/sdk",
|
|
1778
|
-
version: "0.1.
|
|
1784
|
+
version: "0.1.250-beta.1",
|
|
1779
1785
|
private: false,
|
|
1780
1786
|
publishConfig: {
|
|
1781
1787
|
access: "public"
|
|
@@ -10321,267 +10327,2220 @@ var Forwarder_default = [
|
|
|
10321
10327
|
}
|
|
10322
10328
|
];
|
|
10323
10329
|
|
|
10324
|
-
// src/
|
|
10325
|
-
var
|
|
10326
|
-
|
|
10327
|
-
|
|
10328
|
-
|
|
10329
|
-
|
|
10330
|
-
|
|
10331
|
-
|
|
10332
|
-
|
|
10333
|
-
|
|
10334
|
-
|
|
10335
|
-
|
|
10336
|
-
|
|
10337
|
-
|
|
10338
|
-
|
|
10339
|
-
|
|
10340
|
-
|
|
10341
|
-
|
|
10342
|
-
|
|
10343
|
-
}
|
|
10344
|
-
|
|
10345
|
-
|
|
10346
|
-
|
|
10347
|
-
|
|
10348
|
-
|
|
10349
|
-
}
|
|
10350
|
-
|
|
10351
|
-
|
|
10352
|
-
|
|
10353
|
-
|
|
10354
|
-
|
|
10355
|
-
|
|
10356
|
-
|
|
10357
|
-
|
|
10358
|
-
|
|
10359
|
-
|
|
10360
|
-
|
|
10361
|
-
|
|
10362
|
-
|
|
10363
|
-
|
|
10364
|
-
|
|
10365
|
-
|
|
10366
|
-
|
|
10367
|
-
|
|
10368
|
-
|
|
10369
|
-
}
|
|
10370
|
-
|
|
10371
|
-
|
|
10372
|
-
|
|
10373
|
-
|
|
10374
|
-
|
|
10375
|
-
|
|
10376
|
-
|
|
10377
|
-
|
|
10378
|
-
|
|
10379
|
-
|
|
10380
|
-
|
|
10381
|
-
|
|
10382
|
-
|
|
10383
|
-
|
|
10384
|
-
|
|
10385
|
-
|
|
10386
|
-
|
|
10387
|
-
|
|
10388
|
-
|
|
10389
|
-
|
|
10390
|
-
|
|
10391
|
-
|
|
10392
|
-
|
|
10393
|
-
|
|
10394
|
-
|
|
10395
|
-
|
|
10396
|
-
|
|
10397
|
-
|
|
10398
|
-
|
|
10399
|
-
|
|
10400
|
-
|
|
10401
|
-
|
|
10402
|
-
|
|
10403
|
-
|
|
10404
|
-
|
|
10405
|
-
|
|
10406
|
-
|
|
10407
|
-
|
|
10408
|
-
|
|
10409
|
-
|
|
10410
|
-
|
|
10411
|
-
|
|
10412
|
-
|
|
10413
|
-
|
|
10414
|
-
|
|
10415
|
-
|
|
10416
|
-
|
|
10417
|
-
|
|
10418
|
-
|
|
10419
|
-
|
|
10420
|
-
|
|
10421
|
-
|
|
10422
|
-
|
|
10423
|
-
|
|
10424
|
-
|
|
10425
|
-
|
|
10426
|
-
|
|
10427
|
-
|
|
10428
|
-
|
|
10429
|
-
|
|
10430
|
-
|
|
10431
|
-
|
|
10432
|
-
|
|
10433
|
-
|
|
10434
|
-
|
|
10435
|
-
|
|
10436
|
-
|
|
10437
|
-
|
|
10438
|
-
|
|
10439
|
-
|
|
10440
|
-
|
|
10441
|
-
|
|
10442
|
-
|
|
10443
|
-
|
|
10444
|
-
|
|
10445
|
-
|
|
10446
|
-
|
|
10447
|
-
|
|
10448
|
-
|
|
10449
|
-
|
|
10450
|
-
|
|
10451
|
-
|
|
10452
|
-
|
|
10453
|
-
|
|
10454
|
-
|
|
10455
|
-
|
|
10456
|
-
|
|
10457
|
-
|
|
10458
|
-
|
|
10459
|
-
|
|
10460
|
-
|
|
10461
|
-
|
|
10462
|
-
|
|
10463
|
-
|
|
10464
|
-
|
|
10465
|
-
|
|
10466
|
-
|
|
10467
|
-
|
|
10468
|
-
|
|
10469
|
-
|
|
10470
|
-
|
|
10471
|
-
|
|
10472
|
-
|
|
10473
|
-
|
|
10474
|
-
|
|
10475
|
-
|
|
10476
|
-
|
|
10477
|
-
|
|
10478
|
-
|
|
10479
|
-
|
|
10480
|
-
|
|
10481
|
-
|
|
10482
|
-
|
|
10483
|
-
|
|
10484
|
-
|
|
10485
|
-
|
|
10486
|
-
|
|
10487
|
-
|
|
10488
|
-
|
|
10489
|
-
|
|
10490
|
-
|
|
10491
|
-
|
|
10492
|
-
|
|
10493
|
-
|
|
10494
|
-
|
|
10495
|
-
|
|
10496
|
-
|
|
10497
|
-
|
|
10498
|
-
|
|
10499
|
-
|
|
10500
|
-
|
|
10501
|
-
|
|
10502
|
-
|
|
10503
|
-
|
|
10504
|
-
|
|
10505
|
-
|
|
10506
|
-
|
|
10507
|
-
|
|
10508
|
-
|
|
10509
|
-
|
|
10510
|
-
|
|
10511
|
-
|
|
10512
|
-
|
|
10513
|
-
|
|
10514
|
-
|
|
10515
|
-
|
|
10516
|
-
|
|
10517
|
-
|
|
10518
|
-
|
|
10519
|
-
|
|
10520
|
-
|
|
10521
|
-
|
|
10522
|
-
|
|
10523
|
-
|
|
10524
|
-
|
|
10525
|
-
|
|
10526
|
-
|
|
10527
|
-
|
|
10528
|
-
|
|
10529
|
-
|
|
10530
|
-
|
|
10531
|
-
|
|
10532
|
-
|
|
10533
|
-
|
|
10534
|
-
|
|
10535
|
-
|
|
10536
|
-
|
|
10537
|
-
|
|
10538
|
-
|
|
10539
|
-
|
|
10540
|
-
|
|
10541
|
-
|
|
10542
|
-
|
|
10543
|
-
|
|
10544
|
-
|
|
10545
|
-
|
|
10546
|
-
|
|
10547
|
-
|
|
10548
|
-
|
|
10549
|
-
|
|
10550
|
-
|
|
10551
|
-
|
|
10552
|
-
|
|
10553
|
-
|
|
10554
|
-
|
|
10555
|
-
|
|
10556
|
-
|
|
10557
|
-
|
|
10558
|
-
|
|
10559
|
-
|
|
10560
|
-
|
|
10561
|
-
|
|
10562
|
-
|
|
10563
|
-
|
|
10564
|
-
|
|
10565
|
-
|
|
10566
|
-
|
|
10567
|
-
|
|
10568
|
-
|
|
10569
|
-
|
|
10570
|
-
|
|
10571
|
-
|
|
10572
|
-
|
|
10573
|
-
|
|
10574
|
-
|
|
10575
|
-
|
|
10576
|
-
|
|
10577
|
-
|
|
10578
|
-
|
|
10579
|
-
|
|
10580
|
-
|
|
10581
|
-
|
|
10582
|
-
|
|
10583
|
-
|
|
10584
|
-
|
|
10330
|
+
// src/abi/Reimbursement.json
|
|
10331
|
+
var Reimbursement_default = [
|
|
10332
|
+
{
|
|
10333
|
+
type: "error",
|
|
10334
|
+
name: "AddressEmptyCode",
|
|
10335
|
+
inputs: [
|
|
10336
|
+
{
|
|
10337
|
+
type: "address",
|
|
10338
|
+
name: "target"
|
|
10339
|
+
}
|
|
10340
|
+
]
|
|
10341
|
+
},
|
|
10342
|
+
{
|
|
10343
|
+
type: "error",
|
|
10344
|
+
name: "AlreadyClaimed",
|
|
10345
|
+
inputs: [
|
|
10346
|
+
{
|
|
10347
|
+
type: "uint256",
|
|
10348
|
+
name: "caseId"
|
|
10349
|
+
},
|
|
10350
|
+
{
|
|
10351
|
+
type: "address",
|
|
10352
|
+
name: "user"
|
|
10353
|
+
}
|
|
10354
|
+
]
|
|
10355
|
+
},
|
|
10356
|
+
{
|
|
10357
|
+
type: "error",
|
|
10358
|
+
name: "ERC1967InvalidImplementation",
|
|
10359
|
+
inputs: [
|
|
10360
|
+
{
|
|
10361
|
+
type: "address",
|
|
10362
|
+
name: "implementation"
|
|
10363
|
+
}
|
|
10364
|
+
]
|
|
10365
|
+
},
|
|
10366
|
+
{
|
|
10367
|
+
type: "error",
|
|
10368
|
+
name: "ERC1967NonPayable",
|
|
10369
|
+
inputs: []
|
|
10370
|
+
},
|
|
10371
|
+
{
|
|
10372
|
+
type: "error",
|
|
10373
|
+
name: "FailedCall",
|
|
10374
|
+
inputs: []
|
|
10375
|
+
},
|
|
10376
|
+
{
|
|
10377
|
+
type: "error",
|
|
10378
|
+
name: "InvalidAmount",
|
|
10379
|
+
inputs: [
|
|
10380
|
+
{
|
|
10381
|
+
type: "uint256",
|
|
10382
|
+
name: "caseId"
|
|
10383
|
+
},
|
|
10384
|
+
{
|
|
10385
|
+
type: "address",
|
|
10386
|
+
name: "user"
|
|
10387
|
+
}
|
|
10388
|
+
]
|
|
10389
|
+
},
|
|
10390
|
+
{
|
|
10391
|
+
type: "error",
|
|
10392
|
+
name: "InvalidInitialization",
|
|
10393
|
+
inputs: []
|
|
10394
|
+
},
|
|
10395
|
+
{
|
|
10396
|
+
type: "error",
|
|
10397
|
+
name: "MerkleTreeVerificationFailed",
|
|
10398
|
+
inputs: [
|
|
10399
|
+
{
|
|
10400
|
+
type: "uint256",
|
|
10401
|
+
name: "caseId"
|
|
10402
|
+
},
|
|
10403
|
+
{
|
|
10404
|
+
type: "address",
|
|
10405
|
+
name: "user"
|
|
10406
|
+
}
|
|
10407
|
+
]
|
|
10408
|
+
},
|
|
10409
|
+
{
|
|
10410
|
+
type: "error",
|
|
10411
|
+
name: "NotAddressManager",
|
|
10412
|
+
inputs: []
|
|
10413
|
+
},
|
|
10414
|
+
{
|
|
10415
|
+
type: "error",
|
|
10416
|
+
name: "NotDependencyManager",
|
|
10417
|
+
inputs: []
|
|
10418
|
+
},
|
|
10419
|
+
{
|
|
10420
|
+
type: "error",
|
|
10421
|
+
name: "NotInitializing",
|
|
10422
|
+
inputs: []
|
|
10423
|
+
},
|
|
10424
|
+
{
|
|
10425
|
+
type: "error",
|
|
10426
|
+
name: "NotProxyAdmin",
|
|
10427
|
+
inputs: []
|
|
10428
|
+
},
|
|
10429
|
+
{
|
|
10430
|
+
type: "error",
|
|
10431
|
+
name: "PermissionDenied",
|
|
10432
|
+
inputs: [
|
|
10433
|
+
{
|
|
10434
|
+
type: "address",
|
|
10435
|
+
name: "caller"
|
|
10436
|
+
},
|
|
10437
|
+
{
|
|
10438
|
+
type: "address",
|
|
10439
|
+
name: "target"
|
|
10440
|
+
}
|
|
10441
|
+
]
|
|
10442
|
+
},
|
|
10443
|
+
{
|
|
10444
|
+
type: "error",
|
|
10445
|
+
name: "ReimbursementValidity",
|
|
10446
|
+
inputs: [
|
|
10447
|
+
{
|
|
10448
|
+
type: "uint256",
|
|
10449
|
+
name: "caseId"
|
|
10450
|
+
}
|
|
10451
|
+
]
|
|
10452
|
+
},
|
|
10453
|
+
{
|
|
10454
|
+
type: "error",
|
|
10455
|
+
name: "SafeERC20FailedOperation",
|
|
10456
|
+
inputs: [
|
|
10457
|
+
{
|
|
10458
|
+
type: "address",
|
|
10459
|
+
name: "token"
|
|
10460
|
+
}
|
|
10461
|
+
]
|
|
10462
|
+
},
|
|
10463
|
+
{
|
|
10464
|
+
type: "error",
|
|
10465
|
+
name: "UUPSUnauthorizedCallContext",
|
|
10466
|
+
inputs: []
|
|
10467
|
+
},
|
|
10468
|
+
{
|
|
10469
|
+
type: "error",
|
|
10470
|
+
name: "UUPSUnsupportedProxiableUUID",
|
|
10471
|
+
inputs: [
|
|
10472
|
+
{
|
|
10473
|
+
type: "bytes32",
|
|
10474
|
+
name: "slot"
|
|
10475
|
+
}
|
|
10476
|
+
]
|
|
10477
|
+
},
|
|
10478
|
+
{
|
|
10479
|
+
type: "event",
|
|
10480
|
+
anonymous: false,
|
|
10481
|
+
name: "Initialized",
|
|
10482
|
+
inputs: [
|
|
10483
|
+
{
|
|
10484
|
+
type: "uint64",
|
|
10485
|
+
name: "version",
|
|
10486
|
+
indexed: false
|
|
10487
|
+
}
|
|
10488
|
+
]
|
|
10489
|
+
},
|
|
10490
|
+
{
|
|
10491
|
+
type: "event",
|
|
10492
|
+
anonymous: false,
|
|
10493
|
+
name: "ReimbursementClaimed",
|
|
10494
|
+
inputs: [
|
|
10495
|
+
{
|
|
10496
|
+
type: "uint256",
|
|
10497
|
+
name: "caseId",
|
|
10498
|
+
indexed: false
|
|
10499
|
+
},
|
|
10500
|
+
{
|
|
10501
|
+
type: "address",
|
|
10502
|
+
name: "user",
|
|
10503
|
+
indexed: false
|
|
10504
|
+
},
|
|
10505
|
+
{
|
|
10506
|
+
type: "uint256",
|
|
10507
|
+
name: "baseAmount",
|
|
10508
|
+
indexed: false
|
|
10509
|
+
},
|
|
10510
|
+
{
|
|
10511
|
+
type: "uint256",
|
|
10512
|
+
name: "quoteAmount",
|
|
10513
|
+
indexed: false
|
|
10514
|
+
}
|
|
10515
|
+
]
|
|
10516
|
+
},
|
|
10517
|
+
{
|
|
10518
|
+
type: "event",
|
|
10519
|
+
anonymous: false,
|
|
10520
|
+
name: "ReimbursementInfoSet",
|
|
10521
|
+
inputs: [
|
|
10522
|
+
{
|
|
10523
|
+
type: "uint256",
|
|
10524
|
+
name: "caseId",
|
|
10525
|
+
indexed: false
|
|
10526
|
+
},
|
|
10527
|
+
{
|
|
10528
|
+
type: "bytes32",
|
|
10529
|
+
name: "merkleRoot",
|
|
10530
|
+
indexed: false
|
|
10531
|
+
},
|
|
10532
|
+
{
|
|
10533
|
+
type: "address",
|
|
10534
|
+
name: "baseToken",
|
|
10535
|
+
indexed: false
|
|
10536
|
+
},
|
|
10537
|
+
{
|
|
10538
|
+
type: "address",
|
|
10539
|
+
name: "quoteToken",
|
|
10540
|
+
indexed: false
|
|
10541
|
+
},
|
|
10542
|
+
{
|
|
10543
|
+
type: "uint256",
|
|
10544
|
+
name: "totalBaseAmount",
|
|
10545
|
+
indexed: false
|
|
10546
|
+
},
|
|
10547
|
+
{
|
|
10548
|
+
type: "uint256",
|
|
10549
|
+
name: "totalQuoteAmount",
|
|
10550
|
+
indexed: false
|
|
10551
|
+
},
|
|
10552
|
+
{
|
|
10553
|
+
type: "uint256",
|
|
10554
|
+
name: "claimedBaseAmount",
|
|
10555
|
+
indexed: false
|
|
10556
|
+
},
|
|
10557
|
+
{
|
|
10558
|
+
type: "uint256",
|
|
10559
|
+
name: "claimedQuoteAmount",
|
|
10560
|
+
indexed: false
|
|
10561
|
+
},
|
|
10562
|
+
{
|
|
10563
|
+
type: "uint256",
|
|
10564
|
+
name: "expireTime",
|
|
10565
|
+
indexed: false
|
|
10566
|
+
}
|
|
10567
|
+
]
|
|
10568
|
+
},
|
|
10569
|
+
{
|
|
10570
|
+
type: "event",
|
|
10571
|
+
anonymous: false,
|
|
10572
|
+
name: "Upgraded",
|
|
10573
|
+
inputs: [
|
|
10574
|
+
{
|
|
10575
|
+
type: "address",
|
|
10576
|
+
name: "implementation",
|
|
10577
|
+
indexed: true
|
|
10578
|
+
}
|
|
10579
|
+
]
|
|
10580
|
+
},
|
|
10581
|
+
{
|
|
10582
|
+
type: "function",
|
|
10583
|
+
name: "UPGRADE_INTERFACE_VERSION",
|
|
10584
|
+
constant: true,
|
|
10585
|
+
stateMutability: "view",
|
|
10586
|
+
payable: false,
|
|
10587
|
+
inputs: [],
|
|
10588
|
+
outputs: [
|
|
10589
|
+
{
|
|
10590
|
+
type: "string"
|
|
10591
|
+
}
|
|
10592
|
+
]
|
|
10593
|
+
},
|
|
10594
|
+
{
|
|
10595
|
+
type: "function",
|
|
10596
|
+
name: "claimReimbursement",
|
|
10597
|
+
constant: false,
|
|
10598
|
+
payable: false,
|
|
10599
|
+
inputs: [
|
|
10600
|
+
{
|
|
10601
|
+
type: "uint256",
|
|
10602
|
+
name: "caseId"
|
|
10603
|
+
},
|
|
10604
|
+
{
|
|
10605
|
+
type: "uint256",
|
|
10606
|
+
name: "baseAmount"
|
|
10607
|
+
},
|
|
10608
|
+
{
|
|
10609
|
+
type: "uint256",
|
|
10610
|
+
name: "quoteAmount"
|
|
10611
|
+
},
|
|
10612
|
+
{
|
|
10613
|
+
type: "bytes32[]",
|
|
10614
|
+
name: "merkleProof"
|
|
10615
|
+
}
|
|
10616
|
+
],
|
|
10617
|
+
outputs: []
|
|
10618
|
+
},
|
|
10619
|
+
{
|
|
10620
|
+
type: "function",
|
|
10621
|
+
name: "getAddressManager",
|
|
10622
|
+
constant: true,
|
|
10623
|
+
stateMutability: "view",
|
|
10624
|
+
payable: false,
|
|
10625
|
+
inputs: [],
|
|
10626
|
+
outputs: [
|
|
10627
|
+
{
|
|
10628
|
+
type: "address"
|
|
10629
|
+
}
|
|
10630
|
+
]
|
|
10631
|
+
},
|
|
10632
|
+
{
|
|
10633
|
+
type: "function",
|
|
10634
|
+
name: "getDependencyAddress",
|
|
10635
|
+
constant: true,
|
|
10636
|
+
stateMutability: "view",
|
|
10637
|
+
payable: false,
|
|
10638
|
+
inputs: [
|
|
10639
|
+
{
|
|
10640
|
+
type: "bytes32",
|
|
10641
|
+
name: "identifier"
|
|
10642
|
+
}
|
|
10643
|
+
],
|
|
10644
|
+
outputs: [
|
|
10645
|
+
{
|
|
10646
|
+
type: "address"
|
|
10647
|
+
}
|
|
10648
|
+
]
|
|
10649
|
+
},
|
|
10650
|
+
{
|
|
10651
|
+
type: "function",
|
|
10652
|
+
name: "getImplementation",
|
|
10653
|
+
constant: true,
|
|
10654
|
+
stateMutability: "view",
|
|
10655
|
+
payable: false,
|
|
10656
|
+
inputs: [],
|
|
10657
|
+
outputs: [
|
|
10658
|
+
{
|
|
10659
|
+
type: "address"
|
|
10660
|
+
}
|
|
10661
|
+
]
|
|
10662
|
+
},
|
|
10663
|
+
{
|
|
10664
|
+
type: "function",
|
|
10665
|
+
name: "getReimbursementInfo",
|
|
10666
|
+
constant: true,
|
|
10667
|
+
stateMutability: "view",
|
|
10668
|
+
payable: false,
|
|
10669
|
+
inputs: [
|
|
10670
|
+
{
|
|
10671
|
+
type: "uint256",
|
|
10672
|
+
name: "caseId"
|
|
10673
|
+
}
|
|
10674
|
+
],
|
|
10675
|
+
outputs: [
|
|
10676
|
+
{
|
|
10677
|
+
type: "tuple",
|
|
10678
|
+
components: [
|
|
10679
|
+
{
|
|
10680
|
+
type: "bytes32",
|
|
10681
|
+
name: "merkleRoot"
|
|
10682
|
+
},
|
|
10683
|
+
{
|
|
10684
|
+
type: "address",
|
|
10685
|
+
name: "baseToken"
|
|
10686
|
+
},
|
|
10687
|
+
{
|
|
10688
|
+
type: "address",
|
|
10689
|
+
name: "quoteToken"
|
|
10690
|
+
},
|
|
10691
|
+
{
|
|
10692
|
+
type: "uint256",
|
|
10693
|
+
name: "totalBaseAmount"
|
|
10694
|
+
},
|
|
10695
|
+
{
|
|
10696
|
+
type: "uint256",
|
|
10697
|
+
name: "totalQuoteAmount"
|
|
10698
|
+
},
|
|
10699
|
+
{
|
|
10700
|
+
type: "uint256",
|
|
10701
|
+
name: "claimedBaseAmount"
|
|
10702
|
+
},
|
|
10703
|
+
{
|
|
10704
|
+
type: "uint256",
|
|
10705
|
+
name: "claimedQuoteAmount"
|
|
10706
|
+
},
|
|
10707
|
+
{
|
|
10708
|
+
type: "uint256",
|
|
10709
|
+
name: "expireTime"
|
|
10710
|
+
}
|
|
10711
|
+
]
|
|
10712
|
+
}
|
|
10713
|
+
]
|
|
10714
|
+
},
|
|
10715
|
+
{
|
|
10716
|
+
type: "function",
|
|
10717
|
+
name: "initialize",
|
|
10718
|
+
constant: false,
|
|
10719
|
+
payable: false,
|
|
10720
|
+
inputs: [
|
|
10721
|
+
{
|
|
10722
|
+
type: "address",
|
|
10723
|
+
name: "addressManager"
|
|
10724
|
+
}
|
|
10725
|
+
],
|
|
10726
|
+
outputs: []
|
|
10727
|
+
},
|
|
10728
|
+
{
|
|
10729
|
+
type: "function",
|
|
10730
|
+
name: "proxiableUUID",
|
|
10731
|
+
constant: true,
|
|
10732
|
+
stateMutability: "view",
|
|
10733
|
+
payable: false,
|
|
10734
|
+
inputs: [],
|
|
10735
|
+
outputs: [
|
|
10736
|
+
{
|
|
10737
|
+
type: "bytes32"
|
|
10738
|
+
}
|
|
10739
|
+
]
|
|
10740
|
+
},
|
|
10741
|
+
{
|
|
10742
|
+
type: "function",
|
|
10743
|
+
name: "setReimbursementInfo",
|
|
10744
|
+
constant: false,
|
|
10745
|
+
payable: false,
|
|
10746
|
+
inputs: [
|
|
10747
|
+
{
|
|
10748
|
+
type: "uint256",
|
|
10749
|
+
name: "caseId"
|
|
10750
|
+
},
|
|
10751
|
+
{
|
|
10752
|
+
type: "tuple",
|
|
10753
|
+
name: "reimbursementInfo",
|
|
10754
|
+
components: [
|
|
10755
|
+
{
|
|
10756
|
+
type: "bytes32",
|
|
10757
|
+
name: "merkleRoot"
|
|
10758
|
+
},
|
|
10759
|
+
{
|
|
10760
|
+
type: "address",
|
|
10761
|
+
name: "baseToken"
|
|
10762
|
+
},
|
|
10763
|
+
{
|
|
10764
|
+
type: "address",
|
|
10765
|
+
name: "quoteToken"
|
|
10766
|
+
},
|
|
10767
|
+
{
|
|
10768
|
+
type: "uint256",
|
|
10769
|
+
name: "totalBaseAmount"
|
|
10770
|
+
},
|
|
10771
|
+
{
|
|
10772
|
+
type: "uint256",
|
|
10773
|
+
name: "totalQuoteAmount"
|
|
10774
|
+
},
|
|
10775
|
+
{
|
|
10776
|
+
type: "uint256",
|
|
10777
|
+
name: "claimedBaseAmount"
|
|
10778
|
+
},
|
|
10779
|
+
{
|
|
10780
|
+
type: "uint256",
|
|
10781
|
+
name: "claimedQuoteAmount"
|
|
10782
|
+
},
|
|
10783
|
+
{
|
|
10784
|
+
type: "uint256",
|
|
10785
|
+
name: "expireTime"
|
|
10786
|
+
}
|
|
10787
|
+
]
|
|
10788
|
+
}
|
|
10789
|
+
],
|
|
10790
|
+
outputs: []
|
|
10791
|
+
},
|
|
10792
|
+
{
|
|
10793
|
+
type: "function",
|
|
10794
|
+
name: "upgradeTo",
|
|
10795
|
+
constant: false,
|
|
10796
|
+
stateMutability: "payable",
|
|
10797
|
+
payable: true,
|
|
10798
|
+
inputs: [
|
|
10799
|
+
{
|
|
10800
|
+
type: "address",
|
|
10801
|
+
name: "newImplementation"
|
|
10802
|
+
},
|
|
10803
|
+
{
|
|
10804
|
+
type: "bytes",
|
|
10805
|
+
name: "data"
|
|
10806
|
+
}
|
|
10807
|
+
],
|
|
10808
|
+
outputs: []
|
|
10809
|
+
},
|
|
10810
|
+
{
|
|
10811
|
+
type: "function",
|
|
10812
|
+
name: "upgradeToAndCall",
|
|
10813
|
+
constant: false,
|
|
10814
|
+
stateMutability: "payable",
|
|
10815
|
+
payable: true,
|
|
10816
|
+
inputs: [
|
|
10817
|
+
{
|
|
10818
|
+
type: "address",
|
|
10819
|
+
name: "newImplementation"
|
|
10820
|
+
},
|
|
10821
|
+
{
|
|
10822
|
+
type: "bytes",
|
|
10823
|
+
name: "data"
|
|
10824
|
+
}
|
|
10825
|
+
],
|
|
10826
|
+
outputs: []
|
|
10827
|
+
}
|
|
10828
|
+
];
|
|
10829
|
+
|
|
10830
|
+
// src/abi/DisputeCourt.json
|
|
10831
|
+
var DisputeCourt_default = [
|
|
10832
|
+
{
|
|
10833
|
+
type: "constructor",
|
|
10834
|
+
payable: false,
|
|
10835
|
+
inputs: []
|
|
10836
|
+
},
|
|
10837
|
+
{
|
|
10838
|
+
type: "error",
|
|
10839
|
+
name: "AddressEmptyCode",
|
|
10840
|
+
inputs: [
|
|
10841
|
+
{
|
|
10842
|
+
type: "address",
|
|
10843
|
+
name: "target"
|
|
10844
|
+
}
|
|
10845
|
+
]
|
|
10846
|
+
},
|
|
10847
|
+
{
|
|
10848
|
+
type: "error",
|
|
10849
|
+
name: "AlreadyVoted",
|
|
10850
|
+
inputs: []
|
|
10851
|
+
},
|
|
10852
|
+
{
|
|
10853
|
+
type: "error",
|
|
10854
|
+
name: "BondNotReleased",
|
|
10855
|
+
inputs: []
|
|
10856
|
+
},
|
|
10857
|
+
{
|
|
10858
|
+
type: "error",
|
|
10859
|
+
name: "CaseAppealNotFinished",
|
|
10860
|
+
inputs: []
|
|
10861
|
+
},
|
|
10862
|
+
{
|
|
10863
|
+
type: "error",
|
|
10864
|
+
name: "CaseDeadlineNotReached",
|
|
10865
|
+
inputs: []
|
|
10866
|
+
},
|
|
10867
|
+
{
|
|
10868
|
+
type: "error",
|
|
10869
|
+
name: "CaseDeadlineReached",
|
|
10870
|
+
inputs: []
|
|
10871
|
+
},
|
|
10872
|
+
{
|
|
10873
|
+
type: "error",
|
|
10874
|
+
name: "CaseNotAccepted",
|
|
10875
|
+
inputs: []
|
|
10876
|
+
},
|
|
10877
|
+
{
|
|
10878
|
+
type: "error",
|
|
10879
|
+
name: "CaseNotExist",
|
|
10880
|
+
inputs: [
|
|
10881
|
+
{
|
|
10882
|
+
type: "uint256",
|
|
10883
|
+
name: "caseId"
|
|
10884
|
+
}
|
|
10885
|
+
]
|
|
10886
|
+
},
|
|
10887
|
+
{
|
|
10888
|
+
type: "error",
|
|
10889
|
+
name: "CaseRespondentAppealed",
|
|
10890
|
+
inputs: [
|
|
10891
|
+
{
|
|
10892
|
+
type: "uint256",
|
|
10893
|
+
name: "caseId"
|
|
10894
|
+
},
|
|
10895
|
+
{
|
|
10896
|
+
type: "address",
|
|
10897
|
+
name: "respondent"
|
|
10898
|
+
}
|
|
10899
|
+
]
|
|
10900
|
+
},
|
|
10901
|
+
{
|
|
10902
|
+
type: "error",
|
|
10903
|
+
name: "ChainIdMismatch",
|
|
10904
|
+
inputs: []
|
|
10905
|
+
},
|
|
10906
|
+
{
|
|
10907
|
+
type: "error",
|
|
10908
|
+
name: "DisputeNotAllowed",
|
|
10909
|
+
inputs: []
|
|
10910
|
+
},
|
|
10911
|
+
{
|
|
10912
|
+
type: "error",
|
|
10913
|
+
name: "ERC1967InvalidImplementation",
|
|
10914
|
+
inputs: [
|
|
10915
|
+
{
|
|
10916
|
+
type: "address",
|
|
10917
|
+
name: "implementation"
|
|
10918
|
+
}
|
|
10919
|
+
]
|
|
10920
|
+
},
|
|
10921
|
+
{
|
|
10922
|
+
type: "error",
|
|
10923
|
+
name: "ERC1967NonPayable",
|
|
10924
|
+
inputs: []
|
|
10925
|
+
},
|
|
10926
|
+
{
|
|
10927
|
+
type: "error",
|
|
10928
|
+
name: "FailedCall",
|
|
10929
|
+
inputs: []
|
|
10930
|
+
},
|
|
10931
|
+
{
|
|
10932
|
+
type: "error",
|
|
10933
|
+
name: "InvalidAccountNonce",
|
|
10934
|
+
inputs: [
|
|
10935
|
+
{
|
|
10936
|
+
type: "address",
|
|
10937
|
+
name: "account"
|
|
10938
|
+
},
|
|
10939
|
+
{
|
|
10940
|
+
type: "uint256",
|
|
10941
|
+
name: "currentNonce"
|
|
10942
|
+
}
|
|
10943
|
+
]
|
|
10944
|
+
},
|
|
10945
|
+
{
|
|
10946
|
+
type: "error",
|
|
10947
|
+
name: "InvalidContractAddress",
|
|
10948
|
+
inputs: []
|
|
10949
|
+
},
|
|
10950
|
+
{
|
|
10951
|
+
type: "error",
|
|
10952
|
+
name: "InvalidFunctionSignature",
|
|
10953
|
+
inputs: []
|
|
10954
|
+
},
|
|
10955
|
+
{
|
|
10956
|
+
type: "error",
|
|
10957
|
+
name: "InvalidInitialization",
|
|
10958
|
+
inputs: []
|
|
10959
|
+
},
|
|
10960
|
+
{
|
|
10961
|
+
type: "error",
|
|
10962
|
+
name: "InvalidParameter",
|
|
10963
|
+
inputs: []
|
|
10964
|
+
},
|
|
10965
|
+
{
|
|
10966
|
+
type: "error",
|
|
10967
|
+
name: "InvalidPayloadLength",
|
|
10968
|
+
inputs: [
|
|
10969
|
+
{
|
|
10970
|
+
type: "uint256",
|
|
10971
|
+
name: "received"
|
|
10972
|
+
},
|
|
10973
|
+
{
|
|
10974
|
+
type: "uint256",
|
|
10975
|
+
name: "expected"
|
|
10976
|
+
}
|
|
10977
|
+
]
|
|
10978
|
+
},
|
|
10979
|
+
{
|
|
10980
|
+
type: "error",
|
|
10981
|
+
name: "InvalidPoolToken",
|
|
10982
|
+
inputs: []
|
|
10983
|
+
},
|
|
10984
|
+
{
|
|
10985
|
+
type: "error",
|
|
10986
|
+
name: "InvalidProfitAmount",
|
|
10987
|
+
inputs: []
|
|
10988
|
+
},
|
|
10989
|
+
{
|
|
10990
|
+
type: "error",
|
|
10991
|
+
name: "InvalidResponseVersion",
|
|
10992
|
+
inputs: []
|
|
10993
|
+
},
|
|
10994
|
+
{
|
|
10995
|
+
type: "error",
|
|
10996
|
+
name: "InvalidSourceChain",
|
|
10997
|
+
inputs: []
|
|
10998
|
+
},
|
|
10999
|
+
{
|
|
11000
|
+
type: "error",
|
|
11001
|
+
name: "NoChainResponse",
|
|
11002
|
+
inputs: []
|
|
11003
|
+
},
|
|
11004
|
+
{
|
|
11005
|
+
type: "error",
|
|
11006
|
+
name: "NotAddressManager",
|
|
11007
|
+
inputs: []
|
|
11008
|
+
},
|
|
11009
|
+
{
|
|
11010
|
+
type: "error",
|
|
11011
|
+
name: "NotCaseRespondent",
|
|
11012
|
+
inputs: [
|
|
11013
|
+
{
|
|
11014
|
+
type: "uint256",
|
|
11015
|
+
name: "caseId"
|
|
11016
|
+
},
|
|
11017
|
+
{
|
|
11018
|
+
type: "address",
|
|
11019
|
+
name: "respondent"
|
|
11020
|
+
}
|
|
11021
|
+
]
|
|
11022
|
+
},
|
|
11023
|
+
{
|
|
11024
|
+
type: "error",
|
|
11025
|
+
name: "NotDependencyManager",
|
|
11026
|
+
inputs: []
|
|
11027
|
+
},
|
|
11028
|
+
{
|
|
11029
|
+
type: "error",
|
|
11030
|
+
name: "NotInitializing",
|
|
11031
|
+
inputs: []
|
|
11032
|
+
},
|
|
11033
|
+
{
|
|
11034
|
+
type: "error",
|
|
11035
|
+
name: "NotProxyAdmin",
|
|
11036
|
+
inputs: []
|
|
11037
|
+
},
|
|
11038
|
+
{
|
|
11039
|
+
type: "error",
|
|
11040
|
+
name: "NumberOfResponsesMismatch",
|
|
11041
|
+
inputs: []
|
|
11042
|
+
},
|
|
11043
|
+
{
|
|
11044
|
+
type: "error",
|
|
11045
|
+
name: "OnlyRelayer",
|
|
11046
|
+
inputs: []
|
|
11047
|
+
},
|
|
11048
|
+
{
|
|
11049
|
+
type: "error",
|
|
11050
|
+
name: "PermissionDenied",
|
|
11051
|
+
inputs: [
|
|
11052
|
+
{
|
|
11053
|
+
type: "address",
|
|
11054
|
+
name: "caller"
|
|
11055
|
+
},
|
|
11056
|
+
{
|
|
11057
|
+
type: "address",
|
|
11058
|
+
name: "target"
|
|
11059
|
+
}
|
|
11060
|
+
]
|
|
11061
|
+
},
|
|
11062
|
+
{
|
|
11063
|
+
type: "error",
|
|
11064
|
+
name: "RequestTypeMismatch",
|
|
11065
|
+
inputs: []
|
|
11066
|
+
},
|
|
11067
|
+
{
|
|
11068
|
+
type: "error",
|
|
11069
|
+
name: "RiskCloseNotCompleted",
|
|
11070
|
+
inputs: []
|
|
11071
|
+
},
|
|
11072
|
+
{
|
|
11073
|
+
type: "error",
|
|
11074
|
+
name: "SafeERC20FailedOperation",
|
|
11075
|
+
inputs: [
|
|
11076
|
+
{
|
|
11077
|
+
type: "address",
|
|
11078
|
+
name: "token"
|
|
11079
|
+
}
|
|
11080
|
+
]
|
|
11081
|
+
},
|
|
11082
|
+
{
|
|
11083
|
+
type: "error",
|
|
11084
|
+
name: "SignatureExpired",
|
|
11085
|
+
inputs: []
|
|
11086
|
+
},
|
|
11087
|
+
{
|
|
11088
|
+
type: "error",
|
|
11089
|
+
name: "UUPSUnauthorizedCallContext",
|
|
11090
|
+
inputs: []
|
|
11091
|
+
},
|
|
11092
|
+
{
|
|
11093
|
+
type: "error",
|
|
11094
|
+
name: "UUPSUnsupportedProxiableUUID",
|
|
11095
|
+
inputs: [
|
|
11096
|
+
{
|
|
11097
|
+
type: "bytes32",
|
|
11098
|
+
name: "slot"
|
|
11099
|
+
}
|
|
11100
|
+
]
|
|
11101
|
+
},
|
|
11102
|
+
{
|
|
11103
|
+
type: "error",
|
|
11104
|
+
name: "UnexpectedCaseState",
|
|
11105
|
+
inputs: []
|
|
11106
|
+
},
|
|
11107
|
+
{
|
|
11108
|
+
type: "error",
|
|
11109
|
+
name: "UnexpectedCaseType",
|
|
11110
|
+
inputs: []
|
|
11111
|
+
},
|
|
11112
|
+
{
|
|
11113
|
+
type: "error",
|
|
11114
|
+
name: "UnexpectedNumberOfResults",
|
|
11115
|
+
inputs: []
|
|
11116
|
+
},
|
|
11117
|
+
{
|
|
11118
|
+
type: "error",
|
|
11119
|
+
name: "UnsupportedQueryType",
|
|
11120
|
+
inputs: [
|
|
11121
|
+
{
|
|
11122
|
+
type: "uint8",
|
|
11123
|
+
name: "received"
|
|
11124
|
+
}
|
|
11125
|
+
]
|
|
11126
|
+
},
|
|
11127
|
+
{
|
|
11128
|
+
type: "error",
|
|
11129
|
+
name: "UntrustfulVoting",
|
|
11130
|
+
inputs: []
|
|
11131
|
+
},
|
|
11132
|
+
{
|
|
11133
|
+
type: "error",
|
|
11134
|
+
name: "VerificationFailed",
|
|
11135
|
+
inputs: []
|
|
11136
|
+
},
|
|
11137
|
+
{
|
|
11138
|
+
type: "error",
|
|
11139
|
+
name: "VersionMismatch",
|
|
11140
|
+
inputs: []
|
|
11141
|
+
},
|
|
11142
|
+
{
|
|
11143
|
+
type: "error",
|
|
11144
|
+
name: "WrongQueryType",
|
|
11145
|
+
inputs: [
|
|
11146
|
+
{
|
|
11147
|
+
type: "uint8",
|
|
11148
|
+
name: "received"
|
|
11149
|
+
},
|
|
11150
|
+
{
|
|
11151
|
+
type: "uint8",
|
|
11152
|
+
name: "expected"
|
|
11153
|
+
}
|
|
11154
|
+
]
|
|
11155
|
+
},
|
|
11156
|
+
{
|
|
11157
|
+
type: "error",
|
|
11158
|
+
name: "ZeroQueries",
|
|
11159
|
+
inputs: []
|
|
11160
|
+
},
|
|
11161
|
+
{
|
|
11162
|
+
type: "event",
|
|
11163
|
+
anonymous: false,
|
|
11164
|
+
name: "AppealCanceled",
|
|
11165
|
+
inputs: [
|
|
11166
|
+
{
|
|
11167
|
+
type: "uint256",
|
|
11168
|
+
name: "caseId",
|
|
11169
|
+
indexed: false
|
|
11170
|
+
},
|
|
11171
|
+
{
|
|
11172
|
+
type: "uint256",
|
|
11173
|
+
name: "appealCaseId",
|
|
11174
|
+
indexed: false
|
|
11175
|
+
},
|
|
11176
|
+
{
|
|
11177
|
+
type: "address",
|
|
11178
|
+
name: "complainant",
|
|
11179
|
+
indexed: false
|
|
11180
|
+
},
|
|
11181
|
+
{
|
|
11182
|
+
type: "bool",
|
|
11183
|
+
name: "isMalicious",
|
|
11184
|
+
indexed: false
|
|
11185
|
+
}
|
|
11186
|
+
]
|
|
11187
|
+
},
|
|
11188
|
+
{
|
|
11189
|
+
type: "event",
|
|
11190
|
+
anonymous: false,
|
|
11191
|
+
name: "AppealFiled",
|
|
11192
|
+
inputs: [
|
|
11193
|
+
{
|
|
11194
|
+
type: "uint256",
|
|
11195
|
+
name: "caseId",
|
|
11196
|
+
indexed: false
|
|
11197
|
+
},
|
|
11198
|
+
{
|
|
11199
|
+
type: "uint256",
|
|
11200
|
+
name: "appealCaseId",
|
|
11201
|
+
indexed: false
|
|
11202
|
+
},
|
|
11203
|
+
{
|
|
11204
|
+
type: "address",
|
|
11205
|
+
name: "respondent",
|
|
11206
|
+
indexed: false
|
|
11207
|
+
},
|
|
11208
|
+
{
|
|
11209
|
+
type: "address",
|
|
11210
|
+
name: "appealToken",
|
|
11211
|
+
indexed: false
|
|
11212
|
+
},
|
|
11213
|
+
{
|
|
11214
|
+
type: "uint256",
|
|
11215
|
+
name: "appealBond",
|
|
11216
|
+
indexed: false
|
|
11217
|
+
},
|
|
11218
|
+
{
|
|
11219
|
+
type: "uint64",
|
|
11220
|
+
name: "appealDeadline",
|
|
11221
|
+
indexed: false
|
|
11222
|
+
}
|
|
11223
|
+
]
|
|
11224
|
+
},
|
|
11225
|
+
{
|
|
11226
|
+
type: "event",
|
|
11227
|
+
anonymous: false,
|
|
11228
|
+
name: "AppealResolved",
|
|
11229
|
+
inputs: [
|
|
11230
|
+
{
|
|
11231
|
+
type: "uint256",
|
|
11232
|
+
name: "caseId",
|
|
11233
|
+
indexed: false
|
|
11234
|
+
},
|
|
11235
|
+
{
|
|
11236
|
+
type: "uint256",
|
|
11237
|
+
name: "appealCaseId",
|
|
11238
|
+
indexed: false
|
|
11239
|
+
},
|
|
11240
|
+
{
|
|
11241
|
+
type: "uint8",
|
|
11242
|
+
name: "resolution",
|
|
11243
|
+
indexed: false
|
|
11244
|
+
},
|
|
11245
|
+
{
|
|
11246
|
+
type: "address",
|
|
11247
|
+
name: "complainant",
|
|
11248
|
+
indexed: false
|
|
11249
|
+
}
|
|
11250
|
+
]
|
|
11251
|
+
},
|
|
11252
|
+
{
|
|
11253
|
+
type: "event",
|
|
11254
|
+
anonymous: false,
|
|
11255
|
+
name: "BondClaimed",
|
|
11256
|
+
inputs: [
|
|
11257
|
+
{
|
|
11258
|
+
type: "uint256",
|
|
11259
|
+
name: "caseId",
|
|
11260
|
+
indexed: false
|
|
11261
|
+
},
|
|
11262
|
+
{
|
|
11263
|
+
type: "address",
|
|
11264
|
+
name: "user",
|
|
11265
|
+
indexed: false
|
|
11266
|
+
},
|
|
11267
|
+
{
|
|
11268
|
+
type: "address",
|
|
11269
|
+
name: "token",
|
|
11270
|
+
indexed: false
|
|
11271
|
+
},
|
|
11272
|
+
{
|
|
11273
|
+
type: "uint256",
|
|
11274
|
+
name: "amount",
|
|
11275
|
+
indexed: false
|
|
11276
|
+
}
|
|
11277
|
+
]
|
|
11278
|
+
},
|
|
11279
|
+
{
|
|
11280
|
+
type: "event",
|
|
11281
|
+
anonymous: false,
|
|
11282
|
+
name: "CaseAppealsResolved",
|
|
11283
|
+
inputs: [
|
|
11284
|
+
{
|
|
11285
|
+
type: "uint256",
|
|
11286
|
+
name: "caseId",
|
|
11287
|
+
indexed: false
|
|
11288
|
+
}
|
|
11289
|
+
]
|
|
11290
|
+
},
|
|
11291
|
+
{
|
|
11292
|
+
type: "event",
|
|
11293
|
+
anonymous: false,
|
|
11294
|
+
name: "CaseRiskClosed",
|
|
11295
|
+
inputs: [
|
|
11296
|
+
{
|
|
11297
|
+
type: "uint256",
|
|
11298
|
+
name: "caseId",
|
|
11299
|
+
indexed: false
|
|
11300
|
+
}
|
|
11301
|
+
]
|
|
11302
|
+
},
|
|
11303
|
+
{
|
|
11304
|
+
type: "event",
|
|
11305
|
+
anonymous: false,
|
|
11306
|
+
name: "DisputeCanceled",
|
|
11307
|
+
inputs: [
|
|
11308
|
+
{
|
|
11309
|
+
type: "uint256",
|
|
11310
|
+
name: "caseId",
|
|
11311
|
+
indexed: false
|
|
11312
|
+
},
|
|
11313
|
+
{
|
|
11314
|
+
type: "address",
|
|
11315
|
+
name: "complainant",
|
|
11316
|
+
indexed: false
|
|
11317
|
+
},
|
|
11318
|
+
{
|
|
11319
|
+
type: "bool",
|
|
11320
|
+
name: "isMalicious",
|
|
11321
|
+
indexed: false
|
|
11322
|
+
}
|
|
11323
|
+
]
|
|
11324
|
+
},
|
|
11325
|
+
{
|
|
11326
|
+
type: "event",
|
|
11327
|
+
anonymous: false,
|
|
11328
|
+
name: "DisputeConfigurationUpdated",
|
|
11329
|
+
inputs: [
|
|
11330
|
+
{
|
|
11331
|
+
type: "tuple",
|
|
11332
|
+
name: "newDisputeConfigration",
|
|
11333
|
+
indexed: false,
|
|
11334
|
+
components: [
|
|
11335
|
+
{
|
|
11336
|
+
type: "address",
|
|
11337
|
+
name: "appealToken"
|
|
11338
|
+
},
|
|
11339
|
+
{
|
|
11340
|
+
type: "uint64",
|
|
11341
|
+
name: "disputeBondUsd"
|
|
11342
|
+
},
|
|
11343
|
+
{
|
|
11344
|
+
type: "uint64",
|
|
11345
|
+
name: "appealBondUsd"
|
|
11346
|
+
},
|
|
11347
|
+
{
|
|
11348
|
+
type: "uint64",
|
|
11349
|
+
name: "disputeThresholdUsd"
|
|
11350
|
+
},
|
|
11351
|
+
{
|
|
11352
|
+
type: "uint64",
|
|
11353
|
+
name: "caseDuration"
|
|
11354
|
+
},
|
|
11355
|
+
{
|
|
11356
|
+
type: "uint64",
|
|
11357
|
+
name: "voteDuration"
|
|
11358
|
+
},
|
|
11359
|
+
{
|
|
11360
|
+
type: "uint64",
|
|
11361
|
+
name: "resolveDuration"
|
|
11362
|
+
},
|
|
11363
|
+
{
|
|
11364
|
+
type: "uint32",
|
|
11365
|
+
name: "voteCountRate"
|
|
11366
|
+
},
|
|
11367
|
+
{
|
|
11368
|
+
type: "uint32",
|
|
11369
|
+
name: "effectiveVoteRate"
|
|
11370
|
+
}
|
|
11371
|
+
]
|
|
11372
|
+
}
|
|
11373
|
+
]
|
|
11374
|
+
},
|
|
11375
|
+
{
|
|
11376
|
+
type: "event",
|
|
11377
|
+
anonymous: false,
|
|
11378
|
+
name: "DisputeFiled",
|
|
11379
|
+
inputs: [
|
|
11380
|
+
{
|
|
11381
|
+
type: "uint256",
|
|
11382
|
+
name: "caseId",
|
|
11383
|
+
indexed: false
|
|
11384
|
+
},
|
|
11385
|
+
{
|
|
11386
|
+
type: "bytes32",
|
|
11387
|
+
name: "poolId",
|
|
11388
|
+
indexed: false
|
|
11389
|
+
},
|
|
11390
|
+
{
|
|
11391
|
+
type: "address",
|
|
11392
|
+
name: "complainant",
|
|
11393
|
+
indexed: false
|
|
11394
|
+
},
|
|
11395
|
+
{
|
|
11396
|
+
type: "address",
|
|
11397
|
+
name: "poolToken",
|
|
11398
|
+
indexed: false
|
|
11399
|
+
},
|
|
11400
|
+
{
|
|
11401
|
+
type: "uint256",
|
|
11402
|
+
name: "disputeBond",
|
|
11403
|
+
indexed: false
|
|
11404
|
+
},
|
|
11405
|
+
{
|
|
11406
|
+
type: "uint64",
|
|
11407
|
+
name: "caseDeadline",
|
|
11408
|
+
indexed: false
|
|
11409
|
+
}
|
|
11410
|
+
]
|
|
11411
|
+
},
|
|
11412
|
+
{
|
|
11413
|
+
type: "event",
|
|
11414
|
+
anonymous: false,
|
|
11415
|
+
name: "DisputeResolved",
|
|
11416
|
+
inputs: [
|
|
11417
|
+
{
|
|
11418
|
+
type: "uint256",
|
|
11419
|
+
name: "caseId",
|
|
11420
|
+
indexed: false
|
|
11421
|
+
},
|
|
11422
|
+
{
|
|
11423
|
+
type: "uint8",
|
|
11424
|
+
name: "resolution",
|
|
11425
|
+
indexed: false
|
|
11426
|
+
},
|
|
11427
|
+
{
|
|
11428
|
+
type: "uint64",
|
|
11429
|
+
name: "appealDeadline",
|
|
11430
|
+
indexed: false
|
|
11431
|
+
}
|
|
11432
|
+
]
|
|
11433
|
+
},
|
|
11434
|
+
{
|
|
11435
|
+
type: "event",
|
|
11436
|
+
anonymous: false,
|
|
11437
|
+
name: "ForfeitBondsClaimed",
|
|
11438
|
+
inputs: [
|
|
11439
|
+
{
|
|
11440
|
+
type: "address",
|
|
11441
|
+
name: "receiver",
|
|
11442
|
+
indexed: false
|
|
11443
|
+
},
|
|
11444
|
+
{
|
|
11445
|
+
type: "address",
|
|
11446
|
+
name: "token",
|
|
11447
|
+
indexed: false
|
|
11448
|
+
},
|
|
11449
|
+
{
|
|
11450
|
+
type: "uint256",
|
|
11451
|
+
name: "amount",
|
|
11452
|
+
indexed: false
|
|
11453
|
+
}
|
|
11454
|
+
]
|
|
11455
|
+
},
|
|
11456
|
+
{
|
|
11457
|
+
type: "event",
|
|
11458
|
+
anonymous: false,
|
|
11459
|
+
name: "Initialized",
|
|
11460
|
+
inputs: [
|
|
11461
|
+
{
|
|
11462
|
+
type: "uint64",
|
|
11463
|
+
name: "version",
|
|
11464
|
+
indexed: false
|
|
11465
|
+
}
|
|
11466
|
+
]
|
|
11467
|
+
},
|
|
11468
|
+
{
|
|
11469
|
+
type: "event",
|
|
11470
|
+
anonymous: false,
|
|
11471
|
+
name: "ReimbursementProcessed",
|
|
11472
|
+
inputs: [
|
|
11473
|
+
{
|
|
11474
|
+
type: "uint256",
|
|
11475
|
+
name: "caseId",
|
|
11476
|
+
indexed: false
|
|
11477
|
+
},
|
|
11478
|
+
{
|
|
11479
|
+
type: "tuple",
|
|
11480
|
+
name: "reimbursementInfo",
|
|
11481
|
+
indexed: false,
|
|
11482
|
+
components: [
|
|
11483
|
+
{
|
|
11484
|
+
type: "bytes32",
|
|
11485
|
+
name: "merkleRoot"
|
|
11486
|
+
},
|
|
11487
|
+
{
|
|
11488
|
+
type: "address",
|
|
11489
|
+
name: "baseToken"
|
|
11490
|
+
},
|
|
11491
|
+
{
|
|
11492
|
+
type: "address",
|
|
11493
|
+
name: "quoteToken"
|
|
11494
|
+
},
|
|
11495
|
+
{
|
|
11496
|
+
type: "uint256",
|
|
11497
|
+
name: "totalBaseAmount"
|
|
11498
|
+
},
|
|
11499
|
+
{
|
|
11500
|
+
type: "uint256",
|
|
11501
|
+
name: "totalQuoteAmount"
|
|
11502
|
+
},
|
|
11503
|
+
{
|
|
11504
|
+
type: "uint256",
|
|
11505
|
+
name: "claimedBaseAmount"
|
|
11506
|
+
},
|
|
11507
|
+
{
|
|
11508
|
+
type: "uint256",
|
|
11509
|
+
name: "claimedQuoteAmount"
|
|
11510
|
+
},
|
|
11511
|
+
{
|
|
11512
|
+
type: "uint256",
|
|
11513
|
+
name: "expireTime"
|
|
11514
|
+
}
|
|
11515
|
+
]
|
|
11516
|
+
}
|
|
11517
|
+
]
|
|
11518
|
+
},
|
|
11519
|
+
{
|
|
11520
|
+
type: "event",
|
|
11521
|
+
anonymous: false,
|
|
11522
|
+
name: "Upgraded",
|
|
11523
|
+
inputs: [
|
|
11524
|
+
{
|
|
11525
|
+
type: "address",
|
|
11526
|
+
name: "implementation",
|
|
11527
|
+
indexed: true
|
|
11528
|
+
}
|
|
11529
|
+
]
|
|
11530
|
+
},
|
|
11531
|
+
{
|
|
11532
|
+
type: "event",
|
|
11533
|
+
anonymous: false,
|
|
11534
|
+
name: "Voted",
|
|
11535
|
+
inputs: [
|
|
11536
|
+
{
|
|
11537
|
+
type: "uint256",
|
|
11538
|
+
name: "caseId",
|
|
11539
|
+
indexed: false
|
|
11540
|
+
},
|
|
11541
|
+
{
|
|
11542
|
+
type: "address",
|
|
11543
|
+
name: "voter",
|
|
11544
|
+
indexed: false
|
|
11545
|
+
},
|
|
11546
|
+
{
|
|
11547
|
+
type: "uint8",
|
|
11548
|
+
name: "voteOption",
|
|
11549
|
+
indexed: false
|
|
11550
|
+
}
|
|
11551
|
+
]
|
|
11552
|
+
},
|
|
11553
|
+
{
|
|
11554
|
+
type: "event",
|
|
11555
|
+
anonymous: false,
|
|
11556
|
+
name: "VotingOpened",
|
|
11557
|
+
inputs: [
|
|
11558
|
+
{
|
|
11559
|
+
type: "uint256",
|
|
11560
|
+
name: "caseId",
|
|
11561
|
+
indexed: false
|
|
11562
|
+
},
|
|
11563
|
+
{
|
|
11564
|
+
type: "uint256",
|
|
11565
|
+
name: "evidenceId",
|
|
11566
|
+
indexed: false
|
|
11567
|
+
},
|
|
11568
|
+
{
|
|
11569
|
+
type: "uint64",
|
|
11570
|
+
name: "voteDeadline",
|
|
11571
|
+
indexed: false
|
|
11572
|
+
},
|
|
11573
|
+
{
|
|
11574
|
+
type: "address[]",
|
|
11575
|
+
name: "respondents",
|
|
11576
|
+
indexed: false
|
|
11577
|
+
}
|
|
11578
|
+
]
|
|
11579
|
+
},
|
|
11580
|
+
{
|
|
11581
|
+
type: "event",
|
|
11582
|
+
anonymous: false,
|
|
11583
|
+
name: "WormholeConfigurationUpdated",
|
|
11584
|
+
inputs: [
|
|
11585
|
+
{
|
|
11586
|
+
type: "tuple",
|
|
11587
|
+
name: "newWormholeConfiguration",
|
|
11588
|
+
indexed: false,
|
|
11589
|
+
components: [
|
|
11590
|
+
{
|
|
11591
|
+
type: "address",
|
|
11592
|
+
name: "wormhole"
|
|
11593
|
+
},
|
|
11594
|
+
{
|
|
11595
|
+
type: "address",
|
|
11596
|
+
name: "staker"
|
|
11597
|
+
},
|
|
11598
|
+
{
|
|
11599
|
+
type: "bytes4",
|
|
11600
|
+
name: "selector"
|
|
11601
|
+
}
|
|
11602
|
+
]
|
|
11603
|
+
}
|
|
11604
|
+
]
|
|
11605
|
+
},
|
|
11606
|
+
{
|
|
11607
|
+
type: "function",
|
|
11608
|
+
name: "UPGRADE_INTERFACE_VERSION",
|
|
11609
|
+
constant: true,
|
|
11610
|
+
stateMutability: "view",
|
|
11611
|
+
payable: false,
|
|
11612
|
+
inputs: [],
|
|
11613
|
+
outputs: [
|
|
11614
|
+
{
|
|
11615
|
+
type: "string"
|
|
11616
|
+
}
|
|
11617
|
+
]
|
|
11618
|
+
},
|
|
11619
|
+
{
|
|
11620
|
+
type: "function",
|
|
11621
|
+
name: "appeal",
|
|
11622
|
+
constant: false,
|
|
11623
|
+
payable: false,
|
|
11624
|
+
inputs: [
|
|
11625
|
+
{
|
|
11626
|
+
type: "uint256",
|
|
11627
|
+
name: "caseId"
|
|
11628
|
+
}
|
|
11629
|
+
],
|
|
11630
|
+
outputs: []
|
|
11631
|
+
},
|
|
11632
|
+
{
|
|
11633
|
+
type: "function",
|
|
11634
|
+
name: "canRiskControlClose",
|
|
11635
|
+
constant: true,
|
|
11636
|
+
stateMutability: "view",
|
|
11637
|
+
payable: false,
|
|
11638
|
+
inputs: [
|
|
11639
|
+
{
|
|
11640
|
+
type: "uint256",
|
|
11641
|
+
name: "caseId"
|
|
11642
|
+
}
|
|
11643
|
+
],
|
|
11644
|
+
outputs: [
|
|
11645
|
+
{
|
|
11646
|
+
type: "bool"
|
|
11647
|
+
}
|
|
11648
|
+
]
|
|
11649
|
+
},
|
|
11650
|
+
{
|
|
11651
|
+
type: "function",
|
|
11652
|
+
name: "cancelAppeal",
|
|
11653
|
+
constant: false,
|
|
11654
|
+
payable: false,
|
|
11655
|
+
inputs: [
|
|
11656
|
+
{
|
|
11657
|
+
type: "uint256",
|
|
11658
|
+
name: "caseId"
|
|
11659
|
+
},
|
|
11660
|
+
{
|
|
11661
|
+
type: "uint256",
|
|
11662
|
+
name: "appealCaseId"
|
|
11663
|
+
},
|
|
11664
|
+
{
|
|
11665
|
+
type: "bool",
|
|
11666
|
+
name: "isMalicious"
|
|
11667
|
+
}
|
|
11668
|
+
],
|
|
11669
|
+
outputs: []
|
|
11670
|
+
},
|
|
11671
|
+
{
|
|
11672
|
+
type: "function",
|
|
11673
|
+
name: "cancelDispute",
|
|
11674
|
+
constant: false,
|
|
11675
|
+
payable: false,
|
|
11676
|
+
inputs: [
|
|
11677
|
+
{
|
|
11678
|
+
type: "uint256",
|
|
11679
|
+
name: "caseId"
|
|
11680
|
+
},
|
|
11681
|
+
{
|
|
11682
|
+
type: "bool",
|
|
11683
|
+
name: "isMalicious"
|
|
11684
|
+
}
|
|
11685
|
+
],
|
|
11686
|
+
outputs: []
|
|
11687
|
+
},
|
|
11688
|
+
{
|
|
11689
|
+
type: "function",
|
|
11690
|
+
name: "caseIdSequencer",
|
|
11691
|
+
constant: true,
|
|
11692
|
+
stateMutability: "view",
|
|
11693
|
+
payable: false,
|
|
11694
|
+
inputs: [],
|
|
11695
|
+
outputs: [
|
|
11696
|
+
{
|
|
11697
|
+
type: "uint256"
|
|
11698
|
+
}
|
|
11699
|
+
]
|
|
11700
|
+
},
|
|
11701
|
+
{
|
|
11702
|
+
type: "function",
|
|
11703
|
+
name: "claimBond",
|
|
11704
|
+
constant: false,
|
|
11705
|
+
payable: false,
|
|
11706
|
+
inputs: [
|
|
11707
|
+
{
|
|
11708
|
+
type: "uint256",
|
|
11709
|
+
name: "caseId"
|
|
11710
|
+
}
|
|
11711
|
+
],
|
|
11712
|
+
outputs: []
|
|
11713
|
+
},
|
|
11714
|
+
{
|
|
11715
|
+
type: "function",
|
|
11716
|
+
name: "claimForfeitBonds",
|
|
11717
|
+
constant: false,
|
|
11718
|
+
payable: false,
|
|
11719
|
+
inputs: [
|
|
11720
|
+
{
|
|
11721
|
+
type: "address",
|
|
11722
|
+
name: "receiver"
|
|
11723
|
+
}
|
|
11724
|
+
],
|
|
11725
|
+
outputs: []
|
|
11726
|
+
},
|
|
11727
|
+
{
|
|
11728
|
+
type: "function",
|
|
11729
|
+
name: "fileDispute",
|
|
11730
|
+
constant: false,
|
|
11731
|
+
stateMutability: "payable",
|
|
11732
|
+
payable: true,
|
|
11733
|
+
inputs: [
|
|
11734
|
+
{
|
|
11735
|
+
type: "tuple[]",
|
|
11736
|
+
name: "prices",
|
|
11737
|
+
components: [
|
|
11738
|
+
{
|
|
11739
|
+
type: "bytes32",
|
|
11740
|
+
name: "poolId"
|
|
11741
|
+
},
|
|
11742
|
+
{
|
|
11743
|
+
type: "uint8",
|
|
11744
|
+
name: "oracleType"
|
|
11745
|
+
},
|
|
11746
|
+
{
|
|
11747
|
+
type: "uint256",
|
|
11748
|
+
name: "referencePrice"
|
|
11749
|
+
},
|
|
11750
|
+
{
|
|
11751
|
+
type: "bytes",
|
|
11752
|
+
name: "oracleUpdateData"
|
|
11753
|
+
},
|
|
11754
|
+
{
|
|
11755
|
+
type: "uint64",
|
|
11756
|
+
name: "publishTime"
|
|
11757
|
+
}
|
|
11758
|
+
]
|
|
11759
|
+
},
|
|
11760
|
+
{
|
|
11761
|
+
type: "bytes32",
|
|
11762
|
+
name: "poolId"
|
|
11763
|
+
},
|
|
11764
|
+
{
|
|
11765
|
+
type: "address",
|
|
11766
|
+
name: "poolToken"
|
|
11767
|
+
}
|
|
11768
|
+
],
|
|
11769
|
+
outputs: []
|
|
11770
|
+
},
|
|
11771
|
+
{
|
|
11772
|
+
type: "function",
|
|
11773
|
+
name: "getAddressManager",
|
|
11774
|
+
constant: true,
|
|
11775
|
+
stateMutability: "view",
|
|
11776
|
+
payable: false,
|
|
11777
|
+
inputs: [],
|
|
11778
|
+
outputs: [
|
|
11779
|
+
{
|
|
11780
|
+
type: "address"
|
|
11781
|
+
}
|
|
11782
|
+
]
|
|
11783
|
+
},
|
|
11784
|
+
{
|
|
11785
|
+
type: "function",
|
|
11786
|
+
name: "getDependencyAddress",
|
|
11787
|
+
constant: true,
|
|
11788
|
+
stateMutability: "view",
|
|
11789
|
+
payable: false,
|
|
11790
|
+
inputs: [
|
|
11791
|
+
{
|
|
11792
|
+
type: "bytes32",
|
|
11793
|
+
name: "identifier"
|
|
11794
|
+
}
|
|
11795
|
+
],
|
|
11796
|
+
outputs: [
|
|
11797
|
+
{
|
|
11798
|
+
type: "address"
|
|
11799
|
+
}
|
|
11800
|
+
]
|
|
11801
|
+
},
|
|
11802
|
+
{
|
|
11803
|
+
type: "function",
|
|
11804
|
+
name: "getDisputeConfiguration",
|
|
11805
|
+
constant: true,
|
|
11806
|
+
stateMutability: "view",
|
|
11807
|
+
payable: false,
|
|
11808
|
+
inputs: [],
|
|
11809
|
+
outputs: [
|
|
11810
|
+
{
|
|
11811
|
+
type: "tuple",
|
|
11812
|
+
components: [
|
|
11813
|
+
{
|
|
11814
|
+
type: "address",
|
|
11815
|
+
name: "appealToken"
|
|
11816
|
+
},
|
|
11817
|
+
{
|
|
11818
|
+
type: "uint64",
|
|
11819
|
+
name: "disputeBondUsd"
|
|
11820
|
+
},
|
|
11821
|
+
{
|
|
11822
|
+
type: "uint64",
|
|
11823
|
+
name: "appealBondUsd"
|
|
11824
|
+
},
|
|
11825
|
+
{
|
|
11826
|
+
type: "uint64",
|
|
11827
|
+
name: "disputeThresholdUsd"
|
|
11828
|
+
},
|
|
11829
|
+
{
|
|
11830
|
+
type: "uint64",
|
|
11831
|
+
name: "caseDuration"
|
|
11832
|
+
},
|
|
11833
|
+
{
|
|
11834
|
+
type: "uint64",
|
|
11835
|
+
name: "voteDuration"
|
|
11836
|
+
},
|
|
11837
|
+
{
|
|
11838
|
+
type: "uint64",
|
|
11839
|
+
name: "resolveDuration"
|
|
11840
|
+
},
|
|
11841
|
+
{
|
|
11842
|
+
type: "uint32",
|
|
11843
|
+
name: "voteCountRate"
|
|
11844
|
+
},
|
|
11845
|
+
{
|
|
11846
|
+
type: "uint32",
|
|
11847
|
+
name: "effectiveVoteRate"
|
|
11848
|
+
}
|
|
11849
|
+
]
|
|
11850
|
+
}
|
|
11851
|
+
]
|
|
11852
|
+
},
|
|
11853
|
+
{
|
|
11854
|
+
type: "function",
|
|
11855
|
+
name: "getImplementation",
|
|
11856
|
+
constant: true,
|
|
11857
|
+
stateMutability: "view",
|
|
11858
|
+
payable: false,
|
|
11859
|
+
inputs: [],
|
|
11860
|
+
outputs: [
|
|
11861
|
+
{
|
|
11862
|
+
type: "address"
|
|
11863
|
+
}
|
|
11864
|
+
]
|
|
11865
|
+
},
|
|
11866
|
+
{
|
|
11867
|
+
type: "function",
|
|
11868
|
+
name: "initialize",
|
|
11869
|
+
constant: false,
|
|
11870
|
+
payable: false,
|
|
11871
|
+
inputs: [
|
|
11872
|
+
{
|
|
11873
|
+
type: "address",
|
|
11874
|
+
name: "addressManager"
|
|
11875
|
+
}
|
|
11876
|
+
],
|
|
11877
|
+
outputs: []
|
|
11878
|
+
},
|
|
11879
|
+
{
|
|
11880
|
+
type: "function",
|
|
11881
|
+
name: "isCaseRespondents",
|
|
11882
|
+
constant: true,
|
|
11883
|
+
stateMutability: "view",
|
|
11884
|
+
payable: false,
|
|
11885
|
+
inputs: [
|
|
11886
|
+
{
|
|
11887
|
+
type: "uint256",
|
|
11888
|
+
name: "caseId"
|
|
11889
|
+
},
|
|
11890
|
+
{
|
|
11891
|
+
type: "address",
|
|
11892
|
+
name: "account"
|
|
11893
|
+
}
|
|
11894
|
+
],
|
|
11895
|
+
outputs: [
|
|
11896
|
+
{
|
|
11897
|
+
type: "bool"
|
|
11898
|
+
}
|
|
11899
|
+
]
|
|
11900
|
+
},
|
|
11901
|
+
{
|
|
11902
|
+
type: "function",
|
|
11903
|
+
name: "nonces",
|
|
11904
|
+
constant: true,
|
|
11905
|
+
stateMutability: "view",
|
|
11906
|
+
payable: false,
|
|
11907
|
+
inputs: [
|
|
11908
|
+
{
|
|
11909
|
+
type: "address",
|
|
11910
|
+
name: "owner"
|
|
11911
|
+
}
|
|
11912
|
+
],
|
|
11913
|
+
outputs: [
|
|
11914
|
+
{
|
|
11915
|
+
type: "uint256"
|
|
11916
|
+
}
|
|
11917
|
+
]
|
|
11918
|
+
},
|
|
11919
|
+
{
|
|
11920
|
+
type: "function",
|
|
11921
|
+
name: "openVoting",
|
|
11922
|
+
constant: false,
|
|
11923
|
+
payable: false,
|
|
11924
|
+
inputs: [
|
|
11925
|
+
{
|
|
11926
|
+
type: "uint256",
|
|
11927
|
+
name: "caseId"
|
|
11928
|
+
},
|
|
11929
|
+
{
|
|
11930
|
+
type: "uint256",
|
|
11931
|
+
name: "evidenceId"
|
|
11932
|
+
},
|
|
11933
|
+
{
|
|
11934
|
+
type: "address[]",
|
|
11935
|
+
name: "respondents"
|
|
11936
|
+
}
|
|
11937
|
+
],
|
|
11938
|
+
outputs: []
|
|
11939
|
+
},
|
|
11940
|
+
{
|
|
11941
|
+
type: "function",
|
|
11942
|
+
name: "processReimbursement",
|
|
11943
|
+
constant: false,
|
|
11944
|
+
payable: false,
|
|
11945
|
+
inputs: [
|
|
11946
|
+
{
|
|
11947
|
+
type: "uint256",
|
|
11948
|
+
name: "caseId"
|
|
11949
|
+
},
|
|
11950
|
+
{
|
|
11951
|
+
type: "tuple",
|
|
11952
|
+
name: "reimbursementInfo",
|
|
11953
|
+
components: [
|
|
11954
|
+
{
|
|
11955
|
+
type: "bytes32",
|
|
11956
|
+
name: "merkleRoot"
|
|
11957
|
+
},
|
|
11958
|
+
{
|
|
11959
|
+
type: "address",
|
|
11960
|
+
name: "baseToken"
|
|
11961
|
+
},
|
|
11962
|
+
{
|
|
11963
|
+
type: "address",
|
|
11964
|
+
name: "quoteToken"
|
|
11965
|
+
},
|
|
11966
|
+
{
|
|
11967
|
+
type: "uint256",
|
|
11968
|
+
name: "totalBaseAmount"
|
|
11969
|
+
},
|
|
11970
|
+
{
|
|
11971
|
+
type: "uint256",
|
|
11972
|
+
name: "totalQuoteAmount"
|
|
11973
|
+
},
|
|
11974
|
+
{
|
|
11975
|
+
type: "uint256",
|
|
11976
|
+
name: "claimedBaseAmount"
|
|
11977
|
+
},
|
|
11978
|
+
{
|
|
11979
|
+
type: "uint256",
|
|
11980
|
+
name: "claimedQuoteAmount"
|
|
11981
|
+
},
|
|
11982
|
+
{
|
|
11983
|
+
type: "uint256",
|
|
11984
|
+
name: "expireTime"
|
|
11985
|
+
}
|
|
11986
|
+
]
|
|
11987
|
+
},
|
|
11988
|
+
{
|
|
11989
|
+
type: "bytes32[]",
|
|
11990
|
+
name: "zeroMerkleProof"
|
|
11991
|
+
}
|
|
11992
|
+
],
|
|
11993
|
+
outputs: []
|
|
11994
|
+
},
|
|
11995
|
+
{
|
|
11996
|
+
type: "function",
|
|
11997
|
+
name: "proxiableUUID",
|
|
11998
|
+
constant: true,
|
|
11999
|
+
stateMutability: "view",
|
|
12000
|
+
payable: false,
|
|
12001
|
+
inputs: [],
|
|
12002
|
+
outputs: [
|
|
12003
|
+
{
|
|
12004
|
+
type: "bytes32"
|
|
12005
|
+
}
|
|
12006
|
+
]
|
|
12007
|
+
},
|
|
12008
|
+
{
|
|
12009
|
+
type: "function",
|
|
12010
|
+
name: "resolveCaseAppeals",
|
|
12011
|
+
constant: false,
|
|
12012
|
+
payable: false,
|
|
12013
|
+
inputs: [
|
|
12014
|
+
{
|
|
12015
|
+
type: "uint256",
|
|
12016
|
+
name: "caseId"
|
|
12017
|
+
},
|
|
12018
|
+
{
|
|
12019
|
+
type: "bytes",
|
|
12020
|
+
name: "response"
|
|
12021
|
+
},
|
|
12022
|
+
{
|
|
12023
|
+
type: "tuple[]",
|
|
12024
|
+
name: "guardianSignatures",
|
|
12025
|
+
components: [
|
|
12026
|
+
{
|
|
12027
|
+
type: "bytes32",
|
|
12028
|
+
name: "r"
|
|
12029
|
+
},
|
|
12030
|
+
{
|
|
12031
|
+
type: "bytes32",
|
|
12032
|
+
name: "s"
|
|
12033
|
+
},
|
|
12034
|
+
{
|
|
12035
|
+
type: "uint8",
|
|
12036
|
+
name: "v"
|
|
12037
|
+
},
|
|
12038
|
+
{
|
|
12039
|
+
type: "uint8",
|
|
12040
|
+
name: "guardianIndex"
|
|
12041
|
+
}
|
|
12042
|
+
]
|
|
12043
|
+
}
|
|
12044
|
+
],
|
|
12045
|
+
outputs: []
|
|
12046
|
+
},
|
|
12047
|
+
{
|
|
12048
|
+
type: "function",
|
|
12049
|
+
name: "resolveDispute",
|
|
12050
|
+
constant: false,
|
|
12051
|
+
payable: false,
|
|
12052
|
+
inputs: [
|
|
12053
|
+
{
|
|
12054
|
+
type: "uint256",
|
|
12055
|
+
name: "caseId"
|
|
12056
|
+
},
|
|
12057
|
+
{
|
|
12058
|
+
type: "bytes",
|
|
12059
|
+
name: "response"
|
|
12060
|
+
},
|
|
12061
|
+
{
|
|
12062
|
+
type: "tuple[]",
|
|
12063
|
+
name: "guardianSignatures",
|
|
12064
|
+
components: [
|
|
12065
|
+
{
|
|
12066
|
+
type: "bytes32",
|
|
12067
|
+
name: "r"
|
|
12068
|
+
},
|
|
12069
|
+
{
|
|
12070
|
+
type: "bytes32",
|
|
12071
|
+
name: "s"
|
|
12072
|
+
},
|
|
12073
|
+
{
|
|
12074
|
+
type: "uint8",
|
|
12075
|
+
name: "v"
|
|
12076
|
+
},
|
|
12077
|
+
{
|
|
12078
|
+
type: "uint8",
|
|
12079
|
+
name: "guardianIndex"
|
|
12080
|
+
}
|
|
12081
|
+
]
|
|
12082
|
+
}
|
|
12083
|
+
],
|
|
12084
|
+
outputs: []
|
|
12085
|
+
},
|
|
12086
|
+
{
|
|
12087
|
+
type: "function",
|
|
12088
|
+
name: "updateDisputeConfiguration",
|
|
12089
|
+
constant: false,
|
|
12090
|
+
payable: false,
|
|
12091
|
+
inputs: [
|
|
12092
|
+
{
|
|
12093
|
+
type: "tuple",
|
|
12094
|
+
name: "disputeConfiguration",
|
|
12095
|
+
components: [
|
|
12096
|
+
{
|
|
12097
|
+
type: "address",
|
|
12098
|
+
name: "appealToken"
|
|
12099
|
+
},
|
|
12100
|
+
{
|
|
12101
|
+
type: "uint64",
|
|
12102
|
+
name: "disputeBondUsd"
|
|
12103
|
+
},
|
|
12104
|
+
{
|
|
12105
|
+
type: "uint64",
|
|
12106
|
+
name: "appealBondUsd"
|
|
12107
|
+
},
|
|
12108
|
+
{
|
|
12109
|
+
type: "uint64",
|
|
12110
|
+
name: "disputeThresholdUsd"
|
|
12111
|
+
},
|
|
12112
|
+
{
|
|
12113
|
+
type: "uint64",
|
|
12114
|
+
name: "caseDuration"
|
|
12115
|
+
},
|
|
12116
|
+
{
|
|
12117
|
+
type: "uint64",
|
|
12118
|
+
name: "voteDuration"
|
|
12119
|
+
},
|
|
12120
|
+
{
|
|
12121
|
+
type: "uint64",
|
|
12122
|
+
name: "resolveDuration"
|
|
12123
|
+
},
|
|
12124
|
+
{
|
|
12125
|
+
type: "uint32",
|
|
12126
|
+
name: "voteCountRate"
|
|
12127
|
+
},
|
|
12128
|
+
{
|
|
12129
|
+
type: "uint32",
|
|
12130
|
+
name: "effectiveVoteRate"
|
|
12131
|
+
}
|
|
12132
|
+
]
|
|
12133
|
+
}
|
|
12134
|
+
],
|
|
12135
|
+
outputs: []
|
|
12136
|
+
},
|
|
12137
|
+
{
|
|
12138
|
+
type: "function",
|
|
12139
|
+
name: "updateWormholeConfiguration",
|
|
12140
|
+
constant: false,
|
|
12141
|
+
payable: false,
|
|
12142
|
+
inputs: [
|
|
12143
|
+
{
|
|
12144
|
+
type: "tuple",
|
|
12145
|
+
name: "wormholeConfiguration",
|
|
12146
|
+
components: [
|
|
12147
|
+
{
|
|
12148
|
+
type: "address",
|
|
12149
|
+
name: "wormhole"
|
|
12150
|
+
},
|
|
12151
|
+
{
|
|
12152
|
+
type: "address",
|
|
12153
|
+
name: "staker"
|
|
12154
|
+
},
|
|
12155
|
+
{
|
|
12156
|
+
type: "bytes4",
|
|
12157
|
+
name: "selector"
|
|
12158
|
+
}
|
|
12159
|
+
]
|
|
12160
|
+
}
|
|
12161
|
+
],
|
|
12162
|
+
outputs: []
|
|
12163
|
+
},
|
|
12164
|
+
{
|
|
12165
|
+
type: "function",
|
|
12166
|
+
name: "upgradeTo",
|
|
12167
|
+
constant: false,
|
|
12168
|
+
stateMutability: "payable",
|
|
12169
|
+
payable: true,
|
|
12170
|
+
inputs: [
|
|
12171
|
+
{
|
|
12172
|
+
type: "address",
|
|
12173
|
+
name: "newImplementation"
|
|
12174
|
+
},
|
|
12175
|
+
{
|
|
12176
|
+
type: "bytes",
|
|
12177
|
+
name: "data"
|
|
12178
|
+
}
|
|
12179
|
+
],
|
|
12180
|
+
outputs: []
|
|
12181
|
+
},
|
|
12182
|
+
{
|
|
12183
|
+
type: "function",
|
|
12184
|
+
name: "upgradeToAndCall",
|
|
12185
|
+
constant: false,
|
|
12186
|
+
stateMutability: "payable",
|
|
12187
|
+
payable: true,
|
|
12188
|
+
inputs: [
|
|
12189
|
+
{
|
|
12190
|
+
type: "address",
|
|
12191
|
+
name: "newImplementation"
|
|
12192
|
+
},
|
|
12193
|
+
{
|
|
12194
|
+
type: "bytes",
|
|
12195
|
+
name: "data"
|
|
12196
|
+
}
|
|
12197
|
+
],
|
|
12198
|
+
outputs: []
|
|
12199
|
+
},
|
|
12200
|
+
{
|
|
12201
|
+
type: "function",
|
|
12202
|
+
name: "vote",
|
|
12203
|
+
constant: false,
|
|
12204
|
+
payable: false,
|
|
12205
|
+
inputs: [
|
|
12206
|
+
{
|
|
12207
|
+
type: "uint256",
|
|
12208
|
+
name: "caseId"
|
|
12209
|
+
},
|
|
12210
|
+
{
|
|
12211
|
+
type: "address",
|
|
12212
|
+
name: "validator"
|
|
12213
|
+
},
|
|
12214
|
+
{
|
|
12215
|
+
type: "uint8",
|
|
12216
|
+
name: "voteOption"
|
|
12217
|
+
},
|
|
12218
|
+
{
|
|
12219
|
+
type: "uint256",
|
|
12220
|
+
name: "deadline"
|
|
12221
|
+
},
|
|
12222
|
+
{
|
|
12223
|
+
type: "uint8",
|
|
12224
|
+
name: "v"
|
|
12225
|
+
},
|
|
12226
|
+
{
|
|
12227
|
+
type: "bytes32",
|
|
12228
|
+
name: "r"
|
|
12229
|
+
},
|
|
12230
|
+
{
|
|
12231
|
+
type: "bytes32",
|
|
12232
|
+
name: "s"
|
|
12233
|
+
}
|
|
12234
|
+
],
|
|
12235
|
+
outputs: []
|
|
12236
|
+
}
|
|
12237
|
+
];
|
|
12238
|
+
|
|
12239
|
+
// src/web3/providers.ts
|
|
12240
|
+
var getTokenContract = async (chainId, tokenAddress) => {
|
|
12241
|
+
const provider = getJSONProvider(chainId);
|
|
12242
|
+
return getContract(
|
|
12243
|
+
tokenAddress,
|
|
12244
|
+
IERC20Metadata_default,
|
|
12245
|
+
provider
|
|
12246
|
+
);
|
|
12247
|
+
};
|
|
12248
|
+
var getERC20Contract = async (chainId, tokenAddress) => {
|
|
12249
|
+
const provider = await getSignerProvider(chainId);
|
|
12250
|
+
return getContract(
|
|
12251
|
+
tokenAddress,
|
|
12252
|
+
IERC20Metadata_default,
|
|
12253
|
+
provider
|
|
12254
|
+
);
|
|
12255
|
+
};
|
|
12256
|
+
var getAccount = async (chainId) => {
|
|
12257
|
+
const provider = await getSignerProvider(chainId);
|
|
12258
|
+
const account = await provider?.getAddress();
|
|
12259
|
+
return account ?? void 0;
|
|
12260
|
+
};
|
|
12261
|
+
var getLiquidityRouterContract = async (chainId) => {
|
|
12262
|
+
const addresses = address_default[chainId];
|
|
12263
|
+
const address = addresses.LIQUIDITY_ROUTER;
|
|
12264
|
+
const provider = await getSignerProvider(chainId);
|
|
12265
|
+
return getContract(
|
|
12266
|
+
address,
|
|
12267
|
+
LiquidityRouter_default,
|
|
12268
|
+
provider
|
|
12269
|
+
);
|
|
12270
|
+
};
|
|
12271
|
+
var getPoolManagerContract = async (chainId, type = 1 /* Signer */) => {
|
|
12272
|
+
const addresses = address_default[chainId];
|
|
12273
|
+
const address = addresses.POOL_MANAGER;
|
|
12274
|
+
const provider = type === 0 /* JSON */ ? getJSONProvider(chainId) : await getSignerProvider(chainId);
|
|
12275
|
+
return getContract(
|
|
12276
|
+
address,
|
|
12277
|
+
PoolManager_default,
|
|
12278
|
+
provider
|
|
12279
|
+
);
|
|
12280
|
+
};
|
|
12281
|
+
var getQuotePoolContract = async (chainId, type = 0 /* JSON */) => {
|
|
12282
|
+
const addresses = address_default[chainId];
|
|
12283
|
+
const address = addresses.QUOTE_POOL;
|
|
12284
|
+
const provider = type === 0 /* JSON */ ? getJSONProvider(chainId) : await getSignerProvider(chainId);
|
|
12285
|
+
return getContract(address, QuotePool_default, provider);
|
|
12286
|
+
};
|
|
12287
|
+
var getBasePoolContract = async (chainId, type = 0 /* JSON */) => {
|
|
12288
|
+
const addresses = address_default[chainId];
|
|
12289
|
+
const address = addresses.BASE_POOL;
|
|
12290
|
+
const provider = type === 0 /* JSON */ ? getJSONProvider(chainId) : await getSignerProvider(chainId);
|
|
12291
|
+
return getContract(address, BasePool_default, provider);
|
|
12292
|
+
};
|
|
12293
|
+
var getBrokerSingerContract = async (chainId, brokerAddress) => {
|
|
12294
|
+
const address = brokerAddress;
|
|
12295
|
+
const provider = await getSignerProvider(chainId);
|
|
12296
|
+
return getContract(address, Broker_default, provider);
|
|
12297
|
+
};
|
|
12298
|
+
var getSeamlessBrokerContract = async (brokerAddress, singer) => {
|
|
12299
|
+
return getContract(brokerAddress, Broker_default, singer);
|
|
12300
|
+
};
|
|
12301
|
+
var getBrokerContract = async (chainId, brokerAddress) => {
|
|
12302
|
+
const address = brokerAddress;
|
|
12303
|
+
const provider = getJSONProvider(chainId);
|
|
12304
|
+
return getContract(address, Broker_default, provider);
|
|
12305
|
+
};
|
|
12306
|
+
var getPoolTokenContract = async (chainId, lpTokenAddress, type = 0 /* JSON */) => {
|
|
12307
|
+
const address = lpTokenAddress;
|
|
12308
|
+
const provider = type === 0 /* JSON */ ? getJSONProvider(chainId) : await getSignerProvider(chainId);
|
|
12309
|
+
return getContract(address, PoolToken_default, provider);
|
|
12310
|
+
};
|
|
12311
|
+
var getMarketManageContract = async (chainId, type = 0 /* JSON */) => {
|
|
12312
|
+
const addresses = address_default[chainId];
|
|
12313
|
+
const address = addresses.MARKET_MANAGER;
|
|
12314
|
+
console.log(addresses.MARKET_MANAGER);
|
|
12315
|
+
const provider = type === 0 /* JSON */ ? getJSONProvider(chainId) : await getSignerProvider(chainId);
|
|
12316
|
+
return getContract(
|
|
12317
|
+
address,
|
|
12318
|
+
MarketManager_default,
|
|
12319
|
+
provider
|
|
12320
|
+
);
|
|
12321
|
+
};
|
|
12322
|
+
var getDataProviderContract = async (chainId, type = 0 /* JSON */) => {
|
|
12323
|
+
const addresses = address_default[chainId];
|
|
12324
|
+
const address = addresses.DATA_PROVIDER;
|
|
12325
|
+
const provider = type === 0 /* JSON */ ? getJSONProvider(chainId) : await getSignerProvider(chainId);
|
|
12326
|
+
return getContract(
|
|
12327
|
+
address,
|
|
12328
|
+
DataProvider_default,
|
|
12329
|
+
provider
|
|
12330
|
+
);
|
|
12331
|
+
};
|
|
12332
|
+
var getForwarderContract = async (chainId, type = 0 /* JSON */) => {
|
|
12333
|
+
const addresses = address_default[chainId];
|
|
12334
|
+
const address = addresses.FORWARDER;
|
|
12335
|
+
const provider = type === 0 /* JSON */ ? getJSONProvider(chainId) : await getSignerProvider(chainId);
|
|
12336
|
+
return getContract(address, Forwarder_default, provider);
|
|
12337
|
+
};
|
|
12338
|
+
var getReimbursementContract = async (chainId, type = 0 /* JSON */) => {
|
|
12339
|
+
const addresses = address_default[chainId];
|
|
12340
|
+
const address = addresses.REIMBURSEMENT;
|
|
12341
|
+
const provider = type === 0 /* JSON */ ? getJSONProvider(chainId) : await getSignerProvider(chainId);
|
|
12342
|
+
return getContract(
|
|
12343
|
+
address,
|
|
12344
|
+
Reimbursement_default,
|
|
12345
|
+
provider
|
|
12346
|
+
);
|
|
12347
|
+
};
|
|
12348
|
+
var getDisputeCourtContract = async (chainId, type = 0 /* JSON */) => {
|
|
12349
|
+
const addresses = address_default[chainId];
|
|
12350
|
+
const address = addresses.DISPUTE_COURT;
|
|
12351
|
+
const provider = type === 0 /* JSON */ ? getJSONProvider(chainId) : await getSignerProvider(chainId);
|
|
12352
|
+
return getContract(
|
|
12353
|
+
address,
|
|
12354
|
+
DisputeCourt_default,
|
|
12355
|
+
provider
|
|
12356
|
+
);
|
|
12357
|
+
};
|
|
12358
|
+
|
|
12359
|
+
// src/config/error.ts
|
|
12360
|
+
import { ErrorType, ErrorDecoder } from "ethers-decode-error";
|
|
12361
|
+
|
|
12362
|
+
// src/config/customErrorMap.ts
|
|
12363
|
+
var customErrorMapping = {
|
|
12364
|
+
"0xfa52dfc0": "AccountInsufficientFreeAmount()",
|
|
12365
|
+
"0xffd10028": "AccountInsufficientTradableAmount(uint256,uint256)",
|
|
12366
|
+
"0x9996b315": "AddressEmptyCode(address)",
|
|
12367
|
+
"0x4c9c8ce3": "ERC1967InvalidImplementation(address)",
|
|
12368
|
+
"0xb398979f": "ERC1967NonPayable()",
|
|
12369
|
+
"0xd6bda275": "FailedCall()",
|
|
12370
|
+
"0xf92ee8a9": "InvalidInitialization()",
|
|
12371
|
+
"0x44d3438f": "NotAddressManager()",
|
|
12372
|
+
"0x3fc81f20": "NotDependencyManager()",
|
|
12373
|
+
"0xd7e6bcf8": "NotInitializing()",
|
|
12374
|
+
"0x507f487a": "NotProxyAdmin()",
|
|
12375
|
+
"0xe03f6024": "PermissionDenied(address,address)",
|
|
12376
|
+
"0x5274afe7": "SafeERC20FailedOperation(address)",
|
|
12377
|
+
"0xe07c8dba": "UUPSUnauthorizedCallContext()",
|
|
12378
|
+
"0xaa1d49a4": "UUPSUnsupportedProxiableUUID(bytes32)",
|
|
12379
|
+
"0x24775e06": "SafeCastOverflowedUintToInt(uint256)",
|
|
12380
|
+
"0xba767932": "ConvertAmountMismatch(uint256,uint256)",
|
|
12381
|
+
"0xd93c0665": "EnforcedPause()",
|
|
12382
|
+
"0x8dfc202b": "ExpectedPause()",
|
|
12383
|
+
"0x059e2f49": "InRewindMode()",
|
|
12384
|
+
"0x42301c23": "InsufficientOutputAmount()",
|
|
12385
|
+
"0x8637dfc0": "NotInRewindMode()",
|
|
12386
|
+
"0x4578ddb8": "OnlyRelayer()",
|
|
12387
|
+
"0x1e4fbdf7": "OwnableInvalidOwner(address)",
|
|
12388
|
+
"0x118cdaa7": "OwnableUnauthorizedAccount(address)",
|
|
12389
|
+
"0x3ee5aeb5": "ReentrancyGuardReentrantCall()",
|
|
12390
|
+
"0x90b8ec18": "TransferFailed()",
|
|
12391
|
+
"0xc6e8248a": "InsufficientSize()",
|
|
12392
|
+
"0x700deaad": "InvalidADLPosition(OrderId,PositionId)",
|
|
12393
|
+
"0x3385aa1f": "ExceedOrderSize(uint256)",
|
|
12394
|
+
"0xc6c2b87b": "ExecutionFeeNotSupport(address)",
|
|
12395
|
+
"0xb07e3bc4": "InsufficientCollateral(uint256,uint256)",
|
|
12396
|
+
"0x613970e0": "InvalidParameter()",
|
|
12397
|
+
"0x27d08510": "NotActiveBroker(address)",
|
|
12398
|
+
"0xf6412b5a": "NotOrderOwner()",
|
|
12399
|
+
"0x70d645e3": "NotPositionOwner()",
|
|
12400
|
+
"0xe75316c6": "OrderNotExist(OrderId)",
|
|
12401
|
+
"0xba01b06f": "PoolNotActive(PoolId)",
|
|
12402
|
+
"0xddefae28": "AlreadyMinted()",
|
|
12403
|
+
"0x64283d7b": "ERC721IncorrectOwner(address,uint256,address)",
|
|
12404
|
+
"0x177e802f": "ERC721InsufficientApproval(address,uint256)",
|
|
12405
|
+
"0xa9fbf51f": "ERC721InvalidApprover(address)",
|
|
12406
|
+
"0x5b08ba18": "ERC721InvalidOperator(address)",
|
|
12407
|
+
"0x89c62b64": "ERC721InvalidOwner(address)",
|
|
12408
|
+
"0x64a0ae92": "ERC721InvalidReceiver(address)",
|
|
12409
|
+
"0x73c6ac6e": "ERC721InvalidSender(address)",
|
|
12410
|
+
"0x7e273289": "ERC721NonexistentToken(uint256)",
|
|
12411
|
+
"0xb4762117": "ExceedMaxLeverage(PositionId)",
|
|
12412
|
+
"0x29143a42": "ExceedPositionSize()",
|
|
12413
|
+
"0x8ea9158f": "InvalidPosition(PositionId)",
|
|
12414
|
+
"0xa5afd143": "PositionNotHealthy(PositionId,uint256)",
|
|
12415
|
+
"0xba0d3752": "PositionNotInitialized(PositionId)",
|
|
12416
|
+
"0xc20f35b7": "UnderflowOI()",
|
|
12417
|
+
"0xf4d678b8": "InsufficientBalance()",
|
|
12418
|
+
"0x6aee3c1a": "InsufficientRiskReserves()",
|
|
12419
|
+
"0x82cb17ef": "InvalidSplitConfig()",
|
|
12420
|
+
"0x4b3c8f33": "ExceedMaxBaseProfit()",
|
|
12421
|
+
"0xdc82bd68": "ExceedMinOutputAmount()",
|
|
12422
|
+
"0x9ac13039": "InsufficientPoolProfit()",
|
|
12423
|
+
"0x14be833f": "InsufficientReturnAmount(uint256,uint256)",
|
|
12424
|
+
"0x4ec4fd74": "PoolFundingFeeNotPositive(int256,uint256,Direction)",
|
|
12425
|
+
"0xba8f5df5": "PoolNotCompoundable(PoolId)",
|
|
12426
|
+
"0xd34e366f": "ExceedBaseCollateral(uint256,uint256)",
|
|
12427
|
+
"0xc7544914": "ExceedDebt(uint256,uint256)",
|
|
12428
|
+
"0xe7aa687a": "ExceedExchangeable()",
|
|
12429
|
+
"0xdb42144d": "InsufficientBalance(address,uint256,uint256)",
|
|
12430
|
+
"0x5646203f": "InsufficientCollateral(PositionId,uint256)",
|
|
12431
|
+
"0xf645eedf": "ECDSAInvalidSignature()",
|
|
12432
|
+
"0xfce698f7": "ECDSAInvalidSignatureLength(uint256)",
|
|
12433
|
+
"0xd78bce0c": "ECDSAInvalidSignatureS(bytes32)",
|
|
12434
|
+
"0x48834bee": "ExpiredFeeData()",
|
|
12435
|
+
"0x56d69198": "InvalidFeeRate()",
|
|
12436
|
+
"0x80577032": "NoRebateToClaim()",
|
|
12437
|
+
"0x6e6b79b0": "NotBrokerSigner(address)",
|
|
12438
|
+
"0xff70343d": "UnsupportedAssetClass(AssetClass)",
|
|
12439
|
+
"0x185676be": "UnsupportedFeeTier(uint8)",
|
|
12440
|
+
"0x60b25fe4": "BrokerAlreadyExists()",
|
|
12441
|
+
"0x7eb4a674": "BrokerNotFound()",
|
|
12442
|
+
"0x8c3b5bf0": "NotBrokerAdmin()",
|
|
12443
|
+
"0x3733548a": "InvalidFeeTier()",
|
|
12444
|
+
"0x192105d7": "InitializationFunctionReverted(address,bytes)",
|
|
12445
|
+
"0xa37bfec9": "ExpOverflow()",
|
|
12446
|
+
"0xf64fa6a8": "InvalidOrder(OrderId)",
|
|
12447
|
+
"0xd4944235": "NoADLNeeded(OrderId)",
|
|
12448
|
+
"0xe079169e": "NotReachedPrice(OrderId,uint256,uint256,TriggerType)",
|
|
12449
|
+
"0xc60eb335": "OnlyKeeper()",
|
|
12450
|
+
"0xa8ce4432": "SafeCastOverflowedIntToUint(int256)",
|
|
12451
|
+
"0x17229ec4": "NotMeetEarlyCloseCriteria(PositionId)",
|
|
12452
|
+
"0x0dc149f0": "AlreadyInitialized()",
|
|
12453
|
+
"0x7a5c919f": "InvalidRewindPrice()",
|
|
12454
|
+
"0xc53f84e7": "PositionRemainsHealthy(PositionId)",
|
|
12455
|
+
"0x230e8e43": "PoolNotInPreBenchState(PoolId)",
|
|
12456
|
+
"0x664431a8": "NotAllowedTarget(address)",
|
|
12457
|
+
"0x03357c6c": "ExceedsMaximumRelayFee()",
|
|
12458
|
+
"0x0d10f63b": "InconsistentParamsLength()",
|
|
12459
|
+
"0x38802743": "InsufficientFeeAllowance(address,uint256,uint256)",
|
|
12460
|
+
"0xd95b4ad5": "InsufficientFeeBalance(address,uint256,uint256)",
|
|
12461
|
+
"0xa3972305": "MismatchedSender(address)",
|
|
12462
|
+
"0xc3b80e86": "RelayerRegistered(address)",
|
|
12463
|
+
"0xee0844a3": "RemoveRelayerFailed()",
|
|
12464
|
+
"0xc583a8da": "IncorrectFee(uint256)",
|
|
12465
|
+
"0x00bfc921": "InvalidPrice()",
|
|
12466
|
+
"0x148cd0dd": "VerifyPriceFailed()",
|
|
12467
|
+
"0xb12d13eb": "ETHTransferFailed()",
|
|
12468
|
+
"0xa83325d4": "PoolOracleFeeCharged()",
|
|
12469
|
+
"0x6b75f90d": "PoolOracleFeeNotCharged()",
|
|
12470
|
+
"0x42a0e2a7": "PoolOracleFeeNotExisted()",
|
|
12471
|
+
"0x5e0a829b": "ETHTransferFailed(address,uint256)",
|
|
12472
|
+
"0x4ba6536f": "GasLimitExceeded(address,uint256,uint256)",
|
|
12473
|
+
"0xca1aae4b": "GasLimitNotSet(address)",
|
|
12474
|
+
"0x3728b83d": "InvalidAmount(uint256)",
|
|
12475
|
+
"0x3484727e": "BaseFeeNotSoldOut()",
|
|
12476
|
+
"0x0251bde4": "LPNotFullyMinted()",
|
|
12477
|
+
"0x1acb203e": "PositionNotEmpty()",
|
|
12478
|
+
"0x2be7b24b": "UnexpectedPoolState()",
|
|
12479
|
+
"0x7bd42a2e": "NotEmptyAddress()",
|
|
12480
|
+
"0x6697b232": "AccessControlBadConfirmation()",
|
|
12481
|
+
"0xe2517d3f": "AccessControlUnauthorizedAccount(address,bytes32)",
|
|
12482
|
+
"0x7c9a1cf9": "AlreadyVoted()",
|
|
12483
|
+
"0x796ea3a6": "BondNotReleased()",
|
|
12484
|
+
"0xf38e5973": "CaseAppealNotFinished()",
|
|
12485
|
+
"0x63d39157": "CaseCanNotAppeal()",
|
|
12486
|
+
"0x1eaa4a59": "CaseDeadlineNotReached()",
|
|
12487
|
+
"0xe6c67e3a": "CaseDeadlineReached()",
|
|
12488
|
+
"0x0fc957b1": "CaseNotAccepted()",
|
|
12489
|
+
"0x3ddb819d": "CaseNotExist(CaseId)",
|
|
12490
|
+
"0x218ad435": "CaseNotInVoting()",
|
|
12491
|
+
"0x79eab18d": "CaseRespondentAppealed(CaseId,address)",
|
|
12492
|
+
"0x311c16d3": "DisputeNotAllowed()",
|
|
12493
|
+
"0xdcdedda9": "InvalidPoolToken()",
|
|
12494
|
+
"0xc546bca4": "NotCaseRespondent(CaseId,address)",
|
|
12495
|
+
"0x784fd7f1": "OnlyActiveValidator()",
|
|
12496
|
+
"0xc00ca938": "UnexpectedCaseState()",
|
|
12497
|
+
"0xa9214540": "AlreadyClaimed(CaseId,address)",
|
|
12498
|
+
"0xd4ac59c1": "InvalidAmount(CaseId,address)",
|
|
12499
|
+
"0x7a6f5328": "MerkleTreeVerificationFailed(CaseId,address)",
|
|
12500
|
+
"0x094a5cfe": "ReimbursementValidity(CaseId)",
|
|
12501
|
+
"0xb04111ef": "InsufficientFreeCollateral(PositionId,uint256)",
|
|
12502
|
+
"0x12f1b11a": "InsufficientLockedCollateral(PositionId,uint256)",
|
|
12503
|
+
"0x6dfcc650": "SafeCastOverflowedUintDowncast(uint8,uint256)",
|
|
12504
|
+
"0x1c151780": "ExceedMinOutput(uint256,uint256)",
|
|
12505
|
+
"0xe1f0493d": "NotAllowedCaller(address)",
|
|
12506
|
+
"0xfb8f41b2": "ERC20InsufficientAllowance(address,uint256,uint256)",
|
|
12507
|
+
"0xe450d38c": "ERC20InsufficientBalance(address,uint256,uint256)",
|
|
12508
|
+
"0xe602df05": "ERC20InvalidApprover(address)",
|
|
12509
|
+
"0xec442f05": "ERC20InvalidReceiver(address)",
|
|
12510
|
+
"0x96c6fd1e": "ERC20InvalidSender(address)",
|
|
12511
|
+
"0x94280d62": "ERC20InvalidSpender(address)",
|
|
12512
|
+
"0x62791302": "ERC2612ExpiredSignature(uint256)",
|
|
12513
|
+
"0x4b800e46": "ERC2612InvalidSigner(address,address)",
|
|
12514
|
+
"0x752d88c0": "InvalidAccountNonce(address,uint256)",
|
|
12515
|
+
"0xb3512b0c": "InvalidShortString()",
|
|
12516
|
+
"0x305a27a9": "StringTooLong(string)",
|
|
12517
|
+
"0xfd0f789d": "ExceedMaxPriceDeviation()",
|
|
12518
|
+
"0x18b88897": "InvalidUpdateFee()",
|
|
12519
|
+
"0x19abf40e": "StalePrice()",
|
|
12520
|
+
"0xe351cd13": "ExceedMaxExchangeableAmount()",
|
|
12521
|
+
"0x15912a6f": "NotSupportVersion()",
|
|
12522
|
+
"0xf1364a74": "ArrayEmpty()",
|
|
12523
|
+
"0x15ed381d": "ExceedMaxProfit()",
|
|
12524
|
+
"0x51aeee6c": "PoolNotExist(PoolId)",
|
|
12525
|
+
"0x70f6c197": "InvalidQuoteTokenAddress()",
|
|
12526
|
+
"0x0b8457f4": "InvalidRatioParams()",
|
|
12527
|
+
"0x29dae146": "MarketAlreadyExisted()",
|
|
12528
|
+
"0x0e442a4a": "InvalidBaseToken()",
|
|
12529
|
+
"0x24e219c7": "MarketNotExist(MarketId)",
|
|
12530
|
+
"0xcc36f935": "PoolExists(PoolId)",
|
|
12531
|
+
"0xe84c308d": "ExceedBaseReserved(uint256,uint256)",
|
|
12532
|
+
"0x3e241751": "ExceedQuoteReserved(uint256,uint256)",
|
|
12533
|
+
"0xd54d0fc4": "InsufficientLiquidity(uint256,uint256,uint256)",
|
|
12534
|
+
"0x7e562a65": "InvalidDistributionAmount()",
|
|
12535
|
+
"0x83c7580d": "ReservableNotEnough(uint256,uint256)",
|
|
12536
|
+
"0x94eef58a": "ERC2771ForwarderExpiredRequest(uint48)",
|
|
12537
|
+
"0xc845a056": "ERC2771ForwarderInvalidSigner(address,address)",
|
|
12538
|
+
"0x70647f79": "ERC2771ForwarderMismatchedValue(uint256,uint256)",
|
|
12539
|
+
"0xd2650cd1": "ERC2771UntrustfulTarget(address,address)",
|
|
12540
|
+
"0xcf479181": "InsufficientBalance(uint256,uint256)",
|
|
12541
|
+
"0x4c150d8f": "DifferentMarket(PoolId,PoolId)",
|
|
12542
|
+
"0xaa98b06a": "InsufficientQuoteIn(uint256,uint256,uint256)",
|
|
12543
|
+
"0x3e589bee": "InvalidLiquidityAmount()",
|
|
10585
12544
|
"0xaebd3617": "InvalidTpsl(uint256)",
|
|
10586
12545
|
"0x7fe81129": "SamePoolMigration(PoolId)",
|
|
10587
12546
|
"0x71c4efed": "SlippageExceeded(uint256,uint256)",
|
|
@@ -12999,7 +14958,9 @@ var ARB_BETA_SEPOLIA = {
|
|
|
12999
14958
|
DATA_PROVIDER: "0x19dD80bF40Af2d891F270085D9B1C49730a5a6B0",
|
|
13000
14959
|
ORACLE_RESERVE: "0x3e0d8fAd0a5245D0b2C9d893fE155397a307577C",
|
|
13001
14960
|
FORWARDER: "0xf58CAEDf8A76331848ef51108ea102D920Dcf785",
|
|
13002
|
-
TRADING_ROUTER: "0x0000000000000000000000000000000000000000"
|
|
14961
|
+
TRADING_ROUTER: "0x0000000000000000000000000000000000000000",
|
|
14962
|
+
REIMBURSEMENT: "0x0000000000000000000000000000000000000000",
|
|
14963
|
+
DISPUTE_COURT: "0x0000000000000000000000000000000000000000"
|
|
13003
14964
|
};
|
|
13004
14965
|
|
|
13005
14966
|
// src/config/address/LINEA_BETA_SEPOLIA.ts
|
|
@@ -13022,7 +14983,9 @@ var LINEA_BETA_SEPOLIA = {
|
|
|
13022
14983
|
ORACLE_RESERVE: "0xB3D5a67223905FE73a0749e7A03525838063C54C",
|
|
13023
14984
|
USDC: "0xD984fd34f91F92DA0586e1bE82E262fF27DC431b",
|
|
13024
14985
|
FORWARDER: "0x6C40462A4d45BA4119af59Fb9e41b8eaC9293962",
|
|
13025
|
-
TRADING_ROUTER: "0x0000000000000000000000000000000000000000"
|
|
14986
|
+
TRADING_ROUTER: "0x0000000000000000000000000000000000000000",
|
|
14987
|
+
REIMBURSEMENT: "0x0000000000000000000000000000000000000000",
|
|
14988
|
+
DISPUTE_COURT: "0x0000000000000000000000000000000000000000"
|
|
13026
14989
|
};
|
|
13027
14990
|
|
|
13028
14991
|
// src/config/address/BSC_BETA_NET.ts
|
|
@@ -18925,7 +20888,7 @@ var Utils = class {
|
|
|
18925
20888
|
}
|
|
18926
20889
|
return null;
|
|
18927
20890
|
}
|
|
18928
|
-
async getApproveQuoteAmount(
|
|
20891
|
+
async getApproveQuoteAmount(account, chainId, tokenAddress, spenderAddress) {
|
|
18929
20892
|
try {
|
|
18930
20893
|
const erc20Abi = [
|
|
18931
20894
|
"function allowance(address owner, address spender) external view returns (uint256)"
|
|
@@ -18933,11 +20896,11 @@ var Utils = class {
|
|
|
18933
20896
|
const spender = spenderAddress ?? getContractAddressByChainId(chainId).Account;
|
|
18934
20897
|
const provider = await getJSONProvider(chainId);
|
|
18935
20898
|
const tokenContract = new ethers7.Contract(
|
|
18936
|
-
|
|
20899
|
+
tokenAddress,
|
|
18937
20900
|
erc20Abi,
|
|
18938
20901
|
provider
|
|
18939
20902
|
);
|
|
18940
|
-
const allowance = await tokenContract.allowance(
|
|
20903
|
+
const allowance = await tokenContract.allowance(account, spender);
|
|
18941
20904
|
return {
|
|
18942
20905
|
code: 0,
|
|
18943
20906
|
data: allowance.toString()
|
|
@@ -18947,12 +20910,12 @@ var Utils = class {
|
|
|
18947
20910
|
throw typeof error === "string" ? error : await getErrorTextFormError(error);
|
|
18948
20911
|
}
|
|
18949
20912
|
}
|
|
18950
|
-
async needsApproval(
|
|
20913
|
+
async needsApproval(account, chainId, tokenAddress, requiredAmount, spenderAddress) {
|
|
18951
20914
|
try {
|
|
18952
20915
|
const currentAllowanceRes = await this.getApproveQuoteAmount(
|
|
18953
|
-
|
|
20916
|
+
account,
|
|
18954
20917
|
chainId,
|
|
18955
|
-
|
|
20918
|
+
tokenAddress,
|
|
18956
20919
|
spenderAddress
|
|
18957
20920
|
);
|
|
18958
20921
|
const currentAllowance = currentAllowanceRes.data;
|
|
@@ -18977,16 +20940,21 @@ var Utils = class {
|
|
|
18977
20940
|
"function approve(address spender, uint256 amount) external returns (bool)"
|
|
18978
20941
|
];
|
|
18979
20942
|
const config = this.configManager.getConfig();
|
|
18980
|
-
console.log("approveAuthorization: signer-->", signer);
|
|
18981
20943
|
const usdcContract = new ethers7.Contract(
|
|
18982
20944
|
quoteAddress,
|
|
18983
20945
|
erc20Abi,
|
|
18984
20946
|
signer ?? config.signer
|
|
18985
20947
|
);
|
|
18986
|
-
console.log("approveAuthorization: usdcContract-->", usdcContract);
|
|
18987
20948
|
const approveAmount = amount ?? ethers7.MaxUint256;
|
|
18988
20949
|
const spender = spenderAddress ?? getContractAddressByChainId(chainId).Account;
|
|
18989
|
-
const
|
|
20950
|
+
const gasPrice = await this.getGasPriceByRatio();
|
|
20951
|
+
const gasLimit = await this.getGasLimitByRatio(
|
|
20952
|
+
await usdcContract.approve.estimateGas(spender, approveAmount)
|
|
20953
|
+
);
|
|
20954
|
+
const tx = await usdcContract.approve(spender, approveAmount, {
|
|
20955
|
+
gasLimit,
|
|
20956
|
+
gasPrice
|
|
20957
|
+
});
|
|
18990
20958
|
await tx.wait();
|
|
18991
20959
|
return {
|
|
18992
20960
|
code: 0,
|
|
@@ -19044,9 +21012,7 @@ var Utils = class {
|
|
|
19044
21012
|
provider
|
|
19045
21013
|
);
|
|
19046
21014
|
try {
|
|
19047
|
-
const networkFee = await marketManagerContract.getExecutionFee(
|
|
19048
|
-
marketId
|
|
19049
|
-
);
|
|
21015
|
+
const networkFee = await marketManagerContract.getExecutionFee(marketId);
|
|
19050
21016
|
return networkFee.toString();
|
|
19051
21017
|
} catch (error) {
|
|
19052
21018
|
this.logger.error("Error getting network fee:", error);
|
|
@@ -19060,15 +21026,24 @@ var Utils = class {
|
|
|
19060
21026
|
return priceData;
|
|
19061
21027
|
} catch (error) {
|
|
19062
21028
|
this.logger.error("Error getting oracle price:", error);
|
|
19063
|
-
|
|
19064
|
-
price: "0",
|
|
19065
|
-
vaa: "",
|
|
19066
|
-
publishTime: 0,
|
|
19067
|
-
poolId: "",
|
|
19068
|
-
value: 0
|
|
19069
|
-
};
|
|
21029
|
+
throw error;
|
|
19070
21030
|
}
|
|
19071
21031
|
}
|
|
21032
|
+
async buildUpdatePriceParams(poolId, chainId) {
|
|
21033
|
+
const priceData = await this.getOraclePrice(poolId, chainId);
|
|
21034
|
+
if (!priceData) throw new Error("Failed to get price data");
|
|
21035
|
+
return [
|
|
21036
|
+
{
|
|
21037
|
+
poolId,
|
|
21038
|
+
referencePrice: ethers7.parseUnits(priceData.price, 30),
|
|
21039
|
+
oracleUpdateData: priceData.vaa,
|
|
21040
|
+
publishTime: priceData.publishTime,
|
|
21041
|
+
oracleType: priceData.oracleType,
|
|
21042
|
+
value: priceData.value,
|
|
21043
|
+
price: priceData.price
|
|
21044
|
+
}
|
|
21045
|
+
];
|
|
21046
|
+
}
|
|
19072
21047
|
transferKlineResolutionToInterval(resolution) {
|
|
19073
21048
|
switch (resolution) {
|
|
19074
21049
|
case "1m":
|
|
@@ -19194,11 +21169,17 @@ var Utils = class {
|
|
|
19194
21169
|
}
|
|
19195
21170
|
return JSON.stringify(error);
|
|
19196
21171
|
}
|
|
19197
|
-
async getGasPriceByRatio(
|
|
21172
|
+
async getGasPriceByRatio() {
|
|
21173
|
+
const chainId = this.configManager.getConfig().chainId;
|
|
19198
21174
|
return (await bigintTradingGasPriceWithRatio(chainId)).gasPrice;
|
|
19199
21175
|
}
|
|
19200
|
-
async getGasLimitByRatio(
|
|
19201
|
-
|
|
21176
|
+
async getGasLimitByRatio(gasLimit) {
|
|
21177
|
+
const chainId = this.configManager.getConfig().chainId;
|
|
21178
|
+
const chainInfo = CHAIN_INFO[chainId];
|
|
21179
|
+
return bigintTradingGasToRatioCalculator(
|
|
21180
|
+
gasLimit,
|
|
21181
|
+
chainInfo?.gasLimitRatio ?? 1.3
|
|
21182
|
+
);
|
|
19202
21183
|
}
|
|
19203
21184
|
};
|
|
19204
21185
|
|
|
@@ -20319,11 +22300,13 @@ function addQueryParams(rawQuery) {
|
|
|
20319
22300
|
return queryString ? `?${queryString}` : "";
|
|
20320
22301
|
}
|
|
20321
22302
|
|
|
20322
|
-
// src/manager/api/
|
|
20323
|
-
|
|
20324
|
-
|
|
22303
|
+
// src/manager/api/request.ts
|
|
22304
|
+
import { merge } from "lodash-es";
|
|
22305
|
+
var Request = class {
|
|
22306
|
+
constructor(configManager) {
|
|
22307
|
+
this._preSigner = null;
|
|
22308
|
+
this._preUserAddress = null;
|
|
20325
22309
|
this.configManager = configManager;
|
|
20326
|
-
this.logger = logger;
|
|
20327
22310
|
}
|
|
20328
22311
|
getHost() {
|
|
20329
22312
|
const { isTestnet, isBetaMode } = this.configManager.getConfig();
|
|
@@ -20335,6 +22318,71 @@ var Api = class {
|
|
|
20335
22318
|
return "https://api.myx.finance";
|
|
20336
22319
|
}
|
|
20337
22320
|
}
|
|
22321
|
+
async buildAuthParams() {
|
|
22322
|
+
const config = this.configManager.getConfig();
|
|
22323
|
+
if (!config.signer) throw new MyxSDKError("INVALID_SIGNER" /* InvalidSigner */);
|
|
22324
|
+
let userAddress = this._preUserAddress;
|
|
22325
|
+
const accessToken = await this.configManager.getAccessToken() ?? "";
|
|
22326
|
+
if (config.signer !== this._preSigner) {
|
|
22327
|
+
userAddress = await config.signer.getAddress();
|
|
22328
|
+
this._preUserAddress = userAddress;
|
|
22329
|
+
this._preSigner = config.signer;
|
|
22330
|
+
}
|
|
22331
|
+
if (!userAddress) {
|
|
22332
|
+
throw new MyxSDKError("INVALID_SIGNER" /* InvalidSigner */);
|
|
22333
|
+
}
|
|
22334
|
+
return {
|
|
22335
|
+
headers: {
|
|
22336
|
+
myx_openapi_access_token: accessToken,
|
|
22337
|
+
myx_openapi_account: userAddress
|
|
22338
|
+
}
|
|
22339
|
+
};
|
|
22340
|
+
}
|
|
22341
|
+
buildRequestPath(path) {
|
|
22342
|
+
if (path.startsWith("http")) {
|
|
22343
|
+
return path;
|
|
22344
|
+
}
|
|
22345
|
+
return this.getHost() + path;
|
|
22346
|
+
}
|
|
22347
|
+
async get(url, params, { auth = false, ...options } = {}) {
|
|
22348
|
+
const authOptions = auth ? await this.buildAuthParams() : {};
|
|
22349
|
+
return http.get(
|
|
22350
|
+
this.buildRequestPath(url),
|
|
22351
|
+
params,
|
|
22352
|
+
merge(authOptions, options)
|
|
22353
|
+
);
|
|
22354
|
+
}
|
|
22355
|
+
async post(url, data, { auth = false, ...options } = {}) {
|
|
22356
|
+
const authOptions = auth ? await this.buildAuthParams() : {};
|
|
22357
|
+
return http.post(
|
|
22358
|
+
this.buildRequestPath(url),
|
|
22359
|
+
data,
|
|
22360
|
+
merge(authOptions, options)
|
|
22361
|
+
);
|
|
22362
|
+
}
|
|
22363
|
+
async put(url, data, { auth = false, ...options } = {}) {
|
|
22364
|
+
const authOptions = auth ? await this.buildAuthParams() : {};
|
|
22365
|
+
return http.put(
|
|
22366
|
+
this.buildRequestPath(url),
|
|
22367
|
+
data,
|
|
22368
|
+
merge(authOptions, options)
|
|
22369
|
+
);
|
|
22370
|
+
}
|
|
22371
|
+
async delete(url, { auth = false, ...options } = {}) {
|
|
22372
|
+
const authOptions = auth ? await this.buildAuthParams() : {};
|
|
22373
|
+
return http.delete(
|
|
22374
|
+
this.buildRequestPath(url),
|
|
22375
|
+
merge(authOptions, options)
|
|
22376
|
+
);
|
|
22377
|
+
}
|
|
22378
|
+
};
|
|
22379
|
+
|
|
22380
|
+
// src/manager/api/index.ts
|
|
22381
|
+
var Api = class extends Request {
|
|
22382
|
+
constructor(configManager, logger) {
|
|
22383
|
+
super(configManager);
|
|
22384
|
+
this.logger = logger;
|
|
22385
|
+
}
|
|
20338
22386
|
async getTradeFlow({
|
|
20339
22387
|
accessToken,
|
|
20340
22388
|
address,
|
|
@@ -20380,13 +22428,10 @@ var Api = class {
|
|
|
20380
22428
|
}
|
|
20381
22429
|
async getOraclePrice(chainId, poolIds = []) {
|
|
20382
22430
|
if (!!poolIds.length) {
|
|
20383
|
-
return http.get(
|
|
20384
|
-
|
|
20385
|
-
|
|
20386
|
-
|
|
20387
|
-
poolIds: poolIds.join(",")
|
|
20388
|
-
}
|
|
20389
|
-
);
|
|
22431
|
+
return http.get(`${this.getHost()}/openapi/gateway/quote/price/oracles`, {
|
|
22432
|
+
chainId,
|
|
22433
|
+
poolIds: poolIds.join(",")
|
|
22434
|
+
});
|
|
20390
22435
|
}
|
|
20391
22436
|
throw new Error("Invalid pool id");
|
|
20392
22437
|
}
|
|
@@ -20395,15 +22440,14 @@ var Api = class {
|
|
|
20395
22440
|
`${this.getHost()}/openapi/gateway/scan/market/info?chainId=${chainId}&poolId=${poolId}`
|
|
20396
22441
|
);
|
|
20397
22442
|
}
|
|
20398
|
-
async getPoolLevelConfig({
|
|
20399
|
-
poolId,
|
|
20400
|
-
chainId
|
|
20401
|
-
}) {
|
|
22443
|
+
async getPoolLevelConfig({ poolId, chainId }) {
|
|
20402
22444
|
return http.get(
|
|
20403
|
-
`${this.getHost()}/openapi/gateway/risk/market_pool/level_config${addQueryParams(
|
|
20404
|
-
|
|
20405
|
-
|
|
20406
|
-
|
|
22445
|
+
`${this.getHost()}/openapi/gateway/risk/market_pool/level_config${addQueryParams(
|
|
22446
|
+
{
|
|
22447
|
+
poolId,
|
|
22448
|
+
chainId
|
|
22449
|
+
}
|
|
22450
|
+
)}`
|
|
20407
22451
|
);
|
|
20408
22452
|
}
|
|
20409
22453
|
async getPositions(accessToken, address) {
|
|
@@ -20442,7 +22486,13 @@ var Api = class {
|
|
|
20442
22486
|
}
|
|
20443
22487
|
);
|
|
20444
22488
|
}
|
|
20445
|
-
async getKlineData({
|
|
22489
|
+
async getKlineData({
|
|
22490
|
+
chainId,
|
|
22491
|
+
poolId,
|
|
22492
|
+
endTime,
|
|
22493
|
+
limit,
|
|
22494
|
+
interval
|
|
22495
|
+
}) {
|
|
20446
22496
|
return http.get(
|
|
20447
22497
|
`${this.getHost()}/openapi/gateway/quote/candles`,
|
|
20448
22498
|
{
|
|
@@ -20474,7 +22524,11 @@ var Api = class {
|
|
|
20474
22524
|
`${this.getHost()}/v2/mx-gateway/quote/candle/all_tickers`
|
|
20475
22525
|
);
|
|
20476
22526
|
}
|
|
20477
|
-
async searchMarketAuth({
|
|
22527
|
+
async searchMarketAuth({
|
|
22528
|
+
accessToken,
|
|
22529
|
+
address,
|
|
22530
|
+
...params
|
|
22531
|
+
}) {
|
|
20478
22532
|
return http.get(
|
|
20479
22533
|
`${this.getHost()}/openapi/gateway/scan/market/ac-search`,
|
|
20480
22534
|
params,
|
|
@@ -20492,7 +22546,11 @@ var Api = class {
|
|
|
20492
22546
|
params
|
|
20493
22547
|
);
|
|
20494
22548
|
}
|
|
20495
|
-
async addFavorite({
|
|
22549
|
+
async addFavorite({
|
|
22550
|
+
accessToken,
|
|
22551
|
+
address,
|
|
22552
|
+
...params
|
|
22553
|
+
}) {
|
|
20496
22554
|
return http.get(
|
|
20497
22555
|
`${this.getHost()}/openapi/gateway/scan/market/add-favorites`,
|
|
20498
22556
|
params,
|
|
@@ -20504,7 +22562,11 @@ var Api = class {
|
|
|
20504
22562
|
}
|
|
20505
22563
|
);
|
|
20506
22564
|
}
|
|
20507
|
-
async removeFavorite({
|
|
22565
|
+
async removeFavorite({
|
|
22566
|
+
accessToken,
|
|
22567
|
+
address,
|
|
22568
|
+
...params
|
|
22569
|
+
}) {
|
|
20508
22570
|
return http.get(
|
|
20509
22571
|
`${this.getHost()}/openapi/gateway/scan/market/cancel-favorites`,
|
|
20510
22572
|
params,
|
|
@@ -20516,7 +22578,11 @@ var Api = class {
|
|
|
20516
22578
|
}
|
|
20517
22579
|
);
|
|
20518
22580
|
}
|
|
20519
|
-
async getFavoritesList({
|
|
22581
|
+
async getFavoritesList({
|
|
22582
|
+
accessToken,
|
|
22583
|
+
address,
|
|
22584
|
+
...params
|
|
22585
|
+
}) {
|
|
20520
22586
|
return http.get(
|
|
20521
22587
|
`${this.getHost()}/openapi/gateway/scan/market/favorites`,
|
|
20522
22588
|
params,
|
|
@@ -20577,7 +22643,13 @@ var Api = class {
|
|
|
20577
22643
|
`${this.getHost()}/openapi/gateway/scan/market`
|
|
20578
22644
|
);
|
|
20579
22645
|
}
|
|
20580
|
-
async getAccountVipInfo({
|
|
22646
|
+
async getAccountVipInfo({
|
|
22647
|
+
address,
|
|
22648
|
+
accessToken,
|
|
22649
|
+
chainId,
|
|
22650
|
+
deadline,
|
|
22651
|
+
nonce
|
|
22652
|
+
}) {
|
|
20581
22653
|
return http.get(
|
|
20582
22654
|
`${this.getHost()}/openapi/gateway/vip/trade_config`,
|
|
20583
22655
|
{ chainId, deadline, nonce },
|
|
@@ -20589,7 +22661,116 @@ var Api = class {
|
|
|
20589
22661
|
}
|
|
20590
22662
|
);
|
|
20591
22663
|
}
|
|
20592
|
-
|
|
22664
|
+
/**
|
|
22665
|
+
* appeal module start ------>
|
|
22666
|
+
*/
|
|
22667
|
+
async getAppealList(params) {
|
|
22668
|
+
return this.get(
|
|
22669
|
+
"/openapi/gateway/scan/dispute/list",
|
|
22670
|
+
params,
|
|
22671
|
+
{
|
|
22672
|
+
auth: true
|
|
22673
|
+
}
|
|
22674
|
+
);
|
|
22675
|
+
}
|
|
22676
|
+
async getAppealDetail(params) {
|
|
22677
|
+
return this.get(
|
|
22678
|
+
"/openapi/gateway/scan/dispute/details",
|
|
22679
|
+
params,
|
|
22680
|
+
{
|
|
22681
|
+
auth: true
|
|
22682
|
+
}
|
|
22683
|
+
);
|
|
22684
|
+
}
|
|
22685
|
+
async uploadAppealEvidence(params) {
|
|
22686
|
+
return this.get(
|
|
22687
|
+
"/openapi/gateway/scan/dispute/upload/evidence",
|
|
22688
|
+
params,
|
|
22689
|
+
{
|
|
22690
|
+
auth: true
|
|
22691
|
+
}
|
|
22692
|
+
);
|
|
22693
|
+
}
|
|
22694
|
+
async getAppealReconsiderationList(params) {
|
|
22695
|
+
return this.get(
|
|
22696
|
+
"/openapi/gateway/scan/dispute/appeal/list",
|
|
22697
|
+
params,
|
|
22698
|
+
{
|
|
22699
|
+
auth: true
|
|
22700
|
+
}
|
|
22701
|
+
);
|
|
22702
|
+
}
|
|
22703
|
+
async getAppealReconsiderationDetail(params) {
|
|
22704
|
+
return this.get(
|
|
22705
|
+
"/openapi/gateway/scan/appeal/details",
|
|
22706
|
+
params,
|
|
22707
|
+
{
|
|
22708
|
+
auth: true
|
|
22709
|
+
}
|
|
22710
|
+
);
|
|
22711
|
+
}
|
|
22712
|
+
async getAppealReimbursementList(params) {
|
|
22713
|
+
return this.get(
|
|
22714
|
+
"/openapi/gateway/scan/reimbursement/list",
|
|
22715
|
+
params,
|
|
22716
|
+
{
|
|
22717
|
+
auth: true
|
|
22718
|
+
}
|
|
22719
|
+
);
|
|
22720
|
+
}
|
|
22721
|
+
async getAppealNodeVoteList(params) {
|
|
22722
|
+
return this.get(
|
|
22723
|
+
"/openapi/gateway/scan/node/vote-list",
|
|
22724
|
+
params
|
|
22725
|
+
);
|
|
22726
|
+
}
|
|
22727
|
+
async getAppealNodeVoteDetails(params) {
|
|
22728
|
+
return this.get(
|
|
22729
|
+
"/openapi/gateway/scan/node/vote-details",
|
|
22730
|
+
params
|
|
22731
|
+
);
|
|
22732
|
+
}
|
|
22733
|
+
async getIsVoteNode(params) {
|
|
22734
|
+
return this.get(
|
|
22735
|
+
"/openapi/gateway/scan/node/vote-node-check",
|
|
22736
|
+
params
|
|
22737
|
+
);
|
|
22738
|
+
}
|
|
22739
|
+
async postVoteSignature(params) {
|
|
22740
|
+
return this.get(
|
|
22741
|
+
`/openapi/gateway/scan/node/vote`,
|
|
22742
|
+
params,
|
|
22743
|
+
{
|
|
22744
|
+
auth: true
|
|
22745
|
+
}
|
|
22746
|
+
);
|
|
22747
|
+
}
|
|
22748
|
+
async getPedingVoteCount() {
|
|
22749
|
+
return this.get(
|
|
22750
|
+
"/openapi/gateway/scan/node/pending-vote-total",
|
|
22751
|
+
{},
|
|
22752
|
+
{
|
|
22753
|
+
auth: true
|
|
22754
|
+
}
|
|
22755
|
+
);
|
|
22756
|
+
}
|
|
22757
|
+
async getMyAppealCount() {
|
|
22758
|
+
return this.get(
|
|
22759
|
+
"/openapi/gateway/scan/processing-total",
|
|
22760
|
+
{},
|
|
22761
|
+
{
|
|
22762
|
+
auth: true
|
|
22763
|
+
}
|
|
22764
|
+
);
|
|
22765
|
+
}
|
|
22766
|
+
/**
|
|
22767
|
+
* appeal module end ------>
|
|
22768
|
+
*/
|
|
22769
|
+
async getCurrentEpoch({
|
|
22770
|
+
address,
|
|
22771
|
+
accessToken,
|
|
22772
|
+
broker
|
|
22773
|
+
}) {
|
|
20593
22774
|
return http.get(
|
|
20594
22775
|
`${this.getHost()}/openapi/gateway/scan/get-current-epoch`,
|
|
20595
22776
|
{ broker },
|
|
@@ -21017,6 +23198,263 @@ var BaseMyxClient = class {
|
|
|
21017
23198
|
}
|
|
21018
23199
|
};
|
|
21019
23200
|
|
|
23201
|
+
// src/manager/appeal/index.ts
|
|
23202
|
+
var Appeal = class extends BaseMyxClient {
|
|
23203
|
+
constructor(client2) {
|
|
23204
|
+
super(client2);
|
|
23205
|
+
}
|
|
23206
|
+
async getDisputeCourtContract() {
|
|
23207
|
+
const contract = await getDisputeCourtContract(this.config.chainId);
|
|
23208
|
+
return this.connectContract(contract);
|
|
23209
|
+
}
|
|
23210
|
+
async getReimbursementContract() {
|
|
23211
|
+
const contract = await getReimbursementContract(this.config.chainId);
|
|
23212
|
+
return this.connectContract(contract);
|
|
23213
|
+
}
|
|
23214
|
+
/**
|
|
23215
|
+
* submit appeal
|
|
23216
|
+
* @param poolId - the pool id
|
|
23217
|
+
* @param poolToken - the pool token
|
|
23218
|
+
* @returns the transaction receipt
|
|
23219
|
+
*/
|
|
23220
|
+
async submitAppeal(poolId, lpToken, lpAmount) {
|
|
23221
|
+
const account = await this.config.signer?.getAddress() ?? "";
|
|
23222
|
+
const needApprove = await this.client.utils.needsApproval(
|
|
23223
|
+
account,
|
|
23224
|
+
this.config.chainId,
|
|
23225
|
+
lpToken,
|
|
23226
|
+
lpAmount,
|
|
23227
|
+
this.getAddressConfig().DISPUTE_COURT
|
|
23228
|
+
);
|
|
23229
|
+
this.client.logger.debug("need-approve", needApprove);
|
|
23230
|
+
if (needApprove) {
|
|
23231
|
+
await this.client.utils.approveAuthorization({
|
|
23232
|
+
chainId: this.config.chainId,
|
|
23233
|
+
quoteAddress: lpToken,
|
|
23234
|
+
spenderAddress: this.getAddressConfig().DISPUTE_COURT
|
|
23235
|
+
});
|
|
23236
|
+
}
|
|
23237
|
+
const contract = await this.getDisputeCourtContract();
|
|
23238
|
+
const prices = await this.client.utils.buildUpdatePriceParams(
|
|
23239
|
+
poolId,
|
|
23240
|
+
this.config.chainId
|
|
23241
|
+
);
|
|
23242
|
+
const value = BigInt(prices[0].value.toString() || "1");
|
|
23243
|
+
const _gasLimit = await contract.fileDispute.estimateGas(
|
|
23244
|
+
prices,
|
|
23245
|
+
poolId,
|
|
23246
|
+
lpToken,
|
|
23247
|
+
{
|
|
23248
|
+
value
|
|
23249
|
+
}
|
|
23250
|
+
);
|
|
23251
|
+
this.client.logger.debug("_gasLimit", _gasLimit);
|
|
23252
|
+
const gasLimit = await this.client.utils.getGasLimitByRatio(_gasLimit);
|
|
23253
|
+
const gasPrice = await this.client.utils.getGasPriceByRatio();
|
|
23254
|
+
this.client.logger.debug("txParams", {
|
|
23255
|
+
gasLimit,
|
|
23256
|
+
gasPrice,
|
|
23257
|
+
value
|
|
23258
|
+
});
|
|
23259
|
+
const tx = await contract.fileDispute(prices, poolId, lpToken, {
|
|
23260
|
+
value,
|
|
23261
|
+
gasLimit,
|
|
23262
|
+
gasPrice
|
|
23263
|
+
});
|
|
23264
|
+
const receipt = await tx.wait();
|
|
23265
|
+
const DisputeFiledLog = receipt?.logs.find((item) => {
|
|
23266
|
+
if (item.eventName === "DisputeFiled") {
|
|
23267
|
+
return true;
|
|
23268
|
+
}
|
|
23269
|
+
return false;
|
|
23270
|
+
});
|
|
23271
|
+
if (!DisputeFiledLog || !receipt) {
|
|
23272
|
+
throw new MyxSDKError(
|
|
23273
|
+
"TRANSACTION_FAILED" /* TransactionFailed */,
|
|
23274
|
+
"DisputeFiledLog not found"
|
|
23275
|
+
);
|
|
23276
|
+
}
|
|
23277
|
+
const caseId = DisputeFiledLog.args.getValue(
|
|
23278
|
+
"caseId"
|
|
23279
|
+
);
|
|
23280
|
+
this.client.logger.debug("caseId", caseId);
|
|
23281
|
+
this.client.logger.debug("event", DisputeFiledLog);
|
|
23282
|
+
return {
|
|
23283
|
+
transaction: receipt,
|
|
23284
|
+
caseId
|
|
23285
|
+
};
|
|
23286
|
+
}
|
|
23287
|
+
/**
|
|
23288
|
+
* vote for appeal
|
|
23289
|
+
* @param caseId - the case id
|
|
23290
|
+
* @param isFor - true if for the appeal, false if against the appeal
|
|
23291
|
+
* @returns the transaction receipt
|
|
23292
|
+
*/
|
|
23293
|
+
async voteForAppeal({
|
|
23294
|
+
caseId,
|
|
23295
|
+
validator,
|
|
23296
|
+
isFor,
|
|
23297
|
+
deadline,
|
|
23298
|
+
v,
|
|
23299
|
+
r,
|
|
23300
|
+
s
|
|
23301
|
+
}) {
|
|
23302
|
+
const contract = await this.getDisputeCourtContract();
|
|
23303
|
+
const _gasLimit = await contract.vote.estimateGas(
|
|
23304
|
+
caseId,
|
|
23305
|
+
validator,
|
|
23306
|
+
isFor ? 1 : 0,
|
|
23307
|
+
deadline,
|
|
23308
|
+
v,
|
|
23309
|
+
r,
|
|
23310
|
+
s
|
|
23311
|
+
);
|
|
23312
|
+
const gasLimit = await this.client.utils.getGasLimitByRatio(_gasLimit);
|
|
23313
|
+
const gasPrice = await this.client.utils.getGasPriceByRatio();
|
|
23314
|
+
const tx = await contract.vote(
|
|
23315
|
+
caseId,
|
|
23316
|
+
validator,
|
|
23317
|
+
isFor ? 1 : 0,
|
|
23318
|
+
deadline,
|
|
23319
|
+
v,
|
|
23320
|
+
r,
|
|
23321
|
+
s,
|
|
23322
|
+
{
|
|
23323
|
+
gasLimit,
|
|
23324
|
+
gasPrice
|
|
23325
|
+
}
|
|
23326
|
+
);
|
|
23327
|
+
const receipt = await tx.wait();
|
|
23328
|
+
return receipt;
|
|
23329
|
+
}
|
|
23330
|
+
/**
|
|
23331
|
+
* claim appeal margin
|
|
23332
|
+
* @param caseId - the case id
|
|
23333
|
+
* @returns the transaction receipt
|
|
23334
|
+
*/
|
|
23335
|
+
async claimAppealMargin(caseId) {
|
|
23336
|
+
const contract = await this.getDisputeCourtContract();
|
|
23337
|
+
const _gasLimit = await contract.claimBond.estimateGas(caseId);
|
|
23338
|
+
const gasLimit = await this.client.utils.getGasLimitByRatio(_gasLimit);
|
|
23339
|
+
const gasPrice = await this.client.utils.getGasPriceByRatio();
|
|
23340
|
+
const tx = await contract.claimBond(caseId, {
|
|
23341
|
+
gasLimit,
|
|
23342
|
+
gasPrice
|
|
23343
|
+
});
|
|
23344
|
+
const receipt = await tx.wait();
|
|
23345
|
+
return receipt;
|
|
23346
|
+
}
|
|
23347
|
+
/**
|
|
23348
|
+
* claim reimbursement
|
|
23349
|
+
* @param caseId - the case id
|
|
23350
|
+
* @param baseAmount - the base amount
|
|
23351
|
+
* @param quoteAmount - the quote amount
|
|
23352
|
+
* @param merkleProof - the merkle proof
|
|
23353
|
+
* @returns the transaction receipt
|
|
23354
|
+
*/
|
|
23355
|
+
async claimReimbursement(caseId, baseAmount, quoteAmount, merkleProof) {
|
|
23356
|
+
const contract = await this.getReimbursementContract();
|
|
23357
|
+
const _gasLimit = await contract.claimReimbursement.estimateGas(
|
|
23358
|
+
caseId,
|
|
23359
|
+
baseAmount,
|
|
23360
|
+
quoteAmount,
|
|
23361
|
+
merkleProof
|
|
23362
|
+
);
|
|
23363
|
+
const gasLimit = await this.client.utils.getGasLimitByRatio(_gasLimit);
|
|
23364
|
+
const gasPrice = await this.client.utils.getGasPriceByRatio();
|
|
23365
|
+
const tx = await contract.claimReimbursement(
|
|
23366
|
+
caseId,
|
|
23367
|
+
baseAmount,
|
|
23368
|
+
quoteAmount,
|
|
23369
|
+
merkleProof,
|
|
23370
|
+
{
|
|
23371
|
+
gasLimit,
|
|
23372
|
+
gasPrice
|
|
23373
|
+
}
|
|
23374
|
+
);
|
|
23375
|
+
const receipt = await tx.wait();
|
|
23376
|
+
return receipt;
|
|
23377
|
+
}
|
|
23378
|
+
/**
|
|
23379
|
+
* get dispute configuration
|
|
23380
|
+
*/
|
|
23381
|
+
async getDisputeConfiguration() {
|
|
23382
|
+
const contract = await this.getDisputeCourtContract();
|
|
23383
|
+
const configuration = await contract.getDisputeConfiguration();
|
|
23384
|
+
return configuration;
|
|
23385
|
+
}
|
|
23386
|
+
async appealReconsideration(caseId, appealToken, appealAmount) {
|
|
23387
|
+
const contract = await this.getDisputeCourtContract();
|
|
23388
|
+
const account = await this.config.signer?.getAddress() ?? "";
|
|
23389
|
+
const spenderAddress = this.getAddressConfig().DISPUTE_COURT;
|
|
23390
|
+
const isNeedApprove = await this.client.utils.needsApproval(
|
|
23391
|
+
account,
|
|
23392
|
+
this.config.chainId,
|
|
23393
|
+
appealToken,
|
|
23394
|
+
appealAmount,
|
|
23395
|
+
spenderAddress
|
|
23396
|
+
);
|
|
23397
|
+
if (isNeedApprove) {
|
|
23398
|
+
const res = await this.client.utils.approveAuthorization({
|
|
23399
|
+
chainId: this.config.chainId,
|
|
23400
|
+
quoteAddress: appealToken,
|
|
23401
|
+
spenderAddress
|
|
23402
|
+
});
|
|
23403
|
+
if (res.code !== 0) {
|
|
23404
|
+
throw new MyxSDKError("TRANSACTION_FAILED" /* TransactionFailed */, res.message);
|
|
23405
|
+
}
|
|
23406
|
+
}
|
|
23407
|
+
const _gasLimit = await contract.appeal.estimateGas(caseId);
|
|
23408
|
+
const gasLimit = await this.client.utils.getGasLimitByRatio(_gasLimit);
|
|
23409
|
+
const gasPrice = await this.client.utils.getGasPriceByRatio();
|
|
23410
|
+
const tx = await contract.appeal(caseId, {
|
|
23411
|
+
gasLimit,
|
|
23412
|
+
gasPrice
|
|
23413
|
+
});
|
|
23414
|
+
const receipt = await tx.wait();
|
|
23415
|
+
return receipt;
|
|
23416
|
+
}
|
|
23417
|
+
/**
|
|
23418
|
+
* http api
|
|
23419
|
+
*/
|
|
23420
|
+
async getAppealList(params) {
|
|
23421
|
+
return this.client.api.getAppealList(params);
|
|
23422
|
+
}
|
|
23423
|
+
async getAppealDetail(params) {
|
|
23424
|
+
return this.client.api.getAppealDetail(params);
|
|
23425
|
+
}
|
|
23426
|
+
async uploadAppealEvidence(params) {
|
|
23427
|
+
return this.client.api.uploadAppealEvidence(params);
|
|
23428
|
+
}
|
|
23429
|
+
async getAppealReconsiderationList(params) {
|
|
23430
|
+
return this.client.api.getAppealReconsiderationList(params);
|
|
23431
|
+
}
|
|
23432
|
+
async getAppealReconsiderationDetail(params) {
|
|
23433
|
+
return this.client.api.getAppealReconsiderationDetail(params);
|
|
23434
|
+
}
|
|
23435
|
+
async getAppealReimbursementList(params) {
|
|
23436
|
+
return this.client.api.getAppealReimbursementList(params);
|
|
23437
|
+
}
|
|
23438
|
+
async getAppealNodeVoteList(params) {
|
|
23439
|
+
return this.client.api.getAppealNodeVoteList(params);
|
|
23440
|
+
}
|
|
23441
|
+
async getAppealNodeVoteDetail(params) {
|
|
23442
|
+
return this.client.api.getAppealNodeVoteDetails(params);
|
|
23443
|
+
}
|
|
23444
|
+
async getIsVoteNode(params) {
|
|
23445
|
+
return this.client.api.getIsVoteNode(params);
|
|
23446
|
+
}
|
|
23447
|
+
async postVoteSignature(params) {
|
|
23448
|
+
return this.client.api.postVoteSignature(params);
|
|
23449
|
+
}
|
|
23450
|
+
async getPedingVoteCount() {
|
|
23451
|
+
return this.client.api.getPedingVoteCount();
|
|
23452
|
+
}
|
|
23453
|
+
async getMyAppealCount() {
|
|
23454
|
+
return this.client.api.getMyAppealCount();
|
|
23455
|
+
}
|
|
23456
|
+
};
|
|
23457
|
+
|
|
21020
23458
|
// src/manager/referrals/index.tsx
|
|
21021
23459
|
var Referrals = class extends BaseMyxClient {
|
|
21022
23460
|
constructor(client2) {
|
|
@@ -21029,13 +23467,8 @@ var Referrals = class extends BaseMyxClient {
|
|
|
21029
23467
|
const _gasLimit = await brokerContract.claimRebate.estimateGas(
|
|
21030
23468
|
tokenAddress
|
|
21031
23469
|
);
|
|
21032
|
-
const gasLimit = await this.client.utils.getGasLimitByRatio(
|
|
21033
|
-
|
|
21034
|
-
_gasLimit
|
|
21035
|
-
);
|
|
21036
|
-
const gasPrice = await this.client.utils.getGasPriceByRatio(
|
|
21037
|
-
this.config.chainId
|
|
21038
|
-
);
|
|
23470
|
+
const gasLimit = await this.client.utils.getGasLimitByRatio(_gasLimit);
|
|
23471
|
+
const gasPrice = await this.client.utils.getGasPriceByRatio();
|
|
21039
23472
|
const tx = await brokerContract.claimRebate(tokenAddress, {
|
|
21040
23473
|
gasPrice,
|
|
21041
23474
|
gasLimit
|
|
@@ -21045,6 +23478,73 @@ var Referrals = class extends BaseMyxClient {
|
|
|
21045
23478
|
}
|
|
21046
23479
|
};
|
|
21047
23480
|
|
|
23481
|
+
// src/manager/api/appeal-type.ts
|
|
23482
|
+
var AppealType = /* @__PURE__ */ ((AppealType2) => {
|
|
23483
|
+
AppealType2[AppealType2["UnderReview"] = 1] = "UnderReview";
|
|
23484
|
+
AppealType2[AppealType2["InitialVote"] = 2] = "InitialVote";
|
|
23485
|
+
AppealType2[AppealType2["PublicNotice"] = 3] = "PublicNotice";
|
|
23486
|
+
AppealType2[AppealType2["UnderReconsideration"] = 4] = "UnderReconsideration";
|
|
23487
|
+
AppealType2[AppealType2["Won"] = 5] = "Won";
|
|
23488
|
+
AppealType2[AppealType2["Failed"] = 6] = "Failed";
|
|
23489
|
+
AppealType2[AppealType2["PlatformRuling"] = 7] = "PlatformRuling";
|
|
23490
|
+
AppealType2[AppealType2["PlatformRevoked"] = 8] = "PlatformRevoked";
|
|
23491
|
+
return AppealType2;
|
|
23492
|
+
})(AppealType || {});
|
|
23493
|
+
var AppealReconsiderationType = /* @__PURE__ */ ((AppealReconsiderationType2) => {
|
|
23494
|
+
AppealReconsiderationType2[AppealReconsiderationType2["InitialVoting"] = 1] = "InitialVoting";
|
|
23495
|
+
AppealReconsiderationType2[AppealReconsiderationType2["PublicNotice"] = 2] = "PublicNotice";
|
|
23496
|
+
AppealReconsiderationType2[AppealReconsiderationType2["UnderReconsideration"] = 3] = "UnderReconsideration";
|
|
23497
|
+
AppealReconsiderationType2[AppealReconsiderationType2["Won"] = 4] = "Won";
|
|
23498
|
+
AppealReconsiderationType2[AppealReconsiderationType2["Failed"] = 5] = "Failed";
|
|
23499
|
+
AppealReconsiderationType2[AppealReconsiderationType2["PlatformRuling"] = 6] = "PlatformRuling";
|
|
23500
|
+
AppealReconsiderationType2[AppealReconsiderationType2["PlatformRevoked"] = 7] = "PlatformRevoked";
|
|
23501
|
+
AppealReconsiderationType2[AppealReconsiderationType2["ReconsiderationVoting"] = 8] = "ReconsiderationVoting";
|
|
23502
|
+
return AppealReconsiderationType2;
|
|
23503
|
+
})(AppealReconsiderationType || {});
|
|
23504
|
+
var AppealStage = /* @__PURE__ */ ((AppealStage2) => {
|
|
23505
|
+
AppealStage2[AppealStage2["UnderReview"] = 1] = "UnderReview";
|
|
23506
|
+
AppealStage2[AppealStage2["PublicNotice"] = 2] = "PublicNotice";
|
|
23507
|
+
AppealStage2[AppealStage2["UnderReconsideration"] = 3] = "UnderReconsideration";
|
|
23508
|
+
AppealStage2[AppealStage2["Completed"] = 4] = "Completed";
|
|
23509
|
+
return AppealStage2;
|
|
23510
|
+
})(AppealStage || {});
|
|
23511
|
+
var NodeTypeEnum = /* @__PURE__ */ ((NodeTypeEnum2) => {
|
|
23512
|
+
NodeTypeEnum2[NodeTypeEnum2["ElectionNode"] = 0] = "ElectionNode";
|
|
23513
|
+
NodeTypeEnum2[NodeTypeEnum2["OfficialNode"] = 1] = "OfficialNode";
|
|
23514
|
+
return NodeTypeEnum2;
|
|
23515
|
+
})(NodeTypeEnum || {});
|
|
23516
|
+
var VoteTypeEnum = /* @__PURE__ */ ((VoteTypeEnum2) => {
|
|
23517
|
+
VoteTypeEnum2[VoteTypeEnum2["Reject"] = 0] = "Reject";
|
|
23518
|
+
VoteTypeEnum2[VoteTypeEnum2["Support"] = 1] = "Support";
|
|
23519
|
+
return VoteTypeEnum2;
|
|
23520
|
+
})(VoteTypeEnum || {});
|
|
23521
|
+
var AppealClaimStatusEnum = /* @__PURE__ */ ((AppealClaimStatusEnum2) => {
|
|
23522
|
+
AppealClaimStatusEnum2[AppealClaimStatusEnum2["UnClaimed"] = 0] = "UnClaimed";
|
|
23523
|
+
AppealClaimStatusEnum2[AppealClaimStatusEnum2["Claimed"] = 1] = "Claimed";
|
|
23524
|
+
return AppealClaimStatusEnum2;
|
|
23525
|
+
})(AppealClaimStatusEnum || {});
|
|
23526
|
+
var AppealNodeVotedStateEnum = /* @__PURE__ */ ((AppealNodeVotedStateEnum2) => {
|
|
23527
|
+
AppealNodeVotedStateEnum2[AppealNodeVotedStateEnum2["NotVoted"] = 0] = "NotVoted";
|
|
23528
|
+
AppealNodeVotedStateEnum2[AppealNodeVotedStateEnum2["Voted"] = 1] = "Voted";
|
|
23529
|
+
return AppealNodeVotedStateEnum2;
|
|
23530
|
+
})(AppealNodeVotedStateEnum || {});
|
|
23531
|
+
var AppealCaseTypeEnum = /* @__PURE__ */ ((AppealCaseTypeEnum2) => {
|
|
23532
|
+
AppealCaseTypeEnum2[AppealCaseTypeEnum2["Appeal"] = 1] = "Appeal";
|
|
23533
|
+
AppealCaseTypeEnum2[AppealCaseTypeEnum2["Reconsideration"] = 2] = "Reconsideration";
|
|
23534
|
+
return AppealCaseTypeEnum2;
|
|
23535
|
+
})(AppealCaseTypeEnum || {});
|
|
23536
|
+
var AppealNodeStateEnum = /* @__PURE__ */ ((AppealNodeStateEnum2) => {
|
|
23537
|
+
AppealNodeStateEnum2[AppealNodeStateEnum2["NoVote"] = 0] = "NoVote";
|
|
23538
|
+
AppealNodeStateEnum2[AppealNodeStateEnum2["Supported"] = 1] = "Supported";
|
|
23539
|
+
AppealNodeStateEnum2[AppealNodeStateEnum2["Rejected"] = 2] = "Rejected";
|
|
23540
|
+
return AppealNodeStateEnum2;
|
|
23541
|
+
})(AppealNodeStateEnum || {});
|
|
23542
|
+
var IsVoteNodeEnum = /* @__PURE__ */ ((IsVoteNodeEnum2) => {
|
|
23543
|
+
IsVoteNodeEnum2[IsVoteNodeEnum2["Yes"] = 1] = "Yes";
|
|
23544
|
+
IsVoteNodeEnum2[IsVoteNodeEnum2["No"] = 0] = "No";
|
|
23545
|
+
return IsVoteNodeEnum2;
|
|
23546
|
+
})(IsVoteNodeEnum || {});
|
|
23547
|
+
|
|
21048
23548
|
// src/manager/index.ts
|
|
21049
23549
|
var MyxClient = class {
|
|
21050
23550
|
/**
|
|
@@ -21094,6 +23594,7 @@ var MyxClient = class {
|
|
|
21094
23594
|
this.api
|
|
21095
23595
|
);
|
|
21096
23596
|
this.subscription = new SubScription(this.configManager, this.logger);
|
|
23597
|
+
this.appeal = new Appeal(this);
|
|
21097
23598
|
this.referrals = new Referrals(this);
|
|
21098
23599
|
}
|
|
21099
23600
|
/**
|
|
@@ -21120,6 +23621,13 @@ var MyxClient = class {
|
|
|
21120
23621
|
}
|
|
21121
23622
|
};
|
|
21122
23623
|
export {
|
|
23624
|
+
AppealCaseTypeEnum,
|
|
23625
|
+
AppealClaimStatusEnum,
|
|
23626
|
+
AppealNodeStateEnum,
|
|
23627
|
+
AppealNodeVotedStateEnum,
|
|
23628
|
+
AppealReconsiderationType,
|
|
23629
|
+
AppealStage,
|
|
23630
|
+
AppealType,
|
|
21123
23631
|
COMMON_LP_AMOUNT_DECIMALS,
|
|
21124
23632
|
COMMON_PRICE_DECIMALS,
|
|
21125
23633
|
ChainId,
|
|
@@ -21130,11 +23638,13 @@ export {
|
|
|
21130
23638
|
ExecTypeEnum,
|
|
21131
23639
|
ForwarderGetStatus,
|
|
21132
23640
|
HttpKlineIntervalEnum,
|
|
23641
|
+
IsVoteNodeEnum,
|
|
21133
23642
|
MarketCapType,
|
|
21134
23643
|
MarketPoolState,
|
|
21135
23644
|
MarketType,
|
|
21136
23645
|
MxSDK,
|
|
21137
23646
|
MyxClient,
|
|
23647
|
+
NodeTypeEnum,
|
|
21138
23648
|
OperationEnum,
|
|
21139
23649
|
OperationType,
|
|
21140
23650
|
OracleType,
|
|
@@ -21149,6 +23659,7 @@ export {
|
|
|
21149
23659
|
TradeFlowTypeEnum,
|
|
21150
23660
|
TriggerType2 as TriggerType,
|
|
21151
23661
|
TriggerTypeEnum,
|
|
23662
|
+
VoteTypeEnum,
|
|
21152
23663
|
approve,
|
|
21153
23664
|
base_exports as base,
|
|
21154
23665
|
bigintAmountSlipperCalculator,
|