@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.
- package/build/abi/Aave_GSM.json +751 -0
- package/build/abi/aave-gsm/Aave_GSM.json +751 -0
- package/build/abi/aave-gsm/IFeeStrategy.json +78 -0
- package/build/abi/inception/inception-ineth-pool.json +1062 -0
- package/build/abi/inception/inception-ineth.json +609 -0
- package/build/abi/inception/inception-ratio-feed.json +93 -0
- package/build/abi/inception/inception-vault.json +991 -0
- package/build/abi/stkGHO.json +1131 -0
- package/build/abi/usual-bond/usd0pp.abi.json +867 -0
- package/build/config.js +3 -3
- package/build/dex/aave-gsm/aave-gsm-pool.d.ts +26 -0
- package/build/dex/aave-gsm/aave-gsm-pool.js +91 -0
- package/build/dex/aave-gsm/aave-gsm-pool.js.map +1 -0
- package/build/dex/aave-gsm/aave-gsm.d.ts +43 -0
- package/build/dex/aave-gsm/aave-gsm.js +305 -0
- package/build/dex/aave-gsm/aave-gsm.js.map +1 -0
- package/build/dex/aave-gsm/config.d.ts +3 -0
- package/build/dex/aave-gsm/config.js +17 -0
- package/build/dex/aave-gsm/config.js.map +1 -0
- package/build/dex/aave-gsm/types.d.ts +16 -0
- package/build/dex/aave-gsm/types.js +3 -0
- package/build/dex/aave-gsm/types.js.map +1 -0
- package/build/dex/aave-v1/aave-v1.js +0 -1
- package/build/dex/aave-v1/aave-v1.js.map +1 -1
- package/build/dex/dexalot/dexalot.js +4 -4
- package/build/dex/dexalot/dexalot.js.map +1 -1
- package/build/dex/generic-rfq/generic-rfq.js +10 -1
- package/build/dex/generic-rfq/generic-rfq.js.map +1 -1
- package/build/dex/hashflow/hashflow.js +3 -3
- package/build/dex/hashflow/hashflow.js.map +1 -1
- package/build/dex/idle-dao/idle-dao-pool.d.ts +56 -0
- package/build/dex/idle-dao/idle-dao-pool.js +176 -0
- package/build/dex/idle-dao/idle-dao-pool.js.map +1 -0
- package/build/dex/idle-dao/idle-dao-pooling-pool.d.ts +16 -0
- package/build/dex/idle-dao/idle-dao-pooling-pool.js +57 -0
- package/build/dex/idle-dao/idle-dao-pooling-pool.js.map +1 -0
- package/build/dex/idle-dao/scripts.d.ts +9 -0
- package/build/dex/idle-dao/scripts.js +552 -0
- package/build/dex/idle-dao/scripts.js.map +1 -0
- package/build/dex/inception/config.d.ts +5 -0
- package/build/dex/inception/config.js +112 -0
- package/build/dex/inception/config.js.map +1 -0
- package/build/dex/inception/inception-event-pool.d.ts +25 -0
- package/build/dex/inception/inception-event-pool.js +57 -0
- package/build/dex/inception/inception-event-pool.js.map +1 -0
- package/build/dex/inception/inception-native.d.ts +43 -0
- package/build/dex/inception/inception-native.js +131 -0
- package/build/dex/inception/inception-native.js.map +1 -0
- package/build/dex/inception/inception-pool.d.ts +18 -0
- package/build/dex/inception/inception-pool.js +32 -0
- package/build/dex/inception/inception-pool.js.map +1 -0
- package/build/dex/inception/inception-price-feed.d.ts +19 -0
- package/build/dex/inception/inception-price-feed.js +51 -0
- package/build/dex/inception/inception-price-feed.js.map +1 -0
- package/build/dex/inception/inception.d.ts +44 -0
- package/build/dex/inception/inception.js +177 -0
- package/build/dex/inception/inception.js.map +1 -0
- package/build/dex/inception/tokens.d.ts +9 -0
- package/build/dex/inception/tokens.js +28 -0
- package/build/dex/inception/tokens.js.map +1 -0
- package/build/dex/inception/types.d.ts +22 -0
- package/build/dex/inception/types.js +3 -0
- package/build/dex/inception/types.js.map +1 -0
- package/build/dex/inception/utils.d.ts +7 -0
- package/build/dex/inception/utils.js +58 -0
- package/build/dex/inception/utils.js.map +1 -0
- package/build/dex/index.js +2 -0
- package/build/dex/index.js.map +1 -1
- package/build/dex/platypus/platypus.js +3 -17
- package/build/dex/platypus/platypus.js.map +1 -1
- package/build/dex/stkgho/config.d.ts +3 -0
- package/build/dex/stkgho/config.js +14 -0
- package/build/dex/stkgho/config.js.map +1 -0
- package/build/dex/stkgho/stkgho-pool.d.ts +41 -0
- package/build/dex/stkgho/stkgho-pool.js +81 -0
- package/build/dex/stkgho/stkgho-pool.js.map +1 -0
- package/build/dex/stkgho/stkgho.d.ts +41 -0
- package/build/dex/stkgho/stkgho.js +159 -0
- package/build/dex/stkgho/stkgho.js.map +1 -0
- package/build/dex/stkgho/types.d.ts +11 -0
- package/build/dex/stkgho/types.js +3 -0
- package/build/dex/stkgho/types.js.map +1 -0
- package/build/dex/swaap-v1/swaap-v1.js +0 -4
- package/build/dex/swaap-v1/swaap-v1.js.map +1 -1
- package/build/dex/swaap-v2/swaap-v2.js +5 -5
- package/build/dex/swaap-v2/swaap-v2.js.map +1 -1
- package/build/dex/usual-bond/config.d.ts +3 -0
- package/build/dex/usual-bond/config.js +13 -0
- package/build/dex/usual-bond/config.js.map +1 -0
- package/build/dex/usual-bond/types.d.ts +7 -0
- package/build/dex/usual-bond/types.js +3 -0
- package/build/dex/usual-bond/types.js.map +1 -0
- package/build/dex/usual-bond/usual-bond.d.ts +35 -0
- package/build/dex/usual-bond/usual-bond.js +162 -0
- package/build/dex/usual-bond/usual-bond.js.map +1 -0
- package/build/implementations/local-paraswap-sdk.js +1 -0
- package/build/implementations/local-paraswap-sdk.js.map +1 -1
- package/build/types.d.ts +1 -0
- package/package.json +1 -1
- package/src/abi/stkGHO.json +1131 -0
- package/src/config.ts +3 -3
- package/src/dex/dexalot/dexalot.ts +4 -4
- package/src/dex/generic-rfq/generic-rfq.ts +22 -1
- package/src/dex/hashflow/hashflow.ts +3 -3
- package/src/dex/index.ts +2 -0
- package/src/dex/stkgho/config.ts +14 -0
- package/src/dex/stkgho/stkgho-e2e.test.ts +77 -0
- package/src/dex/stkgho/stkgho-events.test.ts +79 -0
- package/src/dex/stkgho/stkgho-integration.test.ts +226 -0
- package/src/dex/stkgho/stkgho-pool.ts +111 -0
- package/src/dex/stkgho/stkgho.ts +217 -0
- package/src/dex/stkgho/types.ts +14 -0
- package/src/dex/swaap-v2/swaap-v2.ts +5 -5
- package/src/implementations/local-paraswap-sdk.ts +1 -0
- package/src/types.ts +1 -0
- package/tests/constants-e2e.ts +4 -0
- package/.vscode/launch.json +0 -53
- package/.vscode/settings.json +0 -2
- package/.vscode/tasks.json +0 -15
- package/build/abi/uniswap-v3/AlienBaseV3Router.abi.json +0 -52
- package/build/abi/wombat/pool.json +0 -1289
- package/build/dex/aave-v2/tokens-avalanche.json +0 -44
- package/build/dex/aave-v2/tokens-mainnet.json +0 -188
- package/build/dex/aave-v2/tokens-polygon.json +0 -44
- package/build/dex/bProtocol.d.ts +0 -18
- package/build/dex/bProtocol.js +0 -39
- package/build/dex/bProtocol.js.map +0 -1
- package/build/dex/bancor.d.ts +0 -26
- package/build/dex/bancor.js +0 -58
- package/build/dex/bancor.js.map +0 -1
- package/build/dex/compound.d.ts +0 -18
- package/build/dex/compound.js +0 -46
- package/build/dex/compound.js.map +0 -1
- package/build/dex/curve-v2.d.ts +0 -58
- package/build/dex/curve-v2.js +0 -180
- package/build/dex/curve-v2.js.map +0 -1
- package/build/dex/dodo-v1.d.ts +0 -33
- package/build/dex/dodo-v1.js +0 -63
- package/build/dex/dodo-v1.js.map +0 -1
- package/build/dex/lido.d.ts +0 -19
- package/build/dex/lido.js +0 -42
- package/build/dex/lido.js.map +0 -1
- package/build/dex/maker-psm/scripts/gem.abi.json +0 -136
- package/build/dex/maker-psm/scripts/validate-state.d.ts +0 -0
- package/build/dex/maker-psm/scripts/validate-state.js +0 -185
- package/build/dex/maker-psm/scripts/validate-state.js.map +0 -1
- package/build/dex/maker-psm/scripts/vat.abi.json +0 -243
- package/build/dex/onebit.d.ts +0 -25
- package/build/dex/onebit.js +0 -42
- package/build/dex/onebit.js.map +0 -1
- package/build/dex/smoothy.d.ts +0 -26
- package/build/dex/smoothy.js +0 -48
- package/build/dex/smoothy.js.map +0 -1
- package/build/dex/solidly-v3/scripts/check-event-pool-event.d.ts +0 -1
- package/build/dex/solidly-v3/scripts/check-event-pool-event.js +0 -53
- package/build/dex/solidly-v3/scripts/check-event-pool-event.js.map +0 -1
- package/build/dex/stable-pool.d.ts +0 -28
- package/build/dex/stable-pool.js +0 -55
- package/build/dex/stable-pool.js.map +0 -1
- package/build/dex/trader-joe-v2.1/trader-joe-v2.1-new.d.ts +0 -7
- package/build/dex/trader-joe-v2.1/trader-joe-v2.1-new.js +0 -20
- package/build/dex/trader-joe-v2.1/trader-joe-v2.1-new.js.map +0 -1
- package/build/dex/trader-joe-v2.1.d.ts +0 -43
- package/build/dex/trader-joe-v2.1.js +0 -79
- package/build/dex/trader-joe-v2.1.js.map +0 -1
- package/build/dex/uniswap-v3/forks/alien-base-v3/alien-base-v3.d.ts +0 -17
- package/build/dex/uniswap-v3/forks/alien-base-v3/alien-base-v3.js +0 -64
- package/build/dex/uniswap-v3/forks/alien-base-v3/alien-base-v3.js.map +0 -1
- package/build/dex/uniswap-v3/forks/alien-v3/alien-v3.d.ts +0 -17
- package/build/dex/uniswap-v3/forks/alien-v3/alien-v3.js +0 -79
- 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
|
+
}
|
|
@@ -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.
|
|
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.
|
|
639
|
+
await this.setBlacklist(options.userAddress, SWAAP_403_TTL_S);
|
|
640
640
|
this.logger.warn(
|
|
641
|
-
`${this.dexKey}-${this.network}: Encountered blacklisted user=${options.
|
|
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.
|
|
644
|
+
await this.setBlacklist(options.userAddress, SWAAP_429_TTL_S);
|
|
645
645
|
this.logger.warn(
|
|
646
|
-
`${this.dexKey}-${this.network}: Encountered restricted user=${options.
|
|
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) {
|
package/src/types.ts
CHANGED
package/tests/constants-e2e.ts
CHANGED
|
@@ -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,
|
package/.vscode/launch.json
DELETED
|
@@ -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
|
-
}
|
package/.vscode/settings.json
DELETED
package/.vscode/tasks.json
DELETED
|
@@ -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
|
-
]
|