@paraswap/dex-lib 3.8.28 → 3.8.29-stkgho

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 (171) hide show
  1. package/build/abi/Aave_GSM.json +751 -0
  2. package/build/abi/aave-gsm/Aave_GSM.json +751 -0
  3. package/build/abi/aave-gsm/IFeeStrategy.json +78 -0
  4. package/build/abi/inception/inception-ineth-pool.json +1062 -0
  5. package/build/abi/inception/inception-ineth.json +609 -0
  6. package/build/abi/inception/inception-ratio-feed.json +93 -0
  7. package/build/abi/inception/inception-vault.json +991 -0
  8. package/build/abi/stkGHO.json +1131 -0
  9. package/build/abi/usual-bond/usd0pp.abi.json +867 -0
  10. package/build/config.js +3 -3
  11. package/build/dex/aave-gsm/aave-gsm-pool.d.ts +26 -0
  12. package/build/dex/aave-gsm/aave-gsm-pool.js +91 -0
  13. package/build/dex/aave-gsm/aave-gsm-pool.js.map +1 -0
  14. package/build/dex/aave-gsm/aave-gsm.d.ts +43 -0
  15. package/build/dex/aave-gsm/aave-gsm.js +305 -0
  16. package/build/dex/aave-gsm/aave-gsm.js.map +1 -0
  17. package/build/dex/aave-gsm/config.d.ts +3 -0
  18. package/build/dex/aave-gsm/config.js +17 -0
  19. package/build/dex/aave-gsm/config.js.map +1 -0
  20. package/build/dex/aave-gsm/types.d.ts +16 -0
  21. package/build/dex/aave-gsm/types.js +3 -0
  22. package/build/dex/aave-gsm/types.js.map +1 -0
  23. package/build/dex/aave-v1/aave-v1.js +0 -1
  24. package/build/dex/aave-v1/aave-v1.js.map +1 -1
  25. package/build/dex/dexalot/dexalot.js +4 -4
  26. package/build/dex/dexalot/dexalot.js.map +1 -1
  27. package/build/dex/generic-rfq/generic-rfq.js +10 -1
  28. package/build/dex/generic-rfq/generic-rfq.js.map +1 -1
  29. package/build/dex/hashflow/hashflow.js +3 -3
  30. package/build/dex/hashflow/hashflow.js.map +1 -1
  31. package/build/dex/idle-dao/idle-dao-pool.d.ts +56 -0
  32. package/build/dex/idle-dao/idle-dao-pool.js +176 -0
  33. package/build/dex/idle-dao/idle-dao-pool.js.map +1 -0
  34. package/build/dex/idle-dao/idle-dao-pooling-pool.d.ts +16 -0
  35. package/build/dex/idle-dao/idle-dao-pooling-pool.js +57 -0
  36. package/build/dex/idle-dao/idle-dao-pooling-pool.js.map +1 -0
  37. package/build/dex/idle-dao/scripts.d.ts +9 -0
  38. package/build/dex/idle-dao/scripts.js +552 -0
  39. package/build/dex/idle-dao/scripts.js.map +1 -0
  40. package/build/dex/inception/config.d.ts +5 -0
  41. package/build/dex/inception/config.js +112 -0
  42. package/build/dex/inception/config.js.map +1 -0
  43. package/build/dex/inception/inception-event-pool.d.ts +25 -0
  44. package/build/dex/inception/inception-event-pool.js +57 -0
  45. package/build/dex/inception/inception-event-pool.js.map +1 -0
  46. package/build/dex/inception/inception-native.d.ts +43 -0
  47. package/build/dex/inception/inception-native.js +131 -0
  48. package/build/dex/inception/inception-native.js.map +1 -0
  49. package/build/dex/inception/inception-pool.d.ts +18 -0
  50. package/build/dex/inception/inception-pool.js +32 -0
  51. package/build/dex/inception/inception-pool.js.map +1 -0
  52. package/build/dex/inception/inception-price-feed.d.ts +19 -0
  53. package/build/dex/inception/inception-price-feed.js +51 -0
  54. package/build/dex/inception/inception-price-feed.js.map +1 -0
  55. package/build/dex/inception/inception.d.ts +44 -0
  56. package/build/dex/inception/inception.js +177 -0
  57. package/build/dex/inception/inception.js.map +1 -0
  58. package/build/dex/inception/tokens.d.ts +9 -0
  59. package/build/dex/inception/tokens.js +28 -0
  60. package/build/dex/inception/tokens.js.map +1 -0
  61. package/build/dex/inception/types.d.ts +22 -0
  62. package/build/dex/inception/types.js +3 -0
  63. package/build/dex/inception/types.js.map +1 -0
  64. package/build/dex/inception/utils.d.ts +7 -0
  65. package/build/dex/inception/utils.js +58 -0
  66. package/build/dex/inception/utils.js.map +1 -0
  67. package/build/dex/index.js +2 -0
  68. package/build/dex/index.js.map +1 -1
  69. package/build/dex/platypus/platypus.js +3 -17
  70. package/build/dex/platypus/platypus.js.map +1 -1
  71. package/build/dex/stkgho/config.d.ts +3 -0
  72. package/build/dex/stkgho/config.js +14 -0
  73. package/build/dex/stkgho/config.js.map +1 -0
  74. package/build/dex/stkgho/stkgho-pool.d.ts +41 -0
  75. package/build/dex/stkgho/stkgho-pool.js +81 -0
  76. package/build/dex/stkgho/stkgho-pool.js.map +1 -0
  77. package/build/dex/stkgho/stkgho.d.ts +41 -0
  78. package/build/dex/stkgho/stkgho.js +159 -0
  79. package/build/dex/stkgho/stkgho.js.map +1 -0
  80. package/build/dex/stkgho/types.d.ts +11 -0
  81. package/build/dex/stkgho/types.js +3 -0
  82. package/build/dex/stkgho/types.js.map +1 -0
  83. package/build/dex/swaap-v1/swaap-v1.js +0 -4
  84. package/build/dex/swaap-v1/swaap-v1.js.map +1 -1
  85. package/build/dex/swaap-v2/swaap-v2.js +5 -5
  86. package/build/dex/swaap-v2/swaap-v2.js.map +1 -1
  87. package/build/dex/usual-bond/config.d.ts +3 -0
  88. package/build/dex/usual-bond/config.js +13 -0
  89. package/build/dex/usual-bond/config.js.map +1 -0
  90. package/build/dex/usual-bond/types.d.ts +7 -0
  91. package/build/dex/usual-bond/types.js +3 -0
  92. package/build/dex/usual-bond/types.js.map +1 -0
  93. package/build/dex/usual-bond/usual-bond.d.ts +35 -0
  94. package/build/dex/usual-bond/usual-bond.js +162 -0
  95. package/build/dex/usual-bond/usual-bond.js.map +1 -0
  96. package/build/implementations/local-paraswap-sdk.js +1 -0
  97. package/build/implementations/local-paraswap-sdk.js.map +1 -1
  98. package/build/types.d.ts +1 -0
  99. package/package.json +1 -1
  100. package/src/abi/stkGHO.json +1131 -0
  101. package/src/config.ts +3 -3
  102. package/src/dex/dexalot/dexalot.ts +4 -4
  103. package/src/dex/generic-rfq/generic-rfq.ts +22 -1
  104. package/src/dex/hashflow/hashflow.ts +3 -3
  105. package/src/dex/index.ts +2 -0
  106. package/src/dex/stkgho/config.ts +14 -0
  107. package/src/dex/stkgho/stkgho-e2e.test.ts +77 -0
  108. package/src/dex/stkgho/stkgho-events.test.ts +79 -0
  109. package/src/dex/stkgho/stkgho-integration.test.ts +226 -0
  110. package/src/dex/stkgho/stkgho-pool.ts +111 -0
  111. package/src/dex/stkgho/stkgho.ts +217 -0
  112. package/src/dex/stkgho/types.ts +14 -0
  113. package/src/dex/swaap-v2/swaap-v2.ts +5 -5
  114. package/src/implementations/local-paraswap-sdk.ts +1 -0
  115. package/src/types.ts +1 -0
  116. package/tests/constants-e2e.ts +4 -0
  117. package/.vscode/launch.json +0 -53
  118. package/.vscode/settings.json +0 -2
  119. package/.vscode/tasks.json +0 -15
  120. package/build/abi/uniswap-v3/AlienBaseV3Router.abi.json +0 -52
  121. package/build/abi/wombat/pool.json +0 -1289
  122. package/build/dex/aave-v2/tokens-avalanche.json +0 -44
  123. package/build/dex/aave-v2/tokens-mainnet.json +0 -188
  124. package/build/dex/aave-v2/tokens-polygon.json +0 -44
  125. package/build/dex/bProtocol.d.ts +0 -18
  126. package/build/dex/bProtocol.js +0 -39
  127. package/build/dex/bProtocol.js.map +0 -1
  128. package/build/dex/bancor.d.ts +0 -26
  129. package/build/dex/bancor.js +0 -58
  130. package/build/dex/bancor.js.map +0 -1
  131. package/build/dex/compound.d.ts +0 -18
  132. package/build/dex/compound.js +0 -46
  133. package/build/dex/compound.js.map +0 -1
  134. package/build/dex/curve-v2.d.ts +0 -58
  135. package/build/dex/curve-v2.js +0 -180
  136. package/build/dex/curve-v2.js.map +0 -1
  137. package/build/dex/dodo-v1.d.ts +0 -33
  138. package/build/dex/dodo-v1.js +0 -63
  139. package/build/dex/dodo-v1.js.map +0 -1
  140. package/build/dex/lido.d.ts +0 -19
  141. package/build/dex/lido.js +0 -42
  142. package/build/dex/lido.js.map +0 -1
  143. package/build/dex/maker-psm/scripts/gem.abi.json +0 -136
  144. package/build/dex/maker-psm/scripts/validate-state.d.ts +0 -0
  145. package/build/dex/maker-psm/scripts/validate-state.js +0 -185
  146. package/build/dex/maker-psm/scripts/validate-state.js.map +0 -1
  147. package/build/dex/maker-psm/scripts/vat.abi.json +0 -243
  148. package/build/dex/onebit.d.ts +0 -25
  149. package/build/dex/onebit.js +0 -42
  150. package/build/dex/onebit.js.map +0 -1
  151. package/build/dex/smoothy.d.ts +0 -26
  152. package/build/dex/smoothy.js +0 -48
  153. package/build/dex/smoothy.js.map +0 -1
  154. package/build/dex/solidly-v3/scripts/check-event-pool-event.d.ts +0 -1
  155. package/build/dex/solidly-v3/scripts/check-event-pool-event.js +0 -53
  156. package/build/dex/solidly-v3/scripts/check-event-pool-event.js.map +0 -1
  157. package/build/dex/stable-pool.d.ts +0 -28
  158. package/build/dex/stable-pool.js +0 -55
  159. package/build/dex/stable-pool.js.map +0 -1
  160. package/build/dex/trader-joe-v2.1/trader-joe-v2.1-new.d.ts +0 -7
  161. package/build/dex/trader-joe-v2.1/trader-joe-v2.1-new.js +0 -20
  162. package/build/dex/trader-joe-v2.1/trader-joe-v2.1-new.js.map +0 -1
  163. package/build/dex/trader-joe-v2.1.d.ts +0 -43
  164. package/build/dex/trader-joe-v2.1.js +0 -79
  165. package/build/dex/trader-joe-v2.1.js.map +0 -1
  166. package/build/dex/uniswap-v3/forks/alien-base-v3/alien-base-v3.d.ts +0 -17
  167. package/build/dex/uniswap-v3/forks/alien-base-v3/alien-base-v3.js +0 -64
  168. package/build/dex/uniswap-v3/forks/alien-base-v3/alien-base-v3.js.map +0 -1
  169. package/build/dex/uniswap-v3/forks/alien-v3/alien-v3.d.ts +0 -17
  170. package/build/dex/uniswap-v3/forks/alien-v3/alien-v3.js +0 -79
  171. package/build/dex/uniswap-v3/forks/alien-v3/alien-v3.js.map +0 -1
@@ -0,0 +1,217 @@
1
+ import { AsyncOrSync } from 'ts-essentials';
2
+ import {
3
+ Token,
4
+ Address,
5
+ ExchangePrices,
6
+ PoolPrices,
7
+ AdapterExchangeParam,
8
+ SimpleExchangeParam,
9
+ PoolLiquidity,
10
+ Logger,
11
+ NumberAsString,
12
+ DexExchangeParam,
13
+ } from '../../types';
14
+ import { SwapSide, Network } from '../../constants';
15
+ import * as CALLDATA_GAS_COST from '../../calldata-gas-cost';
16
+ import { getDexKeysWithNetwork } from '../../utils';
17
+ import { IDex } from '../../dex/idex';
18
+ import { IDexHelper } from '../../dex-helper/idex-helper';
19
+ import { DexParams, PoolState, StkGHOData } from './types';
20
+ import { SimpleExchange } from '../simple-exchange';
21
+ import { StkGHOConfig } from './config';
22
+ import { StkGHOEventPool } from './stkgho-pool';
23
+ import { Interface } from '@ethersproject/abi';
24
+ import StkGHO_ABI from '../../abi/stkGHO.json';
25
+
26
+ export class StkGHO extends SimpleExchange implements IDex<StkGHOData> {
27
+ static readonly stkGHOInterface = new Interface(StkGHO_ABI);
28
+ protected eventPool: StkGHOEventPool;
29
+
30
+ readonly hasConstantPriceLargeAmounts = false;
31
+ readonly needWrapNative = true;
32
+
33
+ protected config: DexParams;
34
+
35
+ readonly isFeeOnTransferSupported = false;
36
+ readonly exchangeRateUnit = 1_000_000_000_000_000_000n;
37
+
38
+ public static dexKeysWithNetwork: { key: string; networks: Network[] }[] =
39
+ getDexKeysWithNetwork(StkGHOConfig);
40
+
41
+ logger: Logger;
42
+
43
+ constructor(
44
+ readonly network: Network,
45
+ readonly dexKey: string,
46
+ readonly dexHelper: IDexHelper,
47
+ ) {
48
+ super(dexHelper, dexKey);
49
+ this.logger = dexHelper.getLogger(dexKey);
50
+ this.eventPool = new StkGHOEventPool(
51
+ dexKey,
52
+ dexKey,
53
+ network,
54
+ dexHelper,
55
+ this.logger,
56
+ );
57
+
58
+ const config = StkGHOConfig[dexKey][network];
59
+ this.config = {
60
+ stkGHO: config.stkGHO.toLowerCase(),
61
+ GHO: config.GHO.toLowerCase(),
62
+ };
63
+ }
64
+
65
+ async initializePricing(blockNumber: number) {
66
+ const state = await this.eventPool.generateState(blockNumber);
67
+
68
+ this.eventPool.initialize(blockNumber, {
69
+ state,
70
+ });
71
+ }
72
+
73
+ getAdapters(side: SwapSide): { name: string; index: number }[] | null {
74
+ return null;
75
+ }
76
+
77
+ async getPoolIdentifiers(
78
+ srcToken: Token,
79
+ destToken: Token,
80
+ side: SwapSide,
81
+ blockNumber: number,
82
+ ): Promise<string[]> {
83
+ const srcTokenAddress = srcToken.address.toLowerCase();
84
+ const destTokenAddress = destToken.address.toLowerCase();
85
+
86
+ if (
87
+ srcTokenAddress === this.config.GHO &&
88
+ destTokenAddress === this.config.stkGHO
89
+ ) {
90
+ return [`${this.dexKey}`];
91
+ } else {
92
+ return [];
93
+ }
94
+ }
95
+
96
+ async getPoolState(blockNumber: number): Promise<PoolState> {
97
+ const eventState = this.eventPool.getState(blockNumber);
98
+ if (eventState) return eventState;
99
+ const onChainState = await this.eventPool.generateState(blockNumber);
100
+ this.eventPool.setState(onChainState, blockNumber);
101
+ return onChainState;
102
+ }
103
+
104
+ async getPricesVolume(
105
+ srcToken: Token,
106
+ destToken: Token,
107
+ amounts: bigint[],
108
+ side: SwapSide,
109
+ blockNumber: number,
110
+ limitPools?: string[],
111
+ ): Promise<null | ExchangePrices<StkGHOData>> {
112
+ const srcTokenAddress = srcToken.address.toLowerCase();
113
+ const destTokenAddress = destToken.address.toLowerCase();
114
+
115
+ if (
116
+ srcTokenAddress != this.config.GHO ||
117
+ destTokenAddress != this.config.stkGHO
118
+ ) {
119
+ return null;
120
+ }
121
+
122
+ const state = await this.getPoolState(blockNumber);
123
+
124
+ return [
125
+ {
126
+ unit: state.exchangeRate,
127
+ prices: amounts.map(
128
+ amount => (state.exchangeRate * amount) / this.exchangeRateUnit,
129
+ ),
130
+ data: {
131
+ exchange: this.dexKey,
132
+ },
133
+ poolAddresses: ['this.config.stkGHO'],
134
+ exchange: this.dexKey,
135
+ gasCost: 100_000,
136
+ poolIdentifier: `${this.dexKey}`,
137
+ },
138
+ ];
139
+ }
140
+
141
+ getCalldataGasCost(poolPrices: PoolPrices<StkGHOData>): number | number[] {
142
+ return CALLDATA_GAS_COST.DEX_NO_PAYLOAD;
143
+ }
144
+
145
+ getAdapterParam(
146
+ srcToken: string,
147
+ destToken: string,
148
+ srcAmount: string,
149
+ destAmount: string,
150
+ data: StkGHOData,
151
+ side: SwapSide,
152
+ ): AdapterExchangeParam {
153
+ const { exchange } = data;
154
+
155
+ const payload = '';
156
+
157
+ return {
158
+ targetExchange: exchange,
159
+ payload,
160
+ networkFee: '0',
161
+ };
162
+ }
163
+
164
+ async updatePoolState(): Promise<void> {}
165
+
166
+ async getDexParam(
167
+ srcToken: Address,
168
+ destToken: Address,
169
+ srcAmount: NumberAsString,
170
+ destAmount: NumberAsString,
171
+ recipient: Address,
172
+ data: StkGHOData,
173
+ side: SwapSide,
174
+ ): Promise<DexExchangeParam> {
175
+ const exchangeData = StkGHO.stkGHOInterface.encodeFunctionData('stake', [
176
+ recipient,
177
+ srcAmount,
178
+ ]);
179
+
180
+ return {
181
+ needWrapNative: this.needWrapNative,
182
+ dexFuncHasRecipient: true,
183
+ exchangeData,
184
+ targetExchange: this.config.stkGHO,
185
+ returnAmountPos: undefined,
186
+ };
187
+ }
188
+
189
+ async getTopPoolsForToken(
190
+ tokenAddress: Address,
191
+ limit: number,
192
+ ): Promise<PoolLiquidity[]> {
193
+ tokenAddress = tokenAddress.toLowerCase();
194
+
195
+ if (tokenAddress == this.config.GHO) {
196
+ return [
197
+ {
198
+ exchange: this.dexKey,
199
+ address: this.config.stkGHO,
200
+ connectorTokens: [
201
+ {
202
+ decimals: 18,
203
+ address: this.config.stkGHO,
204
+ },
205
+ ],
206
+ liquidityUSD: 1_000_000_000_000, // GHO to stkGHO supply is unlimited
207
+ },
208
+ ];
209
+ } else {
210
+ return [];
211
+ }
212
+ }
213
+
214
+ // This is optional function in case if your implementation has acquired any resources
215
+ // you need to release for graceful shutdown. For example, it may be any interval timer
216
+ releaseResources(): AsyncOrSync<void> {}
217
+ }
@@ -0,0 +1,14 @@
1
+ import { Address } from '../../types';
2
+
3
+ export type PoolState = {
4
+ exchangeRate: bigint;
5
+ };
6
+
7
+ export type StkGHOData = {
8
+ exchange: Address;
9
+ };
10
+
11
+ export type DexParams = {
12
+ stkGHO: Address;
13
+ GHO: Address;
14
+ };
@@ -524,7 +524,7 @@ export class SwaapV2 extends SimpleExchange implements IDex<SwaapV2Data> {
524
524
  normalizedDestToken,
525
525
  isSell ? optimalSwapExchange.srcAmount : optimalSwapExchange.destAmount,
526
526
  isSell ? SWAAP_ORDER_TYPE_SELL : SWAAP_ORDER_TYPE_BUY,
527
- options.txOrigin,
527
+ options.userAddress,
528
528
  options.executionContractAddress,
529
529
  options.recipient,
530
530
  tolerance,
@@ -636,14 +636,14 @@ export class SwaapV2 extends SimpleExchange implements IDex<SwaapV2Data> {
636
636
  ];
637
637
  } catch (e) {
638
638
  if (isAxiosError(e) && e.response?.status === 403) {
639
- await this.setBlacklist(options.txOrigin, SWAAP_403_TTL_S);
639
+ await this.setBlacklist(options.userAddress, SWAAP_403_TTL_S);
640
640
  this.logger.warn(
641
- `${this.dexKey}-${this.network}: Encountered blacklisted user=${options.txOrigin}. Adding to local blacklist cache`,
641
+ `${this.dexKey}-${this.network}: Encountered blacklisted user=${options.userAddress}. Adding to local blacklist cache`,
642
642
  );
643
643
  } else if (isAxiosError(e) && e.response?.status === 429) {
644
- await this.setBlacklist(options.txOrigin, SWAAP_429_TTL_S);
644
+ await this.setBlacklist(options.userAddress, SWAAP_429_TTL_S);
645
645
  this.logger.warn(
646
- `${this.dexKey}-${this.network}: Encountered restricted user=${options.txOrigin}. Adding to local blacklist cache`,
646
+ `${this.dexKey}-${this.network}: Encountered restricted user=${options.userAddress}. Adding to local blacklist cache`,
647
647
  );
648
648
  } else {
649
649
  if (e instanceof TooStrictSlippageCheckError) {
@@ -282,6 +282,7 @@ export class LocalParaswapSDK implements IParaSwapSDK {
282
282
  {
283
283
  slippageFactor,
284
284
  txOrigin: userAddress,
285
+ userAddress,
285
286
  executionContractAddress,
286
287
  isDirectMethod: DirectContractMethods.includes(
287
288
  contractMethod as ContractMethod,
package/src/types.ts CHANGED
@@ -318,6 +318,7 @@ export type ExchangeTxInfo = {
318
318
  export type PreprocessTransactionOptions = {
319
319
  slippageFactor: BigNumber;
320
320
  txOrigin: Address;
321
+ userAddress: Address;
321
322
  executionContractAddress: Address;
322
323
  hmac?: string;
323
324
  mockRfqAndLO?: boolean;
@@ -455,6 +455,10 @@ export const Tokens: {
455
455
  address: '0x40d16fc0246ad3160ccc09b8d0d3a2cd28ae6c2f',
456
456
  decimals: 18,
457
457
  },
458
+ stkGHO: {
459
+ address: '0x1a88Df1cFe15Af22B3c4c783D4e6F7F9e0C1885d',
460
+ decimals: 18,
461
+ },
458
462
  USDe: {
459
463
  address: '0x4c9EDD5852cd905f086C759E8383e09bff1E68B3',
460
464
  decimals: 18,
@@ -1,53 +0,0 @@
1
- {
2
- "version": "0.2.0",
3
- "configurations": [
4
- {
5
- "type": "node",
6
- "request": "launch",
7
- "name": "Current",
8
- "program": "${file}",
9
- "preLaunchTask": "npm: build",
10
- "sourceMaps": true,
11
- "smartStep": true,
12
- "internalConsoleOptions": "openOnSessionStart",
13
- "outFiles": ["${workspaceFolder}/build/**/*.js"]
14
- },
15
- {
16
- "type": "node",
17
- "request": "launch",
18
- "name": "Debug dex integration",
19
- "program": "${workspaceFolder}/node_modules/ts-node/dist/bin.js",
20
- "args": [
21
- "--project",
22
- "tsconfig.json",
23
- // "${workspaceFolder}/src/dex/algebra/scripts/validate-state.ts",
24
- "${workspaceFolder}/src/dex/camelot/camelot-pool-discovery.test.ts",
25
- // "${workspaceFolder}/src/dex/solidly-v3/scripts/check-event-pool-event.ts",
26
- // "${workspaceFolder}/scripts/dex-integration.ts",
27
- "test",
28
- "wombat"
29
- ],
30
- "console": "integratedTerminal",
31
- "internalConsoleOptions": "neverOpen",
32
- "runtimeArgs": ["--nolazy"],
33
- "sourceMaps": true,
34
- "smartStep": true,
35
- "skipFiles": ["<node_internals>/**"],
36
- "cwd": "${workspaceFolder}"
37
- },
38
- {
39
- "type": "node",
40
- "name": "Jest file",
41
- "request": "launch",
42
- "program": "${workspaceFolder}/node_modules/jest/bin/jest.js",
43
- // "program": "${workspaceFolder}/src/dex/camelot/scripts/validate-state.ts",
44
- // "args": ["src/dex/balancer-v1/balancer-v1-e2e.test.ts"],
45
- // "args": ["${relativeFile}"],
46
- "args": ["${file}"],
47
- "cwd": "${workspaceRoot}",
48
- "console": "integratedTerminal",
49
- "internalConsoleOptions": "neverOpen",
50
- "sourceMaps": true
51
- }
52
- ]
53
- }
@@ -1,2 +0,0 @@
1
- {
2
- }
@@ -1,15 +0,0 @@
1
- {
2
- "version": "2.0.0",
3
- "tasks": [
4
- {
5
- "label": "tsc: build - tsconfig.json",
6
- "type": "typescript",
7
- "tsconfig": "tsconfig.json",
8
- "problemMatcher": ["$tsc"],
9
- "group": {
10
- "kind": "build",
11
- "isDefault": true
12
- }
13
- }
14
- ]
15
- }
@@ -1,52 +0,0 @@
1
- [
2
- {
3
- "inputs": [
4
- {
5
- "components": [
6
- { "internalType": "bytes", "name": "path", "type": "bytes" },
7
- { "internalType": "address", "name": "recipient", "type": "address" },
8
- { "internalType": "uint256", "name": "amountIn", "type": "uint256" },
9
- {
10
- "internalType": "uint256",
11
- "name": "amountOutMinimum",
12
- "type": "uint256"
13
- }
14
- ],
15
- "internalType": "struct ISwapRouter.ExactInputParams",
16
- "name": "params",
17
- "type": "tuple"
18
- }
19
- ],
20
- "name": "exactInput",
21
- "outputs": [
22
- { "internalType": "uint256", "name": "amountOut", "type": "uint256" }
23
- ],
24
- "stateMutability": "payable",
25
- "type": "function"
26
- },
27
- {
28
- "inputs": [
29
- {
30
- "components": [
31
- { "internalType": "bytes", "name": "path", "type": "bytes" },
32
- { "internalType": "address", "name": "recipient", "type": "address" },
33
- { "internalType": "uint256", "name": "amountOut", "type": "uint256" },
34
- {
35
- "internalType": "uint256",
36
- "name": "amountInMaximum",
37
- "type": "uint256"
38
- }
39
- ],
40
- "internalType": "struct ISwapRouter.ExactOutputParams",
41
- "name": "params",
42
- "type": "tuple"
43
- }
44
- ],
45
- "name": "exactOutput",
46
- "outputs": [
47
- { "internalType": "uint256", "name": "amountIn", "type": "uint256" }
48
- ],
49
- "stateMutability": "payable",
50
- "type": "function"
51
- }
52
- ]