@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.js
CHANGED
|
@@ -37,6 +37,13 @@ var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "
|
|
|
37
37
|
// src/index.ts
|
|
38
38
|
var index_exports = {};
|
|
39
39
|
__export(index_exports, {
|
|
40
|
+
AppealCaseTypeEnum: () => AppealCaseTypeEnum,
|
|
41
|
+
AppealClaimStatusEnum: () => AppealClaimStatusEnum,
|
|
42
|
+
AppealNodeStateEnum: () => AppealNodeStateEnum,
|
|
43
|
+
AppealNodeVotedStateEnum: () => AppealNodeVotedStateEnum,
|
|
44
|
+
AppealReconsiderationType: () => AppealReconsiderationType,
|
|
45
|
+
AppealStage: () => AppealStage,
|
|
46
|
+
AppealType: () => AppealType,
|
|
40
47
|
COMMON_LP_AMOUNT_DECIMALS: () => COMMON_LP_AMOUNT_DECIMALS,
|
|
41
48
|
COMMON_PRICE_DECIMALS: () => COMMON_PRICE_DECIMALS,
|
|
42
49
|
ChainId: () => ChainId,
|
|
@@ -47,11 +54,13 @@ __export(index_exports, {
|
|
|
47
54
|
ExecTypeEnum: () => ExecTypeEnum,
|
|
48
55
|
ForwarderGetStatus: () => ForwarderGetStatus,
|
|
49
56
|
HttpKlineIntervalEnum: () => HttpKlineIntervalEnum,
|
|
57
|
+
IsVoteNodeEnum: () => IsVoteNodeEnum,
|
|
50
58
|
MarketCapType: () => MarketCapType,
|
|
51
59
|
MarketPoolState: () => MarketPoolState,
|
|
52
60
|
MarketType: () => MarketType,
|
|
53
61
|
MxSDK: () => MxSDK,
|
|
54
62
|
MyxClient: () => MyxClient,
|
|
63
|
+
NodeTypeEnum: () => NodeTypeEnum,
|
|
55
64
|
OperationEnum: () => OperationEnum,
|
|
56
65
|
OperationType: () => OperationType,
|
|
57
66
|
OracleType: () => OracleType,
|
|
@@ -66,6 +75,7 @@ __export(index_exports, {
|
|
|
66
75
|
TradeFlowTypeEnum: () => TradeFlowTypeEnum,
|
|
67
76
|
TriggerType: () => TriggerType2,
|
|
68
77
|
TriggerTypeEnum: () => TriggerTypeEnum,
|
|
78
|
+
VoteTypeEnum: () => VoteTypeEnum,
|
|
69
79
|
approve: () => approve,
|
|
70
80
|
base: () => base_exports,
|
|
71
81
|
bigintAmountSlipperCalculator: () => bigintAmountSlipperCalculator,
|
|
@@ -1462,7 +1472,9 @@ var ARB_TEST_SEPOLIA = {
|
|
|
1462
1472
|
DATA_PROVIDER: "0x1E1487d92f6FDbeEa8C2b48610CDCfbCC9c40fa3",
|
|
1463
1473
|
ORACLE_RESERVE: "0xb5f9C48815ab45BdC080523cF82Aaa2F7892b578",
|
|
1464
1474
|
FORWARDER: "0xc5A9f5786Ec4EBf5eeaD5C9263dD6105189C05F9",
|
|
1465
|
-
TRADING_ROUTER: "0x9B9359C2a5C1B103cC5bf66bDB0B78370dc4E706"
|
|
1475
|
+
TRADING_ROUTER: "0x9B9359C2a5C1B103cC5bf66bDB0B78370dc4E706",
|
|
1476
|
+
REIMBURSEMENT: "0x4583A223299b94B95d6937bEF6753afee2b8f81A",
|
|
1477
|
+
DISPUTE_COURT: "0xc6b8b22F0b06caae5C823926205a38276C65718f"
|
|
1466
1478
|
};
|
|
1467
1479
|
|
|
1468
1480
|
// src/config/address/LINEA_SEPOLIA.ts
|
|
@@ -1485,7 +1497,9 @@ var LINEA_SEPOLIA = {
|
|
|
1485
1497
|
DATA_PROVIDER: "0x0A64788b7FB6499fd2eFbb26A5D05e7C6B919db3",
|
|
1486
1498
|
ORACLE_RESERVE: "0xA4da3417Ae7697A4fa494Bec49b37F0Fb08E86e9",
|
|
1487
1499
|
FORWARDER: "0x702c06d4bb20Ee82Cf3DE8f5611FE3a86067e937",
|
|
1488
|
-
TRADING_ROUTER: "0x97656464d608A7d1Ac5B6C42655C6806A16aF5C4"
|
|
1500
|
+
TRADING_ROUTER: "0x97656464d608A7d1Ac5B6C42655C6806A16aF5C4",
|
|
1501
|
+
REIMBURSEMENT: "0x427E0C7E84D8D75f971c62D0688009B421598cCb",
|
|
1502
|
+
DISPUTE_COURT: "0x2f2dec0Cf321a9dA64BEf7dB0b84d998E37dBB11"
|
|
1489
1503
|
};
|
|
1490
1504
|
|
|
1491
1505
|
// src/config/address/BSC_TEST_NET.ts
|
|
@@ -1508,7 +1522,9 @@ var BSC_TEST_NET = {
|
|
|
1508
1522
|
DATA_PROVIDER: "0x827c4D63eCafE28bC7f1aFF460f9A14b4938d76e",
|
|
1509
1523
|
ORACLE_RESERVE: "0xCF72C9fB77cF051F079151d5955753A5b93F4E92",
|
|
1510
1524
|
FORWARDER: "0x2912Ae76E175776B44E3a0f67E60F2624AEeED03",
|
|
1511
|
-
TRADING_ROUTER: "0x0000000000000000000000000000000000000000"
|
|
1525
|
+
TRADING_ROUTER: "0x0000000000000000000000000000000000000000",
|
|
1526
|
+
REIMBURSEMENT: "0x0000000000000000000000000000000000000000",
|
|
1527
|
+
DISPUTE_COURT: "0x0000000000000000000000000000000000000000"
|
|
1512
1528
|
};
|
|
1513
1529
|
|
|
1514
1530
|
// src/config/address.ts
|
|
@@ -1851,7 +1867,7 @@ var RotationProvider = class extends import_providers.BaseProvider {
|
|
|
1851
1867
|
// package.json
|
|
1852
1868
|
var package_default = {
|
|
1853
1869
|
name: "@myx-trade/sdk",
|
|
1854
|
-
version: "0.1.
|
|
1870
|
+
version: "0.1.250-beta.1",
|
|
1855
1871
|
private: false,
|
|
1856
1872
|
publishConfig: {
|
|
1857
1873
|
access: "public"
|
|
@@ -10397,267 +10413,2220 @@ var Forwarder_default = [
|
|
|
10397
10413
|
}
|
|
10398
10414
|
];
|
|
10399
10415
|
|
|
10400
|
-
// src/
|
|
10401
|
-
var
|
|
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
|
-
|
|
10585
|
-
|
|
10586
|
-
|
|
10587
|
-
|
|
10588
|
-
|
|
10589
|
-
|
|
10590
|
-
|
|
10591
|
-
|
|
10592
|
-
|
|
10593
|
-
|
|
10594
|
-
|
|
10595
|
-
|
|
10596
|
-
|
|
10597
|
-
|
|
10598
|
-
|
|
10599
|
-
|
|
10600
|
-
|
|
10601
|
-
|
|
10602
|
-
|
|
10603
|
-
|
|
10604
|
-
|
|
10605
|
-
|
|
10606
|
-
|
|
10607
|
-
|
|
10608
|
-
|
|
10609
|
-
|
|
10610
|
-
|
|
10611
|
-
|
|
10612
|
-
|
|
10613
|
-
|
|
10614
|
-
|
|
10615
|
-
|
|
10616
|
-
|
|
10617
|
-
|
|
10618
|
-
|
|
10619
|
-
|
|
10620
|
-
|
|
10621
|
-
|
|
10622
|
-
|
|
10623
|
-
|
|
10624
|
-
|
|
10625
|
-
|
|
10626
|
-
|
|
10627
|
-
|
|
10628
|
-
|
|
10629
|
-
|
|
10630
|
-
|
|
10631
|
-
|
|
10632
|
-
|
|
10633
|
-
|
|
10634
|
-
|
|
10635
|
-
|
|
10636
|
-
|
|
10637
|
-
|
|
10638
|
-
|
|
10639
|
-
|
|
10640
|
-
|
|
10641
|
-
|
|
10642
|
-
|
|
10643
|
-
|
|
10644
|
-
|
|
10645
|
-
|
|
10646
|
-
|
|
10647
|
-
|
|
10648
|
-
|
|
10649
|
-
|
|
10650
|
-
|
|
10651
|
-
|
|
10652
|
-
|
|
10653
|
-
|
|
10654
|
-
|
|
10655
|
-
|
|
10656
|
-
|
|
10657
|
-
|
|
10658
|
-
|
|
10659
|
-
|
|
10660
|
-
|
|
10416
|
+
// src/abi/Reimbursement.json
|
|
10417
|
+
var Reimbursement_default = [
|
|
10418
|
+
{
|
|
10419
|
+
type: "error",
|
|
10420
|
+
name: "AddressEmptyCode",
|
|
10421
|
+
inputs: [
|
|
10422
|
+
{
|
|
10423
|
+
type: "address",
|
|
10424
|
+
name: "target"
|
|
10425
|
+
}
|
|
10426
|
+
]
|
|
10427
|
+
},
|
|
10428
|
+
{
|
|
10429
|
+
type: "error",
|
|
10430
|
+
name: "AlreadyClaimed",
|
|
10431
|
+
inputs: [
|
|
10432
|
+
{
|
|
10433
|
+
type: "uint256",
|
|
10434
|
+
name: "caseId"
|
|
10435
|
+
},
|
|
10436
|
+
{
|
|
10437
|
+
type: "address",
|
|
10438
|
+
name: "user"
|
|
10439
|
+
}
|
|
10440
|
+
]
|
|
10441
|
+
},
|
|
10442
|
+
{
|
|
10443
|
+
type: "error",
|
|
10444
|
+
name: "ERC1967InvalidImplementation",
|
|
10445
|
+
inputs: [
|
|
10446
|
+
{
|
|
10447
|
+
type: "address",
|
|
10448
|
+
name: "implementation"
|
|
10449
|
+
}
|
|
10450
|
+
]
|
|
10451
|
+
},
|
|
10452
|
+
{
|
|
10453
|
+
type: "error",
|
|
10454
|
+
name: "ERC1967NonPayable",
|
|
10455
|
+
inputs: []
|
|
10456
|
+
},
|
|
10457
|
+
{
|
|
10458
|
+
type: "error",
|
|
10459
|
+
name: "FailedCall",
|
|
10460
|
+
inputs: []
|
|
10461
|
+
},
|
|
10462
|
+
{
|
|
10463
|
+
type: "error",
|
|
10464
|
+
name: "InvalidAmount",
|
|
10465
|
+
inputs: [
|
|
10466
|
+
{
|
|
10467
|
+
type: "uint256",
|
|
10468
|
+
name: "caseId"
|
|
10469
|
+
},
|
|
10470
|
+
{
|
|
10471
|
+
type: "address",
|
|
10472
|
+
name: "user"
|
|
10473
|
+
}
|
|
10474
|
+
]
|
|
10475
|
+
},
|
|
10476
|
+
{
|
|
10477
|
+
type: "error",
|
|
10478
|
+
name: "InvalidInitialization",
|
|
10479
|
+
inputs: []
|
|
10480
|
+
},
|
|
10481
|
+
{
|
|
10482
|
+
type: "error",
|
|
10483
|
+
name: "MerkleTreeVerificationFailed",
|
|
10484
|
+
inputs: [
|
|
10485
|
+
{
|
|
10486
|
+
type: "uint256",
|
|
10487
|
+
name: "caseId"
|
|
10488
|
+
},
|
|
10489
|
+
{
|
|
10490
|
+
type: "address",
|
|
10491
|
+
name: "user"
|
|
10492
|
+
}
|
|
10493
|
+
]
|
|
10494
|
+
},
|
|
10495
|
+
{
|
|
10496
|
+
type: "error",
|
|
10497
|
+
name: "NotAddressManager",
|
|
10498
|
+
inputs: []
|
|
10499
|
+
},
|
|
10500
|
+
{
|
|
10501
|
+
type: "error",
|
|
10502
|
+
name: "NotDependencyManager",
|
|
10503
|
+
inputs: []
|
|
10504
|
+
},
|
|
10505
|
+
{
|
|
10506
|
+
type: "error",
|
|
10507
|
+
name: "NotInitializing",
|
|
10508
|
+
inputs: []
|
|
10509
|
+
},
|
|
10510
|
+
{
|
|
10511
|
+
type: "error",
|
|
10512
|
+
name: "NotProxyAdmin",
|
|
10513
|
+
inputs: []
|
|
10514
|
+
},
|
|
10515
|
+
{
|
|
10516
|
+
type: "error",
|
|
10517
|
+
name: "PermissionDenied",
|
|
10518
|
+
inputs: [
|
|
10519
|
+
{
|
|
10520
|
+
type: "address",
|
|
10521
|
+
name: "caller"
|
|
10522
|
+
},
|
|
10523
|
+
{
|
|
10524
|
+
type: "address",
|
|
10525
|
+
name: "target"
|
|
10526
|
+
}
|
|
10527
|
+
]
|
|
10528
|
+
},
|
|
10529
|
+
{
|
|
10530
|
+
type: "error",
|
|
10531
|
+
name: "ReimbursementValidity",
|
|
10532
|
+
inputs: [
|
|
10533
|
+
{
|
|
10534
|
+
type: "uint256",
|
|
10535
|
+
name: "caseId"
|
|
10536
|
+
}
|
|
10537
|
+
]
|
|
10538
|
+
},
|
|
10539
|
+
{
|
|
10540
|
+
type: "error",
|
|
10541
|
+
name: "SafeERC20FailedOperation",
|
|
10542
|
+
inputs: [
|
|
10543
|
+
{
|
|
10544
|
+
type: "address",
|
|
10545
|
+
name: "token"
|
|
10546
|
+
}
|
|
10547
|
+
]
|
|
10548
|
+
},
|
|
10549
|
+
{
|
|
10550
|
+
type: "error",
|
|
10551
|
+
name: "UUPSUnauthorizedCallContext",
|
|
10552
|
+
inputs: []
|
|
10553
|
+
},
|
|
10554
|
+
{
|
|
10555
|
+
type: "error",
|
|
10556
|
+
name: "UUPSUnsupportedProxiableUUID",
|
|
10557
|
+
inputs: [
|
|
10558
|
+
{
|
|
10559
|
+
type: "bytes32",
|
|
10560
|
+
name: "slot"
|
|
10561
|
+
}
|
|
10562
|
+
]
|
|
10563
|
+
},
|
|
10564
|
+
{
|
|
10565
|
+
type: "event",
|
|
10566
|
+
anonymous: false,
|
|
10567
|
+
name: "Initialized",
|
|
10568
|
+
inputs: [
|
|
10569
|
+
{
|
|
10570
|
+
type: "uint64",
|
|
10571
|
+
name: "version",
|
|
10572
|
+
indexed: false
|
|
10573
|
+
}
|
|
10574
|
+
]
|
|
10575
|
+
},
|
|
10576
|
+
{
|
|
10577
|
+
type: "event",
|
|
10578
|
+
anonymous: false,
|
|
10579
|
+
name: "ReimbursementClaimed",
|
|
10580
|
+
inputs: [
|
|
10581
|
+
{
|
|
10582
|
+
type: "uint256",
|
|
10583
|
+
name: "caseId",
|
|
10584
|
+
indexed: false
|
|
10585
|
+
},
|
|
10586
|
+
{
|
|
10587
|
+
type: "address",
|
|
10588
|
+
name: "user",
|
|
10589
|
+
indexed: false
|
|
10590
|
+
},
|
|
10591
|
+
{
|
|
10592
|
+
type: "uint256",
|
|
10593
|
+
name: "baseAmount",
|
|
10594
|
+
indexed: false
|
|
10595
|
+
},
|
|
10596
|
+
{
|
|
10597
|
+
type: "uint256",
|
|
10598
|
+
name: "quoteAmount",
|
|
10599
|
+
indexed: false
|
|
10600
|
+
}
|
|
10601
|
+
]
|
|
10602
|
+
},
|
|
10603
|
+
{
|
|
10604
|
+
type: "event",
|
|
10605
|
+
anonymous: false,
|
|
10606
|
+
name: "ReimbursementInfoSet",
|
|
10607
|
+
inputs: [
|
|
10608
|
+
{
|
|
10609
|
+
type: "uint256",
|
|
10610
|
+
name: "caseId",
|
|
10611
|
+
indexed: false
|
|
10612
|
+
},
|
|
10613
|
+
{
|
|
10614
|
+
type: "bytes32",
|
|
10615
|
+
name: "merkleRoot",
|
|
10616
|
+
indexed: false
|
|
10617
|
+
},
|
|
10618
|
+
{
|
|
10619
|
+
type: "address",
|
|
10620
|
+
name: "baseToken",
|
|
10621
|
+
indexed: false
|
|
10622
|
+
},
|
|
10623
|
+
{
|
|
10624
|
+
type: "address",
|
|
10625
|
+
name: "quoteToken",
|
|
10626
|
+
indexed: false
|
|
10627
|
+
},
|
|
10628
|
+
{
|
|
10629
|
+
type: "uint256",
|
|
10630
|
+
name: "totalBaseAmount",
|
|
10631
|
+
indexed: false
|
|
10632
|
+
},
|
|
10633
|
+
{
|
|
10634
|
+
type: "uint256",
|
|
10635
|
+
name: "totalQuoteAmount",
|
|
10636
|
+
indexed: false
|
|
10637
|
+
},
|
|
10638
|
+
{
|
|
10639
|
+
type: "uint256",
|
|
10640
|
+
name: "claimedBaseAmount",
|
|
10641
|
+
indexed: false
|
|
10642
|
+
},
|
|
10643
|
+
{
|
|
10644
|
+
type: "uint256",
|
|
10645
|
+
name: "claimedQuoteAmount",
|
|
10646
|
+
indexed: false
|
|
10647
|
+
},
|
|
10648
|
+
{
|
|
10649
|
+
type: "uint256",
|
|
10650
|
+
name: "expireTime",
|
|
10651
|
+
indexed: false
|
|
10652
|
+
}
|
|
10653
|
+
]
|
|
10654
|
+
},
|
|
10655
|
+
{
|
|
10656
|
+
type: "event",
|
|
10657
|
+
anonymous: false,
|
|
10658
|
+
name: "Upgraded",
|
|
10659
|
+
inputs: [
|
|
10660
|
+
{
|
|
10661
|
+
type: "address",
|
|
10662
|
+
name: "implementation",
|
|
10663
|
+
indexed: true
|
|
10664
|
+
}
|
|
10665
|
+
]
|
|
10666
|
+
},
|
|
10667
|
+
{
|
|
10668
|
+
type: "function",
|
|
10669
|
+
name: "UPGRADE_INTERFACE_VERSION",
|
|
10670
|
+
constant: true,
|
|
10671
|
+
stateMutability: "view",
|
|
10672
|
+
payable: false,
|
|
10673
|
+
inputs: [],
|
|
10674
|
+
outputs: [
|
|
10675
|
+
{
|
|
10676
|
+
type: "string"
|
|
10677
|
+
}
|
|
10678
|
+
]
|
|
10679
|
+
},
|
|
10680
|
+
{
|
|
10681
|
+
type: "function",
|
|
10682
|
+
name: "claimReimbursement",
|
|
10683
|
+
constant: false,
|
|
10684
|
+
payable: false,
|
|
10685
|
+
inputs: [
|
|
10686
|
+
{
|
|
10687
|
+
type: "uint256",
|
|
10688
|
+
name: "caseId"
|
|
10689
|
+
},
|
|
10690
|
+
{
|
|
10691
|
+
type: "uint256",
|
|
10692
|
+
name: "baseAmount"
|
|
10693
|
+
},
|
|
10694
|
+
{
|
|
10695
|
+
type: "uint256",
|
|
10696
|
+
name: "quoteAmount"
|
|
10697
|
+
},
|
|
10698
|
+
{
|
|
10699
|
+
type: "bytes32[]",
|
|
10700
|
+
name: "merkleProof"
|
|
10701
|
+
}
|
|
10702
|
+
],
|
|
10703
|
+
outputs: []
|
|
10704
|
+
},
|
|
10705
|
+
{
|
|
10706
|
+
type: "function",
|
|
10707
|
+
name: "getAddressManager",
|
|
10708
|
+
constant: true,
|
|
10709
|
+
stateMutability: "view",
|
|
10710
|
+
payable: false,
|
|
10711
|
+
inputs: [],
|
|
10712
|
+
outputs: [
|
|
10713
|
+
{
|
|
10714
|
+
type: "address"
|
|
10715
|
+
}
|
|
10716
|
+
]
|
|
10717
|
+
},
|
|
10718
|
+
{
|
|
10719
|
+
type: "function",
|
|
10720
|
+
name: "getDependencyAddress",
|
|
10721
|
+
constant: true,
|
|
10722
|
+
stateMutability: "view",
|
|
10723
|
+
payable: false,
|
|
10724
|
+
inputs: [
|
|
10725
|
+
{
|
|
10726
|
+
type: "bytes32",
|
|
10727
|
+
name: "identifier"
|
|
10728
|
+
}
|
|
10729
|
+
],
|
|
10730
|
+
outputs: [
|
|
10731
|
+
{
|
|
10732
|
+
type: "address"
|
|
10733
|
+
}
|
|
10734
|
+
]
|
|
10735
|
+
},
|
|
10736
|
+
{
|
|
10737
|
+
type: "function",
|
|
10738
|
+
name: "getImplementation",
|
|
10739
|
+
constant: true,
|
|
10740
|
+
stateMutability: "view",
|
|
10741
|
+
payable: false,
|
|
10742
|
+
inputs: [],
|
|
10743
|
+
outputs: [
|
|
10744
|
+
{
|
|
10745
|
+
type: "address"
|
|
10746
|
+
}
|
|
10747
|
+
]
|
|
10748
|
+
},
|
|
10749
|
+
{
|
|
10750
|
+
type: "function",
|
|
10751
|
+
name: "getReimbursementInfo",
|
|
10752
|
+
constant: true,
|
|
10753
|
+
stateMutability: "view",
|
|
10754
|
+
payable: false,
|
|
10755
|
+
inputs: [
|
|
10756
|
+
{
|
|
10757
|
+
type: "uint256",
|
|
10758
|
+
name: "caseId"
|
|
10759
|
+
}
|
|
10760
|
+
],
|
|
10761
|
+
outputs: [
|
|
10762
|
+
{
|
|
10763
|
+
type: "tuple",
|
|
10764
|
+
components: [
|
|
10765
|
+
{
|
|
10766
|
+
type: "bytes32",
|
|
10767
|
+
name: "merkleRoot"
|
|
10768
|
+
},
|
|
10769
|
+
{
|
|
10770
|
+
type: "address",
|
|
10771
|
+
name: "baseToken"
|
|
10772
|
+
},
|
|
10773
|
+
{
|
|
10774
|
+
type: "address",
|
|
10775
|
+
name: "quoteToken"
|
|
10776
|
+
},
|
|
10777
|
+
{
|
|
10778
|
+
type: "uint256",
|
|
10779
|
+
name: "totalBaseAmount"
|
|
10780
|
+
},
|
|
10781
|
+
{
|
|
10782
|
+
type: "uint256",
|
|
10783
|
+
name: "totalQuoteAmount"
|
|
10784
|
+
},
|
|
10785
|
+
{
|
|
10786
|
+
type: "uint256",
|
|
10787
|
+
name: "claimedBaseAmount"
|
|
10788
|
+
},
|
|
10789
|
+
{
|
|
10790
|
+
type: "uint256",
|
|
10791
|
+
name: "claimedQuoteAmount"
|
|
10792
|
+
},
|
|
10793
|
+
{
|
|
10794
|
+
type: "uint256",
|
|
10795
|
+
name: "expireTime"
|
|
10796
|
+
}
|
|
10797
|
+
]
|
|
10798
|
+
}
|
|
10799
|
+
]
|
|
10800
|
+
},
|
|
10801
|
+
{
|
|
10802
|
+
type: "function",
|
|
10803
|
+
name: "initialize",
|
|
10804
|
+
constant: false,
|
|
10805
|
+
payable: false,
|
|
10806
|
+
inputs: [
|
|
10807
|
+
{
|
|
10808
|
+
type: "address",
|
|
10809
|
+
name: "addressManager"
|
|
10810
|
+
}
|
|
10811
|
+
],
|
|
10812
|
+
outputs: []
|
|
10813
|
+
},
|
|
10814
|
+
{
|
|
10815
|
+
type: "function",
|
|
10816
|
+
name: "proxiableUUID",
|
|
10817
|
+
constant: true,
|
|
10818
|
+
stateMutability: "view",
|
|
10819
|
+
payable: false,
|
|
10820
|
+
inputs: [],
|
|
10821
|
+
outputs: [
|
|
10822
|
+
{
|
|
10823
|
+
type: "bytes32"
|
|
10824
|
+
}
|
|
10825
|
+
]
|
|
10826
|
+
},
|
|
10827
|
+
{
|
|
10828
|
+
type: "function",
|
|
10829
|
+
name: "setReimbursementInfo",
|
|
10830
|
+
constant: false,
|
|
10831
|
+
payable: false,
|
|
10832
|
+
inputs: [
|
|
10833
|
+
{
|
|
10834
|
+
type: "uint256",
|
|
10835
|
+
name: "caseId"
|
|
10836
|
+
},
|
|
10837
|
+
{
|
|
10838
|
+
type: "tuple",
|
|
10839
|
+
name: "reimbursementInfo",
|
|
10840
|
+
components: [
|
|
10841
|
+
{
|
|
10842
|
+
type: "bytes32",
|
|
10843
|
+
name: "merkleRoot"
|
|
10844
|
+
},
|
|
10845
|
+
{
|
|
10846
|
+
type: "address",
|
|
10847
|
+
name: "baseToken"
|
|
10848
|
+
},
|
|
10849
|
+
{
|
|
10850
|
+
type: "address",
|
|
10851
|
+
name: "quoteToken"
|
|
10852
|
+
},
|
|
10853
|
+
{
|
|
10854
|
+
type: "uint256",
|
|
10855
|
+
name: "totalBaseAmount"
|
|
10856
|
+
},
|
|
10857
|
+
{
|
|
10858
|
+
type: "uint256",
|
|
10859
|
+
name: "totalQuoteAmount"
|
|
10860
|
+
},
|
|
10861
|
+
{
|
|
10862
|
+
type: "uint256",
|
|
10863
|
+
name: "claimedBaseAmount"
|
|
10864
|
+
},
|
|
10865
|
+
{
|
|
10866
|
+
type: "uint256",
|
|
10867
|
+
name: "claimedQuoteAmount"
|
|
10868
|
+
},
|
|
10869
|
+
{
|
|
10870
|
+
type: "uint256",
|
|
10871
|
+
name: "expireTime"
|
|
10872
|
+
}
|
|
10873
|
+
]
|
|
10874
|
+
}
|
|
10875
|
+
],
|
|
10876
|
+
outputs: []
|
|
10877
|
+
},
|
|
10878
|
+
{
|
|
10879
|
+
type: "function",
|
|
10880
|
+
name: "upgradeTo",
|
|
10881
|
+
constant: false,
|
|
10882
|
+
stateMutability: "payable",
|
|
10883
|
+
payable: true,
|
|
10884
|
+
inputs: [
|
|
10885
|
+
{
|
|
10886
|
+
type: "address",
|
|
10887
|
+
name: "newImplementation"
|
|
10888
|
+
},
|
|
10889
|
+
{
|
|
10890
|
+
type: "bytes",
|
|
10891
|
+
name: "data"
|
|
10892
|
+
}
|
|
10893
|
+
],
|
|
10894
|
+
outputs: []
|
|
10895
|
+
},
|
|
10896
|
+
{
|
|
10897
|
+
type: "function",
|
|
10898
|
+
name: "upgradeToAndCall",
|
|
10899
|
+
constant: false,
|
|
10900
|
+
stateMutability: "payable",
|
|
10901
|
+
payable: true,
|
|
10902
|
+
inputs: [
|
|
10903
|
+
{
|
|
10904
|
+
type: "address",
|
|
10905
|
+
name: "newImplementation"
|
|
10906
|
+
},
|
|
10907
|
+
{
|
|
10908
|
+
type: "bytes",
|
|
10909
|
+
name: "data"
|
|
10910
|
+
}
|
|
10911
|
+
],
|
|
10912
|
+
outputs: []
|
|
10913
|
+
}
|
|
10914
|
+
];
|
|
10915
|
+
|
|
10916
|
+
// src/abi/DisputeCourt.json
|
|
10917
|
+
var DisputeCourt_default = [
|
|
10918
|
+
{
|
|
10919
|
+
type: "constructor",
|
|
10920
|
+
payable: false,
|
|
10921
|
+
inputs: []
|
|
10922
|
+
},
|
|
10923
|
+
{
|
|
10924
|
+
type: "error",
|
|
10925
|
+
name: "AddressEmptyCode",
|
|
10926
|
+
inputs: [
|
|
10927
|
+
{
|
|
10928
|
+
type: "address",
|
|
10929
|
+
name: "target"
|
|
10930
|
+
}
|
|
10931
|
+
]
|
|
10932
|
+
},
|
|
10933
|
+
{
|
|
10934
|
+
type: "error",
|
|
10935
|
+
name: "AlreadyVoted",
|
|
10936
|
+
inputs: []
|
|
10937
|
+
},
|
|
10938
|
+
{
|
|
10939
|
+
type: "error",
|
|
10940
|
+
name: "BondNotReleased",
|
|
10941
|
+
inputs: []
|
|
10942
|
+
},
|
|
10943
|
+
{
|
|
10944
|
+
type: "error",
|
|
10945
|
+
name: "CaseAppealNotFinished",
|
|
10946
|
+
inputs: []
|
|
10947
|
+
},
|
|
10948
|
+
{
|
|
10949
|
+
type: "error",
|
|
10950
|
+
name: "CaseDeadlineNotReached",
|
|
10951
|
+
inputs: []
|
|
10952
|
+
},
|
|
10953
|
+
{
|
|
10954
|
+
type: "error",
|
|
10955
|
+
name: "CaseDeadlineReached",
|
|
10956
|
+
inputs: []
|
|
10957
|
+
},
|
|
10958
|
+
{
|
|
10959
|
+
type: "error",
|
|
10960
|
+
name: "CaseNotAccepted",
|
|
10961
|
+
inputs: []
|
|
10962
|
+
},
|
|
10963
|
+
{
|
|
10964
|
+
type: "error",
|
|
10965
|
+
name: "CaseNotExist",
|
|
10966
|
+
inputs: [
|
|
10967
|
+
{
|
|
10968
|
+
type: "uint256",
|
|
10969
|
+
name: "caseId"
|
|
10970
|
+
}
|
|
10971
|
+
]
|
|
10972
|
+
},
|
|
10973
|
+
{
|
|
10974
|
+
type: "error",
|
|
10975
|
+
name: "CaseRespondentAppealed",
|
|
10976
|
+
inputs: [
|
|
10977
|
+
{
|
|
10978
|
+
type: "uint256",
|
|
10979
|
+
name: "caseId"
|
|
10980
|
+
},
|
|
10981
|
+
{
|
|
10982
|
+
type: "address",
|
|
10983
|
+
name: "respondent"
|
|
10984
|
+
}
|
|
10985
|
+
]
|
|
10986
|
+
},
|
|
10987
|
+
{
|
|
10988
|
+
type: "error",
|
|
10989
|
+
name: "ChainIdMismatch",
|
|
10990
|
+
inputs: []
|
|
10991
|
+
},
|
|
10992
|
+
{
|
|
10993
|
+
type: "error",
|
|
10994
|
+
name: "DisputeNotAllowed",
|
|
10995
|
+
inputs: []
|
|
10996
|
+
},
|
|
10997
|
+
{
|
|
10998
|
+
type: "error",
|
|
10999
|
+
name: "ERC1967InvalidImplementation",
|
|
11000
|
+
inputs: [
|
|
11001
|
+
{
|
|
11002
|
+
type: "address",
|
|
11003
|
+
name: "implementation"
|
|
11004
|
+
}
|
|
11005
|
+
]
|
|
11006
|
+
},
|
|
11007
|
+
{
|
|
11008
|
+
type: "error",
|
|
11009
|
+
name: "ERC1967NonPayable",
|
|
11010
|
+
inputs: []
|
|
11011
|
+
},
|
|
11012
|
+
{
|
|
11013
|
+
type: "error",
|
|
11014
|
+
name: "FailedCall",
|
|
11015
|
+
inputs: []
|
|
11016
|
+
},
|
|
11017
|
+
{
|
|
11018
|
+
type: "error",
|
|
11019
|
+
name: "InvalidAccountNonce",
|
|
11020
|
+
inputs: [
|
|
11021
|
+
{
|
|
11022
|
+
type: "address",
|
|
11023
|
+
name: "account"
|
|
11024
|
+
},
|
|
11025
|
+
{
|
|
11026
|
+
type: "uint256",
|
|
11027
|
+
name: "currentNonce"
|
|
11028
|
+
}
|
|
11029
|
+
]
|
|
11030
|
+
},
|
|
11031
|
+
{
|
|
11032
|
+
type: "error",
|
|
11033
|
+
name: "InvalidContractAddress",
|
|
11034
|
+
inputs: []
|
|
11035
|
+
},
|
|
11036
|
+
{
|
|
11037
|
+
type: "error",
|
|
11038
|
+
name: "InvalidFunctionSignature",
|
|
11039
|
+
inputs: []
|
|
11040
|
+
},
|
|
11041
|
+
{
|
|
11042
|
+
type: "error",
|
|
11043
|
+
name: "InvalidInitialization",
|
|
11044
|
+
inputs: []
|
|
11045
|
+
},
|
|
11046
|
+
{
|
|
11047
|
+
type: "error",
|
|
11048
|
+
name: "InvalidParameter",
|
|
11049
|
+
inputs: []
|
|
11050
|
+
},
|
|
11051
|
+
{
|
|
11052
|
+
type: "error",
|
|
11053
|
+
name: "InvalidPayloadLength",
|
|
11054
|
+
inputs: [
|
|
11055
|
+
{
|
|
11056
|
+
type: "uint256",
|
|
11057
|
+
name: "received"
|
|
11058
|
+
},
|
|
11059
|
+
{
|
|
11060
|
+
type: "uint256",
|
|
11061
|
+
name: "expected"
|
|
11062
|
+
}
|
|
11063
|
+
]
|
|
11064
|
+
},
|
|
11065
|
+
{
|
|
11066
|
+
type: "error",
|
|
11067
|
+
name: "InvalidPoolToken",
|
|
11068
|
+
inputs: []
|
|
11069
|
+
},
|
|
11070
|
+
{
|
|
11071
|
+
type: "error",
|
|
11072
|
+
name: "InvalidProfitAmount",
|
|
11073
|
+
inputs: []
|
|
11074
|
+
},
|
|
11075
|
+
{
|
|
11076
|
+
type: "error",
|
|
11077
|
+
name: "InvalidResponseVersion",
|
|
11078
|
+
inputs: []
|
|
11079
|
+
},
|
|
11080
|
+
{
|
|
11081
|
+
type: "error",
|
|
11082
|
+
name: "InvalidSourceChain",
|
|
11083
|
+
inputs: []
|
|
11084
|
+
},
|
|
11085
|
+
{
|
|
11086
|
+
type: "error",
|
|
11087
|
+
name: "NoChainResponse",
|
|
11088
|
+
inputs: []
|
|
11089
|
+
},
|
|
11090
|
+
{
|
|
11091
|
+
type: "error",
|
|
11092
|
+
name: "NotAddressManager",
|
|
11093
|
+
inputs: []
|
|
11094
|
+
},
|
|
11095
|
+
{
|
|
11096
|
+
type: "error",
|
|
11097
|
+
name: "NotCaseRespondent",
|
|
11098
|
+
inputs: [
|
|
11099
|
+
{
|
|
11100
|
+
type: "uint256",
|
|
11101
|
+
name: "caseId"
|
|
11102
|
+
},
|
|
11103
|
+
{
|
|
11104
|
+
type: "address",
|
|
11105
|
+
name: "respondent"
|
|
11106
|
+
}
|
|
11107
|
+
]
|
|
11108
|
+
},
|
|
11109
|
+
{
|
|
11110
|
+
type: "error",
|
|
11111
|
+
name: "NotDependencyManager",
|
|
11112
|
+
inputs: []
|
|
11113
|
+
},
|
|
11114
|
+
{
|
|
11115
|
+
type: "error",
|
|
11116
|
+
name: "NotInitializing",
|
|
11117
|
+
inputs: []
|
|
11118
|
+
},
|
|
11119
|
+
{
|
|
11120
|
+
type: "error",
|
|
11121
|
+
name: "NotProxyAdmin",
|
|
11122
|
+
inputs: []
|
|
11123
|
+
},
|
|
11124
|
+
{
|
|
11125
|
+
type: "error",
|
|
11126
|
+
name: "NumberOfResponsesMismatch",
|
|
11127
|
+
inputs: []
|
|
11128
|
+
},
|
|
11129
|
+
{
|
|
11130
|
+
type: "error",
|
|
11131
|
+
name: "OnlyRelayer",
|
|
11132
|
+
inputs: []
|
|
11133
|
+
},
|
|
11134
|
+
{
|
|
11135
|
+
type: "error",
|
|
11136
|
+
name: "PermissionDenied",
|
|
11137
|
+
inputs: [
|
|
11138
|
+
{
|
|
11139
|
+
type: "address",
|
|
11140
|
+
name: "caller"
|
|
11141
|
+
},
|
|
11142
|
+
{
|
|
11143
|
+
type: "address",
|
|
11144
|
+
name: "target"
|
|
11145
|
+
}
|
|
11146
|
+
]
|
|
11147
|
+
},
|
|
11148
|
+
{
|
|
11149
|
+
type: "error",
|
|
11150
|
+
name: "RequestTypeMismatch",
|
|
11151
|
+
inputs: []
|
|
11152
|
+
},
|
|
11153
|
+
{
|
|
11154
|
+
type: "error",
|
|
11155
|
+
name: "RiskCloseNotCompleted",
|
|
11156
|
+
inputs: []
|
|
11157
|
+
},
|
|
11158
|
+
{
|
|
11159
|
+
type: "error",
|
|
11160
|
+
name: "SafeERC20FailedOperation",
|
|
11161
|
+
inputs: [
|
|
11162
|
+
{
|
|
11163
|
+
type: "address",
|
|
11164
|
+
name: "token"
|
|
11165
|
+
}
|
|
11166
|
+
]
|
|
11167
|
+
},
|
|
11168
|
+
{
|
|
11169
|
+
type: "error",
|
|
11170
|
+
name: "SignatureExpired",
|
|
11171
|
+
inputs: []
|
|
11172
|
+
},
|
|
11173
|
+
{
|
|
11174
|
+
type: "error",
|
|
11175
|
+
name: "UUPSUnauthorizedCallContext",
|
|
11176
|
+
inputs: []
|
|
11177
|
+
},
|
|
11178
|
+
{
|
|
11179
|
+
type: "error",
|
|
11180
|
+
name: "UUPSUnsupportedProxiableUUID",
|
|
11181
|
+
inputs: [
|
|
11182
|
+
{
|
|
11183
|
+
type: "bytes32",
|
|
11184
|
+
name: "slot"
|
|
11185
|
+
}
|
|
11186
|
+
]
|
|
11187
|
+
},
|
|
11188
|
+
{
|
|
11189
|
+
type: "error",
|
|
11190
|
+
name: "UnexpectedCaseState",
|
|
11191
|
+
inputs: []
|
|
11192
|
+
},
|
|
11193
|
+
{
|
|
11194
|
+
type: "error",
|
|
11195
|
+
name: "UnexpectedCaseType",
|
|
11196
|
+
inputs: []
|
|
11197
|
+
},
|
|
11198
|
+
{
|
|
11199
|
+
type: "error",
|
|
11200
|
+
name: "UnexpectedNumberOfResults",
|
|
11201
|
+
inputs: []
|
|
11202
|
+
},
|
|
11203
|
+
{
|
|
11204
|
+
type: "error",
|
|
11205
|
+
name: "UnsupportedQueryType",
|
|
11206
|
+
inputs: [
|
|
11207
|
+
{
|
|
11208
|
+
type: "uint8",
|
|
11209
|
+
name: "received"
|
|
11210
|
+
}
|
|
11211
|
+
]
|
|
11212
|
+
},
|
|
11213
|
+
{
|
|
11214
|
+
type: "error",
|
|
11215
|
+
name: "UntrustfulVoting",
|
|
11216
|
+
inputs: []
|
|
11217
|
+
},
|
|
11218
|
+
{
|
|
11219
|
+
type: "error",
|
|
11220
|
+
name: "VerificationFailed",
|
|
11221
|
+
inputs: []
|
|
11222
|
+
},
|
|
11223
|
+
{
|
|
11224
|
+
type: "error",
|
|
11225
|
+
name: "VersionMismatch",
|
|
11226
|
+
inputs: []
|
|
11227
|
+
},
|
|
11228
|
+
{
|
|
11229
|
+
type: "error",
|
|
11230
|
+
name: "WrongQueryType",
|
|
11231
|
+
inputs: [
|
|
11232
|
+
{
|
|
11233
|
+
type: "uint8",
|
|
11234
|
+
name: "received"
|
|
11235
|
+
},
|
|
11236
|
+
{
|
|
11237
|
+
type: "uint8",
|
|
11238
|
+
name: "expected"
|
|
11239
|
+
}
|
|
11240
|
+
]
|
|
11241
|
+
},
|
|
11242
|
+
{
|
|
11243
|
+
type: "error",
|
|
11244
|
+
name: "ZeroQueries",
|
|
11245
|
+
inputs: []
|
|
11246
|
+
},
|
|
11247
|
+
{
|
|
11248
|
+
type: "event",
|
|
11249
|
+
anonymous: false,
|
|
11250
|
+
name: "AppealCanceled",
|
|
11251
|
+
inputs: [
|
|
11252
|
+
{
|
|
11253
|
+
type: "uint256",
|
|
11254
|
+
name: "caseId",
|
|
11255
|
+
indexed: false
|
|
11256
|
+
},
|
|
11257
|
+
{
|
|
11258
|
+
type: "uint256",
|
|
11259
|
+
name: "appealCaseId",
|
|
11260
|
+
indexed: false
|
|
11261
|
+
},
|
|
11262
|
+
{
|
|
11263
|
+
type: "address",
|
|
11264
|
+
name: "complainant",
|
|
11265
|
+
indexed: false
|
|
11266
|
+
},
|
|
11267
|
+
{
|
|
11268
|
+
type: "bool",
|
|
11269
|
+
name: "isMalicious",
|
|
11270
|
+
indexed: false
|
|
11271
|
+
}
|
|
11272
|
+
]
|
|
11273
|
+
},
|
|
11274
|
+
{
|
|
11275
|
+
type: "event",
|
|
11276
|
+
anonymous: false,
|
|
11277
|
+
name: "AppealFiled",
|
|
11278
|
+
inputs: [
|
|
11279
|
+
{
|
|
11280
|
+
type: "uint256",
|
|
11281
|
+
name: "caseId",
|
|
11282
|
+
indexed: false
|
|
11283
|
+
},
|
|
11284
|
+
{
|
|
11285
|
+
type: "uint256",
|
|
11286
|
+
name: "appealCaseId",
|
|
11287
|
+
indexed: false
|
|
11288
|
+
},
|
|
11289
|
+
{
|
|
11290
|
+
type: "address",
|
|
11291
|
+
name: "respondent",
|
|
11292
|
+
indexed: false
|
|
11293
|
+
},
|
|
11294
|
+
{
|
|
11295
|
+
type: "address",
|
|
11296
|
+
name: "appealToken",
|
|
11297
|
+
indexed: false
|
|
11298
|
+
},
|
|
11299
|
+
{
|
|
11300
|
+
type: "uint256",
|
|
11301
|
+
name: "appealBond",
|
|
11302
|
+
indexed: false
|
|
11303
|
+
},
|
|
11304
|
+
{
|
|
11305
|
+
type: "uint64",
|
|
11306
|
+
name: "appealDeadline",
|
|
11307
|
+
indexed: false
|
|
11308
|
+
}
|
|
11309
|
+
]
|
|
11310
|
+
},
|
|
11311
|
+
{
|
|
11312
|
+
type: "event",
|
|
11313
|
+
anonymous: false,
|
|
11314
|
+
name: "AppealResolved",
|
|
11315
|
+
inputs: [
|
|
11316
|
+
{
|
|
11317
|
+
type: "uint256",
|
|
11318
|
+
name: "caseId",
|
|
11319
|
+
indexed: false
|
|
11320
|
+
},
|
|
11321
|
+
{
|
|
11322
|
+
type: "uint256",
|
|
11323
|
+
name: "appealCaseId",
|
|
11324
|
+
indexed: false
|
|
11325
|
+
},
|
|
11326
|
+
{
|
|
11327
|
+
type: "uint8",
|
|
11328
|
+
name: "resolution",
|
|
11329
|
+
indexed: false
|
|
11330
|
+
},
|
|
11331
|
+
{
|
|
11332
|
+
type: "address",
|
|
11333
|
+
name: "complainant",
|
|
11334
|
+
indexed: false
|
|
11335
|
+
}
|
|
11336
|
+
]
|
|
11337
|
+
},
|
|
11338
|
+
{
|
|
11339
|
+
type: "event",
|
|
11340
|
+
anonymous: false,
|
|
11341
|
+
name: "BondClaimed",
|
|
11342
|
+
inputs: [
|
|
11343
|
+
{
|
|
11344
|
+
type: "uint256",
|
|
11345
|
+
name: "caseId",
|
|
11346
|
+
indexed: false
|
|
11347
|
+
},
|
|
11348
|
+
{
|
|
11349
|
+
type: "address",
|
|
11350
|
+
name: "user",
|
|
11351
|
+
indexed: false
|
|
11352
|
+
},
|
|
11353
|
+
{
|
|
11354
|
+
type: "address",
|
|
11355
|
+
name: "token",
|
|
11356
|
+
indexed: false
|
|
11357
|
+
},
|
|
11358
|
+
{
|
|
11359
|
+
type: "uint256",
|
|
11360
|
+
name: "amount",
|
|
11361
|
+
indexed: false
|
|
11362
|
+
}
|
|
11363
|
+
]
|
|
11364
|
+
},
|
|
11365
|
+
{
|
|
11366
|
+
type: "event",
|
|
11367
|
+
anonymous: false,
|
|
11368
|
+
name: "CaseAppealsResolved",
|
|
11369
|
+
inputs: [
|
|
11370
|
+
{
|
|
11371
|
+
type: "uint256",
|
|
11372
|
+
name: "caseId",
|
|
11373
|
+
indexed: false
|
|
11374
|
+
}
|
|
11375
|
+
]
|
|
11376
|
+
},
|
|
11377
|
+
{
|
|
11378
|
+
type: "event",
|
|
11379
|
+
anonymous: false,
|
|
11380
|
+
name: "CaseRiskClosed",
|
|
11381
|
+
inputs: [
|
|
11382
|
+
{
|
|
11383
|
+
type: "uint256",
|
|
11384
|
+
name: "caseId",
|
|
11385
|
+
indexed: false
|
|
11386
|
+
}
|
|
11387
|
+
]
|
|
11388
|
+
},
|
|
11389
|
+
{
|
|
11390
|
+
type: "event",
|
|
11391
|
+
anonymous: false,
|
|
11392
|
+
name: "DisputeCanceled",
|
|
11393
|
+
inputs: [
|
|
11394
|
+
{
|
|
11395
|
+
type: "uint256",
|
|
11396
|
+
name: "caseId",
|
|
11397
|
+
indexed: false
|
|
11398
|
+
},
|
|
11399
|
+
{
|
|
11400
|
+
type: "address",
|
|
11401
|
+
name: "complainant",
|
|
11402
|
+
indexed: false
|
|
11403
|
+
},
|
|
11404
|
+
{
|
|
11405
|
+
type: "bool",
|
|
11406
|
+
name: "isMalicious",
|
|
11407
|
+
indexed: false
|
|
11408
|
+
}
|
|
11409
|
+
]
|
|
11410
|
+
},
|
|
11411
|
+
{
|
|
11412
|
+
type: "event",
|
|
11413
|
+
anonymous: false,
|
|
11414
|
+
name: "DisputeConfigurationUpdated",
|
|
11415
|
+
inputs: [
|
|
11416
|
+
{
|
|
11417
|
+
type: "tuple",
|
|
11418
|
+
name: "newDisputeConfigration",
|
|
11419
|
+
indexed: false,
|
|
11420
|
+
components: [
|
|
11421
|
+
{
|
|
11422
|
+
type: "address",
|
|
11423
|
+
name: "appealToken"
|
|
11424
|
+
},
|
|
11425
|
+
{
|
|
11426
|
+
type: "uint64",
|
|
11427
|
+
name: "disputeBondUsd"
|
|
11428
|
+
},
|
|
11429
|
+
{
|
|
11430
|
+
type: "uint64",
|
|
11431
|
+
name: "appealBondUsd"
|
|
11432
|
+
},
|
|
11433
|
+
{
|
|
11434
|
+
type: "uint64",
|
|
11435
|
+
name: "disputeThresholdUsd"
|
|
11436
|
+
},
|
|
11437
|
+
{
|
|
11438
|
+
type: "uint64",
|
|
11439
|
+
name: "caseDuration"
|
|
11440
|
+
},
|
|
11441
|
+
{
|
|
11442
|
+
type: "uint64",
|
|
11443
|
+
name: "voteDuration"
|
|
11444
|
+
},
|
|
11445
|
+
{
|
|
11446
|
+
type: "uint64",
|
|
11447
|
+
name: "resolveDuration"
|
|
11448
|
+
},
|
|
11449
|
+
{
|
|
11450
|
+
type: "uint32",
|
|
11451
|
+
name: "voteCountRate"
|
|
11452
|
+
},
|
|
11453
|
+
{
|
|
11454
|
+
type: "uint32",
|
|
11455
|
+
name: "effectiveVoteRate"
|
|
11456
|
+
}
|
|
11457
|
+
]
|
|
11458
|
+
}
|
|
11459
|
+
]
|
|
11460
|
+
},
|
|
11461
|
+
{
|
|
11462
|
+
type: "event",
|
|
11463
|
+
anonymous: false,
|
|
11464
|
+
name: "DisputeFiled",
|
|
11465
|
+
inputs: [
|
|
11466
|
+
{
|
|
11467
|
+
type: "uint256",
|
|
11468
|
+
name: "caseId",
|
|
11469
|
+
indexed: false
|
|
11470
|
+
},
|
|
11471
|
+
{
|
|
11472
|
+
type: "bytes32",
|
|
11473
|
+
name: "poolId",
|
|
11474
|
+
indexed: false
|
|
11475
|
+
},
|
|
11476
|
+
{
|
|
11477
|
+
type: "address",
|
|
11478
|
+
name: "complainant",
|
|
11479
|
+
indexed: false
|
|
11480
|
+
},
|
|
11481
|
+
{
|
|
11482
|
+
type: "address",
|
|
11483
|
+
name: "poolToken",
|
|
11484
|
+
indexed: false
|
|
11485
|
+
},
|
|
11486
|
+
{
|
|
11487
|
+
type: "uint256",
|
|
11488
|
+
name: "disputeBond",
|
|
11489
|
+
indexed: false
|
|
11490
|
+
},
|
|
11491
|
+
{
|
|
11492
|
+
type: "uint64",
|
|
11493
|
+
name: "caseDeadline",
|
|
11494
|
+
indexed: false
|
|
11495
|
+
}
|
|
11496
|
+
]
|
|
11497
|
+
},
|
|
11498
|
+
{
|
|
11499
|
+
type: "event",
|
|
11500
|
+
anonymous: false,
|
|
11501
|
+
name: "DisputeResolved",
|
|
11502
|
+
inputs: [
|
|
11503
|
+
{
|
|
11504
|
+
type: "uint256",
|
|
11505
|
+
name: "caseId",
|
|
11506
|
+
indexed: false
|
|
11507
|
+
},
|
|
11508
|
+
{
|
|
11509
|
+
type: "uint8",
|
|
11510
|
+
name: "resolution",
|
|
11511
|
+
indexed: false
|
|
11512
|
+
},
|
|
11513
|
+
{
|
|
11514
|
+
type: "uint64",
|
|
11515
|
+
name: "appealDeadline",
|
|
11516
|
+
indexed: false
|
|
11517
|
+
}
|
|
11518
|
+
]
|
|
11519
|
+
},
|
|
11520
|
+
{
|
|
11521
|
+
type: "event",
|
|
11522
|
+
anonymous: false,
|
|
11523
|
+
name: "ForfeitBondsClaimed",
|
|
11524
|
+
inputs: [
|
|
11525
|
+
{
|
|
11526
|
+
type: "address",
|
|
11527
|
+
name: "receiver",
|
|
11528
|
+
indexed: false
|
|
11529
|
+
},
|
|
11530
|
+
{
|
|
11531
|
+
type: "address",
|
|
11532
|
+
name: "token",
|
|
11533
|
+
indexed: false
|
|
11534
|
+
},
|
|
11535
|
+
{
|
|
11536
|
+
type: "uint256",
|
|
11537
|
+
name: "amount",
|
|
11538
|
+
indexed: false
|
|
11539
|
+
}
|
|
11540
|
+
]
|
|
11541
|
+
},
|
|
11542
|
+
{
|
|
11543
|
+
type: "event",
|
|
11544
|
+
anonymous: false,
|
|
11545
|
+
name: "Initialized",
|
|
11546
|
+
inputs: [
|
|
11547
|
+
{
|
|
11548
|
+
type: "uint64",
|
|
11549
|
+
name: "version",
|
|
11550
|
+
indexed: false
|
|
11551
|
+
}
|
|
11552
|
+
]
|
|
11553
|
+
},
|
|
11554
|
+
{
|
|
11555
|
+
type: "event",
|
|
11556
|
+
anonymous: false,
|
|
11557
|
+
name: "ReimbursementProcessed",
|
|
11558
|
+
inputs: [
|
|
11559
|
+
{
|
|
11560
|
+
type: "uint256",
|
|
11561
|
+
name: "caseId",
|
|
11562
|
+
indexed: false
|
|
11563
|
+
},
|
|
11564
|
+
{
|
|
11565
|
+
type: "tuple",
|
|
11566
|
+
name: "reimbursementInfo",
|
|
11567
|
+
indexed: false,
|
|
11568
|
+
components: [
|
|
11569
|
+
{
|
|
11570
|
+
type: "bytes32",
|
|
11571
|
+
name: "merkleRoot"
|
|
11572
|
+
},
|
|
11573
|
+
{
|
|
11574
|
+
type: "address",
|
|
11575
|
+
name: "baseToken"
|
|
11576
|
+
},
|
|
11577
|
+
{
|
|
11578
|
+
type: "address",
|
|
11579
|
+
name: "quoteToken"
|
|
11580
|
+
},
|
|
11581
|
+
{
|
|
11582
|
+
type: "uint256",
|
|
11583
|
+
name: "totalBaseAmount"
|
|
11584
|
+
},
|
|
11585
|
+
{
|
|
11586
|
+
type: "uint256",
|
|
11587
|
+
name: "totalQuoteAmount"
|
|
11588
|
+
},
|
|
11589
|
+
{
|
|
11590
|
+
type: "uint256",
|
|
11591
|
+
name: "claimedBaseAmount"
|
|
11592
|
+
},
|
|
11593
|
+
{
|
|
11594
|
+
type: "uint256",
|
|
11595
|
+
name: "claimedQuoteAmount"
|
|
11596
|
+
},
|
|
11597
|
+
{
|
|
11598
|
+
type: "uint256",
|
|
11599
|
+
name: "expireTime"
|
|
11600
|
+
}
|
|
11601
|
+
]
|
|
11602
|
+
}
|
|
11603
|
+
]
|
|
11604
|
+
},
|
|
11605
|
+
{
|
|
11606
|
+
type: "event",
|
|
11607
|
+
anonymous: false,
|
|
11608
|
+
name: "Upgraded",
|
|
11609
|
+
inputs: [
|
|
11610
|
+
{
|
|
11611
|
+
type: "address",
|
|
11612
|
+
name: "implementation",
|
|
11613
|
+
indexed: true
|
|
11614
|
+
}
|
|
11615
|
+
]
|
|
11616
|
+
},
|
|
11617
|
+
{
|
|
11618
|
+
type: "event",
|
|
11619
|
+
anonymous: false,
|
|
11620
|
+
name: "Voted",
|
|
11621
|
+
inputs: [
|
|
11622
|
+
{
|
|
11623
|
+
type: "uint256",
|
|
11624
|
+
name: "caseId",
|
|
11625
|
+
indexed: false
|
|
11626
|
+
},
|
|
11627
|
+
{
|
|
11628
|
+
type: "address",
|
|
11629
|
+
name: "voter",
|
|
11630
|
+
indexed: false
|
|
11631
|
+
},
|
|
11632
|
+
{
|
|
11633
|
+
type: "uint8",
|
|
11634
|
+
name: "voteOption",
|
|
11635
|
+
indexed: false
|
|
11636
|
+
}
|
|
11637
|
+
]
|
|
11638
|
+
},
|
|
11639
|
+
{
|
|
11640
|
+
type: "event",
|
|
11641
|
+
anonymous: false,
|
|
11642
|
+
name: "VotingOpened",
|
|
11643
|
+
inputs: [
|
|
11644
|
+
{
|
|
11645
|
+
type: "uint256",
|
|
11646
|
+
name: "caseId",
|
|
11647
|
+
indexed: false
|
|
11648
|
+
},
|
|
11649
|
+
{
|
|
11650
|
+
type: "uint256",
|
|
11651
|
+
name: "evidenceId",
|
|
11652
|
+
indexed: false
|
|
11653
|
+
},
|
|
11654
|
+
{
|
|
11655
|
+
type: "uint64",
|
|
11656
|
+
name: "voteDeadline",
|
|
11657
|
+
indexed: false
|
|
11658
|
+
},
|
|
11659
|
+
{
|
|
11660
|
+
type: "address[]",
|
|
11661
|
+
name: "respondents",
|
|
11662
|
+
indexed: false
|
|
11663
|
+
}
|
|
11664
|
+
]
|
|
11665
|
+
},
|
|
11666
|
+
{
|
|
11667
|
+
type: "event",
|
|
11668
|
+
anonymous: false,
|
|
11669
|
+
name: "WormholeConfigurationUpdated",
|
|
11670
|
+
inputs: [
|
|
11671
|
+
{
|
|
11672
|
+
type: "tuple",
|
|
11673
|
+
name: "newWormholeConfiguration",
|
|
11674
|
+
indexed: false,
|
|
11675
|
+
components: [
|
|
11676
|
+
{
|
|
11677
|
+
type: "address",
|
|
11678
|
+
name: "wormhole"
|
|
11679
|
+
},
|
|
11680
|
+
{
|
|
11681
|
+
type: "address",
|
|
11682
|
+
name: "staker"
|
|
11683
|
+
},
|
|
11684
|
+
{
|
|
11685
|
+
type: "bytes4",
|
|
11686
|
+
name: "selector"
|
|
11687
|
+
}
|
|
11688
|
+
]
|
|
11689
|
+
}
|
|
11690
|
+
]
|
|
11691
|
+
},
|
|
11692
|
+
{
|
|
11693
|
+
type: "function",
|
|
11694
|
+
name: "UPGRADE_INTERFACE_VERSION",
|
|
11695
|
+
constant: true,
|
|
11696
|
+
stateMutability: "view",
|
|
11697
|
+
payable: false,
|
|
11698
|
+
inputs: [],
|
|
11699
|
+
outputs: [
|
|
11700
|
+
{
|
|
11701
|
+
type: "string"
|
|
11702
|
+
}
|
|
11703
|
+
]
|
|
11704
|
+
},
|
|
11705
|
+
{
|
|
11706
|
+
type: "function",
|
|
11707
|
+
name: "appeal",
|
|
11708
|
+
constant: false,
|
|
11709
|
+
payable: false,
|
|
11710
|
+
inputs: [
|
|
11711
|
+
{
|
|
11712
|
+
type: "uint256",
|
|
11713
|
+
name: "caseId"
|
|
11714
|
+
}
|
|
11715
|
+
],
|
|
11716
|
+
outputs: []
|
|
11717
|
+
},
|
|
11718
|
+
{
|
|
11719
|
+
type: "function",
|
|
11720
|
+
name: "canRiskControlClose",
|
|
11721
|
+
constant: true,
|
|
11722
|
+
stateMutability: "view",
|
|
11723
|
+
payable: false,
|
|
11724
|
+
inputs: [
|
|
11725
|
+
{
|
|
11726
|
+
type: "uint256",
|
|
11727
|
+
name: "caseId"
|
|
11728
|
+
}
|
|
11729
|
+
],
|
|
11730
|
+
outputs: [
|
|
11731
|
+
{
|
|
11732
|
+
type: "bool"
|
|
11733
|
+
}
|
|
11734
|
+
]
|
|
11735
|
+
},
|
|
11736
|
+
{
|
|
11737
|
+
type: "function",
|
|
11738
|
+
name: "cancelAppeal",
|
|
11739
|
+
constant: false,
|
|
11740
|
+
payable: false,
|
|
11741
|
+
inputs: [
|
|
11742
|
+
{
|
|
11743
|
+
type: "uint256",
|
|
11744
|
+
name: "caseId"
|
|
11745
|
+
},
|
|
11746
|
+
{
|
|
11747
|
+
type: "uint256",
|
|
11748
|
+
name: "appealCaseId"
|
|
11749
|
+
},
|
|
11750
|
+
{
|
|
11751
|
+
type: "bool",
|
|
11752
|
+
name: "isMalicious"
|
|
11753
|
+
}
|
|
11754
|
+
],
|
|
11755
|
+
outputs: []
|
|
11756
|
+
},
|
|
11757
|
+
{
|
|
11758
|
+
type: "function",
|
|
11759
|
+
name: "cancelDispute",
|
|
11760
|
+
constant: false,
|
|
11761
|
+
payable: false,
|
|
11762
|
+
inputs: [
|
|
11763
|
+
{
|
|
11764
|
+
type: "uint256",
|
|
11765
|
+
name: "caseId"
|
|
11766
|
+
},
|
|
11767
|
+
{
|
|
11768
|
+
type: "bool",
|
|
11769
|
+
name: "isMalicious"
|
|
11770
|
+
}
|
|
11771
|
+
],
|
|
11772
|
+
outputs: []
|
|
11773
|
+
},
|
|
11774
|
+
{
|
|
11775
|
+
type: "function",
|
|
11776
|
+
name: "caseIdSequencer",
|
|
11777
|
+
constant: true,
|
|
11778
|
+
stateMutability: "view",
|
|
11779
|
+
payable: false,
|
|
11780
|
+
inputs: [],
|
|
11781
|
+
outputs: [
|
|
11782
|
+
{
|
|
11783
|
+
type: "uint256"
|
|
11784
|
+
}
|
|
11785
|
+
]
|
|
11786
|
+
},
|
|
11787
|
+
{
|
|
11788
|
+
type: "function",
|
|
11789
|
+
name: "claimBond",
|
|
11790
|
+
constant: false,
|
|
11791
|
+
payable: false,
|
|
11792
|
+
inputs: [
|
|
11793
|
+
{
|
|
11794
|
+
type: "uint256",
|
|
11795
|
+
name: "caseId"
|
|
11796
|
+
}
|
|
11797
|
+
],
|
|
11798
|
+
outputs: []
|
|
11799
|
+
},
|
|
11800
|
+
{
|
|
11801
|
+
type: "function",
|
|
11802
|
+
name: "claimForfeitBonds",
|
|
11803
|
+
constant: false,
|
|
11804
|
+
payable: false,
|
|
11805
|
+
inputs: [
|
|
11806
|
+
{
|
|
11807
|
+
type: "address",
|
|
11808
|
+
name: "receiver"
|
|
11809
|
+
}
|
|
11810
|
+
],
|
|
11811
|
+
outputs: []
|
|
11812
|
+
},
|
|
11813
|
+
{
|
|
11814
|
+
type: "function",
|
|
11815
|
+
name: "fileDispute",
|
|
11816
|
+
constant: false,
|
|
11817
|
+
stateMutability: "payable",
|
|
11818
|
+
payable: true,
|
|
11819
|
+
inputs: [
|
|
11820
|
+
{
|
|
11821
|
+
type: "tuple[]",
|
|
11822
|
+
name: "prices",
|
|
11823
|
+
components: [
|
|
11824
|
+
{
|
|
11825
|
+
type: "bytes32",
|
|
11826
|
+
name: "poolId"
|
|
11827
|
+
},
|
|
11828
|
+
{
|
|
11829
|
+
type: "uint8",
|
|
11830
|
+
name: "oracleType"
|
|
11831
|
+
},
|
|
11832
|
+
{
|
|
11833
|
+
type: "uint256",
|
|
11834
|
+
name: "referencePrice"
|
|
11835
|
+
},
|
|
11836
|
+
{
|
|
11837
|
+
type: "bytes",
|
|
11838
|
+
name: "oracleUpdateData"
|
|
11839
|
+
},
|
|
11840
|
+
{
|
|
11841
|
+
type: "uint64",
|
|
11842
|
+
name: "publishTime"
|
|
11843
|
+
}
|
|
11844
|
+
]
|
|
11845
|
+
},
|
|
11846
|
+
{
|
|
11847
|
+
type: "bytes32",
|
|
11848
|
+
name: "poolId"
|
|
11849
|
+
},
|
|
11850
|
+
{
|
|
11851
|
+
type: "address",
|
|
11852
|
+
name: "poolToken"
|
|
11853
|
+
}
|
|
11854
|
+
],
|
|
11855
|
+
outputs: []
|
|
11856
|
+
},
|
|
11857
|
+
{
|
|
11858
|
+
type: "function",
|
|
11859
|
+
name: "getAddressManager",
|
|
11860
|
+
constant: true,
|
|
11861
|
+
stateMutability: "view",
|
|
11862
|
+
payable: false,
|
|
11863
|
+
inputs: [],
|
|
11864
|
+
outputs: [
|
|
11865
|
+
{
|
|
11866
|
+
type: "address"
|
|
11867
|
+
}
|
|
11868
|
+
]
|
|
11869
|
+
},
|
|
11870
|
+
{
|
|
11871
|
+
type: "function",
|
|
11872
|
+
name: "getDependencyAddress",
|
|
11873
|
+
constant: true,
|
|
11874
|
+
stateMutability: "view",
|
|
11875
|
+
payable: false,
|
|
11876
|
+
inputs: [
|
|
11877
|
+
{
|
|
11878
|
+
type: "bytes32",
|
|
11879
|
+
name: "identifier"
|
|
11880
|
+
}
|
|
11881
|
+
],
|
|
11882
|
+
outputs: [
|
|
11883
|
+
{
|
|
11884
|
+
type: "address"
|
|
11885
|
+
}
|
|
11886
|
+
]
|
|
11887
|
+
},
|
|
11888
|
+
{
|
|
11889
|
+
type: "function",
|
|
11890
|
+
name: "getDisputeConfiguration",
|
|
11891
|
+
constant: true,
|
|
11892
|
+
stateMutability: "view",
|
|
11893
|
+
payable: false,
|
|
11894
|
+
inputs: [],
|
|
11895
|
+
outputs: [
|
|
11896
|
+
{
|
|
11897
|
+
type: "tuple",
|
|
11898
|
+
components: [
|
|
11899
|
+
{
|
|
11900
|
+
type: "address",
|
|
11901
|
+
name: "appealToken"
|
|
11902
|
+
},
|
|
11903
|
+
{
|
|
11904
|
+
type: "uint64",
|
|
11905
|
+
name: "disputeBondUsd"
|
|
11906
|
+
},
|
|
11907
|
+
{
|
|
11908
|
+
type: "uint64",
|
|
11909
|
+
name: "appealBondUsd"
|
|
11910
|
+
},
|
|
11911
|
+
{
|
|
11912
|
+
type: "uint64",
|
|
11913
|
+
name: "disputeThresholdUsd"
|
|
11914
|
+
},
|
|
11915
|
+
{
|
|
11916
|
+
type: "uint64",
|
|
11917
|
+
name: "caseDuration"
|
|
11918
|
+
},
|
|
11919
|
+
{
|
|
11920
|
+
type: "uint64",
|
|
11921
|
+
name: "voteDuration"
|
|
11922
|
+
},
|
|
11923
|
+
{
|
|
11924
|
+
type: "uint64",
|
|
11925
|
+
name: "resolveDuration"
|
|
11926
|
+
},
|
|
11927
|
+
{
|
|
11928
|
+
type: "uint32",
|
|
11929
|
+
name: "voteCountRate"
|
|
11930
|
+
},
|
|
11931
|
+
{
|
|
11932
|
+
type: "uint32",
|
|
11933
|
+
name: "effectiveVoteRate"
|
|
11934
|
+
}
|
|
11935
|
+
]
|
|
11936
|
+
}
|
|
11937
|
+
]
|
|
11938
|
+
},
|
|
11939
|
+
{
|
|
11940
|
+
type: "function",
|
|
11941
|
+
name: "getImplementation",
|
|
11942
|
+
constant: true,
|
|
11943
|
+
stateMutability: "view",
|
|
11944
|
+
payable: false,
|
|
11945
|
+
inputs: [],
|
|
11946
|
+
outputs: [
|
|
11947
|
+
{
|
|
11948
|
+
type: "address"
|
|
11949
|
+
}
|
|
11950
|
+
]
|
|
11951
|
+
},
|
|
11952
|
+
{
|
|
11953
|
+
type: "function",
|
|
11954
|
+
name: "initialize",
|
|
11955
|
+
constant: false,
|
|
11956
|
+
payable: false,
|
|
11957
|
+
inputs: [
|
|
11958
|
+
{
|
|
11959
|
+
type: "address",
|
|
11960
|
+
name: "addressManager"
|
|
11961
|
+
}
|
|
11962
|
+
],
|
|
11963
|
+
outputs: []
|
|
11964
|
+
},
|
|
11965
|
+
{
|
|
11966
|
+
type: "function",
|
|
11967
|
+
name: "isCaseRespondents",
|
|
11968
|
+
constant: true,
|
|
11969
|
+
stateMutability: "view",
|
|
11970
|
+
payable: false,
|
|
11971
|
+
inputs: [
|
|
11972
|
+
{
|
|
11973
|
+
type: "uint256",
|
|
11974
|
+
name: "caseId"
|
|
11975
|
+
},
|
|
11976
|
+
{
|
|
11977
|
+
type: "address",
|
|
11978
|
+
name: "account"
|
|
11979
|
+
}
|
|
11980
|
+
],
|
|
11981
|
+
outputs: [
|
|
11982
|
+
{
|
|
11983
|
+
type: "bool"
|
|
11984
|
+
}
|
|
11985
|
+
]
|
|
11986
|
+
},
|
|
11987
|
+
{
|
|
11988
|
+
type: "function",
|
|
11989
|
+
name: "nonces",
|
|
11990
|
+
constant: true,
|
|
11991
|
+
stateMutability: "view",
|
|
11992
|
+
payable: false,
|
|
11993
|
+
inputs: [
|
|
11994
|
+
{
|
|
11995
|
+
type: "address",
|
|
11996
|
+
name: "owner"
|
|
11997
|
+
}
|
|
11998
|
+
],
|
|
11999
|
+
outputs: [
|
|
12000
|
+
{
|
|
12001
|
+
type: "uint256"
|
|
12002
|
+
}
|
|
12003
|
+
]
|
|
12004
|
+
},
|
|
12005
|
+
{
|
|
12006
|
+
type: "function",
|
|
12007
|
+
name: "openVoting",
|
|
12008
|
+
constant: false,
|
|
12009
|
+
payable: false,
|
|
12010
|
+
inputs: [
|
|
12011
|
+
{
|
|
12012
|
+
type: "uint256",
|
|
12013
|
+
name: "caseId"
|
|
12014
|
+
},
|
|
12015
|
+
{
|
|
12016
|
+
type: "uint256",
|
|
12017
|
+
name: "evidenceId"
|
|
12018
|
+
},
|
|
12019
|
+
{
|
|
12020
|
+
type: "address[]",
|
|
12021
|
+
name: "respondents"
|
|
12022
|
+
}
|
|
12023
|
+
],
|
|
12024
|
+
outputs: []
|
|
12025
|
+
},
|
|
12026
|
+
{
|
|
12027
|
+
type: "function",
|
|
12028
|
+
name: "processReimbursement",
|
|
12029
|
+
constant: false,
|
|
12030
|
+
payable: false,
|
|
12031
|
+
inputs: [
|
|
12032
|
+
{
|
|
12033
|
+
type: "uint256",
|
|
12034
|
+
name: "caseId"
|
|
12035
|
+
},
|
|
12036
|
+
{
|
|
12037
|
+
type: "tuple",
|
|
12038
|
+
name: "reimbursementInfo",
|
|
12039
|
+
components: [
|
|
12040
|
+
{
|
|
12041
|
+
type: "bytes32",
|
|
12042
|
+
name: "merkleRoot"
|
|
12043
|
+
},
|
|
12044
|
+
{
|
|
12045
|
+
type: "address",
|
|
12046
|
+
name: "baseToken"
|
|
12047
|
+
},
|
|
12048
|
+
{
|
|
12049
|
+
type: "address",
|
|
12050
|
+
name: "quoteToken"
|
|
12051
|
+
},
|
|
12052
|
+
{
|
|
12053
|
+
type: "uint256",
|
|
12054
|
+
name: "totalBaseAmount"
|
|
12055
|
+
},
|
|
12056
|
+
{
|
|
12057
|
+
type: "uint256",
|
|
12058
|
+
name: "totalQuoteAmount"
|
|
12059
|
+
},
|
|
12060
|
+
{
|
|
12061
|
+
type: "uint256",
|
|
12062
|
+
name: "claimedBaseAmount"
|
|
12063
|
+
},
|
|
12064
|
+
{
|
|
12065
|
+
type: "uint256",
|
|
12066
|
+
name: "claimedQuoteAmount"
|
|
12067
|
+
},
|
|
12068
|
+
{
|
|
12069
|
+
type: "uint256",
|
|
12070
|
+
name: "expireTime"
|
|
12071
|
+
}
|
|
12072
|
+
]
|
|
12073
|
+
},
|
|
12074
|
+
{
|
|
12075
|
+
type: "bytes32[]",
|
|
12076
|
+
name: "zeroMerkleProof"
|
|
12077
|
+
}
|
|
12078
|
+
],
|
|
12079
|
+
outputs: []
|
|
12080
|
+
},
|
|
12081
|
+
{
|
|
12082
|
+
type: "function",
|
|
12083
|
+
name: "proxiableUUID",
|
|
12084
|
+
constant: true,
|
|
12085
|
+
stateMutability: "view",
|
|
12086
|
+
payable: false,
|
|
12087
|
+
inputs: [],
|
|
12088
|
+
outputs: [
|
|
12089
|
+
{
|
|
12090
|
+
type: "bytes32"
|
|
12091
|
+
}
|
|
12092
|
+
]
|
|
12093
|
+
},
|
|
12094
|
+
{
|
|
12095
|
+
type: "function",
|
|
12096
|
+
name: "resolveCaseAppeals",
|
|
12097
|
+
constant: false,
|
|
12098
|
+
payable: false,
|
|
12099
|
+
inputs: [
|
|
12100
|
+
{
|
|
12101
|
+
type: "uint256",
|
|
12102
|
+
name: "caseId"
|
|
12103
|
+
},
|
|
12104
|
+
{
|
|
12105
|
+
type: "bytes",
|
|
12106
|
+
name: "response"
|
|
12107
|
+
},
|
|
12108
|
+
{
|
|
12109
|
+
type: "tuple[]",
|
|
12110
|
+
name: "guardianSignatures",
|
|
12111
|
+
components: [
|
|
12112
|
+
{
|
|
12113
|
+
type: "bytes32",
|
|
12114
|
+
name: "r"
|
|
12115
|
+
},
|
|
12116
|
+
{
|
|
12117
|
+
type: "bytes32",
|
|
12118
|
+
name: "s"
|
|
12119
|
+
},
|
|
12120
|
+
{
|
|
12121
|
+
type: "uint8",
|
|
12122
|
+
name: "v"
|
|
12123
|
+
},
|
|
12124
|
+
{
|
|
12125
|
+
type: "uint8",
|
|
12126
|
+
name: "guardianIndex"
|
|
12127
|
+
}
|
|
12128
|
+
]
|
|
12129
|
+
}
|
|
12130
|
+
],
|
|
12131
|
+
outputs: []
|
|
12132
|
+
},
|
|
12133
|
+
{
|
|
12134
|
+
type: "function",
|
|
12135
|
+
name: "resolveDispute",
|
|
12136
|
+
constant: false,
|
|
12137
|
+
payable: false,
|
|
12138
|
+
inputs: [
|
|
12139
|
+
{
|
|
12140
|
+
type: "uint256",
|
|
12141
|
+
name: "caseId"
|
|
12142
|
+
},
|
|
12143
|
+
{
|
|
12144
|
+
type: "bytes",
|
|
12145
|
+
name: "response"
|
|
12146
|
+
},
|
|
12147
|
+
{
|
|
12148
|
+
type: "tuple[]",
|
|
12149
|
+
name: "guardianSignatures",
|
|
12150
|
+
components: [
|
|
12151
|
+
{
|
|
12152
|
+
type: "bytes32",
|
|
12153
|
+
name: "r"
|
|
12154
|
+
},
|
|
12155
|
+
{
|
|
12156
|
+
type: "bytes32",
|
|
12157
|
+
name: "s"
|
|
12158
|
+
},
|
|
12159
|
+
{
|
|
12160
|
+
type: "uint8",
|
|
12161
|
+
name: "v"
|
|
12162
|
+
},
|
|
12163
|
+
{
|
|
12164
|
+
type: "uint8",
|
|
12165
|
+
name: "guardianIndex"
|
|
12166
|
+
}
|
|
12167
|
+
]
|
|
12168
|
+
}
|
|
12169
|
+
],
|
|
12170
|
+
outputs: []
|
|
12171
|
+
},
|
|
12172
|
+
{
|
|
12173
|
+
type: "function",
|
|
12174
|
+
name: "updateDisputeConfiguration",
|
|
12175
|
+
constant: false,
|
|
12176
|
+
payable: false,
|
|
12177
|
+
inputs: [
|
|
12178
|
+
{
|
|
12179
|
+
type: "tuple",
|
|
12180
|
+
name: "disputeConfiguration",
|
|
12181
|
+
components: [
|
|
12182
|
+
{
|
|
12183
|
+
type: "address",
|
|
12184
|
+
name: "appealToken"
|
|
12185
|
+
},
|
|
12186
|
+
{
|
|
12187
|
+
type: "uint64",
|
|
12188
|
+
name: "disputeBondUsd"
|
|
12189
|
+
},
|
|
12190
|
+
{
|
|
12191
|
+
type: "uint64",
|
|
12192
|
+
name: "appealBondUsd"
|
|
12193
|
+
},
|
|
12194
|
+
{
|
|
12195
|
+
type: "uint64",
|
|
12196
|
+
name: "disputeThresholdUsd"
|
|
12197
|
+
},
|
|
12198
|
+
{
|
|
12199
|
+
type: "uint64",
|
|
12200
|
+
name: "caseDuration"
|
|
12201
|
+
},
|
|
12202
|
+
{
|
|
12203
|
+
type: "uint64",
|
|
12204
|
+
name: "voteDuration"
|
|
12205
|
+
},
|
|
12206
|
+
{
|
|
12207
|
+
type: "uint64",
|
|
12208
|
+
name: "resolveDuration"
|
|
12209
|
+
},
|
|
12210
|
+
{
|
|
12211
|
+
type: "uint32",
|
|
12212
|
+
name: "voteCountRate"
|
|
12213
|
+
},
|
|
12214
|
+
{
|
|
12215
|
+
type: "uint32",
|
|
12216
|
+
name: "effectiveVoteRate"
|
|
12217
|
+
}
|
|
12218
|
+
]
|
|
12219
|
+
}
|
|
12220
|
+
],
|
|
12221
|
+
outputs: []
|
|
12222
|
+
},
|
|
12223
|
+
{
|
|
12224
|
+
type: "function",
|
|
12225
|
+
name: "updateWormholeConfiguration",
|
|
12226
|
+
constant: false,
|
|
12227
|
+
payable: false,
|
|
12228
|
+
inputs: [
|
|
12229
|
+
{
|
|
12230
|
+
type: "tuple",
|
|
12231
|
+
name: "wormholeConfiguration",
|
|
12232
|
+
components: [
|
|
12233
|
+
{
|
|
12234
|
+
type: "address",
|
|
12235
|
+
name: "wormhole"
|
|
12236
|
+
},
|
|
12237
|
+
{
|
|
12238
|
+
type: "address",
|
|
12239
|
+
name: "staker"
|
|
12240
|
+
},
|
|
12241
|
+
{
|
|
12242
|
+
type: "bytes4",
|
|
12243
|
+
name: "selector"
|
|
12244
|
+
}
|
|
12245
|
+
]
|
|
12246
|
+
}
|
|
12247
|
+
],
|
|
12248
|
+
outputs: []
|
|
12249
|
+
},
|
|
12250
|
+
{
|
|
12251
|
+
type: "function",
|
|
12252
|
+
name: "upgradeTo",
|
|
12253
|
+
constant: false,
|
|
12254
|
+
stateMutability: "payable",
|
|
12255
|
+
payable: true,
|
|
12256
|
+
inputs: [
|
|
12257
|
+
{
|
|
12258
|
+
type: "address",
|
|
12259
|
+
name: "newImplementation"
|
|
12260
|
+
},
|
|
12261
|
+
{
|
|
12262
|
+
type: "bytes",
|
|
12263
|
+
name: "data"
|
|
12264
|
+
}
|
|
12265
|
+
],
|
|
12266
|
+
outputs: []
|
|
12267
|
+
},
|
|
12268
|
+
{
|
|
12269
|
+
type: "function",
|
|
12270
|
+
name: "upgradeToAndCall",
|
|
12271
|
+
constant: false,
|
|
12272
|
+
stateMutability: "payable",
|
|
12273
|
+
payable: true,
|
|
12274
|
+
inputs: [
|
|
12275
|
+
{
|
|
12276
|
+
type: "address",
|
|
12277
|
+
name: "newImplementation"
|
|
12278
|
+
},
|
|
12279
|
+
{
|
|
12280
|
+
type: "bytes",
|
|
12281
|
+
name: "data"
|
|
12282
|
+
}
|
|
12283
|
+
],
|
|
12284
|
+
outputs: []
|
|
12285
|
+
},
|
|
12286
|
+
{
|
|
12287
|
+
type: "function",
|
|
12288
|
+
name: "vote",
|
|
12289
|
+
constant: false,
|
|
12290
|
+
payable: false,
|
|
12291
|
+
inputs: [
|
|
12292
|
+
{
|
|
12293
|
+
type: "uint256",
|
|
12294
|
+
name: "caseId"
|
|
12295
|
+
},
|
|
12296
|
+
{
|
|
12297
|
+
type: "address",
|
|
12298
|
+
name: "validator"
|
|
12299
|
+
},
|
|
12300
|
+
{
|
|
12301
|
+
type: "uint8",
|
|
12302
|
+
name: "voteOption"
|
|
12303
|
+
},
|
|
12304
|
+
{
|
|
12305
|
+
type: "uint256",
|
|
12306
|
+
name: "deadline"
|
|
12307
|
+
},
|
|
12308
|
+
{
|
|
12309
|
+
type: "uint8",
|
|
12310
|
+
name: "v"
|
|
12311
|
+
},
|
|
12312
|
+
{
|
|
12313
|
+
type: "bytes32",
|
|
12314
|
+
name: "r"
|
|
12315
|
+
},
|
|
12316
|
+
{
|
|
12317
|
+
type: "bytes32",
|
|
12318
|
+
name: "s"
|
|
12319
|
+
}
|
|
12320
|
+
],
|
|
12321
|
+
outputs: []
|
|
12322
|
+
}
|
|
12323
|
+
];
|
|
12324
|
+
|
|
12325
|
+
// src/web3/providers.ts
|
|
12326
|
+
var getTokenContract = async (chainId, tokenAddress) => {
|
|
12327
|
+
const provider = getJSONProvider(chainId);
|
|
12328
|
+
return getContract(
|
|
12329
|
+
tokenAddress,
|
|
12330
|
+
IERC20Metadata_default,
|
|
12331
|
+
provider
|
|
12332
|
+
);
|
|
12333
|
+
};
|
|
12334
|
+
var getERC20Contract = async (chainId, tokenAddress) => {
|
|
12335
|
+
const provider = await getSignerProvider(chainId);
|
|
12336
|
+
return getContract(
|
|
12337
|
+
tokenAddress,
|
|
12338
|
+
IERC20Metadata_default,
|
|
12339
|
+
provider
|
|
12340
|
+
);
|
|
12341
|
+
};
|
|
12342
|
+
var getAccount = async (chainId) => {
|
|
12343
|
+
const provider = await getSignerProvider(chainId);
|
|
12344
|
+
const account = await provider?.getAddress();
|
|
12345
|
+
return account ?? void 0;
|
|
12346
|
+
};
|
|
12347
|
+
var getLiquidityRouterContract = async (chainId) => {
|
|
12348
|
+
const addresses = address_default[chainId];
|
|
12349
|
+
const address = addresses.LIQUIDITY_ROUTER;
|
|
12350
|
+
const provider = await getSignerProvider(chainId);
|
|
12351
|
+
return getContract(
|
|
12352
|
+
address,
|
|
12353
|
+
LiquidityRouter_default,
|
|
12354
|
+
provider
|
|
12355
|
+
);
|
|
12356
|
+
};
|
|
12357
|
+
var getPoolManagerContract = async (chainId, type = 1 /* Signer */) => {
|
|
12358
|
+
const addresses = address_default[chainId];
|
|
12359
|
+
const address = addresses.POOL_MANAGER;
|
|
12360
|
+
const provider = type === 0 /* JSON */ ? getJSONProvider(chainId) : await getSignerProvider(chainId);
|
|
12361
|
+
return getContract(
|
|
12362
|
+
address,
|
|
12363
|
+
PoolManager_default,
|
|
12364
|
+
provider
|
|
12365
|
+
);
|
|
12366
|
+
};
|
|
12367
|
+
var getQuotePoolContract = async (chainId, type = 0 /* JSON */) => {
|
|
12368
|
+
const addresses = address_default[chainId];
|
|
12369
|
+
const address = addresses.QUOTE_POOL;
|
|
12370
|
+
const provider = type === 0 /* JSON */ ? getJSONProvider(chainId) : await getSignerProvider(chainId);
|
|
12371
|
+
return getContract(address, QuotePool_default, provider);
|
|
12372
|
+
};
|
|
12373
|
+
var getBasePoolContract = async (chainId, type = 0 /* JSON */) => {
|
|
12374
|
+
const addresses = address_default[chainId];
|
|
12375
|
+
const address = addresses.BASE_POOL;
|
|
12376
|
+
const provider = type === 0 /* JSON */ ? getJSONProvider(chainId) : await getSignerProvider(chainId);
|
|
12377
|
+
return getContract(address, BasePool_default, provider);
|
|
12378
|
+
};
|
|
12379
|
+
var getBrokerSingerContract = async (chainId, brokerAddress) => {
|
|
12380
|
+
const address = brokerAddress;
|
|
12381
|
+
const provider = await getSignerProvider(chainId);
|
|
12382
|
+
return getContract(address, Broker_default, provider);
|
|
12383
|
+
};
|
|
12384
|
+
var getSeamlessBrokerContract = async (brokerAddress, singer) => {
|
|
12385
|
+
return getContract(brokerAddress, Broker_default, singer);
|
|
12386
|
+
};
|
|
12387
|
+
var getBrokerContract = async (chainId, brokerAddress) => {
|
|
12388
|
+
const address = brokerAddress;
|
|
12389
|
+
const provider = getJSONProvider(chainId);
|
|
12390
|
+
return getContract(address, Broker_default, provider);
|
|
12391
|
+
};
|
|
12392
|
+
var getPoolTokenContract = async (chainId, lpTokenAddress, type = 0 /* JSON */) => {
|
|
12393
|
+
const address = lpTokenAddress;
|
|
12394
|
+
const provider = type === 0 /* JSON */ ? getJSONProvider(chainId) : await getSignerProvider(chainId);
|
|
12395
|
+
return getContract(address, PoolToken_default, provider);
|
|
12396
|
+
};
|
|
12397
|
+
var getMarketManageContract = async (chainId, type = 0 /* JSON */) => {
|
|
12398
|
+
const addresses = address_default[chainId];
|
|
12399
|
+
const address = addresses.MARKET_MANAGER;
|
|
12400
|
+
console.log(addresses.MARKET_MANAGER);
|
|
12401
|
+
const provider = type === 0 /* JSON */ ? getJSONProvider(chainId) : await getSignerProvider(chainId);
|
|
12402
|
+
return getContract(
|
|
12403
|
+
address,
|
|
12404
|
+
MarketManager_default,
|
|
12405
|
+
provider
|
|
12406
|
+
);
|
|
12407
|
+
};
|
|
12408
|
+
var getDataProviderContract = async (chainId, type = 0 /* JSON */) => {
|
|
12409
|
+
const addresses = address_default[chainId];
|
|
12410
|
+
const address = addresses.DATA_PROVIDER;
|
|
12411
|
+
const provider = type === 0 /* JSON */ ? getJSONProvider(chainId) : await getSignerProvider(chainId);
|
|
12412
|
+
return getContract(
|
|
12413
|
+
address,
|
|
12414
|
+
DataProvider_default,
|
|
12415
|
+
provider
|
|
12416
|
+
);
|
|
12417
|
+
};
|
|
12418
|
+
var getForwarderContract = async (chainId, type = 0 /* JSON */) => {
|
|
12419
|
+
const addresses = address_default[chainId];
|
|
12420
|
+
const address = addresses.FORWARDER;
|
|
12421
|
+
const provider = type === 0 /* JSON */ ? getJSONProvider(chainId) : await getSignerProvider(chainId);
|
|
12422
|
+
return getContract(address, Forwarder_default, provider);
|
|
12423
|
+
};
|
|
12424
|
+
var getReimbursementContract = async (chainId, type = 0 /* JSON */) => {
|
|
12425
|
+
const addresses = address_default[chainId];
|
|
12426
|
+
const address = addresses.REIMBURSEMENT;
|
|
12427
|
+
const provider = type === 0 /* JSON */ ? getJSONProvider(chainId) : await getSignerProvider(chainId);
|
|
12428
|
+
return getContract(
|
|
12429
|
+
address,
|
|
12430
|
+
Reimbursement_default,
|
|
12431
|
+
provider
|
|
12432
|
+
);
|
|
12433
|
+
};
|
|
12434
|
+
var getDisputeCourtContract = async (chainId, type = 0 /* JSON */) => {
|
|
12435
|
+
const addresses = address_default[chainId];
|
|
12436
|
+
const address = addresses.DISPUTE_COURT;
|
|
12437
|
+
const provider = type === 0 /* JSON */ ? getJSONProvider(chainId) : await getSignerProvider(chainId);
|
|
12438
|
+
return getContract(
|
|
12439
|
+
address,
|
|
12440
|
+
DisputeCourt_default,
|
|
12441
|
+
provider
|
|
12442
|
+
);
|
|
12443
|
+
};
|
|
12444
|
+
|
|
12445
|
+
// src/config/error.ts
|
|
12446
|
+
var import_ethers_decode_error = require("ethers-decode-error");
|
|
12447
|
+
|
|
12448
|
+
// src/config/customErrorMap.ts
|
|
12449
|
+
var customErrorMapping = {
|
|
12450
|
+
"0xfa52dfc0": "AccountInsufficientFreeAmount()",
|
|
12451
|
+
"0xffd10028": "AccountInsufficientTradableAmount(uint256,uint256)",
|
|
12452
|
+
"0x9996b315": "AddressEmptyCode(address)",
|
|
12453
|
+
"0x4c9c8ce3": "ERC1967InvalidImplementation(address)",
|
|
12454
|
+
"0xb398979f": "ERC1967NonPayable()",
|
|
12455
|
+
"0xd6bda275": "FailedCall()",
|
|
12456
|
+
"0xf92ee8a9": "InvalidInitialization()",
|
|
12457
|
+
"0x44d3438f": "NotAddressManager()",
|
|
12458
|
+
"0x3fc81f20": "NotDependencyManager()",
|
|
12459
|
+
"0xd7e6bcf8": "NotInitializing()",
|
|
12460
|
+
"0x507f487a": "NotProxyAdmin()",
|
|
12461
|
+
"0xe03f6024": "PermissionDenied(address,address)",
|
|
12462
|
+
"0x5274afe7": "SafeERC20FailedOperation(address)",
|
|
12463
|
+
"0xe07c8dba": "UUPSUnauthorizedCallContext()",
|
|
12464
|
+
"0xaa1d49a4": "UUPSUnsupportedProxiableUUID(bytes32)",
|
|
12465
|
+
"0x24775e06": "SafeCastOverflowedUintToInt(uint256)",
|
|
12466
|
+
"0xba767932": "ConvertAmountMismatch(uint256,uint256)",
|
|
12467
|
+
"0xd93c0665": "EnforcedPause()",
|
|
12468
|
+
"0x8dfc202b": "ExpectedPause()",
|
|
12469
|
+
"0x059e2f49": "InRewindMode()",
|
|
12470
|
+
"0x42301c23": "InsufficientOutputAmount()",
|
|
12471
|
+
"0x8637dfc0": "NotInRewindMode()",
|
|
12472
|
+
"0x4578ddb8": "OnlyRelayer()",
|
|
12473
|
+
"0x1e4fbdf7": "OwnableInvalidOwner(address)",
|
|
12474
|
+
"0x118cdaa7": "OwnableUnauthorizedAccount(address)",
|
|
12475
|
+
"0x3ee5aeb5": "ReentrancyGuardReentrantCall()",
|
|
12476
|
+
"0x90b8ec18": "TransferFailed()",
|
|
12477
|
+
"0xc6e8248a": "InsufficientSize()",
|
|
12478
|
+
"0x700deaad": "InvalidADLPosition(OrderId,PositionId)",
|
|
12479
|
+
"0x3385aa1f": "ExceedOrderSize(uint256)",
|
|
12480
|
+
"0xc6c2b87b": "ExecutionFeeNotSupport(address)",
|
|
12481
|
+
"0xb07e3bc4": "InsufficientCollateral(uint256,uint256)",
|
|
12482
|
+
"0x613970e0": "InvalidParameter()",
|
|
12483
|
+
"0x27d08510": "NotActiveBroker(address)",
|
|
12484
|
+
"0xf6412b5a": "NotOrderOwner()",
|
|
12485
|
+
"0x70d645e3": "NotPositionOwner()",
|
|
12486
|
+
"0xe75316c6": "OrderNotExist(OrderId)",
|
|
12487
|
+
"0xba01b06f": "PoolNotActive(PoolId)",
|
|
12488
|
+
"0xddefae28": "AlreadyMinted()",
|
|
12489
|
+
"0x64283d7b": "ERC721IncorrectOwner(address,uint256,address)",
|
|
12490
|
+
"0x177e802f": "ERC721InsufficientApproval(address,uint256)",
|
|
12491
|
+
"0xa9fbf51f": "ERC721InvalidApprover(address)",
|
|
12492
|
+
"0x5b08ba18": "ERC721InvalidOperator(address)",
|
|
12493
|
+
"0x89c62b64": "ERC721InvalidOwner(address)",
|
|
12494
|
+
"0x64a0ae92": "ERC721InvalidReceiver(address)",
|
|
12495
|
+
"0x73c6ac6e": "ERC721InvalidSender(address)",
|
|
12496
|
+
"0x7e273289": "ERC721NonexistentToken(uint256)",
|
|
12497
|
+
"0xb4762117": "ExceedMaxLeverage(PositionId)",
|
|
12498
|
+
"0x29143a42": "ExceedPositionSize()",
|
|
12499
|
+
"0x8ea9158f": "InvalidPosition(PositionId)",
|
|
12500
|
+
"0xa5afd143": "PositionNotHealthy(PositionId,uint256)",
|
|
12501
|
+
"0xba0d3752": "PositionNotInitialized(PositionId)",
|
|
12502
|
+
"0xc20f35b7": "UnderflowOI()",
|
|
12503
|
+
"0xf4d678b8": "InsufficientBalance()",
|
|
12504
|
+
"0x6aee3c1a": "InsufficientRiskReserves()",
|
|
12505
|
+
"0x82cb17ef": "InvalidSplitConfig()",
|
|
12506
|
+
"0x4b3c8f33": "ExceedMaxBaseProfit()",
|
|
12507
|
+
"0xdc82bd68": "ExceedMinOutputAmount()",
|
|
12508
|
+
"0x9ac13039": "InsufficientPoolProfit()",
|
|
12509
|
+
"0x14be833f": "InsufficientReturnAmount(uint256,uint256)",
|
|
12510
|
+
"0x4ec4fd74": "PoolFundingFeeNotPositive(int256,uint256,Direction)",
|
|
12511
|
+
"0xba8f5df5": "PoolNotCompoundable(PoolId)",
|
|
12512
|
+
"0xd34e366f": "ExceedBaseCollateral(uint256,uint256)",
|
|
12513
|
+
"0xc7544914": "ExceedDebt(uint256,uint256)",
|
|
12514
|
+
"0xe7aa687a": "ExceedExchangeable()",
|
|
12515
|
+
"0xdb42144d": "InsufficientBalance(address,uint256,uint256)",
|
|
12516
|
+
"0x5646203f": "InsufficientCollateral(PositionId,uint256)",
|
|
12517
|
+
"0xf645eedf": "ECDSAInvalidSignature()",
|
|
12518
|
+
"0xfce698f7": "ECDSAInvalidSignatureLength(uint256)",
|
|
12519
|
+
"0xd78bce0c": "ECDSAInvalidSignatureS(bytes32)",
|
|
12520
|
+
"0x48834bee": "ExpiredFeeData()",
|
|
12521
|
+
"0x56d69198": "InvalidFeeRate()",
|
|
12522
|
+
"0x80577032": "NoRebateToClaim()",
|
|
12523
|
+
"0x6e6b79b0": "NotBrokerSigner(address)",
|
|
12524
|
+
"0xff70343d": "UnsupportedAssetClass(AssetClass)",
|
|
12525
|
+
"0x185676be": "UnsupportedFeeTier(uint8)",
|
|
12526
|
+
"0x60b25fe4": "BrokerAlreadyExists()",
|
|
12527
|
+
"0x7eb4a674": "BrokerNotFound()",
|
|
12528
|
+
"0x8c3b5bf0": "NotBrokerAdmin()",
|
|
12529
|
+
"0x3733548a": "InvalidFeeTier()",
|
|
12530
|
+
"0x192105d7": "InitializationFunctionReverted(address,bytes)",
|
|
12531
|
+
"0xa37bfec9": "ExpOverflow()",
|
|
12532
|
+
"0xf64fa6a8": "InvalidOrder(OrderId)",
|
|
12533
|
+
"0xd4944235": "NoADLNeeded(OrderId)",
|
|
12534
|
+
"0xe079169e": "NotReachedPrice(OrderId,uint256,uint256,TriggerType)",
|
|
12535
|
+
"0xc60eb335": "OnlyKeeper()",
|
|
12536
|
+
"0xa8ce4432": "SafeCastOverflowedIntToUint(int256)",
|
|
12537
|
+
"0x17229ec4": "NotMeetEarlyCloseCriteria(PositionId)",
|
|
12538
|
+
"0x0dc149f0": "AlreadyInitialized()",
|
|
12539
|
+
"0x7a5c919f": "InvalidRewindPrice()",
|
|
12540
|
+
"0xc53f84e7": "PositionRemainsHealthy(PositionId)",
|
|
12541
|
+
"0x230e8e43": "PoolNotInPreBenchState(PoolId)",
|
|
12542
|
+
"0x664431a8": "NotAllowedTarget(address)",
|
|
12543
|
+
"0x03357c6c": "ExceedsMaximumRelayFee()",
|
|
12544
|
+
"0x0d10f63b": "InconsistentParamsLength()",
|
|
12545
|
+
"0x38802743": "InsufficientFeeAllowance(address,uint256,uint256)",
|
|
12546
|
+
"0xd95b4ad5": "InsufficientFeeBalance(address,uint256,uint256)",
|
|
12547
|
+
"0xa3972305": "MismatchedSender(address)",
|
|
12548
|
+
"0xc3b80e86": "RelayerRegistered(address)",
|
|
12549
|
+
"0xee0844a3": "RemoveRelayerFailed()",
|
|
12550
|
+
"0xc583a8da": "IncorrectFee(uint256)",
|
|
12551
|
+
"0x00bfc921": "InvalidPrice()",
|
|
12552
|
+
"0x148cd0dd": "VerifyPriceFailed()",
|
|
12553
|
+
"0xb12d13eb": "ETHTransferFailed()",
|
|
12554
|
+
"0xa83325d4": "PoolOracleFeeCharged()",
|
|
12555
|
+
"0x6b75f90d": "PoolOracleFeeNotCharged()",
|
|
12556
|
+
"0x42a0e2a7": "PoolOracleFeeNotExisted()",
|
|
12557
|
+
"0x5e0a829b": "ETHTransferFailed(address,uint256)",
|
|
12558
|
+
"0x4ba6536f": "GasLimitExceeded(address,uint256,uint256)",
|
|
12559
|
+
"0xca1aae4b": "GasLimitNotSet(address)",
|
|
12560
|
+
"0x3728b83d": "InvalidAmount(uint256)",
|
|
12561
|
+
"0x3484727e": "BaseFeeNotSoldOut()",
|
|
12562
|
+
"0x0251bde4": "LPNotFullyMinted()",
|
|
12563
|
+
"0x1acb203e": "PositionNotEmpty()",
|
|
12564
|
+
"0x2be7b24b": "UnexpectedPoolState()",
|
|
12565
|
+
"0x7bd42a2e": "NotEmptyAddress()",
|
|
12566
|
+
"0x6697b232": "AccessControlBadConfirmation()",
|
|
12567
|
+
"0xe2517d3f": "AccessControlUnauthorizedAccount(address,bytes32)",
|
|
12568
|
+
"0x7c9a1cf9": "AlreadyVoted()",
|
|
12569
|
+
"0x796ea3a6": "BondNotReleased()",
|
|
12570
|
+
"0xf38e5973": "CaseAppealNotFinished()",
|
|
12571
|
+
"0x63d39157": "CaseCanNotAppeal()",
|
|
12572
|
+
"0x1eaa4a59": "CaseDeadlineNotReached()",
|
|
12573
|
+
"0xe6c67e3a": "CaseDeadlineReached()",
|
|
12574
|
+
"0x0fc957b1": "CaseNotAccepted()",
|
|
12575
|
+
"0x3ddb819d": "CaseNotExist(CaseId)",
|
|
12576
|
+
"0x218ad435": "CaseNotInVoting()",
|
|
12577
|
+
"0x79eab18d": "CaseRespondentAppealed(CaseId,address)",
|
|
12578
|
+
"0x311c16d3": "DisputeNotAllowed()",
|
|
12579
|
+
"0xdcdedda9": "InvalidPoolToken()",
|
|
12580
|
+
"0xc546bca4": "NotCaseRespondent(CaseId,address)",
|
|
12581
|
+
"0x784fd7f1": "OnlyActiveValidator()",
|
|
12582
|
+
"0xc00ca938": "UnexpectedCaseState()",
|
|
12583
|
+
"0xa9214540": "AlreadyClaimed(CaseId,address)",
|
|
12584
|
+
"0xd4ac59c1": "InvalidAmount(CaseId,address)",
|
|
12585
|
+
"0x7a6f5328": "MerkleTreeVerificationFailed(CaseId,address)",
|
|
12586
|
+
"0x094a5cfe": "ReimbursementValidity(CaseId)",
|
|
12587
|
+
"0xb04111ef": "InsufficientFreeCollateral(PositionId,uint256)",
|
|
12588
|
+
"0x12f1b11a": "InsufficientLockedCollateral(PositionId,uint256)",
|
|
12589
|
+
"0x6dfcc650": "SafeCastOverflowedUintDowncast(uint8,uint256)",
|
|
12590
|
+
"0x1c151780": "ExceedMinOutput(uint256,uint256)",
|
|
12591
|
+
"0xe1f0493d": "NotAllowedCaller(address)",
|
|
12592
|
+
"0xfb8f41b2": "ERC20InsufficientAllowance(address,uint256,uint256)",
|
|
12593
|
+
"0xe450d38c": "ERC20InsufficientBalance(address,uint256,uint256)",
|
|
12594
|
+
"0xe602df05": "ERC20InvalidApprover(address)",
|
|
12595
|
+
"0xec442f05": "ERC20InvalidReceiver(address)",
|
|
12596
|
+
"0x96c6fd1e": "ERC20InvalidSender(address)",
|
|
12597
|
+
"0x94280d62": "ERC20InvalidSpender(address)",
|
|
12598
|
+
"0x62791302": "ERC2612ExpiredSignature(uint256)",
|
|
12599
|
+
"0x4b800e46": "ERC2612InvalidSigner(address,address)",
|
|
12600
|
+
"0x752d88c0": "InvalidAccountNonce(address,uint256)",
|
|
12601
|
+
"0xb3512b0c": "InvalidShortString()",
|
|
12602
|
+
"0x305a27a9": "StringTooLong(string)",
|
|
12603
|
+
"0xfd0f789d": "ExceedMaxPriceDeviation()",
|
|
12604
|
+
"0x18b88897": "InvalidUpdateFee()",
|
|
12605
|
+
"0x19abf40e": "StalePrice()",
|
|
12606
|
+
"0xe351cd13": "ExceedMaxExchangeableAmount()",
|
|
12607
|
+
"0x15912a6f": "NotSupportVersion()",
|
|
12608
|
+
"0xf1364a74": "ArrayEmpty()",
|
|
12609
|
+
"0x15ed381d": "ExceedMaxProfit()",
|
|
12610
|
+
"0x51aeee6c": "PoolNotExist(PoolId)",
|
|
12611
|
+
"0x70f6c197": "InvalidQuoteTokenAddress()",
|
|
12612
|
+
"0x0b8457f4": "InvalidRatioParams()",
|
|
12613
|
+
"0x29dae146": "MarketAlreadyExisted()",
|
|
12614
|
+
"0x0e442a4a": "InvalidBaseToken()",
|
|
12615
|
+
"0x24e219c7": "MarketNotExist(MarketId)",
|
|
12616
|
+
"0xcc36f935": "PoolExists(PoolId)",
|
|
12617
|
+
"0xe84c308d": "ExceedBaseReserved(uint256,uint256)",
|
|
12618
|
+
"0x3e241751": "ExceedQuoteReserved(uint256,uint256)",
|
|
12619
|
+
"0xd54d0fc4": "InsufficientLiquidity(uint256,uint256,uint256)",
|
|
12620
|
+
"0x7e562a65": "InvalidDistributionAmount()",
|
|
12621
|
+
"0x83c7580d": "ReservableNotEnough(uint256,uint256)",
|
|
12622
|
+
"0x94eef58a": "ERC2771ForwarderExpiredRequest(uint48)",
|
|
12623
|
+
"0xc845a056": "ERC2771ForwarderInvalidSigner(address,address)",
|
|
12624
|
+
"0x70647f79": "ERC2771ForwarderMismatchedValue(uint256,uint256)",
|
|
12625
|
+
"0xd2650cd1": "ERC2771UntrustfulTarget(address,address)",
|
|
12626
|
+
"0xcf479181": "InsufficientBalance(uint256,uint256)",
|
|
12627
|
+
"0x4c150d8f": "DifferentMarket(PoolId,PoolId)",
|
|
12628
|
+
"0xaa98b06a": "InsufficientQuoteIn(uint256,uint256,uint256)",
|
|
12629
|
+
"0x3e589bee": "InvalidLiquidityAmount()",
|
|
10661
12630
|
"0xaebd3617": "InvalidTpsl(uint256)",
|
|
10662
12631
|
"0x7fe81129": "SamePoolMigration(PoolId)",
|
|
10663
12632
|
"0x71c4efed": "SlippageExceeded(uint256,uint256)",
|
|
@@ -13075,7 +15044,9 @@ var ARB_BETA_SEPOLIA = {
|
|
|
13075
15044
|
DATA_PROVIDER: "0x19dD80bF40Af2d891F270085D9B1C49730a5a6B0",
|
|
13076
15045
|
ORACLE_RESERVE: "0x3e0d8fAd0a5245D0b2C9d893fE155397a307577C",
|
|
13077
15046
|
FORWARDER: "0xf58CAEDf8A76331848ef51108ea102D920Dcf785",
|
|
13078
|
-
TRADING_ROUTER: "0x0000000000000000000000000000000000000000"
|
|
15047
|
+
TRADING_ROUTER: "0x0000000000000000000000000000000000000000",
|
|
15048
|
+
REIMBURSEMENT: "0x0000000000000000000000000000000000000000",
|
|
15049
|
+
DISPUTE_COURT: "0x0000000000000000000000000000000000000000"
|
|
13079
15050
|
};
|
|
13080
15051
|
|
|
13081
15052
|
// src/config/address/LINEA_BETA_SEPOLIA.ts
|
|
@@ -13098,7 +15069,9 @@ var LINEA_BETA_SEPOLIA = {
|
|
|
13098
15069
|
ORACLE_RESERVE: "0xB3D5a67223905FE73a0749e7A03525838063C54C",
|
|
13099
15070
|
USDC: "0xD984fd34f91F92DA0586e1bE82E262fF27DC431b",
|
|
13100
15071
|
FORWARDER: "0x6C40462A4d45BA4119af59Fb9e41b8eaC9293962",
|
|
13101
|
-
TRADING_ROUTER: "0x0000000000000000000000000000000000000000"
|
|
15072
|
+
TRADING_ROUTER: "0x0000000000000000000000000000000000000000",
|
|
15073
|
+
REIMBURSEMENT: "0x0000000000000000000000000000000000000000",
|
|
15074
|
+
DISPUTE_COURT: "0x0000000000000000000000000000000000000000"
|
|
13102
15075
|
};
|
|
13103
15076
|
|
|
13104
15077
|
// src/config/address/BSC_BETA_NET.ts
|
|
@@ -19001,7 +20974,7 @@ var Utils = class {
|
|
|
19001
20974
|
}
|
|
19002
20975
|
return null;
|
|
19003
20976
|
}
|
|
19004
|
-
async getApproveQuoteAmount(
|
|
20977
|
+
async getApproveQuoteAmount(account, chainId, tokenAddress, spenderAddress) {
|
|
19005
20978
|
try {
|
|
19006
20979
|
const erc20Abi = [
|
|
19007
20980
|
"function allowance(address owner, address spender) external view returns (uint256)"
|
|
@@ -19009,11 +20982,11 @@ var Utils = class {
|
|
|
19009
20982
|
const spender = spenderAddress ?? getContractAddressByChainId(chainId).Account;
|
|
19010
20983
|
const provider = await getJSONProvider(chainId);
|
|
19011
20984
|
const tokenContract = new import_ethers25.ethers.Contract(
|
|
19012
|
-
|
|
20985
|
+
tokenAddress,
|
|
19013
20986
|
erc20Abi,
|
|
19014
20987
|
provider
|
|
19015
20988
|
);
|
|
19016
|
-
const allowance = await tokenContract.allowance(
|
|
20989
|
+
const allowance = await tokenContract.allowance(account, spender);
|
|
19017
20990
|
return {
|
|
19018
20991
|
code: 0,
|
|
19019
20992
|
data: allowance.toString()
|
|
@@ -19023,12 +20996,12 @@ var Utils = class {
|
|
|
19023
20996
|
throw typeof error === "string" ? error : await getErrorTextFormError(error);
|
|
19024
20997
|
}
|
|
19025
20998
|
}
|
|
19026
|
-
async needsApproval(
|
|
20999
|
+
async needsApproval(account, chainId, tokenAddress, requiredAmount, spenderAddress) {
|
|
19027
21000
|
try {
|
|
19028
21001
|
const currentAllowanceRes = await this.getApproveQuoteAmount(
|
|
19029
|
-
|
|
21002
|
+
account,
|
|
19030
21003
|
chainId,
|
|
19031
|
-
|
|
21004
|
+
tokenAddress,
|
|
19032
21005
|
spenderAddress
|
|
19033
21006
|
);
|
|
19034
21007
|
const currentAllowance = currentAllowanceRes.data;
|
|
@@ -19053,16 +21026,21 @@ var Utils = class {
|
|
|
19053
21026
|
"function approve(address spender, uint256 amount) external returns (bool)"
|
|
19054
21027
|
];
|
|
19055
21028
|
const config = this.configManager.getConfig();
|
|
19056
|
-
console.log("approveAuthorization: signer-->", signer);
|
|
19057
21029
|
const usdcContract = new import_ethers25.ethers.Contract(
|
|
19058
21030
|
quoteAddress,
|
|
19059
21031
|
erc20Abi,
|
|
19060
21032
|
signer ?? config.signer
|
|
19061
21033
|
);
|
|
19062
|
-
console.log("approveAuthorization: usdcContract-->", usdcContract);
|
|
19063
21034
|
const approveAmount = amount ?? import_ethers25.ethers.MaxUint256;
|
|
19064
21035
|
const spender = spenderAddress ?? getContractAddressByChainId(chainId).Account;
|
|
19065
|
-
const
|
|
21036
|
+
const gasPrice = await this.getGasPriceByRatio();
|
|
21037
|
+
const gasLimit = await this.getGasLimitByRatio(
|
|
21038
|
+
await usdcContract.approve.estimateGas(spender, approveAmount)
|
|
21039
|
+
);
|
|
21040
|
+
const tx = await usdcContract.approve(spender, approveAmount, {
|
|
21041
|
+
gasLimit,
|
|
21042
|
+
gasPrice
|
|
21043
|
+
});
|
|
19066
21044
|
await tx.wait();
|
|
19067
21045
|
return {
|
|
19068
21046
|
code: 0,
|
|
@@ -19120,9 +21098,7 @@ var Utils = class {
|
|
|
19120
21098
|
provider
|
|
19121
21099
|
);
|
|
19122
21100
|
try {
|
|
19123
|
-
const networkFee = await marketManagerContract.getExecutionFee(
|
|
19124
|
-
marketId
|
|
19125
|
-
);
|
|
21101
|
+
const networkFee = await marketManagerContract.getExecutionFee(marketId);
|
|
19126
21102
|
return networkFee.toString();
|
|
19127
21103
|
} catch (error) {
|
|
19128
21104
|
this.logger.error("Error getting network fee:", error);
|
|
@@ -19136,15 +21112,24 @@ var Utils = class {
|
|
|
19136
21112
|
return priceData;
|
|
19137
21113
|
} catch (error) {
|
|
19138
21114
|
this.logger.error("Error getting oracle price:", error);
|
|
19139
|
-
|
|
19140
|
-
price: "0",
|
|
19141
|
-
vaa: "",
|
|
19142
|
-
publishTime: 0,
|
|
19143
|
-
poolId: "",
|
|
19144
|
-
value: 0
|
|
19145
|
-
};
|
|
21115
|
+
throw error;
|
|
19146
21116
|
}
|
|
19147
21117
|
}
|
|
21118
|
+
async buildUpdatePriceParams(poolId, chainId) {
|
|
21119
|
+
const priceData = await this.getOraclePrice(poolId, chainId);
|
|
21120
|
+
if (!priceData) throw new Error("Failed to get price data");
|
|
21121
|
+
return [
|
|
21122
|
+
{
|
|
21123
|
+
poolId,
|
|
21124
|
+
referencePrice: import_ethers25.ethers.parseUnits(priceData.price, 30),
|
|
21125
|
+
oracleUpdateData: priceData.vaa,
|
|
21126
|
+
publishTime: priceData.publishTime,
|
|
21127
|
+
oracleType: priceData.oracleType,
|
|
21128
|
+
value: priceData.value,
|
|
21129
|
+
price: priceData.price
|
|
21130
|
+
}
|
|
21131
|
+
];
|
|
21132
|
+
}
|
|
19148
21133
|
transferKlineResolutionToInterval(resolution) {
|
|
19149
21134
|
switch (resolution) {
|
|
19150
21135
|
case "1m":
|
|
@@ -19270,11 +21255,17 @@ var Utils = class {
|
|
|
19270
21255
|
}
|
|
19271
21256
|
return JSON.stringify(error);
|
|
19272
21257
|
}
|
|
19273
|
-
async getGasPriceByRatio(
|
|
21258
|
+
async getGasPriceByRatio() {
|
|
21259
|
+
const chainId = this.configManager.getConfig().chainId;
|
|
19274
21260
|
return (await bigintTradingGasPriceWithRatio(chainId)).gasPrice;
|
|
19275
21261
|
}
|
|
19276
|
-
async getGasLimitByRatio(
|
|
19277
|
-
|
|
21262
|
+
async getGasLimitByRatio(gasLimit) {
|
|
21263
|
+
const chainId = this.configManager.getConfig().chainId;
|
|
21264
|
+
const chainInfo = CHAIN_INFO[chainId];
|
|
21265
|
+
return bigintTradingGasToRatioCalculator(
|
|
21266
|
+
gasLimit,
|
|
21267
|
+
chainInfo?.gasLimitRatio ?? 1.3
|
|
21268
|
+
);
|
|
19278
21269
|
}
|
|
19279
21270
|
};
|
|
19280
21271
|
|
|
@@ -20395,11 +22386,13 @@ function addQueryParams(rawQuery) {
|
|
|
20395
22386
|
return queryString ? `?${queryString}` : "";
|
|
20396
22387
|
}
|
|
20397
22388
|
|
|
20398
|
-
// src/manager/api/
|
|
20399
|
-
var
|
|
20400
|
-
|
|
22389
|
+
// src/manager/api/request.ts
|
|
22390
|
+
var import_lodash_es3 = require("lodash-es");
|
|
22391
|
+
var Request = class {
|
|
22392
|
+
constructor(configManager) {
|
|
22393
|
+
this._preSigner = null;
|
|
22394
|
+
this._preUserAddress = null;
|
|
20401
22395
|
this.configManager = configManager;
|
|
20402
|
-
this.logger = logger;
|
|
20403
22396
|
}
|
|
20404
22397
|
getHost() {
|
|
20405
22398
|
const { isTestnet, isBetaMode } = this.configManager.getConfig();
|
|
@@ -20411,6 +22404,71 @@ var Api = class {
|
|
|
20411
22404
|
return "https://api.myx.finance";
|
|
20412
22405
|
}
|
|
20413
22406
|
}
|
|
22407
|
+
async buildAuthParams() {
|
|
22408
|
+
const config = this.configManager.getConfig();
|
|
22409
|
+
if (!config.signer) throw new MyxSDKError("INVALID_SIGNER" /* InvalidSigner */);
|
|
22410
|
+
let userAddress = this._preUserAddress;
|
|
22411
|
+
const accessToken = await this.configManager.getAccessToken() ?? "";
|
|
22412
|
+
if (config.signer !== this._preSigner) {
|
|
22413
|
+
userAddress = await config.signer.getAddress();
|
|
22414
|
+
this._preUserAddress = userAddress;
|
|
22415
|
+
this._preSigner = config.signer;
|
|
22416
|
+
}
|
|
22417
|
+
if (!userAddress) {
|
|
22418
|
+
throw new MyxSDKError("INVALID_SIGNER" /* InvalidSigner */);
|
|
22419
|
+
}
|
|
22420
|
+
return {
|
|
22421
|
+
headers: {
|
|
22422
|
+
myx_openapi_access_token: accessToken,
|
|
22423
|
+
myx_openapi_account: userAddress
|
|
22424
|
+
}
|
|
22425
|
+
};
|
|
22426
|
+
}
|
|
22427
|
+
buildRequestPath(path) {
|
|
22428
|
+
if (path.startsWith("http")) {
|
|
22429
|
+
return path;
|
|
22430
|
+
}
|
|
22431
|
+
return this.getHost() + path;
|
|
22432
|
+
}
|
|
22433
|
+
async get(url, params, { auth = false, ...options } = {}) {
|
|
22434
|
+
const authOptions = auth ? await this.buildAuthParams() : {};
|
|
22435
|
+
return http.get(
|
|
22436
|
+
this.buildRequestPath(url),
|
|
22437
|
+
params,
|
|
22438
|
+
(0, import_lodash_es3.merge)(authOptions, options)
|
|
22439
|
+
);
|
|
22440
|
+
}
|
|
22441
|
+
async post(url, data, { auth = false, ...options } = {}) {
|
|
22442
|
+
const authOptions = auth ? await this.buildAuthParams() : {};
|
|
22443
|
+
return http.post(
|
|
22444
|
+
this.buildRequestPath(url),
|
|
22445
|
+
data,
|
|
22446
|
+
(0, import_lodash_es3.merge)(authOptions, options)
|
|
22447
|
+
);
|
|
22448
|
+
}
|
|
22449
|
+
async put(url, data, { auth = false, ...options } = {}) {
|
|
22450
|
+
const authOptions = auth ? await this.buildAuthParams() : {};
|
|
22451
|
+
return http.put(
|
|
22452
|
+
this.buildRequestPath(url),
|
|
22453
|
+
data,
|
|
22454
|
+
(0, import_lodash_es3.merge)(authOptions, options)
|
|
22455
|
+
);
|
|
22456
|
+
}
|
|
22457
|
+
async delete(url, { auth = false, ...options } = {}) {
|
|
22458
|
+
const authOptions = auth ? await this.buildAuthParams() : {};
|
|
22459
|
+
return http.delete(
|
|
22460
|
+
this.buildRequestPath(url),
|
|
22461
|
+
(0, import_lodash_es3.merge)(authOptions, options)
|
|
22462
|
+
);
|
|
22463
|
+
}
|
|
22464
|
+
};
|
|
22465
|
+
|
|
22466
|
+
// src/manager/api/index.ts
|
|
22467
|
+
var Api = class extends Request {
|
|
22468
|
+
constructor(configManager, logger) {
|
|
22469
|
+
super(configManager);
|
|
22470
|
+
this.logger = logger;
|
|
22471
|
+
}
|
|
20414
22472
|
async getTradeFlow({
|
|
20415
22473
|
accessToken,
|
|
20416
22474
|
address,
|
|
@@ -20456,13 +22514,10 @@ var Api = class {
|
|
|
20456
22514
|
}
|
|
20457
22515
|
async getOraclePrice(chainId, poolIds = []) {
|
|
20458
22516
|
if (!!poolIds.length) {
|
|
20459
|
-
return http.get(
|
|
20460
|
-
|
|
20461
|
-
|
|
20462
|
-
|
|
20463
|
-
poolIds: poolIds.join(",")
|
|
20464
|
-
}
|
|
20465
|
-
);
|
|
22517
|
+
return http.get(`${this.getHost()}/openapi/gateway/quote/price/oracles`, {
|
|
22518
|
+
chainId,
|
|
22519
|
+
poolIds: poolIds.join(",")
|
|
22520
|
+
});
|
|
20466
22521
|
}
|
|
20467
22522
|
throw new Error("Invalid pool id");
|
|
20468
22523
|
}
|
|
@@ -20471,15 +22526,14 @@ var Api = class {
|
|
|
20471
22526
|
`${this.getHost()}/openapi/gateway/scan/market/info?chainId=${chainId}&poolId=${poolId}`
|
|
20472
22527
|
);
|
|
20473
22528
|
}
|
|
20474
|
-
async getPoolLevelConfig({
|
|
20475
|
-
poolId,
|
|
20476
|
-
chainId
|
|
20477
|
-
}) {
|
|
22529
|
+
async getPoolLevelConfig({ poolId, chainId }) {
|
|
20478
22530
|
return http.get(
|
|
20479
|
-
`${this.getHost()}/openapi/gateway/risk/market_pool/level_config${addQueryParams(
|
|
20480
|
-
|
|
20481
|
-
|
|
20482
|
-
|
|
22531
|
+
`${this.getHost()}/openapi/gateway/risk/market_pool/level_config${addQueryParams(
|
|
22532
|
+
{
|
|
22533
|
+
poolId,
|
|
22534
|
+
chainId
|
|
22535
|
+
}
|
|
22536
|
+
)}`
|
|
20483
22537
|
);
|
|
20484
22538
|
}
|
|
20485
22539
|
async getPositions(accessToken, address) {
|
|
@@ -20518,7 +22572,13 @@ var Api = class {
|
|
|
20518
22572
|
}
|
|
20519
22573
|
);
|
|
20520
22574
|
}
|
|
20521
|
-
async getKlineData({
|
|
22575
|
+
async getKlineData({
|
|
22576
|
+
chainId,
|
|
22577
|
+
poolId,
|
|
22578
|
+
endTime,
|
|
22579
|
+
limit,
|
|
22580
|
+
interval
|
|
22581
|
+
}) {
|
|
20522
22582
|
return http.get(
|
|
20523
22583
|
`${this.getHost()}/openapi/gateway/quote/candles`,
|
|
20524
22584
|
{
|
|
@@ -20550,7 +22610,11 @@ var Api = class {
|
|
|
20550
22610
|
`${this.getHost()}/v2/mx-gateway/quote/candle/all_tickers`
|
|
20551
22611
|
);
|
|
20552
22612
|
}
|
|
20553
|
-
async searchMarketAuth({
|
|
22613
|
+
async searchMarketAuth({
|
|
22614
|
+
accessToken,
|
|
22615
|
+
address,
|
|
22616
|
+
...params
|
|
22617
|
+
}) {
|
|
20554
22618
|
return http.get(
|
|
20555
22619
|
`${this.getHost()}/openapi/gateway/scan/market/ac-search`,
|
|
20556
22620
|
params,
|
|
@@ -20568,7 +22632,11 @@ var Api = class {
|
|
|
20568
22632
|
params
|
|
20569
22633
|
);
|
|
20570
22634
|
}
|
|
20571
|
-
async addFavorite({
|
|
22635
|
+
async addFavorite({
|
|
22636
|
+
accessToken,
|
|
22637
|
+
address,
|
|
22638
|
+
...params
|
|
22639
|
+
}) {
|
|
20572
22640
|
return http.get(
|
|
20573
22641
|
`${this.getHost()}/openapi/gateway/scan/market/add-favorites`,
|
|
20574
22642
|
params,
|
|
@@ -20580,7 +22648,11 @@ var Api = class {
|
|
|
20580
22648
|
}
|
|
20581
22649
|
);
|
|
20582
22650
|
}
|
|
20583
|
-
async removeFavorite({
|
|
22651
|
+
async removeFavorite({
|
|
22652
|
+
accessToken,
|
|
22653
|
+
address,
|
|
22654
|
+
...params
|
|
22655
|
+
}) {
|
|
20584
22656
|
return http.get(
|
|
20585
22657
|
`${this.getHost()}/openapi/gateway/scan/market/cancel-favorites`,
|
|
20586
22658
|
params,
|
|
@@ -20592,7 +22664,11 @@ var Api = class {
|
|
|
20592
22664
|
}
|
|
20593
22665
|
);
|
|
20594
22666
|
}
|
|
20595
|
-
async getFavoritesList({
|
|
22667
|
+
async getFavoritesList({
|
|
22668
|
+
accessToken,
|
|
22669
|
+
address,
|
|
22670
|
+
...params
|
|
22671
|
+
}) {
|
|
20596
22672
|
return http.get(
|
|
20597
22673
|
`${this.getHost()}/openapi/gateway/scan/market/favorites`,
|
|
20598
22674
|
params,
|
|
@@ -20653,7 +22729,13 @@ var Api = class {
|
|
|
20653
22729
|
`${this.getHost()}/openapi/gateway/scan/market`
|
|
20654
22730
|
);
|
|
20655
22731
|
}
|
|
20656
|
-
async getAccountVipInfo({
|
|
22732
|
+
async getAccountVipInfo({
|
|
22733
|
+
address,
|
|
22734
|
+
accessToken,
|
|
22735
|
+
chainId,
|
|
22736
|
+
deadline,
|
|
22737
|
+
nonce
|
|
22738
|
+
}) {
|
|
20657
22739
|
return http.get(
|
|
20658
22740
|
`${this.getHost()}/openapi/gateway/vip/trade_config`,
|
|
20659
22741
|
{ chainId, deadline, nonce },
|
|
@@ -20665,7 +22747,116 @@ var Api = class {
|
|
|
20665
22747
|
}
|
|
20666
22748
|
);
|
|
20667
22749
|
}
|
|
20668
|
-
|
|
22750
|
+
/**
|
|
22751
|
+
* appeal module start ------>
|
|
22752
|
+
*/
|
|
22753
|
+
async getAppealList(params) {
|
|
22754
|
+
return this.get(
|
|
22755
|
+
"/openapi/gateway/scan/dispute/list",
|
|
22756
|
+
params,
|
|
22757
|
+
{
|
|
22758
|
+
auth: true
|
|
22759
|
+
}
|
|
22760
|
+
);
|
|
22761
|
+
}
|
|
22762
|
+
async getAppealDetail(params) {
|
|
22763
|
+
return this.get(
|
|
22764
|
+
"/openapi/gateway/scan/dispute/details",
|
|
22765
|
+
params,
|
|
22766
|
+
{
|
|
22767
|
+
auth: true
|
|
22768
|
+
}
|
|
22769
|
+
);
|
|
22770
|
+
}
|
|
22771
|
+
async uploadAppealEvidence(params) {
|
|
22772
|
+
return this.get(
|
|
22773
|
+
"/openapi/gateway/scan/dispute/upload/evidence",
|
|
22774
|
+
params,
|
|
22775
|
+
{
|
|
22776
|
+
auth: true
|
|
22777
|
+
}
|
|
22778
|
+
);
|
|
22779
|
+
}
|
|
22780
|
+
async getAppealReconsiderationList(params) {
|
|
22781
|
+
return this.get(
|
|
22782
|
+
"/openapi/gateway/scan/dispute/appeal/list",
|
|
22783
|
+
params,
|
|
22784
|
+
{
|
|
22785
|
+
auth: true
|
|
22786
|
+
}
|
|
22787
|
+
);
|
|
22788
|
+
}
|
|
22789
|
+
async getAppealReconsiderationDetail(params) {
|
|
22790
|
+
return this.get(
|
|
22791
|
+
"/openapi/gateway/scan/appeal/details",
|
|
22792
|
+
params,
|
|
22793
|
+
{
|
|
22794
|
+
auth: true
|
|
22795
|
+
}
|
|
22796
|
+
);
|
|
22797
|
+
}
|
|
22798
|
+
async getAppealReimbursementList(params) {
|
|
22799
|
+
return this.get(
|
|
22800
|
+
"/openapi/gateway/scan/reimbursement/list",
|
|
22801
|
+
params,
|
|
22802
|
+
{
|
|
22803
|
+
auth: true
|
|
22804
|
+
}
|
|
22805
|
+
);
|
|
22806
|
+
}
|
|
22807
|
+
async getAppealNodeVoteList(params) {
|
|
22808
|
+
return this.get(
|
|
22809
|
+
"/openapi/gateway/scan/node/vote-list",
|
|
22810
|
+
params
|
|
22811
|
+
);
|
|
22812
|
+
}
|
|
22813
|
+
async getAppealNodeVoteDetails(params) {
|
|
22814
|
+
return this.get(
|
|
22815
|
+
"/openapi/gateway/scan/node/vote-details",
|
|
22816
|
+
params
|
|
22817
|
+
);
|
|
22818
|
+
}
|
|
22819
|
+
async getIsVoteNode(params) {
|
|
22820
|
+
return this.get(
|
|
22821
|
+
"/openapi/gateway/scan/node/vote-node-check",
|
|
22822
|
+
params
|
|
22823
|
+
);
|
|
22824
|
+
}
|
|
22825
|
+
async postVoteSignature(params) {
|
|
22826
|
+
return this.get(
|
|
22827
|
+
`/openapi/gateway/scan/node/vote`,
|
|
22828
|
+
params,
|
|
22829
|
+
{
|
|
22830
|
+
auth: true
|
|
22831
|
+
}
|
|
22832
|
+
);
|
|
22833
|
+
}
|
|
22834
|
+
async getPedingVoteCount() {
|
|
22835
|
+
return this.get(
|
|
22836
|
+
"/openapi/gateway/scan/node/pending-vote-total",
|
|
22837
|
+
{},
|
|
22838
|
+
{
|
|
22839
|
+
auth: true
|
|
22840
|
+
}
|
|
22841
|
+
);
|
|
22842
|
+
}
|
|
22843
|
+
async getMyAppealCount() {
|
|
22844
|
+
return this.get(
|
|
22845
|
+
"/openapi/gateway/scan/processing-total",
|
|
22846
|
+
{},
|
|
22847
|
+
{
|
|
22848
|
+
auth: true
|
|
22849
|
+
}
|
|
22850
|
+
);
|
|
22851
|
+
}
|
|
22852
|
+
/**
|
|
22853
|
+
* appeal module end ------>
|
|
22854
|
+
*/
|
|
22855
|
+
async getCurrentEpoch({
|
|
22856
|
+
address,
|
|
22857
|
+
accessToken,
|
|
22858
|
+
broker
|
|
22859
|
+
}) {
|
|
20669
22860
|
return http.get(
|
|
20670
22861
|
`${this.getHost()}/openapi/gateway/scan/get-current-epoch`,
|
|
20671
22862
|
{ broker },
|
|
@@ -21093,6 +23284,263 @@ var BaseMyxClient = class {
|
|
|
21093
23284
|
}
|
|
21094
23285
|
};
|
|
21095
23286
|
|
|
23287
|
+
// src/manager/appeal/index.ts
|
|
23288
|
+
var Appeal = class extends BaseMyxClient {
|
|
23289
|
+
constructor(client2) {
|
|
23290
|
+
super(client2);
|
|
23291
|
+
}
|
|
23292
|
+
async getDisputeCourtContract() {
|
|
23293
|
+
const contract = await getDisputeCourtContract(this.config.chainId);
|
|
23294
|
+
return this.connectContract(contract);
|
|
23295
|
+
}
|
|
23296
|
+
async getReimbursementContract() {
|
|
23297
|
+
const contract = await getReimbursementContract(this.config.chainId);
|
|
23298
|
+
return this.connectContract(contract);
|
|
23299
|
+
}
|
|
23300
|
+
/**
|
|
23301
|
+
* submit appeal
|
|
23302
|
+
* @param poolId - the pool id
|
|
23303
|
+
* @param poolToken - the pool token
|
|
23304
|
+
* @returns the transaction receipt
|
|
23305
|
+
*/
|
|
23306
|
+
async submitAppeal(poolId, lpToken, lpAmount) {
|
|
23307
|
+
const account = await this.config.signer?.getAddress() ?? "";
|
|
23308
|
+
const needApprove = await this.client.utils.needsApproval(
|
|
23309
|
+
account,
|
|
23310
|
+
this.config.chainId,
|
|
23311
|
+
lpToken,
|
|
23312
|
+
lpAmount,
|
|
23313
|
+
this.getAddressConfig().DISPUTE_COURT
|
|
23314
|
+
);
|
|
23315
|
+
this.client.logger.debug("need-approve", needApprove);
|
|
23316
|
+
if (needApprove) {
|
|
23317
|
+
await this.client.utils.approveAuthorization({
|
|
23318
|
+
chainId: this.config.chainId,
|
|
23319
|
+
quoteAddress: lpToken,
|
|
23320
|
+
spenderAddress: this.getAddressConfig().DISPUTE_COURT
|
|
23321
|
+
});
|
|
23322
|
+
}
|
|
23323
|
+
const contract = await this.getDisputeCourtContract();
|
|
23324
|
+
const prices = await this.client.utils.buildUpdatePriceParams(
|
|
23325
|
+
poolId,
|
|
23326
|
+
this.config.chainId
|
|
23327
|
+
);
|
|
23328
|
+
const value = BigInt(prices[0].value.toString() || "1");
|
|
23329
|
+
const _gasLimit = await contract.fileDispute.estimateGas(
|
|
23330
|
+
prices,
|
|
23331
|
+
poolId,
|
|
23332
|
+
lpToken,
|
|
23333
|
+
{
|
|
23334
|
+
value
|
|
23335
|
+
}
|
|
23336
|
+
);
|
|
23337
|
+
this.client.logger.debug("_gasLimit", _gasLimit);
|
|
23338
|
+
const gasLimit = await this.client.utils.getGasLimitByRatio(_gasLimit);
|
|
23339
|
+
const gasPrice = await this.client.utils.getGasPriceByRatio();
|
|
23340
|
+
this.client.logger.debug("txParams", {
|
|
23341
|
+
gasLimit,
|
|
23342
|
+
gasPrice,
|
|
23343
|
+
value
|
|
23344
|
+
});
|
|
23345
|
+
const tx = await contract.fileDispute(prices, poolId, lpToken, {
|
|
23346
|
+
value,
|
|
23347
|
+
gasLimit,
|
|
23348
|
+
gasPrice
|
|
23349
|
+
});
|
|
23350
|
+
const receipt = await tx.wait();
|
|
23351
|
+
const DisputeFiledLog = receipt?.logs.find((item) => {
|
|
23352
|
+
if (item.eventName === "DisputeFiled") {
|
|
23353
|
+
return true;
|
|
23354
|
+
}
|
|
23355
|
+
return false;
|
|
23356
|
+
});
|
|
23357
|
+
if (!DisputeFiledLog || !receipt) {
|
|
23358
|
+
throw new MyxSDKError(
|
|
23359
|
+
"TRANSACTION_FAILED" /* TransactionFailed */,
|
|
23360
|
+
"DisputeFiledLog not found"
|
|
23361
|
+
);
|
|
23362
|
+
}
|
|
23363
|
+
const caseId = DisputeFiledLog.args.getValue(
|
|
23364
|
+
"caseId"
|
|
23365
|
+
);
|
|
23366
|
+
this.client.logger.debug("caseId", caseId);
|
|
23367
|
+
this.client.logger.debug("event", DisputeFiledLog);
|
|
23368
|
+
return {
|
|
23369
|
+
transaction: receipt,
|
|
23370
|
+
caseId
|
|
23371
|
+
};
|
|
23372
|
+
}
|
|
23373
|
+
/**
|
|
23374
|
+
* vote for appeal
|
|
23375
|
+
* @param caseId - the case id
|
|
23376
|
+
* @param isFor - true if for the appeal, false if against the appeal
|
|
23377
|
+
* @returns the transaction receipt
|
|
23378
|
+
*/
|
|
23379
|
+
async voteForAppeal({
|
|
23380
|
+
caseId,
|
|
23381
|
+
validator,
|
|
23382
|
+
isFor,
|
|
23383
|
+
deadline,
|
|
23384
|
+
v,
|
|
23385
|
+
r,
|
|
23386
|
+
s
|
|
23387
|
+
}) {
|
|
23388
|
+
const contract = await this.getDisputeCourtContract();
|
|
23389
|
+
const _gasLimit = await contract.vote.estimateGas(
|
|
23390
|
+
caseId,
|
|
23391
|
+
validator,
|
|
23392
|
+
isFor ? 1 : 0,
|
|
23393
|
+
deadline,
|
|
23394
|
+
v,
|
|
23395
|
+
r,
|
|
23396
|
+
s
|
|
23397
|
+
);
|
|
23398
|
+
const gasLimit = await this.client.utils.getGasLimitByRatio(_gasLimit);
|
|
23399
|
+
const gasPrice = await this.client.utils.getGasPriceByRatio();
|
|
23400
|
+
const tx = await contract.vote(
|
|
23401
|
+
caseId,
|
|
23402
|
+
validator,
|
|
23403
|
+
isFor ? 1 : 0,
|
|
23404
|
+
deadline,
|
|
23405
|
+
v,
|
|
23406
|
+
r,
|
|
23407
|
+
s,
|
|
23408
|
+
{
|
|
23409
|
+
gasLimit,
|
|
23410
|
+
gasPrice
|
|
23411
|
+
}
|
|
23412
|
+
);
|
|
23413
|
+
const receipt = await tx.wait();
|
|
23414
|
+
return receipt;
|
|
23415
|
+
}
|
|
23416
|
+
/**
|
|
23417
|
+
* claim appeal margin
|
|
23418
|
+
* @param caseId - the case id
|
|
23419
|
+
* @returns the transaction receipt
|
|
23420
|
+
*/
|
|
23421
|
+
async claimAppealMargin(caseId) {
|
|
23422
|
+
const contract = await this.getDisputeCourtContract();
|
|
23423
|
+
const _gasLimit = await contract.claimBond.estimateGas(caseId);
|
|
23424
|
+
const gasLimit = await this.client.utils.getGasLimitByRatio(_gasLimit);
|
|
23425
|
+
const gasPrice = await this.client.utils.getGasPriceByRatio();
|
|
23426
|
+
const tx = await contract.claimBond(caseId, {
|
|
23427
|
+
gasLimit,
|
|
23428
|
+
gasPrice
|
|
23429
|
+
});
|
|
23430
|
+
const receipt = await tx.wait();
|
|
23431
|
+
return receipt;
|
|
23432
|
+
}
|
|
23433
|
+
/**
|
|
23434
|
+
* claim reimbursement
|
|
23435
|
+
* @param caseId - the case id
|
|
23436
|
+
* @param baseAmount - the base amount
|
|
23437
|
+
* @param quoteAmount - the quote amount
|
|
23438
|
+
* @param merkleProof - the merkle proof
|
|
23439
|
+
* @returns the transaction receipt
|
|
23440
|
+
*/
|
|
23441
|
+
async claimReimbursement(caseId, baseAmount, quoteAmount, merkleProof) {
|
|
23442
|
+
const contract = await this.getReimbursementContract();
|
|
23443
|
+
const _gasLimit = await contract.claimReimbursement.estimateGas(
|
|
23444
|
+
caseId,
|
|
23445
|
+
baseAmount,
|
|
23446
|
+
quoteAmount,
|
|
23447
|
+
merkleProof
|
|
23448
|
+
);
|
|
23449
|
+
const gasLimit = await this.client.utils.getGasLimitByRatio(_gasLimit);
|
|
23450
|
+
const gasPrice = await this.client.utils.getGasPriceByRatio();
|
|
23451
|
+
const tx = await contract.claimReimbursement(
|
|
23452
|
+
caseId,
|
|
23453
|
+
baseAmount,
|
|
23454
|
+
quoteAmount,
|
|
23455
|
+
merkleProof,
|
|
23456
|
+
{
|
|
23457
|
+
gasLimit,
|
|
23458
|
+
gasPrice
|
|
23459
|
+
}
|
|
23460
|
+
);
|
|
23461
|
+
const receipt = await tx.wait();
|
|
23462
|
+
return receipt;
|
|
23463
|
+
}
|
|
23464
|
+
/**
|
|
23465
|
+
* get dispute configuration
|
|
23466
|
+
*/
|
|
23467
|
+
async getDisputeConfiguration() {
|
|
23468
|
+
const contract = await this.getDisputeCourtContract();
|
|
23469
|
+
const configuration = await contract.getDisputeConfiguration();
|
|
23470
|
+
return configuration;
|
|
23471
|
+
}
|
|
23472
|
+
async appealReconsideration(caseId, appealToken, appealAmount) {
|
|
23473
|
+
const contract = await this.getDisputeCourtContract();
|
|
23474
|
+
const account = await this.config.signer?.getAddress() ?? "";
|
|
23475
|
+
const spenderAddress = this.getAddressConfig().DISPUTE_COURT;
|
|
23476
|
+
const isNeedApprove = await this.client.utils.needsApproval(
|
|
23477
|
+
account,
|
|
23478
|
+
this.config.chainId,
|
|
23479
|
+
appealToken,
|
|
23480
|
+
appealAmount,
|
|
23481
|
+
spenderAddress
|
|
23482
|
+
);
|
|
23483
|
+
if (isNeedApprove) {
|
|
23484
|
+
const res = await this.client.utils.approveAuthorization({
|
|
23485
|
+
chainId: this.config.chainId,
|
|
23486
|
+
quoteAddress: appealToken,
|
|
23487
|
+
spenderAddress
|
|
23488
|
+
});
|
|
23489
|
+
if (res.code !== 0) {
|
|
23490
|
+
throw new MyxSDKError("TRANSACTION_FAILED" /* TransactionFailed */, res.message);
|
|
23491
|
+
}
|
|
23492
|
+
}
|
|
23493
|
+
const _gasLimit = await contract.appeal.estimateGas(caseId);
|
|
23494
|
+
const gasLimit = await this.client.utils.getGasLimitByRatio(_gasLimit);
|
|
23495
|
+
const gasPrice = await this.client.utils.getGasPriceByRatio();
|
|
23496
|
+
const tx = await contract.appeal(caseId, {
|
|
23497
|
+
gasLimit,
|
|
23498
|
+
gasPrice
|
|
23499
|
+
});
|
|
23500
|
+
const receipt = await tx.wait();
|
|
23501
|
+
return receipt;
|
|
23502
|
+
}
|
|
23503
|
+
/**
|
|
23504
|
+
* http api
|
|
23505
|
+
*/
|
|
23506
|
+
async getAppealList(params) {
|
|
23507
|
+
return this.client.api.getAppealList(params);
|
|
23508
|
+
}
|
|
23509
|
+
async getAppealDetail(params) {
|
|
23510
|
+
return this.client.api.getAppealDetail(params);
|
|
23511
|
+
}
|
|
23512
|
+
async uploadAppealEvidence(params) {
|
|
23513
|
+
return this.client.api.uploadAppealEvidence(params);
|
|
23514
|
+
}
|
|
23515
|
+
async getAppealReconsiderationList(params) {
|
|
23516
|
+
return this.client.api.getAppealReconsiderationList(params);
|
|
23517
|
+
}
|
|
23518
|
+
async getAppealReconsiderationDetail(params) {
|
|
23519
|
+
return this.client.api.getAppealReconsiderationDetail(params);
|
|
23520
|
+
}
|
|
23521
|
+
async getAppealReimbursementList(params) {
|
|
23522
|
+
return this.client.api.getAppealReimbursementList(params);
|
|
23523
|
+
}
|
|
23524
|
+
async getAppealNodeVoteList(params) {
|
|
23525
|
+
return this.client.api.getAppealNodeVoteList(params);
|
|
23526
|
+
}
|
|
23527
|
+
async getAppealNodeVoteDetail(params) {
|
|
23528
|
+
return this.client.api.getAppealNodeVoteDetails(params);
|
|
23529
|
+
}
|
|
23530
|
+
async getIsVoteNode(params) {
|
|
23531
|
+
return this.client.api.getIsVoteNode(params);
|
|
23532
|
+
}
|
|
23533
|
+
async postVoteSignature(params) {
|
|
23534
|
+
return this.client.api.postVoteSignature(params);
|
|
23535
|
+
}
|
|
23536
|
+
async getPedingVoteCount() {
|
|
23537
|
+
return this.client.api.getPedingVoteCount();
|
|
23538
|
+
}
|
|
23539
|
+
async getMyAppealCount() {
|
|
23540
|
+
return this.client.api.getMyAppealCount();
|
|
23541
|
+
}
|
|
23542
|
+
};
|
|
23543
|
+
|
|
21096
23544
|
// src/manager/referrals/index.tsx
|
|
21097
23545
|
var Referrals = class extends BaseMyxClient {
|
|
21098
23546
|
constructor(client2) {
|
|
@@ -21105,13 +23553,8 @@ var Referrals = class extends BaseMyxClient {
|
|
|
21105
23553
|
const _gasLimit = await brokerContract.claimRebate.estimateGas(
|
|
21106
23554
|
tokenAddress
|
|
21107
23555
|
);
|
|
21108
|
-
const gasLimit = await this.client.utils.getGasLimitByRatio(
|
|
21109
|
-
|
|
21110
|
-
_gasLimit
|
|
21111
|
-
);
|
|
21112
|
-
const gasPrice = await this.client.utils.getGasPriceByRatio(
|
|
21113
|
-
this.config.chainId
|
|
21114
|
-
);
|
|
23556
|
+
const gasLimit = await this.client.utils.getGasLimitByRatio(_gasLimit);
|
|
23557
|
+
const gasPrice = await this.client.utils.getGasPriceByRatio();
|
|
21115
23558
|
const tx = await brokerContract.claimRebate(tokenAddress, {
|
|
21116
23559
|
gasPrice,
|
|
21117
23560
|
gasLimit
|
|
@@ -21121,6 +23564,73 @@ var Referrals = class extends BaseMyxClient {
|
|
|
21121
23564
|
}
|
|
21122
23565
|
};
|
|
21123
23566
|
|
|
23567
|
+
// src/manager/api/appeal-type.ts
|
|
23568
|
+
var AppealType = /* @__PURE__ */ ((AppealType2) => {
|
|
23569
|
+
AppealType2[AppealType2["UnderReview"] = 1] = "UnderReview";
|
|
23570
|
+
AppealType2[AppealType2["InitialVote"] = 2] = "InitialVote";
|
|
23571
|
+
AppealType2[AppealType2["PublicNotice"] = 3] = "PublicNotice";
|
|
23572
|
+
AppealType2[AppealType2["UnderReconsideration"] = 4] = "UnderReconsideration";
|
|
23573
|
+
AppealType2[AppealType2["Won"] = 5] = "Won";
|
|
23574
|
+
AppealType2[AppealType2["Failed"] = 6] = "Failed";
|
|
23575
|
+
AppealType2[AppealType2["PlatformRuling"] = 7] = "PlatformRuling";
|
|
23576
|
+
AppealType2[AppealType2["PlatformRevoked"] = 8] = "PlatformRevoked";
|
|
23577
|
+
return AppealType2;
|
|
23578
|
+
})(AppealType || {});
|
|
23579
|
+
var AppealReconsiderationType = /* @__PURE__ */ ((AppealReconsiderationType2) => {
|
|
23580
|
+
AppealReconsiderationType2[AppealReconsiderationType2["InitialVoting"] = 1] = "InitialVoting";
|
|
23581
|
+
AppealReconsiderationType2[AppealReconsiderationType2["PublicNotice"] = 2] = "PublicNotice";
|
|
23582
|
+
AppealReconsiderationType2[AppealReconsiderationType2["UnderReconsideration"] = 3] = "UnderReconsideration";
|
|
23583
|
+
AppealReconsiderationType2[AppealReconsiderationType2["Won"] = 4] = "Won";
|
|
23584
|
+
AppealReconsiderationType2[AppealReconsiderationType2["Failed"] = 5] = "Failed";
|
|
23585
|
+
AppealReconsiderationType2[AppealReconsiderationType2["PlatformRuling"] = 6] = "PlatformRuling";
|
|
23586
|
+
AppealReconsiderationType2[AppealReconsiderationType2["PlatformRevoked"] = 7] = "PlatformRevoked";
|
|
23587
|
+
AppealReconsiderationType2[AppealReconsiderationType2["ReconsiderationVoting"] = 8] = "ReconsiderationVoting";
|
|
23588
|
+
return AppealReconsiderationType2;
|
|
23589
|
+
})(AppealReconsiderationType || {});
|
|
23590
|
+
var AppealStage = /* @__PURE__ */ ((AppealStage2) => {
|
|
23591
|
+
AppealStage2[AppealStage2["UnderReview"] = 1] = "UnderReview";
|
|
23592
|
+
AppealStage2[AppealStage2["PublicNotice"] = 2] = "PublicNotice";
|
|
23593
|
+
AppealStage2[AppealStage2["UnderReconsideration"] = 3] = "UnderReconsideration";
|
|
23594
|
+
AppealStage2[AppealStage2["Completed"] = 4] = "Completed";
|
|
23595
|
+
return AppealStage2;
|
|
23596
|
+
})(AppealStage || {});
|
|
23597
|
+
var NodeTypeEnum = /* @__PURE__ */ ((NodeTypeEnum2) => {
|
|
23598
|
+
NodeTypeEnum2[NodeTypeEnum2["ElectionNode"] = 0] = "ElectionNode";
|
|
23599
|
+
NodeTypeEnum2[NodeTypeEnum2["OfficialNode"] = 1] = "OfficialNode";
|
|
23600
|
+
return NodeTypeEnum2;
|
|
23601
|
+
})(NodeTypeEnum || {});
|
|
23602
|
+
var VoteTypeEnum = /* @__PURE__ */ ((VoteTypeEnum2) => {
|
|
23603
|
+
VoteTypeEnum2[VoteTypeEnum2["Reject"] = 0] = "Reject";
|
|
23604
|
+
VoteTypeEnum2[VoteTypeEnum2["Support"] = 1] = "Support";
|
|
23605
|
+
return VoteTypeEnum2;
|
|
23606
|
+
})(VoteTypeEnum || {});
|
|
23607
|
+
var AppealClaimStatusEnum = /* @__PURE__ */ ((AppealClaimStatusEnum2) => {
|
|
23608
|
+
AppealClaimStatusEnum2[AppealClaimStatusEnum2["UnClaimed"] = 0] = "UnClaimed";
|
|
23609
|
+
AppealClaimStatusEnum2[AppealClaimStatusEnum2["Claimed"] = 1] = "Claimed";
|
|
23610
|
+
return AppealClaimStatusEnum2;
|
|
23611
|
+
})(AppealClaimStatusEnum || {});
|
|
23612
|
+
var AppealNodeVotedStateEnum = /* @__PURE__ */ ((AppealNodeVotedStateEnum2) => {
|
|
23613
|
+
AppealNodeVotedStateEnum2[AppealNodeVotedStateEnum2["NotVoted"] = 0] = "NotVoted";
|
|
23614
|
+
AppealNodeVotedStateEnum2[AppealNodeVotedStateEnum2["Voted"] = 1] = "Voted";
|
|
23615
|
+
return AppealNodeVotedStateEnum2;
|
|
23616
|
+
})(AppealNodeVotedStateEnum || {});
|
|
23617
|
+
var AppealCaseTypeEnum = /* @__PURE__ */ ((AppealCaseTypeEnum2) => {
|
|
23618
|
+
AppealCaseTypeEnum2[AppealCaseTypeEnum2["Appeal"] = 1] = "Appeal";
|
|
23619
|
+
AppealCaseTypeEnum2[AppealCaseTypeEnum2["Reconsideration"] = 2] = "Reconsideration";
|
|
23620
|
+
return AppealCaseTypeEnum2;
|
|
23621
|
+
})(AppealCaseTypeEnum || {});
|
|
23622
|
+
var AppealNodeStateEnum = /* @__PURE__ */ ((AppealNodeStateEnum2) => {
|
|
23623
|
+
AppealNodeStateEnum2[AppealNodeStateEnum2["NoVote"] = 0] = "NoVote";
|
|
23624
|
+
AppealNodeStateEnum2[AppealNodeStateEnum2["Supported"] = 1] = "Supported";
|
|
23625
|
+
AppealNodeStateEnum2[AppealNodeStateEnum2["Rejected"] = 2] = "Rejected";
|
|
23626
|
+
return AppealNodeStateEnum2;
|
|
23627
|
+
})(AppealNodeStateEnum || {});
|
|
23628
|
+
var IsVoteNodeEnum = /* @__PURE__ */ ((IsVoteNodeEnum2) => {
|
|
23629
|
+
IsVoteNodeEnum2[IsVoteNodeEnum2["Yes"] = 1] = "Yes";
|
|
23630
|
+
IsVoteNodeEnum2[IsVoteNodeEnum2["No"] = 0] = "No";
|
|
23631
|
+
return IsVoteNodeEnum2;
|
|
23632
|
+
})(IsVoteNodeEnum || {});
|
|
23633
|
+
|
|
21124
23634
|
// src/manager/index.ts
|
|
21125
23635
|
var MyxClient = class {
|
|
21126
23636
|
/**
|
|
@@ -21170,6 +23680,7 @@ var MyxClient = class {
|
|
|
21170
23680
|
this.api
|
|
21171
23681
|
);
|
|
21172
23682
|
this.subscription = new SubScription(this.configManager, this.logger);
|
|
23683
|
+
this.appeal = new Appeal(this);
|
|
21173
23684
|
this.referrals = new Referrals(this);
|
|
21174
23685
|
}
|
|
21175
23686
|
/**
|
|
@@ -21197,6 +23708,13 @@ var MyxClient = class {
|
|
|
21197
23708
|
};
|
|
21198
23709
|
// Annotate the CommonJS export names for ESM import in node:
|
|
21199
23710
|
0 && (module.exports = {
|
|
23711
|
+
AppealCaseTypeEnum,
|
|
23712
|
+
AppealClaimStatusEnum,
|
|
23713
|
+
AppealNodeStateEnum,
|
|
23714
|
+
AppealNodeVotedStateEnum,
|
|
23715
|
+
AppealReconsiderationType,
|
|
23716
|
+
AppealStage,
|
|
23717
|
+
AppealType,
|
|
21200
23718
|
COMMON_LP_AMOUNT_DECIMALS,
|
|
21201
23719
|
COMMON_PRICE_DECIMALS,
|
|
21202
23720
|
ChainId,
|
|
@@ -21207,11 +23725,13 @@ var MyxClient = class {
|
|
|
21207
23725
|
ExecTypeEnum,
|
|
21208
23726
|
ForwarderGetStatus,
|
|
21209
23727
|
HttpKlineIntervalEnum,
|
|
23728
|
+
IsVoteNodeEnum,
|
|
21210
23729
|
MarketCapType,
|
|
21211
23730
|
MarketPoolState,
|
|
21212
23731
|
MarketType,
|
|
21213
23732
|
MxSDK,
|
|
21214
23733
|
MyxClient,
|
|
23734
|
+
NodeTypeEnum,
|
|
21215
23735
|
OperationEnum,
|
|
21216
23736
|
OperationType,
|
|
21217
23737
|
OracleType,
|
|
@@ -21226,6 +23746,7 @@ var MyxClient = class {
|
|
|
21226
23746
|
TradeFlowTypeEnum,
|
|
21227
23747
|
TriggerType,
|
|
21228
23748
|
TriggerTypeEnum,
|
|
23749
|
+
VoteTypeEnum,
|
|
21229
23750
|
approve,
|
|
21230
23751
|
base,
|
|
21231
23752
|
bigintAmountSlipperCalculator,
|