@pendle/sdk-boros 0.3.38 → 0.3.40-beta

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.
@@ -1,6 +1,101 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.iMultiTokenMerkleDistributorAbi = exports.iBOROS20Abi = exports.iAMMAbi = exports.iFIndexOracleAbi = exports.iAuthModuleAbi = exports.iTradeModuleAbi = exports.iMarkRateOracleAbi = exports.iExplorerAbi = exports.iMulticall3Abi = exports.iMarketOffViewOnlyAbi = exports.iMarketEntryAbi = exports.iMarketRiskManagementAbi = exports.iMarketSettingAbi = exports.iMarketAllTypesAbi = exports.iMarketOrderAndOtcAbi = exports.iMarketOffAbi = exports.iMarketAbi = exports.iMarketAllEventsAndTypesAbi = exports.iRouterAbi = exports.iMarketFactoryAbi = exports.iMarketHubStorageOnlyAbi = exports.iMarketHubAllEventsAndTypesAbi = exports.iMarginManagerOnlyAbi = exports.iMarketHubAbi = exports.iMarketHubRiskManagementAbi = exports.iMarketHubEntryOnlyAbi = exports.iAMMFactoryAbi = void 0;
3
+ exports.iMultiTokenMerkleDistributorAbi = exports.iBOROS20Abi = exports.iAMMAbi = exports.iFIndexOracleAbi = exports.iAuthModuleAbi = exports.iTradeModuleAbi = exports.iMarkRateOracleAbi = exports.iExplorerAbi = exports.iMulticall3Abi = exports.iMarketOffViewOnlyAbi = exports.iMarketEntryAbi = exports.iMarketRiskManagementAbi = exports.iMarketSettingAbi = exports.iMarketAllTypesAbi = exports.iMarketOrderAndOtcAbi = exports.iMarketOffAbi = exports.iMarketAbi = exports.iMarketAllEventsAndTypesAbi = exports.iRouterAbi = exports.iMarketFactoryAbi = exports.iMarketHubStorageOnlyAbi = exports.iMarketHubAllEventsAndTypesAbi = exports.iMarginManagerOnlyAbi = exports.iMarketHubAbi = exports.iMarketHubRiskManagementAbi = exports.iMarketHubEntryOnlyAbi = exports.iAMMFactoryAbi = exports.iArbitrageExecutorAbi = void 0;
4
+ exports.iArbitrageExecutorAbi = [
5
+ {
6
+ anonymous: false,
7
+ inputs: [
8
+ { indexed: false, internalType: 'AMMId', name: 'ammId', type: 'uint24' },
9
+ { indexed: false, internalType: 'int256', name: 'profit', type: 'int256' },
10
+ ],
11
+ name: 'ArbitrageExecuted',
12
+ type: 'event',
13
+ },
14
+ {
15
+ inputs: [],
16
+ name: 'MARKET_HUB',
17
+ outputs: [{ internalType: 'address', name: '', type: 'address' }],
18
+ stateMutability: 'view',
19
+ type: 'function',
20
+ },
21
+ {
22
+ inputs: [],
23
+ name: 'ROUTER',
24
+ outputs: [{ internalType: 'address', name: '', type: 'address' }],
25
+ stateMutability: 'view',
26
+ type: 'function',
27
+ },
28
+ {
29
+ inputs: [
30
+ { internalType: 'TokenId', name: 'tokenId', type: 'uint16' },
31
+ { internalType: 'uint256', name: 'amount', type: 'uint256' },
32
+ ],
33
+ name: 'deposit',
34
+ outputs: [],
35
+ stateMutability: 'nonpayable',
36
+ type: 'function',
37
+ },
38
+ {
39
+ inputs: [
40
+ {
41
+ components: [
42
+ { internalType: 'enum Side', name: 'bookSide', type: 'uint8' },
43
+ { internalType: 'AMMId', name: 'ammId', type: 'uint24' },
44
+ { internalType: 'int256', name: 'minProfit', type: 'int256' },
45
+ { internalType: 'bool', name: 'maximizeProfit', type: 'bool' },
46
+ ],
47
+ internalType: 'struct IArbitrageExecutor.ArbitrageParams',
48
+ name: 'params',
49
+ type: 'tuple',
50
+ },
51
+ ],
52
+ name: 'executeArbitrage',
53
+ outputs: [
54
+ { internalType: 'uint256', name: 'arbSize', type: 'uint256' },
55
+ { internalType: 'int256', name: 'profit', type: 'int256' },
56
+ ],
57
+ stateMutability: 'nonpayable',
58
+ type: 'function',
59
+ },
60
+ {
61
+ inputs: [],
62
+ name: 'nTicksToTryAtOnce',
63
+ outputs: [{ internalType: 'uint16', name: '', type: 'uint16' }],
64
+ stateMutability: 'view',
65
+ type: 'function',
66
+ },
67
+ {
68
+ inputs: [
69
+ { internalType: 'bool', name: 'cross', type: 'bool' },
70
+ { internalType: 'MarketId', name: 'marketId', type: 'uint24' },
71
+ ],
72
+ name: 'payMarketEntranceFee',
73
+ outputs: [],
74
+ stateMutability: 'nonpayable',
75
+ type: 'function',
76
+ },
77
+ {
78
+ inputs: [
79
+ { internalType: 'TokenId', name: 'tokenId', type: 'uint16' },
80
+ { internalType: 'uint256', name: 'amount', type: 'uint256' },
81
+ ],
82
+ name: 'requestWithdrawal',
83
+ outputs: [],
84
+ stateMutability: 'nonpayable',
85
+ type: 'function',
86
+ },
87
+ {
88
+ inputs: [
89
+ { internalType: 'TokenId', name: 'tokenId', type: 'uint16' },
90
+ { internalType: 'uint256', name: 'amount', type: 'uint256' },
91
+ { internalType: 'address', name: 'receiver', type: 'address' },
92
+ ],
93
+ name: 'withdraw',
94
+ outputs: [],
95
+ stateMutability: 'nonpayable',
96
+ type: 'function',
97
+ },
98
+ ];
4
99
  exports.iAMMFactoryAbi = [
5
100
  {
6
101
  anonymous: false,
@@ -86,53 +181,6 @@ exports.iAMMFactoryAbi = [
86
181
  },
87
182
  ];
88
183
  exports.iMarketHubEntryOnlyAbi = [
89
- {
90
- inputs: [
91
- { internalType: 'MarketId', name: 'marketId', type: 'uint24' },
92
- { internalType: 'MarketAcc', name: 'user', type: 'bytes26' },
93
- {
94
- components: [
95
- { internalType: 'OrderId[]', name: 'ids', type: 'uint64[]' },
96
- { internalType: 'bool', name: 'isAll', type: 'bool' },
97
- { internalType: 'bool', name: 'isStrict', type: 'bool' },
98
- ],
99
- internalType: 'struct CancelData',
100
- name: 'cancelData',
101
- type: 'tuple',
102
- },
103
- {
104
- components: [
105
- { internalType: 'enum TimeInForce', name: 'tif', type: 'uint8' },
106
- { internalType: 'enum Side', name: 'side', type: 'uint8' },
107
- { internalType: 'uint256[]', name: 'sizes', type: 'uint256[]' },
108
- { internalType: 'int16[]', name: 'limitTicks', type: 'int16[]' },
109
- ],
110
- internalType: 'struct LongShort',
111
- name: 'orders1',
112
- type: 'tuple',
113
- },
114
- {
115
- components: [
116
- { internalType: 'enum TimeInForce', name: 'tif', type: 'uint8' },
117
- { internalType: 'enum Side', name: 'side', type: 'uint8' },
118
- { internalType: 'uint256[]', name: 'sizes', type: 'uint256[]' },
119
- { internalType: 'int16[]', name: 'limitTicks', type: 'int16[]' },
120
- ],
121
- internalType: 'struct LongShort',
122
- name: 'orders2',
123
- type: 'tuple',
124
- },
125
- ],
126
- name: 'bulkOrders',
127
- outputs: [
128
- { internalType: 'Trade', name: 'matched1', type: 'uint256' },
129
- { internalType: 'Trade', name: 'matched2', type: 'uint256' },
130
- { internalType: 'uint256', name: 'takerFee1', type: 'uint256' },
131
- { internalType: 'uint256', name: 'takerFee2', type: 'uint256' },
132
- ],
133
- stateMutability: 'nonpayable',
134
- type: 'function',
135
- },
136
184
  {
137
185
  inputs: [
138
186
  { internalType: 'MarketAcc', name: 'user', type: 'bytes26' },
@@ -504,6 +552,7 @@ exports.iMarketHubAbi = [
504
552
  inputs: [
505
553
  { indexed: false, internalType: 'address', name: 'root', type: 'address' },
506
554
  { indexed: false, internalType: 'TokenId', name: 'tokenId', type: 'uint16' },
555
+ { indexed: false, internalType: 'uint256', name: 'totalUnscaledAmount', type: 'uint256' },
507
556
  ],
508
557
  name: 'VaultWithdrawalCanceled',
509
558
  type: 'event',
@@ -574,53 +623,6 @@ exports.iMarketHubAbi = [
574
623
  stateMutability: 'nonpayable',
575
624
  type: 'function',
576
625
  },
577
- {
578
- inputs: [
579
- { internalType: 'MarketId', name: 'marketId', type: 'uint24' },
580
- { internalType: 'MarketAcc', name: 'user', type: 'bytes26' },
581
- {
582
- components: [
583
- { internalType: 'OrderId[]', name: 'ids', type: 'uint64[]' },
584
- { internalType: 'bool', name: 'isAll', type: 'bool' },
585
- { internalType: 'bool', name: 'isStrict', type: 'bool' },
586
- ],
587
- internalType: 'struct CancelData',
588
- name: 'cancelData',
589
- type: 'tuple',
590
- },
591
- {
592
- components: [
593
- { internalType: 'enum TimeInForce', name: 'tif', type: 'uint8' },
594
- { internalType: 'enum Side', name: 'side', type: 'uint8' },
595
- { internalType: 'uint256[]', name: 'sizes', type: 'uint256[]' },
596
- { internalType: 'int16[]', name: 'limitTicks', type: 'int16[]' },
597
- ],
598
- internalType: 'struct LongShort',
599
- name: 'orders1',
600
- type: 'tuple',
601
- },
602
- {
603
- components: [
604
- { internalType: 'enum TimeInForce', name: 'tif', type: 'uint8' },
605
- { internalType: 'enum Side', name: 'side', type: 'uint8' },
606
- { internalType: 'uint256[]', name: 'sizes', type: 'uint256[]' },
607
- { internalType: 'int16[]', name: 'limitTicks', type: 'int16[]' },
608
- ],
609
- internalType: 'struct LongShort',
610
- name: 'orders2',
611
- type: 'tuple',
612
- },
613
- ],
614
- name: 'bulkOrders',
615
- outputs: [
616
- { internalType: 'Trade', name: 'matched1', type: 'uint256' },
617
- { internalType: 'Trade', name: 'matched2', type: 'uint256' },
618
- { internalType: 'uint256', name: 'takerFee1', type: 'uint256' },
619
- { internalType: 'uint256', name: 'takerFee2', type: 'uint256' },
620
- ],
621
- stateMutability: 'nonpayable',
622
- type: 'function',
623
- },
624
626
  {
625
627
  inputs: [
626
628
  { internalType: 'MarketAcc', name: 'user', type: 'bytes26' },
@@ -1424,6 +1426,7 @@ exports.iMarketHubAllEventsAndTypesAbi = [
1424
1426
  inputs: [
1425
1427
  { indexed: false, internalType: 'address', name: 'root', type: 'address' },
1426
1428
  { indexed: false, internalType: 'TokenId', name: 'tokenId', type: 'uint16' },
1429
+ { indexed: false, internalType: 'uint256', name: 'totalUnscaledAmount', type: 'uint256' },
1427
1430
  ],
1428
1431
  name: 'VaultWithdrawalCanceled',
1429
1432
  type: 'event',
@@ -1593,6 +1596,7 @@ exports.iMarketHubStorageOnlyAbi = [
1593
1596
  inputs: [
1594
1597
  { indexed: false, internalType: 'address', name: 'root', type: 'address' },
1595
1598
  { indexed: false, internalType: 'TokenId', name: 'tokenId', type: 'uint16' },
1599
+ { indexed: false, internalType: 'uint256', name: 'totalUnscaledAmount', type: 'uint256' },
1596
1600
  ],
1597
1601
  name: 'VaultWithdrawalCanceled',
1598
1602
  type: 'event',
@@ -2357,62 +2361,6 @@ exports.iRouterAbi = [
2357
2361
  stateMutability: 'nonpayable',
2358
2362
  type: 'function',
2359
2363
  },
2360
- {
2361
- inputs: [
2362
- {
2363
- components: [
2364
- { internalType: 'bool', name: 'cross', type: 'bool' },
2365
- { internalType: 'MarketId', name: 'marketId', type: 'uint24' },
2366
- {
2367
- components: [
2368
- { internalType: 'OrderId[]', name: 'ids', type: 'uint64[]' },
2369
- { internalType: 'bool', name: 'isAll', type: 'bool' },
2370
- { internalType: 'bool', name: 'isStrict', type: 'bool' },
2371
- ],
2372
- internalType: 'struct CancelData',
2373
- name: 'cancels',
2374
- type: 'tuple',
2375
- },
2376
- {
2377
- components: [
2378
- { internalType: 'enum TimeInForce', name: 'tif', type: 'uint8' },
2379
- { internalType: 'enum Side', name: 'side', type: 'uint8' },
2380
- { internalType: 'uint256[]', name: 'sizes', type: 'uint256[]' },
2381
- { internalType: 'int16[]', name: 'limitTicks', type: 'int16[]' },
2382
- ],
2383
- internalType: 'struct LongShort',
2384
- name: 'orders1',
2385
- type: 'tuple',
2386
- },
2387
- {
2388
- components: [
2389
- { internalType: 'enum TimeInForce', name: 'tif', type: 'uint8' },
2390
- { internalType: 'enum Side', name: 'side', type: 'uint8' },
2391
- { internalType: 'uint256[]', name: 'sizes', type: 'uint256[]' },
2392
- { internalType: 'int16[]', name: 'limitTicks', type: 'int16[]' },
2393
- ],
2394
- internalType: 'struct LongShort',
2395
- name: 'orders2',
2396
- type: 'tuple',
2397
- },
2398
- { internalType: 'int128', name: 'desiredMatchRate1', type: 'int128' },
2399
- { internalType: 'int128', name: 'desiredMatchRate2', type: 'int128' },
2400
- ],
2401
- internalType: 'struct IRouterEventsAndTypes.BulkOrders',
2402
- name: 'req',
2403
- type: 'tuple',
2404
- },
2405
- ],
2406
- name: 'bulkOrders',
2407
- outputs: [
2408
- { internalType: 'Trade', name: 'matched1', type: 'uint256' },
2409
- { internalType: 'Trade', name: 'matched2', type: 'uint256' },
2410
- { internalType: 'uint256', name: 'takerFee1', type: 'uint256' },
2411
- { internalType: 'uint256', name: 'takerFee2', type: 'uint256' },
2412
- ],
2413
- stateMutability: 'nonpayable',
2414
- type: 'function',
2415
- },
2416
2364
  {
2417
2365
  inputs: [
2418
2366
  {
@@ -2551,21 +2499,6 @@ exports.iRouterAbi = [
2551
2499
  stateMutability: 'nonpayable',
2552
2500
  type: 'function',
2553
2501
  },
2554
- {
2555
- inputs: [
2556
- { internalType: 'bool', name: 'cross', type: 'bool' },
2557
- { internalType: 'MarketId', name: 'marketId', type: 'uint24' },
2558
- { internalType: 'MarketAcc', name: 'violator', type: 'bytes26' },
2559
- { internalType: 'int256', name: 'sizeToLiquidator', type: 'int256' },
2560
- ],
2561
- name: 'liquidate',
2562
- outputs: [
2563
- { internalType: 'Trade', name: 'liqTrade', type: 'uint256' },
2564
- { internalType: 'uint256', name: 'liqFee', type: 'uint256' },
2565
- ],
2566
- stateMutability: 'nonpayable',
2567
- type: 'function',
2568
- },
2569
2502
  {
2570
2503
  inputs: [],
2571
2504
  name: 'maxIterationAndEps',
@@ -7250,62 +7183,6 @@ exports.iTradeModuleAbi = [
7250
7183
  stateMutability: 'nonpayable',
7251
7184
  type: 'function',
7252
7185
  },
7253
- {
7254
- inputs: [
7255
- {
7256
- components: [
7257
- { internalType: 'bool', name: 'cross', type: 'bool' },
7258
- { internalType: 'MarketId', name: 'marketId', type: 'uint24' },
7259
- {
7260
- components: [
7261
- { internalType: 'OrderId[]', name: 'ids', type: 'uint64[]' },
7262
- { internalType: 'bool', name: 'isAll', type: 'bool' },
7263
- { internalType: 'bool', name: 'isStrict', type: 'bool' },
7264
- ],
7265
- internalType: 'struct CancelData',
7266
- name: 'cancels',
7267
- type: 'tuple',
7268
- },
7269
- {
7270
- components: [
7271
- { internalType: 'enum TimeInForce', name: 'tif', type: 'uint8' },
7272
- { internalType: 'enum Side', name: 'side', type: 'uint8' },
7273
- { internalType: 'uint256[]', name: 'sizes', type: 'uint256[]' },
7274
- { internalType: 'int16[]', name: 'limitTicks', type: 'int16[]' },
7275
- ],
7276
- internalType: 'struct LongShort',
7277
- name: 'orders1',
7278
- type: 'tuple',
7279
- },
7280
- {
7281
- components: [
7282
- { internalType: 'enum TimeInForce', name: 'tif', type: 'uint8' },
7283
- { internalType: 'enum Side', name: 'side', type: 'uint8' },
7284
- { internalType: 'uint256[]', name: 'sizes', type: 'uint256[]' },
7285
- { internalType: 'int16[]', name: 'limitTicks', type: 'int16[]' },
7286
- ],
7287
- internalType: 'struct LongShort',
7288
- name: 'orders2',
7289
- type: 'tuple',
7290
- },
7291
- { internalType: 'int128', name: 'desiredMatchRate1', type: 'int128' },
7292
- { internalType: 'int128', name: 'desiredMatchRate2', type: 'int128' },
7293
- ],
7294
- internalType: 'struct IRouterEventsAndTypes.BulkOrders',
7295
- name: 'req',
7296
- type: 'tuple',
7297
- },
7298
- ],
7299
- name: 'bulkOrders',
7300
- outputs: [
7301
- { internalType: 'Trade', name: 'matched1', type: 'uint256' },
7302
- { internalType: 'Trade', name: 'matched2', type: 'uint256' },
7303
- { internalType: 'uint256', name: 'takerFee1', type: 'uint256' },
7304
- { internalType: 'uint256', name: 'takerFee2', type: 'uint256' },
7305
- ],
7306
- stateMutability: 'nonpayable',
7307
- type: 'function',
7308
- },
7309
7186
  {
7310
7187
  inputs: [
7311
7188
  {
@@ -7414,21 +7291,6 @@ exports.iTradeModuleAbi = [
7414
7291
  stateMutability: 'nonpayable',
7415
7292
  type: 'function',
7416
7293
  },
7417
- {
7418
- inputs: [
7419
- { internalType: 'bool', name: 'cross', type: 'bool' },
7420
- { internalType: 'MarketId', name: 'marketId', type: 'uint24' },
7421
- { internalType: 'MarketAcc', name: 'violator', type: 'bytes26' },
7422
- { internalType: 'int256', name: 'sizeToLiquidator', type: 'int256' },
7423
- ],
7424
- name: 'liquidate',
7425
- outputs: [
7426
- { internalType: 'Trade', name: 'liqTrade', type: 'uint256' },
7427
- { internalType: 'uint256', name: 'liqFee', type: 'uint256' },
7428
- ],
7429
- stateMutability: 'nonpayable',
7430
- type: 'function',
7431
- },
7432
7294
  {
7433
7295
  inputs: [
7434
7296
  {
@@ -7878,7 +7740,6 @@ exports.iFIndexOracleAbi = [
7878
7740
  { indexed: false, internalType: 'uint64', name: 'newSettleFeeRate', type: 'uint64' },
7879
7741
  { indexed: false, internalType: 'uint32', name: 'newUpdatePeriod', type: 'uint32' },
7880
7742
  { indexed: false, internalType: 'uint32', name: 'newMaxUpdateDelay', type: 'uint32' },
7881
- { indexed: false, internalType: 'uint128', name: 'newMaxFRateDeviationFactor', type: 'uint128' },
7882
7743
  ],
7883
7744
  name: 'ConfigUpdated',
7884
7745
  type: 'event',
@@ -7896,7 +7757,6 @@ exports.iFIndexOracleAbi = [
7896
7757
  { internalType: 'uint64', name: 'settleFeeRate', type: 'uint64' },
7897
7758
  { internalType: 'uint32', name: 'updatePeriod', type: 'uint32' },
7898
7759
  { internalType: 'uint32', name: 'maxUpdateDelay', type: 'uint32' },
7899
- { internalType: 'uint128', name: 'maxFRateDeviationFactor', type: 'uint128' },
7900
7760
  ],
7901
7761
  stateMutability: 'view',
7902
7762
  type: 'function',
@@ -7948,7 +7808,6 @@ exports.iFIndexOracleAbi = [
7948
7808
  { internalType: 'uint64', name: 'settleFeeRate', type: 'uint64' },
7949
7809
  { internalType: 'uint32', name: 'updatePeriod', type: 'uint32' },
7950
7810
  { internalType: 'uint32', name: 'maxFUpdateDelay', type: 'uint32' },
7951
- { internalType: 'uint128', name: 'maxFRateDeviationFactor', type: 'uint128' },
7952
7811
  ],
7953
7812
  name: 'setConfig',
7954
7813
  outputs: [],
@@ -7967,7 +7826,7 @@ exports.iFIndexOracleAbi = [
7967
7826
  { internalType: 'int112', name: 'floatingIndexDelta', type: 'int112' },
7968
7827
  { internalType: 'uint32', name: 'desiredTimestamp', type: 'uint32' },
7969
7828
  ],
7970
- name: 'updateFloatingIndex',
7829
+ name: 'updateFloatingRate',
7971
7830
  outputs: [],
7972
7831
  stateMutability: 'nonpayable',
7973
7832
  type: 'function',