@gmx-io/sdk 1.1.2 → 1.2.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/build/cjs/src/abis/ClaimHandler.json +439 -0
- package/build/cjs/src/abis/StBTC.json +1225 -0
- package/build/cjs/src/abis/SyntheticsReader.json +480 -19
- package/build/cjs/src/abis/index.js +4 -0
- package/build/cjs/src/configs/__tests__/markets.spec.js +1 -1
- package/build/cjs/src/configs/__tests__/tokens.spec.js +2 -1
- package/build/cjs/src/configs/batch.js +12 -0
- package/build/cjs/src/configs/chains.js +57 -6
- package/build/cjs/src/configs/contracts.js +66 -68
- package/build/cjs/src/configs/dataStore.js +14 -3
- package/build/cjs/src/configs/express.js +4 -2
- package/build/cjs/src/configs/markets.js +72 -0
- package/build/cjs/src/configs/oracleKeeper.js +19 -34
- package/build/cjs/src/configs/tokens.js +185 -1
- package/build/cjs/src/index.js +3 -3
- package/build/cjs/src/modules/orders/helpers.js +21 -13
- package/build/cjs/src/modules/orders/helpers.spec.js +1 -1
- package/build/cjs/src/modules/orders/orders.js +3 -3
- package/build/cjs/src/modules/positions/positions.js +9 -0
- package/build/cjs/src/modules/utils/utils.js +3 -3
- package/build/cjs/src/prebuilt/hashedKinkModelMarketRatesKeys.json +82 -0
- package/build/cjs/src/prebuilt/hashedMarketConfigKeys.json +512 -0
- package/build/cjs/src/prebuilt/hashedMarketValuesKeys.json +152 -0
- package/build/cjs/src/types/subsquid.js +193 -1
- package/build/cjs/src/types/swapStrategy.js +2 -0
- package/build/cjs/src/types/trade.js +1 -0
- package/build/cjs/src/utils/__tests__/numbers.spec.js +17 -9
- package/build/cjs/src/utils/__tests__/orderTransactions/decreaseOrders.spec.js +2 -0
- package/build/cjs/src/utils/__tests__/orderTransactions/exchangeRouterMulticall.spec.js +2 -0
- package/build/cjs/src/utils/__tests__/orderTransactions/increaseOrders.spec.js +4 -0
- package/build/cjs/src/utils/__tests__/orderTransactions/swapOrders.spec.js +1 -0
- package/build/cjs/src/utils/__tests__/prices.spec.js +3 -2
- package/build/cjs/src/utils/__tests__/uiFeeReceiver.spec.js +19 -0
- package/build/cjs/src/utils/errors/transactionsErrors.js +9 -2
- package/build/cjs/src/utils/fees/executionFee.js +9 -1
- package/build/cjs/src/utils/numbers.js +52 -34
- package/build/cjs/src/utils/orderTransactions.js +3 -1
- package/build/cjs/src/utils/orders.js +8 -2
- package/build/cjs/src/utils/prices.js +1 -1
- package/build/cjs/src/utils/swap/botanixStaking.js +90 -0
- package/build/cjs/src/utils/swap/buildSwapStrategy.js +224 -0
- package/build/cjs/src/utils/swap/externalSwapPath.js +41 -0
- package/build/cjs/src/utils/swap/externalSwapQuoteByPath.js +27 -0
- package/build/cjs/src/utils/swap/swapValues.js +288 -9
- package/build/cjs/src/utils/tokens.js +10 -1
- package/build/cjs/src/utils/trade/amounts.js +89 -41
- package/build/cjs/src/utils/trade/trade.js +2 -2
- package/build/cjs/src/utils/twap/uiFeeReceiver.js +26 -6
- package/build/esm/src/abis/ClaimHandler.json +439 -0
- package/build/esm/src/abis/StBTC.json +1225 -0
- package/build/esm/src/abis/SyntheticsReader.json +480 -19
- package/build/esm/src/abis/index.js +4 -0
- package/build/esm/src/configs/__tests__/markets.spec.js +1 -1
- package/build/esm/src/configs/__tests__/tokens.spec.js +3 -2
- package/build/esm/src/configs/batch.js +13 -1
- package/build/esm/src/configs/chains.js +56 -5
- package/build/esm/src/configs/contracts.js +67 -69
- package/build/esm/src/configs/dataStore.js +9 -0
- package/build/esm/src/configs/express.js +5 -3
- package/build/esm/src/configs/markets.js +73 -1
- package/build/esm/src/configs/oracleKeeper.js +18 -29
- package/build/esm/src/configs/tokens.js +186 -2
- package/build/esm/src/index.js +3 -3
- package/build/esm/src/modules/orders/helpers.js +21 -13
- package/build/esm/src/modules/orders/helpers.spec.js +1 -1
- package/build/esm/src/modules/orders/orders.js +3 -3
- package/build/esm/src/modules/positions/positions.js +9 -0
- package/build/esm/src/modules/utils/utils.js +3 -3
- package/build/esm/src/prebuilt/hashedKinkModelMarketRatesKeys.json +82 -0
- package/build/esm/src/prebuilt/hashedMarketConfigKeys.json +512 -0
- package/build/esm/src/prebuilt/hashedMarketValuesKeys.json +152 -0
- package/build/esm/src/types/subsquid.js +192 -0
- package/build/esm/src/types/swapStrategy.js +1 -0
- package/build/esm/src/types/trade.js +1 -0
- package/build/esm/src/utils/__tests__/numbers.spec.js +18 -10
- package/build/esm/src/utils/__tests__/orderTransactions/decreaseOrders.spec.js +2 -0
- package/build/esm/src/utils/__tests__/orderTransactions/exchangeRouterMulticall.spec.js +2 -0
- package/build/esm/src/utils/__tests__/orderTransactions/increaseOrders.spec.js +4 -0
- package/build/esm/src/utils/__tests__/orderTransactions/swapOrders.spec.js +1 -0
- package/build/esm/src/utils/__tests__/prices.spec.js +3 -2
- package/build/esm/src/utils/__tests__/uiFeeReceiver.spec.js +20 -1
- package/build/esm/src/utils/errors/transactionsErrors.js +9 -2
- package/build/esm/src/utils/fees/executionFee.js +11 -3
- package/build/esm/src/utils/numbers.js +50 -31
- package/build/esm/src/utils/orderTransactions.js +3 -1
- package/build/esm/src/utils/orders.js +8 -2
- package/build/esm/src/utils/prices.js +1 -1
- package/build/esm/src/utils/swap/botanixStaking.js +83 -0
- package/build/esm/src/utils/swap/buildSwapStrategy.js +219 -0
- package/build/esm/src/utils/swap/externalSwapPath.js +37 -0
- package/build/esm/src/utils/swap/externalSwapQuoteByPath.js +23 -0
- package/build/esm/src/utils/swap/swapValues.js +287 -8
- package/build/esm/src/utils/tokens.js +7 -0
- package/build/esm/src/utils/trade/amounts.js +89 -41
- package/build/esm/src/utils/trade/trade.js +2 -2
- package/build/esm/src/utils/twap/uiFeeReceiver.js +24 -5
- package/build/types/src/abis/index.d.ts +1 -1
- package/build/types/src/configs/batch.d.ts +2 -1
- package/build/types/src/configs/chains.d.ts +20 -37
- package/build/types/src/configs/contracts.d.ts +62 -63
- package/build/types/src/configs/dataStore.d.ts +5 -0
- package/build/types/src/configs/express.d.ts +1 -0
- package/build/types/src/configs/markets.d.ts +2 -1
- package/build/types/src/configs/oracleKeeper.d.ts +2 -3
- package/build/types/src/configs/tokens.d.ts +1 -0
- package/build/types/src/index.d.ts +1 -1
- package/build/types/src/modules/base.d.ts +1 -1
- package/build/types/src/modules/orders/helpers.d.ts +10 -2
- package/build/types/src/modules/orders/orders.d.ts +10 -1
- package/build/types/src/types/orders.d.ts +1 -1
- package/build/types/src/types/sdk.d.ts +2 -1
- package/build/types/src/types/subsquid.d.ts +691 -0
- package/build/types/src/types/swapStrategy.d.ts +33 -0
- package/build/types/src/types/tokens.d.ts +6 -0
- package/build/types/src/types/trade.d.ts +19 -4
- package/build/types/src/utils/multicall.d.ts +1 -1
- package/build/types/src/utils/numbers.d.ts +8 -3
- package/build/types/src/utils/orderTransactions.d.ts +2 -3
- package/build/types/src/utils/prices.d.ts +1 -1
- package/build/types/src/utils/swap/botanixStaking.d.ts +11 -0
- package/build/types/src/utils/swap/buildSwapStrategy.d.ts +22 -0
- package/build/types/src/utils/swap/externalSwapPath.d.ts +13 -0
- package/build/types/src/utils/swap/externalSwapQuoteByPath.d.ts +6 -0
- package/build/types/src/utils/swap/swapValues.d.ts +10 -3
- package/build/types/src/utils/tokens.d.ts +2 -0
- package/build/types/src/utils/trade/amounts.d.ts +5 -2
- package/build/types/src/utils/twap/uiFeeReceiver.d.ts +13 -0
- package/package.json +1 -1
|
@@ -1,4 +1,36 @@
|
|
|
1
1
|
{
|
|
2
|
+
"3637": {
|
|
3
|
+
"0x6682BB60590a045A956541B1433f016Ed22E361d": {
|
|
4
|
+
"longPoolAmount": "0x69a00ee30c22f748c1aa54b8f77a5b786c365e817497322cea18cba5e12f8446",
|
|
5
|
+
"shortPoolAmount": "0x69a00ee30c22f748c1aa54b8f77a5b786c365e817497322cea18cba5e12f8446",
|
|
6
|
+
"positionImpactPoolAmount": "0xe72b2da1beeaa2cde5f5861b60f1adb27ed581864c6e39ecb37f8794e03e174d",
|
|
7
|
+
"swapImpactPoolAmountLong": "0x02603eac1d091c38978f864769361f985169348da32b431d4c0ee7c8559fddc1",
|
|
8
|
+
"swapImpactPoolAmountShort": "0x02603eac1d091c38978f864769361f985169348da32b431d4c0ee7c8559fddc1",
|
|
9
|
+
"longInterestUsingLongToken": "0x214be68b117ab3421e08bccb2521f805f76ae486dc92f1464abb3d7ed9ce907c",
|
|
10
|
+
"longInterestUsingShortToken": "0x214be68b117ab3421e08bccb2521f805f76ae486dc92f1464abb3d7ed9ce907c",
|
|
11
|
+
"shortInterestUsingLongToken": "0x44a1c0cc7e5e724918f78b1ae77c240bc1dec8098ddefd9fb15dfb4e06f58b39",
|
|
12
|
+
"shortInterestUsingShortToken": "0x44a1c0cc7e5e724918f78b1ae77c240bc1dec8098ddefd9fb15dfb4e06f58b39",
|
|
13
|
+
"longInterestInTokensUsingLongToken": "0xddc7e3aefe087c9ff970def36636c36cefa45ea75bf9d99c2747b921d46e3936",
|
|
14
|
+
"longInterestInTokensUsingShortToken": "0xddc7e3aefe087c9ff970def36636c36cefa45ea75bf9d99c2747b921d46e3936",
|
|
15
|
+
"shortInterestInTokensUsingLongToken": "0x85a20a5a323d16c5f5ecbc2d6352b4f47dc7921eef88e4cc987b3c8022e6a87f",
|
|
16
|
+
"shortInterestInTokensUsingShortToken": "0x85a20a5a323d16c5f5ecbc2d6352b4f47dc7921eef88e4cc987b3c8022e6a87f"
|
|
17
|
+
},
|
|
18
|
+
"0x2f95a2529328E427d3204555F164B1102086690E": {
|
|
19
|
+
"longPoolAmount": "0xecf9656e2b727f8d13f37e55d2400a942dccac9d6381148f77d902fcbe2cf7ee",
|
|
20
|
+
"shortPoolAmount": "0xcfec2d18f35126352a2ce695309d775bbee4fafefe3413f7042939145a8b0573",
|
|
21
|
+
"positionImpactPoolAmount": "0xf6f96ba2726dd8a85b2e9405309d1d848df3d96880d59321dcc218ef8d980668",
|
|
22
|
+
"swapImpactPoolAmountLong": "0x357c18aaf9d45a361d90863904ade24e17fb77c64a416ece27086f31a0d8b054",
|
|
23
|
+
"swapImpactPoolAmountShort": "0xbbb05a1d798d61588b2c44b94b16386d41137dbe373c187371d86d997a9147e1",
|
|
24
|
+
"longInterestUsingLongToken": "0x129ec5ddb1853ff59fe335e75bd2fcfa6bbb9269fdc499282cf18e2f4d5964c9",
|
|
25
|
+
"longInterestUsingShortToken": "0x3f654d7efcfe4f6cb7c83aa01e873c16e5af513cc4f87adf6eed255042a258fc",
|
|
26
|
+
"shortInterestUsingLongToken": "0x1f410105f8be87f75b58b9cdee8d74667aced7496bb99a82f07f68db7ed1beb4",
|
|
27
|
+
"shortInterestUsingShortToken": "0x51765c7340efd23bef0fef20734bbc293d17b324540a253b57bd0337038c7668",
|
|
28
|
+
"longInterestInTokensUsingLongToken": "0x7f172a05ae40ac360e65ac522e8714499e4695d2250d219b96a6cf33fdbc083b",
|
|
29
|
+
"longInterestInTokensUsingShortToken": "0xc34e82056451cf4f589cdb5609780092eef55a11937ecb6b97120c6425979ea4",
|
|
30
|
+
"shortInterestInTokensUsingLongToken": "0xdfc2472d4b9b2c6f4b2754c1ade2bef5e4fe747aa61d86922f62b34d4f9b09bb",
|
|
31
|
+
"shortInterestInTokensUsingShortToken": "0x3eff00ec29f463c99b6b378801ecb7b167366433326231573f74fa7ae20bbe20"
|
|
32
|
+
}
|
|
33
|
+
},
|
|
2
34
|
"42161": {
|
|
3
35
|
"0x47c031236e19d024b42f8AE6780E44A573170703": {
|
|
4
36
|
"longPoolAmount": "0xc97d6ba9e3cbf19c2bdb3eb671109e97cbbb0c4684ac5ea9b34fffbf3fff84fb",
|
|
@@ -1304,6 +1336,111 @@
|
|
|
1304
1336
|
"longInterestInTokensUsingShortToken": "0x270eaf7ded63283fe668107dae6e74b2f65611f2ce8ac93f7587aa42690e726a",
|
|
1305
1337
|
"shortInterestInTokensUsingLongToken": "0xba25770c0d2c19cb82136ca008f7f59e3f0a6273159a121852ef001e7fcf5cd4",
|
|
1306
1338
|
"shortInterestInTokensUsingShortToken": "0x434a95fd250b7b15239714a1a92599a7706c946310e7cc999a66202318a3b9d5"
|
|
1339
|
+
},
|
|
1340
|
+
"0x4C0Bb704529Fa49A26bD854802d70206982c6f1B": {
|
|
1341
|
+
"longPoolAmount": "0xc996bc9829549ec431dc6686d166b850c834ca57d6d13eef76878eb034346f49",
|
|
1342
|
+
"shortPoolAmount": "0x73576063b41f5bfab75ba59775beae18756d9a05d1934205cd5c1c8ba136c37f",
|
|
1343
|
+
"positionImpactPoolAmount": "0x336c51bf0ded13ba7909d73214583e37c9b26efea4938aceda45c44e8a3daf11",
|
|
1344
|
+
"swapImpactPoolAmountLong": "0x82459c6efac2e94161ec6d0598601585325eef90f2af9881301f2278fee5099f",
|
|
1345
|
+
"swapImpactPoolAmountShort": "0x9f0dbc64c99da086cb864d7e695f4e7f266ca1440f08ec043ff6ed3665184d81",
|
|
1346
|
+
"longInterestUsingLongToken": "0x7994ea7561117141e087e7af8aa01cf4051b35e85120e52501d1e5796828d4b9",
|
|
1347
|
+
"longInterestUsingShortToken": "0xb5d3a077dd57f1759a6d816686fbf4107a01d451800b80f4ac2355fa60c2310f",
|
|
1348
|
+
"shortInterestUsingLongToken": "0xb28ff06b21c5927f46a4156fee083f0c7441fd5c53971d47344678e9ef9cf0ae",
|
|
1349
|
+
"shortInterestUsingShortToken": "0xf2729a78f904139a3e33a1278c11af17d3b46e5f5ca6223c397814f052e5d019",
|
|
1350
|
+
"longInterestInTokensUsingLongToken": "0xaeeeb61d7d9544320d5c9223f4d671475bfb227124129ec581bdd1c9427961b0",
|
|
1351
|
+
"longInterestInTokensUsingShortToken": "0x3f8f433c8c804ca8bc6c5c383e9201516559ee81f67de93db9ce8b2c2ee2403b",
|
|
1352
|
+
"shortInterestInTokensUsingLongToken": "0xf8b11af0ad2d1ab5f63791944792e3d3c96e5973b7f003dd86bd4314a25dcda9",
|
|
1353
|
+
"shortInterestInTokensUsingShortToken": "0x4ed2301ae42565af0bc559a51c13c60223d0159f349ccc0efc2f080d3a467298"
|
|
1354
|
+
},
|
|
1355
|
+
"0x8263bC3766a09f6dD4Bab04b4bf8D45F2B0973FF": {
|
|
1356
|
+
"longPoolAmount": "0x376d10c7c9e12d555cc72da9c11f290bb948dee849e7ac53c9919cb7ea326356",
|
|
1357
|
+
"shortPoolAmount": "0x0328aa07dddd94e5b175e0c18e2a038a87ef77dbe0f01598abfd5334e14f8e5e",
|
|
1358
|
+
"positionImpactPoolAmount": "0xec2057fa3283a4b58a58071d0fc709fbabe164669de94f39a32c0f9e6d8ad857",
|
|
1359
|
+
"swapImpactPoolAmountLong": "0xcad777762cbf8191fdc7a83fed0b6dc7267c3ec95deafbc3f278c78640f5def2",
|
|
1360
|
+
"swapImpactPoolAmountShort": "0x4ea39496d661599d66dd7c36f636e2beb1d9f22d494251079661ef97b260796b",
|
|
1361
|
+
"longInterestUsingLongToken": "0x60b2619176219b8e25afc32c0822b3ff9866f234f23171cd5c443e1307aadb83",
|
|
1362
|
+
"longInterestUsingShortToken": "0x2d9f098282c2b594ffa540647b1ac0c6209b17e64061586c5c89f70b7f1e561c",
|
|
1363
|
+
"shortInterestUsingLongToken": "0x46574cd73b54eb902ef9f6257cf28096088a744437a313e50ac6a3dcdde873ad",
|
|
1364
|
+
"shortInterestUsingShortToken": "0xa8bbf0769960efdfe8fcd0fb1dd38f6713bf76f3980f613aee0fb1c8fbcb5fa6",
|
|
1365
|
+
"longInterestInTokensUsingLongToken": "0x64f6ab661c3fb1f4782cee482f58fa61e4a8e8f100f407793406835061104b48",
|
|
1366
|
+
"longInterestInTokensUsingShortToken": "0x2aa02635cddc8d2c7be1cb924b3bb933eeb0fea6fa8a5a480180c0d0cb7d3aca",
|
|
1367
|
+
"shortInterestInTokensUsingLongToken": "0x82047a97d39c5c336f198c2c03598016c99e5e7c055d3507be800f23e516aef6",
|
|
1368
|
+
"shortInterestInTokensUsingShortToken": "0xe2de08baa4086bcdaa890f544b6144c2a3e1f7687a0724b6d9211851eb8851cb"
|
|
1369
|
+
},
|
|
1370
|
+
"0x40dAEAc02dCf6b3c51F9151f532C21DCEF2F7E63": {
|
|
1371
|
+
"longPoolAmount": "0x3ada05b4ab6a01c1e9d5d14a6623330ac706b167ef0a071c44caae0f2e86fdc5",
|
|
1372
|
+
"shortPoolAmount": "0x4549e636396f94e60a42c4e6cf6de9cc4641b422616da34afad3bb545252d55b",
|
|
1373
|
+
"positionImpactPoolAmount": "0x7ac4153f38da7f40234e4278155360da68d5d7ba448b8406a58a32e3984e1c84",
|
|
1374
|
+
"swapImpactPoolAmountLong": "0x23d98dcb90fa99c0c0afaf8da74219739891cb8110408cf62f0ff7ee9791b841",
|
|
1375
|
+
"swapImpactPoolAmountShort": "0x67689a5fe771bcce0255ea6af7497ebdf969b44a2925b0a7d57ab813a7d92528",
|
|
1376
|
+
"longInterestUsingLongToken": "0xb54834f5f22fd80d4bff9e5fad82cdc0812f9c92145c9213d61ec65e023f4a49",
|
|
1377
|
+
"longInterestUsingShortToken": "0x6b03ae70dddc4ea9ffac583d90730c4deb7aa91f2e05b0ef4496373135f501db",
|
|
1378
|
+
"shortInterestUsingLongToken": "0xb7825b979161efdf744c59e3a2f1ce9a946401f1fff467cdda4c79b4eeef1dee",
|
|
1379
|
+
"shortInterestUsingShortToken": "0x20d46f0c26c10020a4caa0b8508e679b5c0366ffa1957348f4af12e02e8ae627",
|
|
1380
|
+
"longInterestInTokensUsingLongToken": "0xb05b543fd027e0faeac576b85e5eb8dd16dbe9b0a287951e880462f74428dbe7",
|
|
1381
|
+
"longInterestInTokensUsingShortToken": "0x548e4ec925976c9573b2513f3e04ccb85992e7b2f9fcadef9d390972901249d2",
|
|
1382
|
+
"shortInterestInTokensUsingLongToken": "0x43eeca3a191fb5f9d6e028d433477afb80d8bc8be6d4736ca40f72100ed01760",
|
|
1383
|
+
"shortInterestInTokensUsingShortToken": "0x08fb093e1d5256360f715652095ebef083a166cb62c222f96d377cc7aee3e961"
|
|
1384
|
+
},
|
|
1385
|
+
"0x672fEA44f4583DdaD620d60C1Ac31021F47558Cb": {
|
|
1386
|
+
"longPoolAmount": "0xd88d77f52c0605af9087b8ac011f7ce71651f30489699ab476eaaf49fe3169be",
|
|
1387
|
+
"shortPoolAmount": "0xd88d77f52c0605af9087b8ac011f7ce71651f30489699ab476eaaf49fe3169be",
|
|
1388
|
+
"positionImpactPoolAmount": "0xc7f1c4797976d4aa2d9af5b9b4bac9af3820775e22a642a5f882d0040e30d7e4",
|
|
1389
|
+
"swapImpactPoolAmountLong": "0x10f2963890a8ae4e833e0f611420b6c41136c2ff83a764654cddfcb185ce39ec",
|
|
1390
|
+
"swapImpactPoolAmountShort": "0x10f2963890a8ae4e833e0f611420b6c41136c2ff83a764654cddfcb185ce39ec",
|
|
1391
|
+
"longInterestUsingLongToken": "0x5ebd54efa4eec2c74d89f7fdbbad947ed4ade7a369f87b940aa4c455a8140f8f",
|
|
1392
|
+
"longInterestUsingShortToken": "0x5ebd54efa4eec2c74d89f7fdbbad947ed4ade7a369f87b940aa4c455a8140f8f",
|
|
1393
|
+
"shortInterestUsingLongToken": "0x300b925f106354291a9776ac37a374aa7149da134418f5f8bdc2b59739fa7829",
|
|
1394
|
+
"shortInterestUsingShortToken": "0x300b925f106354291a9776ac37a374aa7149da134418f5f8bdc2b59739fa7829",
|
|
1395
|
+
"longInterestInTokensUsingLongToken": "0x8ff57a652cd892eade9757b138549656bc9f8dc00d9eeeb3fc4f9bd6f2cc2bd4",
|
|
1396
|
+
"longInterestInTokensUsingShortToken": "0x8ff57a652cd892eade9757b138549656bc9f8dc00d9eeeb3fc4f9bd6f2cc2bd4",
|
|
1397
|
+
"shortInterestInTokensUsingLongToken": "0x81b4fc3022e9cb293b10549fa7ff90ca91abec03ca725ded69a4b35c09858ddf",
|
|
1398
|
+
"shortInterestInTokensUsingShortToken": "0x81b4fc3022e9cb293b10549fa7ff90ca91abec03ca725ded69a4b35c09858ddf"
|
|
1399
|
+
},
|
|
1400
|
+
"0x3B7f4e4Cf2fa43df013d2B32673e6A01d29ab2Ac": {
|
|
1401
|
+
"longPoolAmount": "0x950f55352377af24d3a96bc2a3a38d1e5dfbf04c07d8364475feb8092ec75c64",
|
|
1402
|
+
"shortPoolAmount": "0x0704221c55eb30a2efec7b9d42ad18b41c308c26c638e85ce53d08cc694bb340",
|
|
1403
|
+
"positionImpactPoolAmount": "0x757e7478893be5bf67fc10551f9ed34f1403a3628a8ff3f99bafa17b3ea66b79",
|
|
1404
|
+
"swapImpactPoolAmountLong": "0x7d1c81974ef4c7afb3592f7ebd245358952ca21333678e9ed0685d30b02e8a0a",
|
|
1405
|
+
"swapImpactPoolAmountShort": "0x71ba227bbc9232cd200c2a208ce26cb2991da321664a31bbd5d410174d07eefa",
|
|
1406
|
+
"longInterestUsingLongToken": "0xffbd879ff459c888617ba08141ca99969c83ac9de54990cab294ce2edd9fc9bd",
|
|
1407
|
+
"longInterestUsingShortToken": "0xb86c0a56965a83b03c7f93e6612efc66d78eaffc027d8877b4edf23ad75fa4cc",
|
|
1408
|
+
"shortInterestUsingLongToken": "0x769be22d39b7606b33a7734d76e3b9416cba72fff936b26a9ddb7875b4497dc3",
|
|
1409
|
+
"shortInterestUsingShortToken": "0x1746986fd30dbb8fb1939fe11604f11eeb57acbc85b1a76b5c78551798afdea7",
|
|
1410
|
+
"longInterestInTokensUsingLongToken": "0x19507cd2da36e6ca0e96b043c6b0e853e477cd1aab3ee7f74db45f918910549d",
|
|
1411
|
+
"longInterestInTokensUsingShortToken": "0x8d9c0ab0775b9405e5f54458dcbe28bfa2a49a07e39253b6d9735a77ba8a6c16",
|
|
1412
|
+
"shortInterestInTokensUsingLongToken": "0x10863b6d78d3d1746d0bb8de8b7e3df021ddcdc1008d6c1ede3c3bfb30f08199",
|
|
1413
|
+
"shortInterestInTokensUsingShortToken": "0x98724366736175a92826c63d94d611bc2ea3a63f24714d71c2c106a24a7548ea"
|
|
1414
|
+
},
|
|
1415
|
+
"0xa29FfE4152B65A0347512Ae5c6A4Bbc7a3d6d51B": {
|
|
1416
|
+
"longPoolAmount": "0x6693ae65f8c7bbbdb4dafdc6e2d2a4824b589b7c7454b411517e795feae42bc8",
|
|
1417
|
+
"shortPoolAmount": "0x29057b0a5f9faf83d5b250aa95a44056aafe0c87f6ebbed9ff5bede52e4b2d7e",
|
|
1418
|
+
"positionImpactPoolAmount": "0x2882e4b9bb2ad8ea954630b4ecb75982cf32cba38bac0acaf3db59d61735bee3",
|
|
1419
|
+
"swapImpactPoolAmountLong": "0xd496578938511700e33179b3c23bd8fed3ce421ad8800f4dfd11e3363ba2dddb",
|
|
1420
|
+
"swapImpactPoolAmountShort": "0x3308ca648709f2b017c80f87483d2f87e1f55bc67d0a7de075d50ef01af25a13",
|
|
1421
|
+
"longInterestUsingLongToken": "0xd5f0aacccbc59df807fe217610dff270e934ce85b5629a8bd93f723389fd628c",
|
|
1422
|
+
"longInterestUsingShortToken": "0x250a4ce3cc83fa6179cdff4c755cd1434fa1d2ca4fbc8dd0db896098ce0fd94a",
|
|
1423
|
+
"shortInterestUsingLongToken": "0x977c23ba871ab8a9572a25e627de71e8665f2ff6f3bcd6fb8aa1c033382ec0a1",
|
|
1424
|
+
"shortInterestUsingShortToken": "0xce032220c9bf7365cd2b408a5f6bb2df31f6220585ceaaffbecb714a182cba81",
|
|
1425
|
+
"longInterestInTokensUsingLongToken": "0xbb9538095139b99b8d1a471e5298108f9879203fdc9f88e302b98edbc810f377",
|
|
1426
|
+
"longInterestInTokensUsingShortToken": "0xaf453df5666a65e4ccc0f2a16fe04f10e5c7c44b0c24d8ebfdd1da10e0b57e1e",
|
|
1427
|
+
"shortInterestInTokensUsingLongToken": "0x168d1abf6abf13f235b7fbc88ac6a316e280110fb243fa96ba0d1d39184a8863",
|
|
1428
|
+
"shortInterestInTokensUsingShortToken": "0xfd8853a8fc94ff0f74ae1b99c4dd162d6a5673bf3a2b1d7cea2217cfecd8ad2a"
|
|
1429
|
+
},
|
|
1430
|
+
"0x9f0849FB830679829d1FB759b11236D375D15C78": {
|
|
1431
|
+
"longPoolAmount": "0x21b6ff319e87d9484b5155577154f1e7eb2a02719b2c78877e1b878bd628aab6",
|
|
1432
|
+
"shortPoolAmount": "0xcbcc6f24046ab5a5cb181328fc5279797aa888128db0943ca97d5e29cd07589c",
|
|
1433
|
+
"positionImpactPoolAmount": "0x7bc771e3bd2c1e339894d8cc0e339f3bd29571b1f81dc4aaab752d9d5c4565d8",
|
|
1434
|
+
"swapImpactPoolAmountLong": "0x9b8e8803dce19ab635bdcbd739151269bdcfe50181bdded95378e3fd86b32060",
|
|
1435
|
+
"swapImpactPoolAmountShort": "0x55f2af971ae258c2ac5ae48e016329ea7e3d41558f1171bc082f9de3c822dff3",
|
|
1436
|
+
"longInterestUsingLongToken": "0xe7339c70b7e5f38ed83fde6e7db586b5472612110751aa45da936bdbac49d176",
|
|
1437
|
+
"longInterestUsingShortToken": "0x8be7905da5f947c317e5183fdcb4ccfa7dc100dd7b612f5c7ba9ecba45220914",
|
|
1438
|
+
"shortInterestUsingLongToken": "0x35cff8db41f43cd082d5ec9e12c8e41e96e62da8ad6e9f62c24ab649ae2de828",
|
|
1439
|
+
"shortInterestUsingShortToken": "0xd933217c4dd384699dac11292fa70a208607ffbf9a63beb7bae9d66b1b7080b8",
|
|
1440
|
+
"longInterestInTokensUsingLongToken": "0x3953a9515c3bf950fa114c7de0c76524b7dce1188855ed5e1858ff72a757b4f3",
|
|
1441
|
+
"longInterestInTokensUsingShortToken": "0x0b102716f7adc9208283d13cf4d33943256dda36d1ee07862e50753261911492",
|
|
1442
|
+
"shortInterestInTokensUsingLongToken": "0x6a9fe892379ef84c1da651fb1b30387a0d01a1569c5351d4a18984b34bfd1f62",
|
|
1443
|
+
"shortInterestInTokensUsingShortToken": "0x84181252090dc10bfd3e2e1e50d08518e7699461a3fa413f0231e14bdacb16fd"
|
|
1307
1444
|
}
|
|
1308
1445
|
},
|
|
1309
1446
|
"43113": {
|
|
@@ -1848,6 +1985,21 @@
|
|
|
1848
1985
|
"longInterestInTokensUsingShortToken": "0xaf01e4f4a7b0884f217695d374acc70a5904db6d460bc5c5d31591557300f689",
|
|
1849
1986
|
"shortInterestInTokensUsingLongToken": "0x562b9a09cca894aa54f6d4b17a72fe7e9c4ddc4686516dcfd15a597f3eec7ee3",
|
|
1850
1987
|
"shortInterestInTokensUsingShortToken": "0xc563cc005593b275e1c8e42f993a0b8df38c5d1634f6867ece778bea7be36823"
|
|
1988
|
+
},
|
|
1989
|
+
"0x94cE6F65188a92F297C7f0A5A7B3cAd9013450F8": {
|
|
1990
|
+
"longPoolAmount": "0x0cfc5b6a91f7d200cae8e17385f5c1fd9b500ba6919cbf2e8cec407444011762",
|
|
1991
|
+
"shortPoolAmount": "0xb6914e1bc1f98f7ccb5bd8c45a6f66837aaa99b2dd99cce7445612f34d61159b",
|
|
1992
|
+
"positionImpactPoolAmount": "0xdee53ff0bba09c25e3b7b789306f2f0748efb7192065f1e8f7048e202dd961a6",
|
|
1993
|
+
"swapImpactPoolAmountLong": "0x80a076262b69e244f998a5e5223c9be6a98454c49f5035e917e980745aedb3c1",
|
|
1994
|
+
"swapImpactPoolAmountShort": "0x0ef33099e30c494475f3538713b9d743ef7d10110336e09a076dba073c1d50c2",
|
|
1995
|
+
"longInterestUsingLongToken": "0xb7bd39bc06702cd6a32bb1f032526ef3eccbfe167f07f613fe092b0407dfbc2f",
|
|
1996
|
+
"longInterestUsingShortToken": "0xa4f7b789a5352e3e7647a57749c1c429c988f01e0418f452cff7ffac89a1ab31",
|
|
1997
|
+
"shortInterestUsingLongToken": "0xc535618ec842c32b50e86466a8d22286ad738227af317ce4d50dcb098780b650",
|
|
1998
|
+
"shortInterestUsingShortToken": "0x4de2b3fa042fd5b54999ab452e6fb1080a078f2ccf6e19c933ad1414defb3730",
|
|
1999
|
+
"longInterestInTokensUsingLongToken": "0x3c9e0baac56e2818c4a3eb98924f340b2f65d5fec4afe3238d2744be64c62406",
|
|
2000
|
+
"longInterestInTokensUsingShortToken": "0xd0ce682e37dcac3e21bfb60546f612310ddc6d55cde3010a03f39c8254c58c9e",
|
|
2001
|
+
"shortInterestInTokensUsingLongToken": "0xe4a0a086a57e5ebf93c02996173518a25df8280b48bfaab22ddad851d5d5f279",
|
|
2002
|
+
"shortInterestInTokensUsingShortToken": "0x459afc07ae83faa216fe9bcbbb75a032a0557d866842476547540f230077ab76"
|
|
1851
2003
|
}
|
|
1852
2004
|
}
|
|
1853
2005
|
}
|
|
@@ -339,6 +339,75 @@ export var CollectedFeesInfoOrderByInput;
|
|
|
339
339
|
CollectedFeesInfoOrderByInput["timestampGroup_DESC_NULLS_FIRST"] = "timestampGroup_DESC_NULLS_FIRST";
|
|
340
340
|
CollectedFeesInfoOrderByInput["timestampGroup_DESC_NULLS_LAST"] = "timestampGroup_DESC_NULLS_LAST";
|
|
341
341
|
})(CollectedFeesInfoOrderByInput || (CollectedFeesInfoOrderByInput = {}));
|
|
342
|
+
export var CumulativePnlOrderByInput;
|
|
343
|
+
(function (CumulativePnlOrderByInput) {
|
|
344
|
+
CumulativePnlOrderByInput["address_ASC"] = "address_ASC";
|
|
345
|
+
CumulativePnlOrderByInput["address_ASC_NULLS_FIRST"] = "address_ASC_NULLS_FIRST";
|
|
346
|
+
CumulativePnlOrderByInput["address_ASC_NULLS_LAST"] = "address_ASC_NULLS_LAST";
|
|
347
|
+
CumulativePnlOrderByInput["address_DESC"] = "address_DESC";
|
|
348
|
+
CumulativePnlOrderByInput["address_DESC_NULLS_FIRST"] = "address_DESC_NULLS_FIRST";
|
|
349
|
+
CumulativePnlOrderByInput["address_DESC_NULLS_LAST"] = "address_DESC_NULLS_LAST";
|
|
350
|
+
CumulativePnlOrderByInput["cumulativeRealizedPnlLong_ASC"] = "cumulativeRealizedPnlLong_ASC";
|
|
351
|
+
CumulativePnlOrderByInput["cumulativeRealizedPnlLong_ASC_NULLS_FIRST"] = "cumulativeRealizedPnlLong_ASC_NULLS_FIRST";
|
|
352
|
+
CumulativePnlOrderByInput["cumulativeRealizedPnlLong_ASC_NULLS_LAST"] = "cumulativeRealizedPnlLong_ASC_NULLS_LAST";
|
|
353
|
+
CumulativePnlOrderByInput["cumulativeRealizedPnlLong_DESC"] = "cumulativeRealizedPnlLong_DESC";
|
|
354
|
+
CumulativePnlOrderByInput["cumulativeRealizedPnlLong_DESC_NULLS_FIRST"] = "cumulativeRealizedPnlLong_DESC_NULLS_FIRST";
|
|
355
|
+
CumulativePnlOrderByInput["cumulativeRealizedPnlLong_DESC_NULLS_LAST"] = "cumulativeRealizedPnlLong_DESC_NULLS_LAST";
|
|
356
|
+
CumulativePnlOrderByInput["cumulativeRealizedPnlShort_ASC"] = "cumulativeRealizedPnlShort_ASC";
|
|
357
|
+
CumulativePnlOrderByInput["cumulativeRealizedPnlShort_ASC_NULLS_FIRST"] = "cumulativeRealizedPnlShort_ASC_NULLS_FIRST";
|
|
358
|
+
CumulativePnlOrderByInput["cumulativeRealizedPnlShort_ASC_NULLS_LAST"] = "cumulativeRealizedPnlShort_ASC_NULLS_LAST";
|
|
359
|
+
CumulativePnlOrderByInput["cumulativeRealizedPnlShort_DESC"] = "cumulativeRealizedPnlShort_DESC";
|
|
360
|
+
CumulativePnlOrderByInput["cumulativeRealizedPnlShort_DESC_NULLS_FIRST"] = "cumulativeRealizedPnlShort_DESC_NULLS_FIRST";
|
|
361
|
+
CumulativePnlOrderByInput["cumulativeRealizedPnlShort_DESC_NULLS_LAST"] = "cumulativeRealizedPnlShort_DESC_NULLS_LAST";
|
|
362
|
+
CumulativePnlOrderByInput["cumulativeUnrealizedPnlLong_ASC"] = "cumulativeUnrealizedPnlLong_ASC";
|
|
363
|
+
CumulativePnlOrderByInput["cumulativeUnrealizedPnlLong_ASC_NULLS_FIRST"] = "cumulativeUnrealizedPnlLong_ASC_NULLS_FIRST";
|
|
364
|
+
CumulativePnlOrderByInput["cumulativeUnrealizedPnlLong_ASC_NULLS_LAST"] = "cumulativeUnrealizedPnlLong_ASC_NULLS_LAST";
|
|
365
|
+
CumulativePnlOrderByInput["cumulativeUnrealizedPnlLong_DESC"] = "cumulativeUnrealizedPnlLong_DESC";
|
|
366
|
+
CumulativePnlOrderByInput["cumulativeUnrealizedPnlLong_DESC_NULLS_FIRST"] = "cumulativeUnrealizedPnlLong_DESC_NULLS_FIRST";
|
|
367
|
+
CumulativePnlOrderByInput["cumulativeUnrealizedPnlLong_DESC_NULLS_LAST"] = "cumulativeUnrealizedPnlLong_DESC_NULLS_LAST";
|
|
368
|
+
CumulativePnlOrderByInput["cumulativeUnrealizedPnlShort_ASC"] = "cumulativeUnrealizedPnlShort_ASC";
|
|
369
|
+
CumulativePnlOrderByInput["cumulativeUnrealizedPnlShort_ASC_NULLS_FIRST"] = "cumulativeUnrealizedPnlShort_ASC_NULLS_FIRST";
|
|
370
|
+
CumulativePnlOrderByInput["cumulativeUnrealizedPnlShort_ASC_NULLS_LAST"] = "cumulativeUnrealizedPnlShort_ASC_NULLS_LAST";
|
|
371
|
+
CumulativePnlOrderByInput["cumulativeUnrealizedPnlShort_DESC"] = "cumulativeUnrealizedPnlShort_DESC";
|
|
372
|
+
CumulativePnlOrderByInput["cumulativeUnrealizedPnlShort_DESC_NULLS_FIRST"] = "cumulativeUnrealizedPnlShort_DESC_NULLS_FIRST";
|
|
373
|
+
CumulativePnlOrderByInput["cumulativeUnrealizedPnlShort_DESC_NULLS_LAST"] = "cumulativeUnrealizedPnlShort_DESC_NULLS_LAST";
|
|
374
|
+
CumulativePnlOrderByInput["entityType_ASC"] = "entityType_ASC";
|
|
375
|
+
CumulativePnlOrderByInput["entityType_ASC_NULLS_FIRST"] = "entityType_ASC_NULLS_FIRST";
|
|
376
|
+
CumulativePnlOrderByInput["entityType_ASC_NULLS_LAST"] = "entityType_ASC_NULLS_LAST";
|
|
377
|
+
CumulativePnlOrderByInput["entityType_DESC"] = "entityType_DESC";
|
|
378
|
+
CumulativePnlOrderByInput["entityType_DESC_NULLS_FIRST"] = "entityType_DESC_NULLS_FIRST";
|
|
379
|
+
CumulativePnlOrderByInput["entityType_DESC_NULLS_LAST"] = "entityType_DESC_NULLS_LAST";
|
|
380
|
+
CumulativePnlOrderByInput["id_ASC"] = "id_ASC";
|
|
381
|
+
CumulativePnlOrderByInput["id_ASC_NULLS_FIRST"] = "id_ASC_NULLS_FIRST";
|
|
382
|
+
CumulativePnlOrderByInput["id_ASC_NULLS_LAST"] = "id_ASC_NULLS_LAST";
|
|
383
|
+
CumulativePnlOrderByInput["id_DESC"] = "id_DESC";
|
|
384
|
+
CumulativePnlOrderByInput["id_DESC_NULLS_FIRST"] = "id_DESC_NULLS_FIRST";
|
|
385
|
+
CumulativePnlOrderByInput["id_DESC_NULLS_LAST"] = "id_DESC_NULLS_LAST";
|
|
386
|
+
CumulativePnlOrderByInput["isSnapshot_ASC"] = "isSnapshot_ASC";
|
|
387
|
+
CumulativePnlOrderByInput["isSnapshot_ASC_NULLS_FIRST"] = "isSnapshot_ASC_NULLS_FIRST";
|
|
388
|
+
CumulativePnlOrderByInput["isSnapshot_ASC_NULLS_LAST"] = "isSnapshot_ASC_NULLS_LAST";
|
|
389
|
+
CumulativePnlOrderByInput["isSnapshot_DESC"] = "isSnapshot_DESC";
|
|
390
|
+
CumulativePnlOrderByInput["isSnapshot_DESC_NULLS_FIRST"] = "isSnapshot_DESC_NULLS_FIRST";
|
|
391
|
+
CumulativePnlOrderByInput["isSnapshot_DESC_NULLS_LAST"] = "isSnapshot_DESC_NULLS_LAST";
|
|
392
|
+
CumulativePnlOrderByInput["lastUnrealizedPnlLong_ASC"] = "lastUnrealizedPnlLong_ASC";
|
|
393
|
+
CumulativePnlOrderByInput["lastUnrealizedPnlLong_ASC_NULLS_FIRST"] = "lastUnrealizedPnlLong_ASC_NULLS_FIRST";
|
|
394
|
+
CumulativePnlOrderByInput["lastUnrealizedPnlLong_ASC_NULLS_LAST"] = "lastUnrealizedPnlLong_ASC_NULLS_LAST";
|
|
395
|
+
CumulativePnlOrderByInput["lastUnrealizedPnlLong_DESC"] = "lastUnrealizedPnlLong_DESC";
|
|
396
|
+
CumulativePnlOrderByInput["lastUnrealizedPnlLong_DESC_NULLS_FIRST"] = "lastUnrealizedPnlLong_DESC_NULLS_FIRST";
|
|
397
|
+
CumulativePnlOrderByInput["lastUnrealizedPnlLong_DESC_NULLS_LAST"] = "lastUnrealizedPnlLong_DESC_NULLS_LAST";
|
|
398
|
+
CumulativePnlOrderByInput["lastUnrealizedPnlShort_ASC"] = "lastUnrealizedPnlShort_ASC";
|
|
399
|
+
CumulativePnlOrderByInput["lastUnrealizedPnlShort_ASC_NULLS_FIRST"] = "lastUnrealizedPnlShort_ASC_NULLS_FIRST";
|
|
400
|
+
CumulativePnlOrderByInput["lastUnrealizedPnlShort_ASC_NULLS_LAST"] = "lastUnrealizedPnlShort_ASC_NULLS_LAST";
|
|
401
|
+
CumulativePnlOrderByInput["lastUnrealizedPnlShort_DESC"] = "lastUnrealizedPnlShort_DESC";
|
|
402
|
+
CumulativePnlOrderByInput["lastUnrealizedPnlShort_DESC_NULLS_FIRST"] = "lastUnrealizedPnlShort_DESC_NULLS_FIRST";
|
|
403
|
+
CumulativePnlOrderByInput["lastUnrealizedPnlShort_DESC_NULLS_LAST"] = "lastUnrealizedPnlShort_DESC_NULLS_LAST";
|
|
404
|
+
CumulativePnlOrderByInput["snapshotTimestamp_ASC"] = "snapshotTimestamp_ASC";
|
|
405
|
+
CumulativePnlOrderByInput["snapshotTimestamp_ASC_NULLS_FIRST"] = "snapshotTimestamp_ASC_NULLS_FIRST";
|
|
406
|
+
CumulativePnlOrderByInput["snapshotTimestamp_ASC_NULLS_LAST"] = "snapshotTimestamp_ASC_NULLS_LAST";
|
|
407
|
+
CumulativePnlOrderByInput["snapshotTimestamp_DESC"] = "snapshotTimestamp_DESC";
|
|
408
|
+
CumulativePnlOrderByInput["snapshotTimestamp_DESC_NULLS_FIRST"] = "snapshotTimestamp_DESC_NULLS_FIRST";
|
|
409
|
+
CumulativePnlOrderByInput["snapshotTimestamp_DESC_NULLS_LAST"] = "snapshotTimestamp_DESC_NULLS_LAST";
|
|
410
|
+
})(CumulativePnlOrderByInput || (CumulativePnlOrderByInput = {}));
|
|
342
411
|
export var CumulativePoolValueOrderByInput;
|
|
343
412
|
(function (CumulativePoolValueOrderByInput) {
|
|
344
413
|
CumulativePoolValueOrderByInput["address_ASC"] = "address_ASC";
|
|
@@ -396,6 +465,69 @@ export var CumulativePoolValueOrderByInput;
|
|
|
396
465
|
CumulativePoolValueOrderByInput["snapshotTimestamp_DESC_NULLS_FIRST"] = "snapshotTimestamp_DESC_NULLS_FIRST";
|
|
397
466
|
CumulativePoolValueOrderByInput["snapshotTimestamp_DESC_NULLS_LAST"] = "snapshotTimestamp_DESC_NULLS_LAST";
|
|
398
467
|
})(CumulativePoolValueOrderByInput || (CumulativePoolValueOrderByInput = {}));
|
|
468
|
+
export var DistributionOrderByInput;
|
|
469
|
+
(function (DistributionOrderByInput) {
|
|
470
|
+
DistributionOrderByInput["id_ASC"] = "id_ASC";
|
|
471
|
+
DistributionOrderByInput["id_ASC_NULLS_FIRST"] = "id_ASC_NULLS_FIRST";
|
|
472
|
+
DistributionOrderByInput["id_ASC_NULLS_LAST"] = "id_ASC_NULLS_LAST";
|
|
473
|
+
DistributionOrderByInput["id_DESC"] = "id_DESC";
|
|
474
|
+
DistributionOrderByInput["id_DESC_NULLS_FIRST"] = "id_DESC_NULLS_FIRST";
|
|
475
|
+
DistributionOrderByInput["id_DESC_NULLS_LAST"] = "id_DESC_NULLS_LAST";
|
|
476
|
+
DistributionOrderByInput["receiver_ASC"] = "receiver_ASC";
|
|
477
|
+
DistributionOrderByInput["receiver_ASC_NULLS_FIRST"] = "receiver_ASC_NULLS_FIRST";
|
|
478
|
+
DistributionOrderByInput["receiver_ASC_NULLS_LAST"] = "receiver_ASC_NULLS_LAST";
|
|
479
|
+
DistributionOrderByInput["receiver_DESC"] = "receiver_DESC";
|
|
480
|
+
DistributionOrderByInput["receiver_DESC_NULLS_FIRST"] = "receiver_DESC_NULLS_FIRST";
|
|
481
|
+
DistributionOrderByInput["receiver_DESC_NULLS_LAST"] = "receiver_DESC_NULLS_LAST";
|
|
482
|
+
DistributionOrderByInput["transaction_blockNumber_ASC"] = "transaction_blockNumber_ASC";
|
|
483
|
+
DistributionOrderByInput["transaction_blockNumber_ASC_NULLS_FIRST"] = "transaction_blockNumber_ASC_NULLS_FIRST";
|
|
484
|
+
DistributionOrderByInput["transaction_blockNumber_ASC_NULLS_LAST"] = "transaction_blockNumber_ASC_NULLS_LAST";
|
|
485
|
+
DistributionOrderByInput["transaction_blockNumber_DESC"] = "transaction_blockNumber_DESC";
|
|
486
|
+
DistributionOrderByInput["transaction_blockNumber_DESC_NULLS_FIRST"] = "transaction_blockNumber_DESC_NULLS_FIRST";
|
|
487
|
+
DistributionOrderByInput["transaction_blockNumber_DESC_NULLS_LAST"] = "transaction_blockNumber_DESC_NULLS_LAST";
|
|
488
|
+
DistributionOrderByInput["transaction_from_ASC"] = "transaction_from_ASC";
|
|
489
|
+
DistributionOrderByInput["transaction_from_ASC_NULLS_FIRST"] = "transaction_from_ASC_NULLS_FIRST";
|
|
490
|
+
DistributionOrderByInput["transaction_from_ASC_NULLS_LAST"] = "transaction_from_ASC_NULLS_LAST";
|
|
491
|
+
DistributionOrderByInput["transaction_from_DESC"] = "transaction_from_DESC";
|
|
492
|
+
DistributionOrderByInput["transaction_from_DESC_NULLS_FIRST"] = "transaction_from_DESC_NULLS_FIRST";
|
|
493
|
+
DistributionOrderByInput["transaction_from_DESC_NULLS_LAST"] = "transaction_from_DESC_NULLS_LAST";
|
|
494
|
+
DistributionOrderByInput["transaction_hash_ASC"] = "transaction_hash_ASC";
|
|
495
|
+
DistributionOrderByInput["transaction_hash_ASC_NULLS_FIRST"] = "transaction_hash_ASC_NULLS_FIRST";
|
|
496
|
+
DistributionOrderByInput["transaction_hash_ASC_NULLS_LAST"] = "transaction_hash_ASC_NULLS_LAST";
|
|
497
|
+
DistributionOrderByInput["transaction_hash_DESC"] = "transaction_hash_DESC";
|
|
498
|
+
DistributionOrderByInput["transaction_hash_DESC_NULLS_FIRST"] = "transaction_hash_DESC_NULLS_FIRST";
|
|
499
|
+
DistributionOrderByInput["transaction_hash_DESC_NULLS_LAST"] = "transaction_hash_DESC_NULLS_LAST";
|
|
500
|
+
DistributionOrderByInput["transaction_id_ASC"] = "transaction_id_ASC";
|
|
501
|
+
DistributionOrderByInput["transaction_id_ASC_NULLS_FIRST"] = "transaction_id_ASC_NULLS_FIRST";
|
|
502
|
+
DistributionOrderByInput["transaction_id_ASC_NULLS_LAST"] = "transaction_id_ASC_NULLS_LAST";
|
|
503
|
+
DistributionOrderByInput["transaction_id_DESC"] = "transaction_id_DESC";
|
|
504
|
+
DistributionOrderByInput["transaction_id_DESC_NULLS_FIRST"] = "transaction_id_DESC_NULLS_FIRST";
|
|
505
|
+
DistributionOrderByInput["transaction_id_DESC_NULLS_LAST"] = "transaction_id_DESC_NULLS_LAST";
|
|
506
|
+
DistributionOrderByInput["transaction_timestamp_ASC"] = "transaction_timestamp_ASC";
|
|
507
|
+
DistributionOrderByInput["transaction_timestamp_ASC_NULLS_FIRST"] = "transaction_timestamp_ASC_NULLS_FIRST";
|
|
508
|
+
DistributionOrderByInput["transaction_timestamp_ASC_NULLS_LAST"] = "transaction_timestamp_ASC_NULLS_LAST";
|
|
509
|
+
DistributionOrderByInput["transaction_timestamp_DESC"] = "transaction_timestamp_DESC";
|
|
510
|
+
DistributionOrderByInput["transaction_timestamp_DESC_NULLS_FIRST"] = "transaction_timestamp_DESC_NULLS_FIRST";
|
|
511
|
+
DistributionOrderByInput["transaction_timestamp_DESC_NULLS_LAST"] = "transaction_timestamp_DESC_NULLS_LAST";
|
|
512
|
+
DistributionOrderByInput["transaction_to_ASC"] = "transaction_to_ASC";
|
|
513
|
+
DistributionOrderByInput["transaction_to_ASC_NULLS_FIRST"] = "transaction_to_ASC_NULLS_FIRST";
|
|
514
|
+
DistributionOrderByInput["transaction_to_ASC_NULLS_LAST"] = "transaction_to_ASC_NULLS_LAST";
|
|
515
|
+
DistributionOrderByInput["transaction_to_DESC"] = "transaction_to_DESC";
|
|
516
|
+
DistributionOrderByInput["transaction_to_DESC_NULLS_FIRST"] = "transaction_to_DESC_NULLS_FIRST";
|
|
517
|
+
DistributionOrderByInput["transaction_to_DESC_NULLS_LAST"] = "transaction_to_DESC_NULLS_LAST";
|
|
518
|
+
DistributionOrderByInput["transaction_transactionIndex_ASC"] = "transaction_transactionIndex_ASC";
|
|
519
|
+
DistributionOrderByInput["transaction_transactionIndex_ASC_NULLS_FIRST"] = "transaction_transactionIndex_ASC_NULLS_FIRST";
|
|
520
|
+
DistributionOrderByInput["transaction_transactionIndex_ASC_NULLS_LAST"] = "transaction_transactionIndex_ASC_NULLS_LAST";
|
|
521
|
+
DistributionOrderByInput["transaction_transactionIndex_DESC"] = "transaction_transactionIndex_DESC";
|
|
522
|
+
DistributionOrderByInput["transaction_transactionIndex_DESC_NULLS_FIRST"] = "transaction_transactionIndex_DESC_NULLS_FIRST";
|
|
523
|
+
DistributionOrderByInput["transaction_transactionIndex_DESC_NULLS_LAST"] = "transaction_transactionIndex_DESC_NULLS_LAST";
|
|
524
|
+
DistributionOrderByInput["typeId_ASC"] = "typeId_ASC";
|
|
525
|
+
DistributionOrderByInput["typeId_ASC_NULLS_FIRST"] = "typeId_ASC_NULLS_FIRST";
|
|
526
|
+
DistributionOrderByInput["typeId_ASC_NULLS_LAST"] = "typeId_ASC_NULLS_LAST";
|
|
527
|
+
DistributionOrderByInput["typeId_DESC"] = "typeId_DESC";
|
|
528
|
+
DistributionOrderByInput["typeId_DESC_NULLS_FIRST"] = "typeId_DESC_NULLS_FIRST";
|
|
529
|
+
DistributionOrderByInput["typeId_DESC_NULLS_LAST"] = "typeId_DESC_NULLS_LAST";
|
|
530
|
+
})(DistributionOrderByInput || (DistributionOrderByInput = {}));
|
|
399
531
|
export var EntityType;
|
|
400
532
|
(function (EntityType) {
|
|
401
533
|
EntityType["Glv"] = "Glv";
|
|
@@ -1318,6 +1450,39 @@ export var OrderStatus;
|
|
|
1318
1450
|
OrderStatus["Executed"] = "Executed";
|
|
1319
1451
|
OrderStatus["Frozen"] = "Frozen";
|
|
1320
1452
|
})(OrderStatus || (OrderStatus = {}));
|
|
1453
|
+
export var PnlAprSnapshotOrderByInput;
|
|
1454
|
+
(function (PnlAprSnapshotOrderByInput) {
|
|
1455
|
+
PnlAprSnapshotOrderByInput["address_ASC"] = "address_ASC";
|
|
1456
|
+
PnlAprSnapshotOrderByInput["address_ASC_NULLS_FIRST"] = "address_ASC_NULLS_FIRST";
|
|
1457
|
+
PnlAprSnapshotOrderByInput["address_ASC_NULLS_LAST"] = "address_ASC_NULLS_LAST";
|
|
1458
|
+
PnlAprSnapshotOrderByInput["address_DESC"] = "address_DESC";
|
|
1459
|
+
PnlAprSnapshotOrderByInput["address_DESC_NULLS_FIRST"] = "address_DESC_NULLS_FIRST";
|
|
1460
|
+
PnlAprSnapshotOrderByInput["address_DESC_NULLS_LAST"] = "address_DESC_NULLS_LAST";
|
|
1461
|
+
PnlAprSnapshotOrderByInput["apr_ASC"] = "apr_ASC";
|
|
1462
|
+
PnlAprSnapshotOrderByInput["apr_ASC_NULLS_FIRST"] = "apr_ASC_NULLS_FIRST";
|
|
1463
|
+
PnlAprSnapshotOrderByInput["apr_ASC_NULLS_LAST"] = "apr_ASC_NULLS_LAST";
|
|
1464
|
+
PnlAprSnapshotOrderByInput["apr_DESC"] = "apr_DESC";
|
|
1465
|
+
PnlAprSnapshotOrderByInput["apr_DESC_NULLS_FIRST"] = "apr_DESC_NULLS_FIRST";
|
|
1466
|
+
PnlAprSnapshotOrderByInput["apr_DESC_NULLS_LAST"] = "apr_DESC_NULLS_LAST";
|
|
1467
|
+
PnlAprSnapshotOrderByInput["entityType_ASC"] = "entityType_ASC";
|
|
1468
|
+
PnlAprSnapshotOrderByInput["entityType_ASC_NULLS_FIRST"] = "entityType_ASC_NULLS_FIRST";
|
|
1469
|
+
PnlAprSnapshotOrderByInput["entityType_ASC_NULLS_LAST"] = "entityType_ASC_NULLS_LAST";
|
|
1470
|
+
PnlAprSnapshotOrderByInput["entityType_DESC"] = "entityType_DESC";
|
|
1471
|
+
PnlAprSnapshotOrderByInput["entityType_DESC_NULLS_FIRST"] = "entityType_DESC_NULLS_FIRST";
|
|
1472
|
+
PnlAprSnapshotOrderByInput["entityType_DESC_NULLS_LAST"] = "entityType_DESC_NULLS_LAST";
|
|
1473
|
+
PnlAprSnapshotOrderByInput["id_ASC"] = "id_ASC";
|
|
1474
|
+
PnlAprSnapshotOrderByInput["id_ASC_NULLS_FIRST"] = "id_ASC_NULLS_FIRST";
|
|
1475
|
+
PnlAprSnapshotOrderByInput["id_ASC_NULLS_LAST"] = "id_ASC_NULLS_LAST";
|
|
1476
|
+
PnlAprSnapshotOrderByInput["id_DESC"] = "id_DESC";
|
|
1477
|
+
PnlAprSnapshotOrderByInput["id_DESC_NULLS_FIRST"] = "id_DESC_NULLS_FIRST";
|
|
1478
|
+
PnlAprSnapshotOrderByInput["id_DESC_NULLS_LAST"] = "id_DESC_NULLS_LAST";
|
|
1479
|
+
PnlAprSnapshotOrderByInput["snapshotTimestamp_ASC"] = "snapshotTimestamp_ASC";
|
|
1480
|
+
PnlAprSnapshotOrderByInput["snapshotTimestamp_ASC_NULLS_FIRST"] = "snapshotTimestamp_ASC_NULLS_FIRST";
|
|
1481
|
+
PnlAprSnapshotOrderByInput["snapshotTimestamp_ASC_NULLS_LAST"] = "snapshotTimestamp_ASC_NULLS_LAST";
|
|
1482
|
+
PnlAprSnapshotOrderByInput["snapshotTimestamp_DESC"] = "snapshotTimestamp_DESC";
|
|
1483
|
+
PnlAprSnapshotOrderByInput["snapshotTimestamp_DESC_NULLS_FIRST"] = "snapshotTimestamp_DESC_NULLS_FIRST";
|
|
1484
|
+
PnlAprSnapshotOrderByInput["snapshotTimestamp_DESC_NULLS_LAST"] = "snapshotTimestamp_DESC_NULLS_LAST";
|
|
1485
|
+
})(PnlAprSnapshotOrderByInput || (PnlAprSnapshotOrderByInput = {}));
|
|
1321
1486
|
export var PositionChangeOrderByInput;
|
|
1322
1487
|
(function (PositionChangeOrderByInput) {
|
|
1323
1488
|
PositionChangeOrderByInput["account_ASC"] = "account_ASC";
|
|
@@ -1875,6 +2040,33 @@ export var PriceType;
|
|
|
1875
2040
|
PriceType["onchainFeed"] = "onchainFeed";
|
|
1876
2041
|
PriceType["v2"] = "v2";
|
|
1877
2042
|
})(PriceType || (PriceType = {}));
|
|
2043
|
+
export var ProcessorStatusOrderByInput;
|
|
2044
|
+
(function (ProcessorStatusOrderByInput) {
|
|
2045
|
+
ProcessorStatusOrderByInput["id_ASC"] = "id_ASC";
|
|
2046
|
+
ProcessorStatusOrderByInput["id_ASC_NULLS_FIRST"] = "id_ASC_NULLS_FIRST";
|
|
2047
|
+
ProcessorStatusOrderByInput["id_ASC_NULLS_LAST"] = "id_ASC_NULLS_LAST";
|
|
2048
|
+
ProcessorStatusOrderByInput["id_DESC"] = "id_DESC";
|
|
2049
|
+
ProcessorStatusOrderByInput["id_DESC_NULLS_FIRST"] = "id_DESC_NULLS_FIRST";
|
|
2050
|
+
ProcessorStatusOrderByInput["id_DESC_NULLS_LAST"] = "id_DESC_NULLS_LAST";
|
|
2051
|
+
ProcessorStatusOrderByInput["lastParsedBlockNumber_ASC"] = "lastParsedBlockNumber_ASC";
|
|
2052
|
+
ProcessorStatusOrderByInput["lastParsedBlockNumber_ASC_NULLS_FIRST"] = "lastParsedBlockNumber_ASC_NULLS_FIRST";
|
|
2053
|
+
ProcessorStatusOrderByInput["lastParsedBlockNumber_ASC_NULLS_LAST"] = "lastParsedBlockNumber_ASC_NULLS_LAST";
|
|
2054
|
+
ProcessorStatusOrderByInput["lastParsedBlockNumber_DESC"] = "lastParsedBlockNumber_DESC";
|
|
2055
|
+
ProcessorStatusOrderByInput["lastParsedBlockNumber_DESC_NULLS_FIRST"] = "lastParsedBlockNumber_DESC_NULLS_FIRST";
|
|
2056
|
+
ProcessorStatusOrderByInput["lastParsedBlockNumber_DESC_NULLS_LAST"] = "lastParsedBlockNumber_DESC_NULLS_LAST";
|
|
2057
|
+
ProcessorStatusOrderByInput["lastParsedBlockTimestamp_ASC"] = "lastParsedBlockTimestamp_ASC";
|
|
2058
|
+
ProcessorStatusOrderByInput["lastParsedBlockTimestamp_ASC_NULLS_FIRST"] = "lastParsedBlockTimestamp_ASC_NULLS_FIRST";
|
|
2059
|
+
ProcessorStatusOrderByInput["lastParsedBlockTimestamp_ASC_NULLS_LAST"] = "lastParsedBlockTimestamp_ASC_NULLS_LAST";
|
|
2060
|
+
ProcessorStatusOrderByInput["lastParsedBlockTimestamp_DESC"] = "lastParsedBlockTimestamp_DESC";
|
|
2061
|
+
ProcessorStatusOrderByInput["lastParsedBlockTimestamp_DESC_NULLS_FIRST"] = "lastParsedBlockTimestamp_DESC_NULLS_FIRST";
|
|
2062
|
+
ProcessorStatusOrderByInput["lastParsedBlockTimestamp_DESC_NULLS_LAST"] = "lastParsedBlockTimestamp_DESC_NULLS_LAST";
|
|
2063
|
+
ProcessorStatusOrderByInput["lastProcessorCallTimestamp_ASC"] = "lastProcessorCallTimestamp_ASC";
|
|
2064
|
+
ProcessorStatusOrderByInput["lastProcessorCallTimestamp_ASC_NULLS_FIRST"] = "lastProcessorCallTimestamp_ASC_NULLS_FIRST";
|
|
2065
|
+
ProcessorStatusOrderByInput["lastProcessorCallTimestamp_ASC_NULLS_LAST"] = "lastProcessorCallTimestamp_ASC_NULLS_LAST";
|
|
2066
|
+
ProcessorStatusOrderByInput["lastProcessorCallTimestamp_DESC"] = "lastProcessorCallTimestamp_DESC";
|
|
2067
|
+
ProcessorStatusOrderByInput["lastProcessorCallTimestamp_DESC_NULLS_FIRST"] = "lastProcessorCallTimestamp_DESC_NULLS_FIRST";
|
|
2068
|
+
ProcessorStatusOrderByInput["lastProcessorCallTimestamp_DESC_NULLS_LAST"] = "lastProcessorCallTimestamp_DESC_NULLS_LAST";
|
|
2069
|
+
})(ProcessorStatusOrderByInput || (ProcessorStatusOrderByInput = {}));
|
|
1878
2070
|
export var SwapInfoOrderByInput;
|
|
1879
2071
|
(function (SwapInfoOrderByInput) {
|
|
1880
2072
|
SwapInfoOrderByInput["amountInAfterFees_ASC"] = "amountInAfterFees_ASC";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -20,4 +20,5 @@ export var TriggerThresholdType;
|
|
|
20
20
|
export var ExternalSwapAggregator;
|
|
21
21
|
(function (ExternalSwapAggregator) {
|
|
22
22
|
ExternalSwapAggregator["OpenOcean"] = "openOcean";
|
|
23
|
+
ExternalSwapAggregator["BotanixStaking"] = "botanixStaking";
|
|
23
24
|
})(ExternalSwapAggregator || (ExternalSwapAggregator = {}));
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { describe, expect, it } from "vitest";
|
|
2
2
|
import { BASIS_POINTS_DIVISOR_BIGINT, USD_DECIMALS } from "../../configs/factors";
|
|
3
3
|
const ONE_USD = 1000000000000000000000000000000n;
|
|
4
|
-
import { applyFactor, basisPointsToFloat, bigintToNumber, BN_NEGATIVE_ONE, BN_ONE, BN_ZERO, expandDecimals, formatAmount, formatAmountHuman, formatBalanceAmount,
|
|
4
|
+
import { applyFactor, basisPointsToFloat, bigintToNumber, BN_NEGATIVE_ONE, BN_ONE, BN_ZERO, expandDecimals, formatAmount, formatAmountHuman, formatBalanceAmount, formatFactor, formatPercentage, formatUsdPrice, getBasisPoints, numberToBigint, PERCENT_PRECISION_DECIMALS, PRECISION, PRECISION_DECIMALS, roundWithDecimals, roundUpMagnitudeDivision, toBigNumberWithDecimals, } from "../numbers";
|
|
5
5
|
describe("numbers utils", () => {
|
|
6
6
|
it("constants", () => {
|
|
7
7
|
// Just to confirm they exist and have no unexpected changes
|
|
@@ -232,7 +232,7 @@ describe("formatBalanceAmount", () => {
|
|
|
232
232
|
it("should display balance amount", () => {
|
|
233
233
|
expect(formatBalanceAmount(ONE_USD * 1000n, USD_DECIMALS)).toBe("1,000.0000");
|
|
234
234
|
expect(formatBalanceAmount(0n, USD_DECIMALS)).toBe("-");
|
|
235
|
-
expect(formatBalanceAmount(0n, USD_DECIMALS, undefined, true)).toBe("0.0000");
|
|
235
|
+
expect(formatBalanceAmount(0n, USD_DECIMALS, undefined, { showZero: true })).toBe("0.0000");
|
|
236
236
|
expect(formatBalanceAmount(ONE_USD * 1n, USD_DECIMALS)).toBe("1.0000");
|
|
237
237
|
expect(formatBalanceAmount(ONE_USD / 10n, USD_DECIMALS)).toBe("0.10000");
|
|
238
238
|
expect(formatBalanceAmount(ONE_USD / 100n, USD_DECIMALS)).toBe("0.010000");
|
|
@@ -248,14 +248,22 @@ describe("formatBalanceAmount", () => {
|
|
|
248
248
|
});
|
|
249
249
|
it("should display balance amount with symbol", () => {
|
|
250
250
|
expect(formatBalanceAmount(ONE_USD, USD_DECIMALS, "USDC")).toBe("1.0000 USDC");
|
|
251
|
-
expect(formatBalanceAmount(0n, USD_DECIMALS, "USDC", true)).toBe("0.0000 USDC");
|
|
252
|
-
expect(formatBalanceAmount(0n, USD_DECIMALS, "USDC", false)).toBe("-");
|
|
253
|
-
});
|
|
254
|
-
it("should display balance
|
|
255
|
-
expect(
|
|
256
|
-
expect(
|
|
257
|
-
expect(
|
|
258
|
-
expect(
|
|
251
|
+
expect(formatBalanceAmount(0n, USD_DECIMALS, "USDC", { showZero: true })).toBe("0.0000 USDC");
|
|
252
|
+
expect(formatBalanceAmount(0n, USD_DECIMALS, "USDC", { showZero: false })).toBe("-");
|
|
253
|
+
});
|
|
254
|
+
it("should display balance of stable token correctly", () => {
|
|
255
|
+
expect(formatBalanceAmount(ONE_USD, USD_DECIMALS, undefined, { isStable: true })).toBe("1.00");
|
|
256
|
+
expect(formatBalanceAmount(ONE_USD / 10n, USD_DECIMALS, undefined, { isStable: true })).toBe("0.100");
|
|
257
|
+
expect(formatBalanceAmount(ONE_USD / 100n, USD_DECIMALS, undefined, { isStable: true })).toBe("0.0100");
|
|
258
|
+
expect(formatBalanceAmount(ONE_USD / 1000n, USD_DECIMALS, undefined, { isStable: true })).toBe("0.00100");
|
|
259
|
+
expect(formatBalanceAmount(ONE_USD / 10000n, USD_DECIMALS, undefined, { isStable: true })).toBe("0.00010000");
|
|
260
|
+
expect(formatBalanceAmount(ONE_USD / 100000n, USD_DECIMALS, undefined, { isStable: true })).toBe("0.00001000");
|
|
261
|
+
expect(formatBalanceAmount(ONE_USD / 1000000n, USD_DECIMALS, undefined, { isStable: true })).toBe("0.00000100");
|
|
262
|
+
expect(formatBalanceAmount(ONE_USD / 10000000n, USD_DECIMALS, undefined, { isStable: true })).toBe("0.00000010");
|
|
263
|
+
expect(formatBalanceAmount(ONE_USD / 100000000n, USD_DECIMALS, undefined, { isStable: true })).toBe("0.00000001");
|
|
264
|
+
expect(formatBalanceAmount(ONE_USD / 1000000000n, USD_DECIMALS, undefined, { isStable: true })).toBe("1.00e-9");
|
|
265
|
+
expect(formatBalanceAmount(0n, USD_DECIMALS, undefined, { isStable: true, showZero: true })).toBe("0.00");
|
|
266
|
+
expect(formatBalanceAmount(0n, USD_DECIMALS, undefined, { isStable: true, showZero: false })).toBe("-");
|
|
259
267
|
});
|
|
260
268
|
});
|
|
261
269
|
describe("formatFactor", () => {
|
|
@@ -368,6 +368,7 @@ describe("Decrease Order Payloads", () => {
|
|
|
368
368
|
expect(decoded).toEqual({
|
|
369
369
|
twapId: "8000",
|
|
370
370
|
numberOfParts: twapParams.numberOfParts,
|
|
371
|
+
isExpress: false,
|
|
371
372
|
});
|
|
372
373
|
return {
|
|
373
374
|
orderPayload: {
|
|
@@ -460,6 +461,7 @@ describe("Decrease Order Payloads", () => {
|
|
|
460
461
|
const uiFeeReceiver = `0xff00000000000000000000000000000004800001`;
|
|
461
462
|
const decoded = decodeTwapUiFeeReceiver(uiFeeReceiver);
|
|
462
463
|
expect(decoded).toEqual({
|
|
464
|
+
isExpress: false,
|
|
463
465
|
twapId: "8000",
|
|
464
466
|
numberOfParts: twapParams.numberOfParts,
|
|
465
467
|
});
|
|
@@ -162,6 +162,7 @@ describe("Exchange Router Multicall", () => {
|
|
|
162
162
|
it("Token transfers with multiple orders, external swaps, update and cancel", () => {
|
|
163
163
|
const params1 = {
|
|
164
164
|
...commonParams,
|
|
165
|
+
swapPath: [],
|
|
165
166
|
payTokenAddress: NATIVE_TOKEN_ADDRESS,
|
|
166
167
|
payTokenAmount: parseValue("1", WETH.decimals), // 1 ETH
|
|
167
168
|
externalSwapQuote: mockExternalSwap({
|
|
@@ -175,6 +176,7 @@ describe("Exchange Router Multicall", () => {
|
|
|
175
176
|
};
|
|
176
177
|
const params2 = {
|
|
177
178
|
...commonParams,
|
|
179
|
+
swapPath: [],
|
|
178
180
|
payTokenAddress: USDC.address,
|
|
179
181
|
payTokenAmount: parseValue("1000", USDC.decimals), // 1000 USDC
|
|
180
182
|
externalSwapQuote: mockExternalSwap({
|
|
@@ -294,6 +294,7 @@ describe("Increase Order Payloads", () => {
|
|
|
294
294
|
it("Market Increase with External Swap, Pay With Native Token", () => {
|
|
295
295
|
const params = {
|
|
296
296
|
...commonParams,
|
|
297
|
+
swapPath: [],
|
|
297
298
|
payTokenAddress: NATIVE_TOKEN_ADDRESS,
|
|
298
299
|
payTokenAmount: parseValue("1", WETH.decimals), // 1 ETH
|
|
299
300
|
collateralTokenAddress: USDC.address,
|
|
@@ -373,6 +374,7 @@ describe("Increase Order Payloads", () => {
|
|
|
373
374
|
it("Market Increase with External Swap, Pay With ERC20", () => {
|
|
374
375
|
const params = {
|
|
375
376
|
...commonParams,
|
|
377
|
+
swapPath: [],
|
|
376
378
|
payTokenAddress: USDC.address,
|
|
377
379
|
payTokenAmount: parseValue("1000", USDC.decimals), // 1000 USDC
|
|
378
380
|
collateralTokenAddress: WETH.address,
|
|
@@ -532,6 +534,7 @@ describe("Increase Order Payloads", () => {
|
|
|
532
534
|
const uiFeeReceiver = `0xff00000000000000000000000000000004800001`;
|
|
533
535
|
const decoded = decodeTwapUiFeeReceiver(uiFeeReceiver);
|
|
534
536
|
expect(decoded).toEqual({
|
|
537
|
+
isExpress: false,
|
|
535
538
|
twapId: "8000",
|
|
536
539
|
numberOfParts: twapParams.numberOfParts,
|
|
537
540
|
});
|
|
@@ -626,6 +629,7 @@ describe("Increase Order Payloads", () => {
|
|
|
626
629
|
const uiFeeReceiver = `0xff00000000000000000000000000000004800001`;
|
|
627
630
|
const decoded = decodeTwapUiFeeReceiver(uiFeeReceiver);
|
|
628
631
|
expect(decoded).toEqual({
|
|
632
|
+
isExpress: false,
|
|
629
633
|
twapId: "8000",
|
|
630
634
|
numberOfParts: twapParams.numberOfParts,
|
|
631
635
|
});
|
|
@@ -61,7 +61,8 @@ describe("getTriggerThresholdType", () => {
|
|
|
61
61
|
const result = getOrderThresholdType(OrderType.StopIncrease, false);
|
|
62
62
|
expect(result).toBe(TriggerThresholdType.Below);
|
|
63
63
|
});
|
|
64
|
-
it("
|
|
65
|
-
|
|
64
|
+
it("returns undefined for invalid order type", () => {
|
|
65
|
+
const result = getOrderThresholdType("SomeInvalidType", true);
|
|
66
|
+
expect(result).toBeUndefined();
|
|
66
67
|
});
|
|
67
68
|
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { isAddress } from "viem";
|
|
2
2
|
import { describe, it, expect } from "vitest";
|
|
3
|
-
import { createTwapUiFeeReceiver, decodeTwapUiFeeReceiver } from "../twap/uiFeeReceiver";
|
|
3
|
+
import { createTwapUiFeeReceiver, decodeTwapUiFeeReceiver, setUiFeeReceiverIsExpress } from "../twap/uiFeeReceiver";
|
|
4
4
|
describe("uiFeeReceiver", () => {
|
|
5
5
|
describe("decodeTwapUiFeeReceiver", () => {
|
|
6
6
|
it("should return undefined if the address is not a valid address", () => {
|
|
@@ -11,12 +11,21 @@ describe("uiFeeReceiver", () => {
|
|
|
11
11
|
it("should return undefined if twapId inside is 0000", () => {
|
|
12
12
|
expect(decodeTwapUiFeeReceiver("0xff00000000000000000000000000000000000001")).toBeUndefined();
|
|
13
13
|
});
|
|
14
|
+
it("should correctly decode isExpress", () => {
|
|
15
|
+
expect(decodeTwapUiFeeReceiver("0xff0000000000000000000000000000010a123401")).toEqual({
|
|
16
|
+
isExpress: true,
|
|
17
|
+
twapId: "1234",
|
|
18
|
+
numberOfParts: 10,
|
|
19
|
+
});
|
|
20
|
+
});
|
|
14
21
|
it("should return the twapId and numberOfParts if the uiFeeReceiver is valid twap", () => {
|
|
15
22
|
expect(decodeTwapUiFeeReceiver("0xff0000000000000000000000000000000a123401")).toEqual({
|
|
23
|
+
isExpress: false,
|
|
16
24
|
twapId: "1234",
|
|
17
25
|
numberOfParts: 10,
|
|
18
26
|
});
|
|
19
27
|
expect(decodeTwapUiFeeReceiver("0xff000000000000000000000000000000153a4f01")).toEqual({
|
|
28
|
+
isExpress: false,
|
|
20
29
|
twapId: "3a4f",
|
|
21
30
|
numberOfParts: 21,
|
|
22
31
|
});
|
|
@@ -41,3 +50,13 @@ describe("uiFeeReceiver", () => {
|
|
|
41
50
|
});
|
|
42
51
|
});
|
|
43
52
|
});
|
|
53
|
+
describe("setUiFeeReceiverIsExpress", () => {
|
|
54
|
+
it("should correctly set isExpress for simple uiFeeReceiver", () => {
|
|
55
|
+
expect(setUiFeeReceiverIsExpress("0xff00000000000000000000000000000000000001", true)).toEqual("0xff00000000000000000000000000000100000001");
|
|
56
|
+
expect(setUiFeeReceiverIsExpress("0xff00000000000000000000000000000000000001", false)).toEqual("0xff00000000000000000000000000000000000001");
|
|
57
|
+
});
|
|
58
|
+
it("should correctly set isExpress for twap uiFeeReceiver", () => {
|
|
59
|
+
expect(setUiFeeReceiverIsExpress("0xff0000000000000000000000000000000a123401", true)).toEqual("0xff0000000000000000000000000000010a123401");
|
|
60
|
+
expect(setUiFeeReceiverIsExpress("0xff0000000000000000000000000000000a123401", false)).toEqual("0xff0000000000000000000000000000000a123401");
|
|
61
|
+
});
|
|
62
|
+
});
|