@dhedge/v2-sdk 2.1.8 → 2.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.
Files changed (95) hide show
  1. package/README.md +404 -54
  2. package/dist/config.d.ts +13 -2
  3. package/dist/entities/pool.d.ts +25 -86
  4. package/dist/entities/utils.d.ts +15 -0
  5. package/dist/services/hyperliquid/index.d.ts +22 -0
  6. package/dist/services/kyberSwap/index.d.ts +1 -1
  7. package/dist/services/ondo/index.d.ts +5 -0
  8. package/dist/services/oneInch/index.d.ts +1 -1
  9. package/dist/services/toros/easySwapper.d.ts +14 -0
  10. package/dist/services/toros/swapData.d.ts +5 -5
  11. package/dist/services/uniswap/V3Liquidity.d.ts +2 -2
  12. package/dist/services/velodrome/liquidity.d.ts +3 -0
  13. package/dist/test/constants.d.ts +48 -3
  14. package/dist/test/utils/testingHelper.d.ts +4 -0
  15. package/dist/types.d.ts +21 -5
  16. package/dist/utils/contract.d.ts +20 -0
  17. package/dist/v2-sdk.cjs.development.js +5133 -6641
  18. package/dist/v2-sdk.cjs.development.js.map +1 -1
  19. package/dist/v2-sdk.cjs.production.min.js +1 -1
  20. package/dist/v2-sdk.cjs.production.min.js.map +1 -1
  21. package/dist/v2-sdk.esm.js +5138 -6641
  22. package/dist/v2-sdk.esm.js.map +1 -1
  23. package/package.json +1 -1
  24. package/src/abi/PoolFactory.json +414 -204
  25. package/src/abi/PoolLogic.json +160 -134
  26. package/src/abi/ondo/IOndoGMSwap.json +30 -0
  27. package/src/config.ts +15 -9
  28. package/src/entities/pool.ts +56 -253
  29. package/src/entities/utils.ts +15 -0
  30. package/src/services/hyperliquid/index.ts +22 -0
  31. package/src/services/kyberSwap/index.ts +5 -3
  32. package/src/services/ondo/index.ts +142 -0
  33. package/src/services/oneInch/index.ts +5 -4
  34. package/src/services/toros/completeWithdrawal.ts +57 -40
  35. package/src/services/toros/easySwapper.ts +15 -1
  36. package/src/services/toros/initWithdrawal.ts +39 -31
  37. package/src/services/toros/swapData.ts +45 -131
  38. package/src/services/uniswap/V3Liquidity.ts +3 -24
  39. package/src/services/velodrome/liquidity.ts +3 -0
  40. package/src/test/aave.test.ts +99 -70
  41. package/src/test/aerodrome.test.ts +53 -24
  42. package/src/test/aerodromeCL.test.ts +64 -30
  43. package/src/test/arrakis.test.ts +23 -35
  44. package/src/test/balancer.test.ts +114 -106
  45. package/src/test/compoundV3.test.ts +45 -29
  46. package/src/test/constants.ts +56 -11
  47. package/src/test/cowswap.test.ts +33 -35
  48. package/src/test/dhedge.test.ts +45 -12
  49. package/src/test/flatmoney.test.ts +25 -39
  50. package/src/test/fluid.test.ts +33 -24
  51. package/src/test/hyperliquid.onchain.test.ts +131 -0
  52. package/src/test/kyberSwap.test.ts +37 -16
  53. package/src/test/lyra.test.ts +159 -150
  54. package/src/test/odos.test.ts +2 -2
  55. package/src/test/ondo.onchain.test.ts +132 -0
  56. package/src/test/oneInch.test.ts +36 -22
  57. package/src/test/pancakeCL.test.ts +72 -31
  58. package/src/test/pendle.test.ts +94 -54
  59. package/src/test/{pendleMint.test.ts → pendleMint.onchain.test.ts} +22 -8
  60. package/src/test/pool.test.ts +152 -95
  61. package/src/test/toros.onchain.test.ts +92 -0
  62. package/src/test/toros.test.ts +74 -20
  63. package/src/test/torosLimitOrder.test.ts +87 -42
  64. package/src/test/uniswap.test.ts +77 -128
  65. package/src/test/utils/testingHelper.ts +120 -0
  66. package/src/test/velodrome.test.ts +126 -92
  67. package/src/test/velodromeCL.test.ts +43 -31
  68. package/src/test/velodromeV2.test.ts +153 -95
  69. package/src/types.ts +22 -6
  70. package/src/utils/contract.ts +20 -0
  71. package/dist/services/futures/constants.d.ts +0 -1
  72. package/dist/services/futures/index.d.ts +0 -2
  73. package/dist/services/futures/margin.d.ts +0 -2
  74. package/dist/services/futures/trade.d.ts +0 -3
  75. package/dist/services/ramses/vesting.d.ts +0 -4
  76. package/dist/services/uniswap/V3Trade.d.ts +0 -3
  77. package/dist/test/utils/futures.d.ts +0 -2
  78. package/src/abi/IRamsesNonfungiblePositionManager.json +0 -486
  79. package/src/abi/ISynthetiXFuturesMarketV2.json +0 -531
  80. package/src/abi/ISynthetix.json +0 -139
  81. package/src/abi/IUniswapV3Quoter.json +0 -195
  82. package/src/abi/IUniswapV3Router.json +0 -221
  83. package/src/abi/IXRam.json +0 -99
  84. package/src/services/futures/constants.ts +0 -1
  85. package/src/services/futures/index.ts +0 -2
  86. package/src/services/futures/margin.ts +0 -10
  87. package/src/services/futures/trade.ts +0 -32
  88. package/src/services/ramses/vesting.ts +0 -24
  89. package/src/services/uniswap/V3Trade.ts +0 -46
  90. package/src/test/futures.test.ts +0 -51
  91. package/src/test/hyperliquid.test.ts +0 -107
  92. package/src/test/ramses.test.ts +0 -190
  93. package/src/test/ramsesCL.test.ts +0 -155
  94. package/src/test/synthetix.test.ts +0 -36
  95. package/src/test/utils/futures.ts +0 -14
@@ -92,6 +92,44 @@
92
92
  "name": "Deposit",
93
93
  "type": "event"
94
94
  },
95
+ {
96
+ "anonymous": false,
97
+ "inputs": [
98
+ {
99
+ "indexed": false,
100
+ "internalType": "address",
101
+ "name": "recipient",
102
+ "type": "address"
103
+ },
104
+ {
105
+ "indexed": false,
106
+ "internalType": "uint256",
107
+ "name": "entryFeeAmount",
108
+ "type": "uint256"
109
+ }
110
+ ],
111
+ "name": "EntryFeeMinted",
112
+ "type": "event"
113
+ },
114
+ {
115
+ "anonymous": false,
116
+ "inputs": [
117
+ {
118
+ "indexed": false,
119
+ "internalType": "address",
120
+ "name": "recipient",
121
+ "type": "address"
122
+ },
123
+ {
124
+ "indexed": false,
125
+ "internalType": "uint256",
126
+ "name": "exitFeeAmount",
127
+ "type": "uint256"
128
+ }
129
+ ],
130
+ "name": "ExitFeeMinted",
131
+ "type": "event"
132
+ },
95
133
  {
96
134
  "anonymous": false,
97
135
  "inputs": [
@@ -167,6 +205,25 @@
167
205
  "name": "PoolPrivacyUpdated",
168
206
  "type": "event"
169
207
  },
208
+ {
209
+ "anonymous": false,
210
+ "inputs": [
211
+ {
212
+ "indexed": true,
213
+ "internalType": "address",
214
+ "name": "referrer",
215
+ "type": "address"
216
+ },
217
+ {
218
+ "indexed": false,
219
+ "internalType": "uint256",
220
+ "name": "amount",
221
+ "type": "uint256"
222
+ }
223
+ ],
224
+ "name": "ReferralFeeMinted",
225
+ "type": "event"
226
+ },
170
227
  {
171
228
  "anonymous": false,
172
229
  "inputs": [
@@ -349,19 +406,6 @@
349
406
  "stateMutability": "nonpayable",
350
407
  "type": "function"
351
408
  },
352
- {
353
- "inputs": [],
354
- "name": "availableManagerFee",
355
- "outputs": [
356
- {
357
- "internalType": "uint256",
358
- "name": "fee",
359
- "type": "uint256"
360
- }
361
- ],
362
- "stateMutability": "view",
363
- "type": "function"
364
- },
365
409
  {
366
410
  "inputs": [
367
411
  {
@@ -385,7 +429,7 @@
385
429
  "inputs": [
386
430
  {
387
431
  "internalType": "uint256",
388
- "name": "fundValue",
432
+ "name": "_fundValue",
389
433
  "type": "uint256"
390
434
  }
391
435
  ],
@@ -400,50 +444,6 @@
400
444
  "stateMutability": "view",
401
445
  "type": "function"
402
446
  },
403
- {
404
- "inputs": [
405
- {
406
- "internalType": "uint256",
407
- "name": "currentBalance",
408
- "type": "uint256"
409
- },
410
- {
411
- "internalType": "uint256",
412
- "name": "liquidityMinted",
413
- "type": "uint256"
414
- },
415
- {
416
- "internalType": "uint256",
417
- "name": "newCooldown",
418
- "type": "uint256"
419
- },
420
- {
421
- "internalType": "uint256",
422
- "name": "lastCooldown",
423
- "type": "uint256"
424
- },
425
- {
426
- "internalType": "uint256",
427
- "name": "lastDepositTime",
428
- "type": "uint256"
429
- },
430
- {
431
- "internalType": "uint256",
432
- "name": "blockTimestamp",
433
- "type": "uint256"
434
- }
435
- ],
436
- "name": "calculateCooldown",
437
- "outputs": [
438
- {
439
- "internalType": "uint256",
440
- "name": "cooldown",
441
- "type": "uint256"
442
- }
443
- ],
444
- "stateMutability": "pure",
445
- "type": "function"
446
- },
447
447
  {
448
448
  "inputs": [],
449
449
  "name": "creationTime",
@@ -547,40 +547,16 @@
547
547
  "internalType": "uint256",
548
548
  "name": "_amount",
549
549
  "type": "uint256"
550
- }
551
- ],
552
- "name": "depositFor",
553
- "outputs": [
550
+ },
554
551
  {
555
552
  "internalType": "uint256",
556
- "name": "liquidityMinted",
553
+ "name": "_cooldown",
557
554
  "type": "uint256"
558
- }
559
- ],
560
- "stateMutability": "nonpayable",
561
- "type": "function"
562
- },
563
- {
564
- "inputs": [
565
- {
566
- "internalType": "address",
567
- "name": "_recipient",
568
- "type": "address"
569
555
  },
570
556
  {
571
557
  "internalType": "address",
572
- "name": "_asset",
558
+ "name": "_referrer",
573
559
  "type": "address"
574
- },
575
- {
576
- "internalType": "uint256",
577
- "name": "_amount",
578
- "type": "uint256"
579
- },
580
- {
581
- "internalType": "uint256",
582
- "name": "_cooldown",
583
- "type": "uint256"
584
560
  }
585
561
  ],
586
562
  "name": "depositForWithCustomCooldown",
@@ -639,13 +615,7 @@
639
615
  }
640
616
  ],
641
617
  "name": "execTransactions",
642
- "outputs": [
643
- {
644
- "internalType": "bool",
645
- "name": "success",
646
- "type": "bool"
647
- }
648
- ],
618
+ "outputs": [],
649
619
  "stateMutability": "nonpayable",
650
620
  "type": "function"
651
621
  },
@@ -668,7 +638,7 @@
668
638
  },
669
639
  {
670
640
  "internalType": "address",
671
- "name": "originator",
641
+ "name": "initiator",
672
642
  "type": "address"
673
643
  },
674
644
  {
@@ -705,7 +675,7 @@
705
675
  "inputs": [
706
676
  {
707
677
  "internalType": "address",
708
- "name": "sender",
678
+ "name": "_depositor",
709
679
  "type": "address"
710
680
  }
711
681
  ],
@@ -852,25 +822,6 @@
852
822
  "stateMutability": "nonpayable",
853
823
  "type": "function"
854
824
  },
855
- {
856
- "inputs": [
857
- {
858
- "internalType": "address",
859
- "name": "member",
860
- "type": "address"
861
- }
862
- ],
863
- "name": "isMemberAllowed",
864
- "outputs": [
865
- {
866
- "internalType": "bool",
867
- "name": "",
868
- "type": "bool"
869
- }
870
- ],
871
- "stateMutability": "view",
872
- "type": "function"
873
- },
874
825
  {
875
826
  "inputs": [
876
827
  {
@@ -941,19 +892,6 @@
941
892
  "stateMutability": "view",
942
893
  "type": "function"
943
894
  },
944
- {
945
- "inputs": [],
946
- "name": "managerName",
947
- "outputs": [
948
- {
949
- "internalType": "string",
950
- "name": "_managerName",
951
- "type": "string"
952
- }
953
- ],
954
- "stateMutability": "view",
955
- "type": "function"
956
- },
957
895
  {
958
896
  "inputs": [],
959
897
  "name": "mintManagerFee",
@@ -974,6 +912,25 @@
974
912
  "stateMutability": "view",
975
913
  "type": "function"
976
914
  },
915
+ {
916
+ "inputs": [
917
+ {
918
+ "internalType": "bytes",
919
+ "name": "data",
920
+ "type": "bytes"
921
+ }
922
+ ],
923
+ "name": "onDelegationCallback",
924
+ "outputs": [
925
+ {
926
+ "internalType": "bytes",
927
+ "name": "",
928
+ "type": "bytes"
929
+ }
930
+ ],
931
+ "stateMutability": "nonpayable",
932
+ "type": "function"
933
+ },
977
934
  {
978
935
  "inputs": [
979
936
  {
@@ -1043,13 +1000,7 @@
1043
1000
  }
1044
1001
  ],
1045
1002
  "name": "setPoolManagerLogic",
1046
- "outputs": [
1047
- {
1048
- "internalType": "bool",
1049
- "name": "",
1050
- "type": "bool"
1051
- }
1052
- ],
1003
+ "outputs": [],
1053
1004
  "stateMutability": "nonpayable",
1054
1005
  "type": "function"
1055
1006
  },
@@ -1197,6 +1148,41 @@
1197
1148
  "stateMutability": "nonpayable",
1198
1149
  "type": "function"
1199
1150
  },
1151
+ {
1152
+ "inputs": [
1153
+ {
1154
+ "internalType": "uint256",
1155
+ "name": "_fundTokenAmount",
1156
+ "type": "uint256"
1157
+ },
1158
+ {
1159
+ "components": [
1160
+ {
1161
+ "internalType": "address",
1162
+ "name": "supportedAsset",
1163
+ "type": "address"
1164
+ },
1165
+ {
1166
+ "internalType": "bytes",
1167
+ "name": "withdrawData",
1168
+ "type": "bytes"
1169
+ },
1170
+ {
1171
+ "internalType": "uint256",
1172
+ "name": "slippageTolerance",
1173
+ "type": "uint256"
1174
+ }
1175
+ ],
1176
+ "internalType": "struct IPoolLogic.ComplexAsset[]",
1177
+ "name": "_complexAssetsData",
1178
+ "type": "tuple[]"
1179
+ }
1180
+ ],
1181
+ "name": "withdrawSafe",
1182
+ "outputs": [],
1183
+ "stateMutability": "nonpayable",
1184
+ "type": "function"
1185
+ },
1200
1186
  {
1201
1187
  "inputs": [
1202
1188
  {
@@ -1214,6 +1200,46 @@
1214
1200
  "outputs": [],
1215
1201
  "stateMutability": "nonpayable",
1216
1202
  "type": "function"
1203
+ },
1204
+ {
1205
+ "inputs": [
1206
+ {
1207
+ "internalType": "address",
1208
+ "name": "_recipient",
1209
+ "type": "address"
1210
+ },
1211
+ {
1212
+ "internalType": "uint256",
1213
+ "name": "_fundTokenAmount",
1214
+ "type": "uint256"
1215
+ },
1216
+ {
1217
+ "components": [
1218
+ {
1219
+ "internalType": "address",
1220
+ "name": "supportedAsset",
1221
+ "type": "address"
1222
+ },
1223
+ {
1224
+ "internalType": "bytes",
1225
+ "name": "withdrawData",
1226
+ "type": "bytes"
1227
+ },
1228
+ {
1229
+ "internalType": "uint256",
1230
+ "name": "slippageTolerance",
1231
+ "type": "uint256"
1232
+ }
1233
+ ],
1234
+ "internalType": "struct IPoolLogic.ComplexAsset[]",
1235
+ "name": "_complexAssetsData",
1236
+ "type": "tuple[]"
1237
+ }
1238
+ ],
1239
+ "name": "withdrawToSafe",
1240
+ "outputs": [],
1241
+ "stateMutability": "nonpayable",
1242
+ "type": "function"
1217
1243
  }
1218
- ]
1244
+ ]
1219
1245
  }
@@ -0,0 +1,30 @@
1
+ [
2
+ {
3
+ "inputs": [
4
+ { "name": "tokenIn", "type": "address" },
5
+ { "name": "amountIn", "type": "uint256" },
6
+ { "name": "tokenOut", "type": "address" },
7
+ { "name": "amountOutMinimum", "type": "uint256" },
8
+ { "name": "attestationSignature", "type": "bytes" },
9
+ {
10
+ "components": [
11
+ { "name": "chainId", "type": "uint256" },
12
+ { "name": "attestationId", "type": "uint256" },
13
+ { "name": "userId", "type": "bytes32" },
14
+ { "name": "asset", "type": "address" },
15
+ { "name": "price", "type": "uint256" },
16
+ { "name": "quantity", "type": "uint256" },
17
+ { "name": "expiration", "type": "uint256" },
18
+ { "name": "side", "type": "uint8" },
19
+ { "name": "additionalData", "type": "bytes32" }
20
+ ],
21
+ "name": "quote",
22
+ "type": "tuple"
23
+ }
24
+ ],
25
+ "name": "swapExactInWithAttestation",
26
+ "outputs": [],
27
+ "stateMutability": "nonpayable",
28
+ "type": "function"
29
+ }
30
+ ]
package/src/config.ts CHANGED
@@ -11,6 +11,7 @@ import { Deployment } from "@lyrafinance/lyra-js";
11
11
  // eslint-disable-next-line @typescript-eslint/no-var-requires
12
12
  require("dotenv").config();
13
13
 
14
+ /** dHEDGE PoolFactory proxy address per network — used by `Dhedge.createPool` and pool lookups. */
14
15
  export const factoryAddress: AddressNetworkMap = {
15
16
  [Network.POLYGON]: process.env.STAGING_CONTRACTS
16
17
  ? "0xDd87eCdB10cFF7004276AAbAbd30e7a08F69bb53"
@@ -23,6 +24,7 @@ export const factoryAddress: AddressNetworkMap = {
23
24
  [Network.HYPERLIQUID]: "0xe91505e2ab653dd128c71e9690eeefd28cc5b333"
24
25
  };
25
26
 
27
+ /** Router/spender address for each (network, Dapp). Target of `pool.approve`/`pool.trade`. */
26
28
  export const routerAddress: AddressDappNetworkMap = {
27
29
  [Network.POLYGON]: {
28
30
  [Dapp.SUSHISWAP]: "0x1b02dA8Cb0d097eB8D57A175b88c7D8b47997506",
@@ -40,7 +42,6 @@ export const routerAddress: AddressDappNetworkMap = {
40
42
  },
41
43
  [Network.OPTIMISM]: {
42
44
  [Dapp.UNISWAPV3]: "0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45",
43
- [Dapp.SYNTHETIX]: "0x8700dAec35aF8Ff88c16BdF0418774CB3D7599B4",
44
45
  [Dapp.AAVEV3]: "0x794a61358D6845594F94dc1DB02A252b5b4814aD",
45
46
  [Dapp.ONEINCH]: "0x111111125421ca6dc452d289314280a0f8842a65",
46
47
  [Dapp.TOROS]: "0x2Ed1bd7f66e47113672f3870308b5E867C5bb743",
@@ -57,7 +58,6 @@ export const routerAddress: AddressDappNetworkMap = {
57
58
  [Dapp.UNISWAPV3]: "0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45",
58
59
  [Dapp.AAVEV3]: "0x794a61358D6845594F94dc1DB02A252b5b4814aD",
59
60
  [Dapp.BALANCER]: "0xBA12222222228d8Ba445958a75a0704d566BF2C8",
60
- [Dapp.RAMSES]: "0xaaa87963efeb6f7e0a2711f397663105acb1805e",
61
61
  [Dapp.TOROS]: "0xA5679C4272A056Bb83f039961fae7D99C48529F5",
62
62
  [Dapp.ODOS]: "0x0D05a7D3448512B78fa8A9e46c4872C88C4a0D05",
63
63
  [Dapp.PENDLE]: "0x888888888889758F76e7103c6CbF23ABbF58F946",
@@ -77,7 +77,8 @@ export const routerAddress: AddressDappNetworkMap = {
77
77
  [Dapp.ODOS]: "0x0D05a7D3448512B78fa8A9e46c4872C88C4a0D05",
78
78
  [Dapp.PENDLE]: "0x888888888889758F76e7103c6CbF23ABbF58F946",
79
79
  [Dapp.ONEINCH]: "0x111111125421ca6dc452d289314280a0f8842a65",
80
- [Dapp.KYBERSWAP]: "0x6131B5fae19EA4f9D964eAc0408E4408b66337b5"
80
+ [Dapp.KYBERSWAP]: "0x6131B5fae19EA4f9D964eAc0408E4408b66337b5",
81
+ [Dapp.ONDO]: "0xde41399145F23936b03dD1474eC16c1519c0DC2a"
81
82
  },
82
83
  [Network.PLASMA]: {
83
84
  [Dapp.AAVEV3]: "0x925a2A7214Ed92428B5b1B090F80b25700095e12",
@@ -89,10 +90,12 @@ export const routerAddress: AddressDappNetworkMap = {
89
90
  }
90
91
  };
91
92
 
93
+ /** CoW Protocol GPv2Settlement address per network (where pre-signed orders are submitted). */
92
94
  export const gpv2SettlementAddress: Partial<Record<Network, string>> = {
93
95
  [Network.POLYGON]: "0x9008D19f58AAbD9eD0D60971565AA8510560ab41"
94
96
  };
95
97
 
98
+ /** Pair-factory address for each (network, Dapp). Used for LP pair lookup (e.g. Sushi/Quickswap). */
96
99
  export const dappFactoryAddress: AddressDappNetworkMap = {
97
100
  [Network.POLYGON]: {
98
101
  [Dapp.SUSHISWAP]: "0xc35DADB65012eC5796536bD9864eD8773aBc74C4",
@@ -106,6 +109,7 @@ export const dappFactoryAddress: AddressDappNetworkMap = {
106
109
  [Network.HYPERLIQUID]: {}
107
110
  };
108
111
 
112
+ /** Staking-rewards / MasterChef / Voter address for each (network, Dapp). */
109
113
  export const stakingAddress: AddressDappNetworkMap = {
110
114
  [Network.POLYGON]: {
111
115
  [Dapp.SUSHISWAP]: "0x0769fd68dFb93167989C6f7254cd0D766Fb2841F",
@@ -129,6 +133,7 @@ export const stakingAddress: AddressDappNetworkMap = {
129
133
  [Network.HYPERLIQUID]: {}
130
134
  };
131
135
 
136
+ /** Aave PoolAddressesProvider per network — entrypoint for Aave V2/V3 lookups. */
132
137
  export const aaveAddressProvider: AddressDappNetworkMap = {
133
138
  [Network.POLYGON]: {
134
139
  [Dapp.AAVE]: "0xd05e3E715d945B59290df0ae8eF85c1BdB684744",
@@ -152,6 +157,7 @@ export const aaveAddressProvider: AddressDappNetworkMap = {
152
157
  },
153
158
  [Network.HYPERLIQUID]: {}
154
159
  };
160
+ /** ERC-721 NonfungiblePositionManager for each Uniswap V3-style CL Dapp. */
155
161
  export const nonfungiblePositionManagerAddress: AddressDappNetworkMap = {
156
162
  [Network.POLYGON]: {
157
163
  [Dapp.UNISWAPV3]: "0xC36442b4a4522E871399CD717aBDD847Ab11FE88"
@@ -162,7 +168,6 @@ export const nonfungiblePositionManagerAddress: AddressDappNetworkMap = {
162
168
  },
163
169
  [Network.ARBITRUM]: {
164
170
  [Dapp.UNISWAPV3]: "0xC36442b4a4522E871399CD717aBDD847Ab11FE88",
165
- [Dapp.RAMSESCL]: "0xAA277CB7914b7e5514946Da92cb9De332Ce610EF",
166
171
  [Dapp.PANCAKECL]: "0x46a15b0b27311cedf172ab29e4f4766fbe7f4364"
167
172
  },
168
173
  [Network.BASE]: {
@@ -175,6 +180,7 @@ export const nonfungiblePositionManagerAddress: AddressDappNetworkMap = {
175
180
  [Network.HYPERLIQUID]: {}
176
181
  };
177
182
 
183
+ /** EVM chain id for each `Network` — used by API quotes (1inch, Pendle, KyberSwap…). */
178
184
  export const networkChainIdMap: NetworkChainIdMap = {
179
185
  [Network.POLYGON]: 137,
180
186
  [Network.OPTIMISM]: 10,
@@ -185,6 +191,7 @@ export const networkChainIdMap: NetworkChainIdMap = {
185
191
  [Network.HYPERLIQUID]: 999
186
192
  };
187
193
 
194
+ /** Balancer SOR subgraph URL per network (used by `Utils.getBalancerSwapTx`). */
188
195
  export const balancerSubgraph: AddressNetworkMap = {
189
196
  [Network.POLYGON]:
190
197
  "https://api.thegraph.com/subgraphs/name/balancer-labs/balancer-polygon-v2",
@@ -196,6 +203,7 @@ export const balancerSubgraph: AddressNetworkMap = {
196
203
  [Network.HYPERLIQUID]: ""
197
204
  };
198
205
 
206
+ /** Multicall3 contract per network — used by `multicall` / `Multicaller`. */
199
207
  export const multiCallAddress: AddressNetworkMap = {
200
208
  [Network.POLYGON]: "0x275617327c958bD06b5D6b871E7f491D76113dd8",
201
209
  [Network.OPTIMISM]: "",
@@ -206,17 +214,14 @@ export const multiCallAddress: AddressNetworkMap = {
206
214
  [Network.HYPERLIQUID]: ""
207
215
  };
208
216
 
217
+ /** Lyra deployment id per network — passed to `@lyrafinance/lyra-js` to scope queries. */
209
218
  export const lyraNetworkMap: LyraNetworkMap = {
210
219
  [Network.OPTIMISM]: Deployment.Mainnet
211
220
  };
212
221
 
213
222
  export const MaxUint128 = "0xffffffffffffffffffffffffffffffff";
214
- export const UNISWAPV3_QUOTER_ADDRESS =
215
- "0xb27308f9F90D607463bb33eA1BeBb41C27CE5AB6";
216
-
217
- export const SYNTHETIX_TRACKING_CODE =
218
- "0x4448454447450000000000000000000000000000000000000000000000000000";
219
223
 
224
+ /** FlatMoney v1/v2 module addresses per network (DelayedOrder, FlatcoinVault, StableModule). */
220
225
  export const flatMoneyContractAddresses: Readonly<Partial<
221
226
  Record<
222
227
  Network,
@@ -251,6 +256,7 @@ export const flatMoneyContractAddresses: Readonly<Partial<
251
256
  }
252
257
  };
253
258
 
259
+ /** Toros PoolLimitOrderManager address per network — used for stop-loss / take-profit orders. */
254
260
  export const limitOrderAddress: AddressNetworkMap = {
255
261
  [Network.POLYGON]: "0xB71410736d2C8F2DAf30dA9D332dA10534d2624d",
256
262
  [Network.OPTIMISM]: "0x3bFE2a472d2964Ea4070725b7Fb0A868b3f08b63",