@dhedge/trading-widget 1.2.9 → 2.0.0

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 (79) hide show
  1. package/README.md +110 -110
  2. package/core-kit/abi/easy-swapper-v2.d.ts +413 -0
  3. package/core-kit/abi/flatcoin-points-module.d.ts +1 -1
  4. package/core-kit/abi/index.d.ts +2 -1
  5. package/core-kit/const/config.d.ts +1 -1
  6. package/core-kit/const/contracts/arbitrum.d.ts +1 -0
  7. package/core-kit/const/contracts/base.d.ts +1 -0
  8. package/core-kit/const/contracts/optimism.d.ts +1 -0
  9. package/core-kit/const/contracts/polygon.d.ts +1 -0
  10. package/core-kit/const/default-data.d.ts +3 -7
  11. package/core-kit/const/index.d.ts +1 -0
  12. package/core-kit/const/logger.d.ts +0 -1
  13. package/core-kit/const/synthetix.d.ts +1 -0
  14. package/core-kit/const/tokens/index.d.ts +2 -1
  15. package/core-kit/const/trading.d.ts +10 -0
  16. package/core-kit/hooks/pool/multicall/use-pool.static.d.ts +530 -401
  17. package/core-kit/hooks/pool/use-pool-fees.d.ts +0 -1
  18. package/core-kit/hooks/state/action.d.ts +4 -1
  19. package/core-kit/hooks/state/index.d.ts +3 -3
  20. package/core-kit/hooks/state/meta.d.ts +0 -2
  21. package/core-kit/hooks/state/pool.d.ts +0 -2
  22. package/core-kit/hooks/trading/deposit-v2/index.d.ts +16 -0
  23. package/core-kit/hooks/trading/deposit-v2/use-applied-deposit-slippage.d.ts +1 -0
  24. package/core-kit/hooks/trading/deposit-v2/use-deposit-lock-time.d.ts +1 -0
  25. package/core-kit/hooks/trading/deposit-v2/use-deposit-price-diff.d.ts +5 -0
  26. package/core-kit/hooks/trading/deposit-v2/use-deposit-quote-contract-read.d.ts +414 -0
  27. package/core-kit/hooks/trading/deposit-v2/use-deposit-quote.d.ts +1 -0
  28. package/core-kit/hooks/trading/deposit-v2/use-deposit-slippage.d.ts +1 -0
  29. package/core-kit/hooks/trading/deposit-v2/use-is-custom-cooldown-deposit.d.ts +1 -0
  30. package/core-kit/hooks/trading/deposit-v2/use-is-deposit-with-swap-transaction.d.ts +1 -0
  31. package/core-kit/hooks/trading/deposit-v2/use-is-vault-deposit-locked.d.ts +4 -0
  32. package/core-kit/hooks/trading/deposit-v2/use-min-vault-tokens-received-amount.d.ts +1 -0
  33. package/core-kit/hooks/trading/deposit-v2/use-swap-data-based-on-send-token.d.ts +1 -0
  34. package/core-kit/hooks/trading/deposit-v2/use-vault-deposit-params.d.ts +2 -0
  35. package/core-kit/hooks/trading/deposit-v2/use-vault-deposit-token-amount.d.ts +1 -0
  36. package/core-kit/hooks/trading/{deposit/use-pool-deposit-tokens.d.ts → deposit-v2/use-vault-deposit-tokens.d.ts} +1 -1
  37. package/core-kit/hooks/trading/deposit-v2/use-vault-deposit-transaction-arguments.d.ts +2 -0
  38. package/core-kit/hooks/trading/index.d.ts +1 -3
  39. package/core-kit/hooks/trading/use-swap-data-query.d.ts +6 -0
  40. package/core-kit/models/index.d.ts +0 -3
  41. package/core-kit/types/config.types.d.ts +1 -4
  42. package/core-kit/types/state.types.d.ts +8 -13
  43. package/core-kit/types/trading-panel.types.d.ts +0 -1
  44. package/core-kit/types/trading.types.d.ts +21 -3
  45. package/core-kit/utils/transaction.d.ts +12 -0
  46. package/{index-76dd5f17.js → index-8649280a.js} +12840 -12519
  47. package/index-e1549967.cjs +207 -0
  48. package/index.cjs +1 -1
  49. package/index.d.ts +6 -9
  50. package/index.js +226 -260
  51. package/package.json +1 -1
  52. package/{pyth-adapter-5642b8a7.js → pyth-adapter-ac818fc3.js} +1 -1
  53. package/{pyth-adapter-4f3cae01.cjs → pyth-adapter-e6d49270.cjs} +1 -1
  54. package/trading-widget/components/deposit/meta/transaction-disclosure/transaction-disclosure.hooks.d.ts +1 -0
  55. package/trading-widget/components/widget/widget-input/asset-composition-table/asset-composition-table.hooks.d.ts +1 -0
  56. package/trading-widget/components/widget/widget-input/asset-composition-table/withdraw-explanation-tip.d.ts +4 -0
  57. package/trading-widget/components/widget/widget-overlay/pool-select-overlay/pool-select-overlay.hooks.d.ts +0 -3
  58. package/trading-widget/providers/config-provider/config-provider.types.d.ts +2 -1
  59. package/trading-widget/providers/translation-provider/translation-provider.types.d.ts +0 -2
  60. package/core-kit/hooks/trading/deposit/index.d.ts +0 -10
  61. package/core-kit/hooks/trading/deposit/use-deposit-method-handler.d.ts +0 -2
  62. package/core-kit/hooks/trading/deposit/use-deposit-quote.d.ts +0 -2
  63. package/core-kit/hooks/trading/deposit/use-deposit-slippage.d.ts +0 -1
  64. package/core-kit/hooks/trading/deposit/use-deposit-trading-params.d.ts +0 -2
  65. package/core-kit/hooks/trading/deposit/use-pool-deposit-asset-address.d.ts +0 -9
  66. package/core-kit/hooks/trading/deposit/use-should-be-whitelisted.d.ts +0 -4
  67. package/core-kit/hooks/trading/use-handle-pool-swap-info.d.ts +0 -1
  68. package/core-kit/hooks/trading/use-is-easy-swapper-trading.d.ts +0 -1
  69. package/core-kit/hooks/trading/use-trading-price-diff.d.ts +0 -8
  70. package/core-kit/models/buying-with-easyswapper-args.d.ts +0 -18
  71. package/core-kit/models/buying-with-native-asset-args.d.ts +0 -16
  72. package/core-kit/models/buying-with-pool-logic-args.d.ts +0 -14
  73. package/index-83c3afd8.cjs +0 -207
  74. package/trading-widget/components/deposit/settings/deposit-fee-switch/deposit-fee-switch.d.ts +0 -1
  75. package/trading-widget/components/deposit/settings/deposit-fee-switch/deposit-fee-switch.hooks.d.ts +0 -5
  76. package/trading-widget/components/deposit/settings/deposit-settings/deposit-settings.hooks.d.ts +0 -6
  77. /package/core-kit/hooks/trading/{deposit → deposit-v2}/use-deposit-allowance.d.ts +0 -0
  78. /package/core-kit/hooks/trading/{deposit → deposit-v2}/use-deposit.d.ts +0 -0
  79. /package/core-kit/hooks/trading/{deposit → deposit-v2}/use-handle-pool-deposit-data.d.ts +0 -0
@@ -0,0 +1,413 @@
1
+ export declare const EasySwapperV2Abi: readonly [{
2
+ readonly inputs: readonly [];
3
+ readonly name: "customCooldown";
4
+ readonly outputs: readonly [{
5
+ readonly internalType: "uint256";
6
+ readonly name: "";
7
+ readonly type: "uint256";
8
+ }];
9
+ readonly stateMutability: "view";
10
+ readonly type: "function";
11
+ }, {
12
+ readonly inputs: readonly [{
13
+ readonly internalType: "address";
14
+ readonly name: "";
15
+ readonly type: "address";
16
+ }];
17
+ readonly name: "customCooldownDepositsWhitelist";
18
+ readonly outputs: readonly [{
19
+ readonly internalType: "bool";
20
+ readonly name: "";
21
+ readonly type: "bool";
22
+ }];
23
+ readonly stateMutability: "view";
24
+ readonly type: "function";
25
+ }, {
26
+ readonly inputs: readonly [{
27
+ readonly internalType: "address";
28
+ readonly name: "_dHedgeVault";
29
+ readonly type: "address";
30
+ }, {
31
+ readonly internalType: "contract IERC20";
32
+ readonly name: "_vaultDepositToken";
33
+ readonly type: "address";
34
+ }, {
35
+ readonly internalType: "uint256";
36
+ readonly name: "_depositAmount";
37
+ readonly type: "uint256";
38
+ }, {
39
+ readonly internalType: "uint256";
40
+ readonly name: "_expectedAmountReceived";
41
+ readonly type: "uint256";
42
+ }];
43
+ readonly name: "deposit";
44
+ readonly outputs: readonly [];
45
+ readonly stateMutability: "nonpayable";
46
+ readonly type: "function";
47
+ }, {
48
+ readonly inputs: readonly [{
49
+ readonly internalType: "address";
50
+ readonly name: "_dHedgeVault";
51
+ readonly type: "address";
52
+ }, {
53
+ readonly internalType: "address";
54
+ readonly name: "_vaultDepositToken";
55
+ readonly type: "address";
56
+ }, {
57
+ readonly internalType: "uint256";
58
+ readonly name: "_depositAmount";
59
+ readonly type: "uint256";
60
+ }];
61
+ readonly name: "depositQuote";
62
+ readonly outputs: readonly [{
63
+ readonly internalType: "uint256";
64
+ readonly name: "expectedAmountReceived";
65
+ readonly type: "uint256";
66
+ }];
67
+ readonly stateMutability: "view";
68
+ readonly type: "function";
69
+ }, {
70
+ readonly inputs: readonly [{
71
+ readonly internalType: "address";
72
+ readonly name: "_dHedgeVault";
73
+ readonly type: "address";
74
+ }, {
75
+ readonly internalType: "contract IERC20";
76
+ readonly name: "_vaultDepositToken";
77
+ readonly type: "address";
78
+ }, {
79
+ readonly internalType: "uint256";
80
+ readonly name: "_depositAmount";
81
+ readonly type: "uint256";
82
+ }, {
83
+ readonly internalType: "uint256";
84
+ readonly name: "_expectedAmountReceived";
85
+ readonly type: "uint256";
86
+ }];
87
+ readonly name: "depositWithCustomCooldown";
88
+ readonly outputs: readonly [];
89
+ readonly stateMutability: "nonpayable";
90
+ readonly type: "function";
91
+ }, {
92
+ readonly inputs: readonly [{
93
+ readonly internalType: "address";
94
+ readonly name: "_dHedgeVault";
95
+ readonly type: "address";
96
+ }, {
97
+ readonly internalType: "uint256";
98
+ readonly name: "_amountIn";
99
+ readonly type: "uint256";
100
+ }, {
101
+ readonly internalType: "uint256";
102
+ readonly name: "_slippageTolerance";
103
+ readonly type: "uint256";
104
+ }];
105
+ readonly name: "initWithdrawal";
106
+ readonly outputs: readonly [];
107
+ readonly stateMutability: "nonpayable";
108
+ readonly type: "function";
109
+ }, {
110
+ readonly inputs: readonly [{
111
+ readonly internalType: "address";
112
+ readonly name: "_dHedgeVault";
113
+ readonly type: "address";
114
+ }, {
115
+ readonly internalType: "uint256";
116
+ readonly name: "_expectedAmountReceived";
117
+ readonly type: "uint256";
118
+ }];
119
+ readonly name: "nativeDeposit";
120
+ readonly outputs: readonly [];
121
+ readonly stateMutability: "payable";
122
+ readonly type: "function";
123
+ }, {
124
+ readonly inputs: readonly [{
125
+ readonly internalType: "address";
126
+ readonly name: "_dHedgeVault";
127
+ readonly type: "address";
128
+ }, {
129
+ readonly internalType: "uint256";
130
+ readonly name: "_expectedAmountReceived";
131
+ readonly type: "uint256";
132
+ }];
133
+ readonly name: "nativeDepositWithCustomCooldown";
134
+ readonly outputs: readonly [];
135
+ readonly stateMutability: "payable";
136
+ readonly type: "function";
137
+ }, {
138
+ readonly inputs: readonly [];
139
+ readonly name: "swapper";
140
+ readonly outputs: readonly [{
141
+ readonly internalType: "contract ISwapper";
142
+ readonly name: "";
143
+ readonly type: "address";
144
+ }];
145
+ readonly stateMutability: "view";
146
+ readonly type: "function";
147
+ }, {
148
+ readonly inputs: readonly [];
149
+ readonly name: "weth";
150
+ readonly outputs: readonly [{
151
+ readonly internalType: "address";
152
+ readonly name: "";
153
+ readonly type: "address";
154
+ }];
155
+ readonly stateMutability: "view";
156
+ readonly type: "function";
157
+ }, {
158
+ readonly inputs: readonly [{
159
+ readonly internalType: "address";
160
+ readonly name: "";
161
+ readonly type: "address";
162
+ }];
163
+ readonly name: "withdrawalContracts";
164
+ readonly outputs: readonly [{
165
+ readonly internalType: "address";
166
+ readonly name: "";
167
+ readonly type: "address";
168
+ }];
169
+ readonly stateMutability: "view";
170
+ readonly type: "function";
171
+ }, {
172
+ readonly inputs: readonly [];
173
+ readonly name: "wrappedNativeToken";
174
+ readonly outputs: readonly [{
175
+ readonly internalType: "contract IWETH";
176
+ readonly name: "";
177
+ readonly type: "address";
178
+ }];
179
+ readonly stateMutability: "view";
180
+ readonly type: "function";
181
+ }, {
182
+ readonly inputs: readonly [{
183
+ readonly internalType: "address";
184
+ readonly name: "_dHedgeVault";
185
+ readonly type: "address";
186
+ }, {
187
+ readonly components: readonly [{
188
+ readonly components: readonly [{
189
+ readonly internalType: "contract IERC20";
190
+ readonly name: "token";
191
+ readonly type: "address";
192
+ }, {
193
+ readonly internalType: "uint256";
194
+ readonly name: "amount";
195
+ readonly type: "uint256";
196
+ }, {
197
+ readonly components: readonly [{
198
+ readonly internalType: "bytes32";
199
+ readonly name: "routerKey";
200
+ readonly type: "bytes32";
201
+ }, {
202
+ readonly internalType: "bytes";
203
+ readonly name: "swapData";
204
+ readonly type: "bytes";
205
+ }];
206
+ readonly internalType: "struct ISwapper.AggregatorData";
207
+ readonly name: "aggregatorData";
208
+ readonly type: "tuple";
209
+ }];
210
+ readonly internalType: "struct ISwapper.SrcTokenSwapDetails";
211
+ readonly name: "srcData";
212
+ readonly type: "tuple";
213
+ }, {
214
+ readonly components: readonly [{
215
+ readonly internalType: "contract IERC20";
216
+ readonly name: "destToken";
217
+ readonly type: "address";
218
+ }, {
219
+ readonly internalType: "uint256";
220
+ readonly name: "minDestAmount";
221
+ readonly type: "uint256";
222
+ }];
223
+ readonly internalType: "struct ISwapper.DestData";
224
+ readonly name: "destData";
225
+ readonly type: "tuple";
226
+ }];
227
+ readonly internalType: "struct EasySwapperV2.SingleInSingleOutData";
228
+ readonly name: "_swapData";
229
+ readonly type: "tuple";
230
+ }, {
231
+ readonly internalType: "uint256";
232
+ readonly name: "_expectedAmountReceived";
233
+ readonly type: "uint256";
234
+ }];
235
+ readonly name: "zapDeposit";
236
+ readonly outputs: readonly [];
237
+ readonly stateMutability: "nonpayable";
238
+ readonly type: "function";
239
+ }, {
240
+ readonly inputs: readonly [{
241
+ readonly internalType: "address";
242
+ readonly name: "_dHedgeVault";
243
+ readonly type: "address";
244
+ }, {
245
+ readonly components: readonly [{
246
+ readonly components: readonly [{
247
+ readonly internalType: "contract IERC20";
248
+ readonly name: "token";
249
+ readonly type: "address";
250
+ }, {
251
+ readonly internalType: "uint256";
252
+ readonly name: "amount";
253
+ readonly type: "uint256";
254
+ }, {
255
+ readonly components: readonly [{
256
+ readonly internalType: "bytes32";
257
+ readonly name: "routerKey";
258
+ readonly type: "bytes32";
259
+ }, {
260
+ readonly internalType: "bytes";
261
+ readonly name: "swapData";
262
+ readonly type: "bytes";
263
+ }];
264
+ readonly internalType: "struct ISwapper.AggregatorData";
265
+ readonly name: "aggregatorData";
266
+ readonly type: "tuple";
267
+ }];
268
+ readonly internalType: "struct ISwapper.SrcTokenSwapDetails";
269
+ readonly name: "srcData";
270
+ readonly type: "tuple";
271
+ }, {
272
+ readonly components: readonly [{
273
+ readonly internalType: "contract IERC20";
274
+ readonly name: "destToken";
275
+ readonly type: "address";
276
+ }, {
277
+ readonly internalType: "uint256";
278
+ readonly name: "minDestAmount";
279
+ readonly type: "uint256";
280
+ }];
281
+ readonly internalType: "struct ISwapper.DestData";
282
+ readonly name: "destData";
283
+ readonly type: "tuple";
284
+ }];
285
+ readonly internalType: "struct EasySwapperV2.SingleInSingleOutData";
286
+ readonly name: "_swapData";
287
+ readonly type: "tuple";
288
+ }, {
289
+ readonly internalType: "uint256";
290
+ readonly name: "_expectedAmountReceived";
291
+ readonly type: "uint256";
292
+ }];
293
+ readonly name: "zapDepositWithCustomCooldown";
294
+ readonly outputs: readonly [];
295
+ readonly stateMutability: "nonpayable";
296
+ readonly type: "function";
297
+ }, {
298
+ readonly inputs: readonly [{
299
+ readonly internalType: "address";
300
+ readonly name: "_dHedgeVault";
301
+ readonly type: "address";
302
+ }, {
303
+ readonly components: readonly [{
304
+ readonly components: readonly [{
305
+ readonly internalType: "contract IERC20";
306
+ readonly name: "token";
307
+ readonly type: "address";
308
+ }, {
309
+ readonly internalType: "uint256";
310
+ readonly name: "amount";
311
+ readonly type: "uint256";
312
+ }, {
313
+ readonly components: readonly [{
314
+ readonly internalType: "bytes32";
315
+ readonly name: "routerKey";
316
+ readonly type: "bytes32";
317
+ }, {
318
+ readonly internalType: "bytes";
319
+ readonly name: "swapData";
320
+ readonly type: "bytes";
321
+ }];
322
+ readonly internalType: "struct ISwapper.AggregatorData";
323
+ readonly name: "aggregatorData";
324
+ readonly type: "tuple";
325
+ }];
326
+ readonly internalType: "struct ISwapper.SrcTokenSwapDetails";
327
+ readonly name: "srcData";
328
+ readonly type: "tuple";
329
+ }, {
330
+ readonly components: readonly [{
331
+ readonly internalType: "contract IERC20";
332
+ readonly name: "destToken";
333
+ readonly type: "address";
334
+ }, {
335
+ readonly internalType: "uint256";
336
+ readonly name: "minDestAmount";
337
+ readonly type: "uint256";
338
+ }];
339
+ readonly internalType: "struct ISwapper.DestData";
340
+ readonly name: "destData";
341
+ readonly type: "tuple";
342
+ }];
343
+ readonly internalType: "struct EasySwapperV2.SingleInSingleOutData";
344
+ readonly name: "_swapData";
345
+ readonly type: "tuple";
346
+ }, {
347
+ readonly internalType: "uint256";
348
+ readonly name: "_expectedAmountReceived";
349
+ readonly type: "uint256";
350
+ }];
351
+ readonly name: "zapNativeDeposit";
352
+ readonly outputs: readonly [];
353
+ readonly stateMutability: "payable";
354
+ readonly type: "function";
355
+ }, {
356
+ readonly inputs: readonly [{
357
+ readonly internalType: "address";
358
+ readonly name: "_dHedgeVault";
359
+ readonly type: "address";
360
+ }, {
361
+ readonly components: readonly [{
362
+ readonly components: readonly [{
363
+ readonly internalType: "contract IERC20";
364
+ readonly name: "token";
365
+ readonly type: "address";
366
+ }, {
367
+ readonly internalType: "uint256";
368
+ readonly name: "amount";
369
+ readonly type: "uint256";
370
+ }, {
371
+ readonly components: readonly [{
372
+ readonly internalType: "bytes32";
373
+ readonly name: "routerKey";
374
+ readonly type: "bytes32";
375
+ }, {
376
+ readonly internalType: "bytes";
377
+ readonly name: "swapData";
378
+ readonly type: "bytes";
379
+ }];
380
+ readonly internalType: "struct ISwapper.AggregatorData";
381
+ readonly name: "aggregatorData";
382
+ readonly type: "tuple";
383
+ }];
384
+ readonly internalType: "struct ISwapper.SrcTokenSwapDetails";
385
+ readonly name: "srcData";
386
+ readonly type: "tuple";
387
+ }, {
388
+ readonly components: readonly [{
389
+ readonly internalType: "contract IERC20";
390
+ readonly name: "destToken";
391
+ readonly type: "address";
392
+ }, {
393
+ readonly internalType: "uint256";
394
+ readonly name: "minDestAmount";
395
+ readonly type: "uint256";
396
+ }];
397
+ readonly internalType: "struct ISwapper.DestData";
398
+ readonly name: "destData";
399
+ readonly type: "tuple";
400
+ }];
401
+ readonly internalType: "struct EasySwapperV2.SingleInSingleOutData";
402
+ readonly name: "_swapData";
403
+ readonly type: "tuple";
404
+ }, {
405
+ readonly internalType: "uint256";
406
+ readonly name: "_expectedAmountReceived";
407
+ readonly type: "uint256";
408
+ }];
409
+ readonly name: "zapNativeDepositWithCustomCooldown";
410
+ readonly outputs: readonly [];
411
+ readonly stateMutability: "payable";
412
+ readonly type: "function";
413
+ }];
@@ -1,4 +1,4 @@
1
- export declare const FlatcoinPointsModuleABI: readonly [{
1
+ export declare const FlatcoinPointsModuleAbi: readonly [{
2
2
  readonly inputs: readonly [{
3
3
  readonly internalType: "address";
4
4
  readonly name: "account";
@@ -7,4 +7,5 @@ export { PoolLogicAbi } from './pool-logic';
7
7
  export { PoolManagerLogicAbi } from './pool-manager-logic';
8
8
  export { RewardDistributionAbi } from './reward-distribution';
9
9
  export { ITrustedMulticallForwarderAbi, IERC2771ContextAbi, IERC7412Abi, SynthetixV3CoreAbi, SynthetixV3AssetGuard, SynthetixV3ContractGuard, } from './synthetix-v3';
10
- export { FlatcoinPointsModuleABI } from './flatcoin-points-module';
10
+ export { FlatcoinPointsModuleAbi } from './flatcoin-points-module';
11
+ export { EasySwapperV2Abi } from './easy-swapper-v2';
@@ -1,5 +1,5 @@
1
1
  import type { Address, ChainId } from 'core-kit/types/web3.types';
2
- export type ContractId = 'factory' | 'easySwapper' | 'rewardDistribution' | 'aaveLendingPoolV2' | 'aaveLendingPoolV3' | 'stakingV2' | 'poolManagerLogic' | 'erc20' | 'poolLogic' | 'synthetixV3AssetGuard' | 'synthetixV3Core' | 'flatcoinPointsModule';
2
+ export type ContractId = 'factory' | 'easySwapper' | 'rewardDistribution' | 'aaveLendingPoolV2' | 'aaveLendingPoolV3' | 'stakingV2' | 'poolManagerLogic' | 'erc20' | 'poolLogic' | 'synthetixV3AssetGuard' | 'synthetixV3Core' | 'flatcoinPointsModule' | 'easySwapperV2';
3
3
  type ContractsAddressesMap = Readonly<Record<ChainId, {
4
4
  [id in ContractId]?: Address;
5
5
  }>>;
@@ -2,3 +2,4 @@ export declare const FACTORY_ADDRESS_ARBITRUM = "0xffFb5fB14606EB3a548C113026355
2
2
  export declare const EASY_SWAPPER_ADDRESS_ARBITRUM = "0x80b9411977C4fF8D618f2aC3f29F1e2D623C4d34";
3
3
  export declare const AAVE_LENDING_POOL_V3_ADDRESS_ARBITRUM = "0x794a61358D6845594F94dc1DB02A252b5b4814aD";
4
4
  export declare const SYNTHETIX_V3_CORE_ADDRESS_ARBITRUM = "0xffffffaEff0B96Ea8e4f94b2253f31abdD875847";
5
+ export declare const EASY_SWAPPER_V2_ADDRESS_ARBITRUM = "0xA5679C4272A056Bb83f039961fae7D99C48529F5";
@@ -1,5 +1,6 @@
1
1
  export declare const FACTORY_ADDRESS_BASE = "0x49Afe3abCf66CF09Fab86cb1139D8811C8afe56F";
2
2
  export declare const SYNTHETIX_V3_CORE_ADDRESS_BASE = "0x32C222A9A159782aFD7529c87FA34b96CA72C696";
3
3
  export declare const EASY_SWAPPER_ADDRESS_BASE = "0xE10Ed1E5354eEd0F7C9D2e16250ba8996C12db7A";
4
+ export declare const EASY_SWAPPER_V2_ADDRESS_BASE = "0xf067575Eb60c7587C11e867907AA7284833704d1";
4
5
  export declare const FLATCOIN_POINTS_MODULE_ADDRESS_BASE = "0x59525b9b23adc475ef91d98dae06b568ba574ce5";
5
6
  export declare const FLATMONEY_EARLY_DEPOSITOR_VAULT_ADDRESS_BASE = "0xa907504d7a4c415b4e6e1d0866d96afe8202f0e5";
@@ -3,3 +3,4 @@ export declare const FACTORY_ADDRESS_OPTIMISM = "0x5e61a079A178f0E5784107a4963ba
3
3
  export declare const EASY_SWAPPER_ADDRESS_OPTIMISM = "0x3988513793bCE39f0167064A9F7fC3617FaF35AB";
4
4
  export declare const STAKING_V2_ADDRESS_OPTIMISM = "0xf165ca3d75120d817b7428eef8c39ea5cb33b612";
5
5
  export declare const AAVE_LENDING_POOL_V3_ADDRESS_OPTIMISM = "0x794a61358D6845594F94dc1DB02A252b5b4814aD";
6
+ export declare const EASY_SWAPPER_V2_ADDRESS_OPTIMISM = "0x2Ed1bd7f66e47113672f3870308b5E867C5bb743";
@@ -2,3 +2,4 @@ export declare const FACTORY_ADDRESS_POLYGON = "0xfdc7b8bFe0DD3513Cc669bB8d601Cb
2
2
  export declare const EASY_SWAPPER_ADDRESS_POLYGON = "0xB2F1498983bf9c9442c35F772e6C1AdE66a8DeDE";
3
3
  export declare const AAVE_LENDING_POOL_V2_ADDRESS_POLYGON = "0x8dFf5E27EA6b7AC08EbFdf9eB090F32ee9a30fcf";
4
4
  export declare const AAVE_LENDING_POOL_V3_ADDRESS_POLYGON = "0x794a61358D6845594F94dc1DB02A252b5b4814aD";
5
+ export declare const EASY_SWAPPER_V2_ADDRESS_POLYGON = "0x45b90480D6F643dE2f128db091A357C3c90399f2";
@@ -1,26 +1,22 @@
1
- import type { ChainId } from 'core-kit/types';
2
1
  import type { PoolConfig } from 'core-kit/types/config.types';
3
- import type { DepositMethodName } from 'core-kit/types/trading-panel.types';
4
- import type { PoolDepositMethodName } from 'core-kit/types/trading.types';
2
+ import type { DepositMethodName } from 'core-kit/types/trading.types';
5
3
  export declare const DEFAULT_PRECISION = 18;
6
4
  export declare const DEFAULT_POLLING_INTERVAL = 59000;
7
5
  export declare const SHORTEN_POLLING_INTERVAL = 30000;
8
6
  export declare const EXTREMELY_SHORT_POLLING_INTERVAL = 15000;
9
7
  export declare const DEFAULT_RETRIES_NUMBER = 5;
10
8
  export declare const DEFAULT_LOCK_TIME: string;
11
- export declare const CUSTOM_LOCK_TIME: string;
12
- export declare const DEFAULT_DEPOSIT_LOCKTIME_MAP: Record<ChainId, Record<PoolDepositMethodName, string>>;
13
9
  export declare const EMPTY_POOL_CONFIG: PoolConfig;
14
10
  export declare const DEFAULT_DEPOSIT_METHOD: DepositMethodName;
15
11
  export declare const DEFAULT_WITHDRAW_SLIPPAGE = 3;
16
12
  export declare const DEFAULT_DEPOSIT_SLIPPAGE = 0;
13
+ export declare const DEFAULT_NO_SWAP_MIN_DEPOSIT_AMOUNT_GAP = 0.1;
14
+ export declare const DEFAULT_SWAP_TRANSACTION_SLIPPAGE = 0.3;
17
15
  export declare const DEFAULT_WITHDRAW_SLIPPAGE_SCALE: number[];
18
16
  export declare const DEFAULT_DEPOSIT_SLIPPAGE_SCALE: number[];
19
17
  export declare const DEFAULT_EASY_SWAPPER_WITHDRAW_METHOD = "withdraw";
20
18
  export declare const DEFAULT_MULTI_ASSET_WITHDRAW_METHOD = "withdrawSafe";
21
19
  export declare const NATIVE_TOKEN_DEPOSIT_GAS_LIMIT = 4200000;
22
20
  export declare const GAS_LIMIT_BUFFER_COEFF = 1.25;
23
- export declare const DEPOSIT_QUOTE_MULTIPLIER_DEFAULT = 0.9997;
24
- export declare const DEPOSIT_QUOTE_MULTIPLIER_CUSTOM = 0.999;
25
21
  export declare const MANAGER_FEE_DENOMINATOR = 10000;
26
22
  export declare const DEFAULT_PROMISE_TIMEOUT_MS = 13000;
@@ -10,3 +10,4 @@ export * from './tokens';
10
10
  export * from './synthetix';
11
11
  export * from './links';
12
12
  export * from './flat-money';
13
+ export * from './trading';
@@ -4,7 +4,6 @@ export declare const TRADING_PANEL_LOG_EVENT: {
4
4
  DEPOSIT: string;
5
5
  WITHDRAWAL: string;
6
6
  TRADING_SETTINGS_OPENED: string;
7
- DEPOSIT_METHOD_CHANGE: string;
8
7
  INFINITE_ALLOWANCE_CHANGE: string;
9
8
  MULTI_ASSET_WITHDRAWAL_CHANGE: string;
10
9
  };
@@ -1,4 +1,5 @@
1
1
  import type { Address, ChainId } from 'core-kit/types';
2
2
  export declare const DHEDGE_SYNTHETIX_V3_ASSETS_MAP: Record<ChainId, Address>;
3
3
  export declare const DHEDGE_SYNTHETIX_V3_VAULT_ADDRESSES: Address[];
4
+ export declare const SYNTHETIX_V3_VAULTS_WITHDRAW_ASSET_SYMBOL_MAP: Record<string, string>;
4
5
  export declare const SYNTHETIX_V3_POSITION_DEBT_ARGUMENTS: Record<string, string[]>;
@@ -1,4 +1,4 @@
1
- import type { TradingToken } from 'core-kit/types';
1
+ import type { ChainId, TradingToken } from 'core-kit/types';
2
2
  export * from './arbitrum';
3
3
  export * from './base';
4
4
  export * from './optimism';
@@ -6,3 +6,4 @@ export * from './polygon';
6
6
  export declare const MULTI_ASSET_TOKEN: TradingToken;
7
7
  export declare const BRIDGED_TOKENS_SYMBOLS: Record<string, string>;
8
8
  export declare const WETH_BY_CHAIN_ID: Record<number, TradingToken>;
9
+ export declare const FALLBACK_ASSETS_MAP: Record<ChainId, Record<string, TradingToken>>;
@@ -0,0 +1,10 @@
1
+ export declare const EASY_SWAPPER_V2_DEPOSIT_METHODS: {
2
+ DEPOSIT: "deposit";
3
+ DEPOSIT_CUSTOM: "depositWithCustomCooldown";
4
+ NATIVE: "nativeDeposit";
5
+ NATIVE_CUSTOM: "nativeDepositWithCustomCooldown";
6
+ ZAP_NATIVE_DEPOSIT: "zapNativeDeposit";
7
+ ZAP_NATIVE_DEPOSIT_CUSTOM: "zapNativeDepositWithCustomCooldown";
8
+ ZAP_DEPOSIT: "zapDeposit";
9
+ ZAP_DEPOSIT_CUSTOM: "zapDepositWithCustomCooldown";
10
+ };