@paraswap/dex-lib 3.8.23 → 3.8.25
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/infusion/InfusionFactory.json +147 -0
- package/build/abi/infusion/InfusionPair.json +658 -0
- package/build/abi/infusion/InfusionRouter.json +442 -0
- package/build/dex/index.js +4 -0
- package/build/dex/index.js.map +1 -1
- package/build/dex/infusion/config.d.ts +3 -0
- package/build/dex/infusion/config.js +20 -0
- package/build/dex/infusion/config.js.map +1 -0
- package/build/dex/infusion/infusion-stable-pool.d.ts +4 -0
- package/build/dex/infusion/infusion-stable-pool.js +74 -0
- package/build/dex/infusion/infusion-stable-pool.js.map +1 -0
- package/build/dex/infusion/infusion.d.ts +51 -0
- package/build/dex/infusion/infusion.js +457 -0
- package/build/dex/infusion/infusion.js.map +1 -0
- package/build/dex/infusion/types.d.ts +45 -0
- package/build/dex/infusion/types.js +3 -0
- package/build/dex/infusion/types.js.map +1 -0
- package/build/dex/infusion/utils/isStablePair.d.ts +2 -0
- package/build/dex/infusion/utils/isStablePair.js +18 -0
- package/build/dex/infusion/utils/isStablePair.js.map +1 -0
- package/build/dex/lite-psm/lite-psm.js +2 -5
- package/build/dex/lite-psm/lite-psm.js.map +1 -1
- package/build/dex/maker-psm/maker-psm.js +2 -6
- package/build/dex/maker-psm/maker-psm.js.map +1 -1
- package/build/dex/oswap/oswap-pool.js +8 -8
- package/build/dex/oswap/oswap-pool.js.map +1 -1
- package/build/dex/oswap/oswap.d.ts +5 -5
- package/build/dex/oswap/oswap.js +62 -46
- package/build/dex/oswap/oswap.js.map +1 -1
- package/build/dex/oswap/types.d.ts +4 -4
- package/package.json +1 -1
- package/src/abi/infusion/InfusionFactory.json +147 -0
- package/src/abi/infusion/InfusionPair.json +658 -0
- package/src/abi/infusion/InfusionRouter.json +442 -0
- package/src/abi/oswap/oswap.abi.json +452 -0
- package/src/dex/index.ts +4 -0
- package/src/dex/infusion/config.ts +21 -0
- package/src/dex/infusion/infusion-e2e.test.ts +110 -0
- package/src/dex/infusion/infusion-integration.test.ts +232 -0
- package/src/dex/infusion/infusion-stable-pool.ts +91 -0
- package/src/dex/infusion/infusion.ts +652 -0
- package/src/dex/infusion/types.ts +60 -0
- package/src/dex/infusion/utils/isStablePair.ts +18 -0
- package/src/dex/lite-psm/lite-psm.ts +2 -5
- package/src/dex/maker-psm/maker-psm.ts +2 -6
- package/src/dex/oswap/config.ts +32 -0
- package/src/dex/oswap/oswap-e2e.test.ts +91 -0
- package/src/dex/oswap/oswap-events.test.ts +88 -0
- package/src/dex/oswap/oswap-integration.test.ts +291 -0
- package/src/dex/oswap/oswap-pool.ts +190 -0
- package/src/dex/oswap/oswap.ts +414 -0
- package/src/dex/oswap/types.ts +29 -0
- package/tests/constants-e2e.ts +1 -1
|
@@ -0,0 +1,442 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"inputs": [
|
|
4
|
+
{ "internalType": "address", "name": "_factory", "type": "address" },
|
|
5
|
+
{
|
|
6
|
+
"internalType": "contract ILockFactory",
|
|
7
|
+
"name": "_lockFactory",
|
|
8
|
+
"type": "address"
|
|
9
|
+
},
|
|
10
|
+
{ "internalType": "address", "name": "_weth", "type": "address" }
|
|
11
|
+
],
|
|
12
|
+
"stateMutability": "nonpayable",
|
|
13
|
+
"type": "constructor"
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"inputs": [
|
|
17
|
+
{ "internalType": "address", "name": "target", "type": "address" }
|
|
18
|
+
],
|
|
19
|
+
"name": "AddressEmptyCode",
|
|
20
|
+
"type": "error"
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"inputs": [
|
|
24
|
+
{ "internalType": "address", "name": "account", "type": "address" }
|
|
25
|
+
],
|
|
26
|
+
"name": "AddressInsufficientBalance",
|
|
27
|
+
"type": "error"
|
|
28
|
+
},
|
|
29
|
+
{ "inputs": [], "name": "FailedInnerCall", "type": "error" },
|
|
30
|
+
{
|
|
31
|
+
"inputs": [
|
|
32
|
+
{ "internalType": "address", "name": "token", "type": "address" }
|
|
33
|
+
],
|
|
34
|
+
"name": "SafeERC20FailedOperation",
|
|
35
|
+
"type": "error"
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"inputs": [
|
|
39
|
+
{ "internalType": "uint256[]", "name": "amounts", "type": "uint256[]" },
|
|
40
|
+
{
|
|
41
|
+
"components": [
|
|
42
|
+
{ "internalType": "address", "name": "from", "type": "address" },
|
|
43
|
+
{ "internalType": "address", "name": "to", "type": "address" },
|
|
44
|
+
{ "internalType": "bool", "name": "stable", "type": "bool" }
|
|
45
|
+
],
|
|
46
|
+
"internalType": "struct Router.route[]",
|
|
47
|
+
"name": "routes",
|
|
48
|
+
"type": "tuple[]"
|
|
49
|
+
},
|
|
50
|
+
{ "internalType": "address", "name": "to", "type": "address" },
|
|
51
|
+
{ "internalType": "uint256", "name": "deadline", "type": "uint256" }
|
|
52
|
+
],
|
|
53
|
+
"name": "UNSAFE_swapExactTokensForTokens",
|
|
54
|
+
"outputs": [
|
|
55
|
+
{ "internalType": "uint256[]", "name": "", "type": "uint256[]" }
|
|
56
|
+
],
|
|
57
|
+
"stateMutability": "nonpayable",
|
|
58
|
+
"type": "function"
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
"inputs": [
|
|
62
|
+
{ "internalType": "address", "name": "tokenA", "type": "address" },
|
|
63
|
+
{ "internalType": "address", "name": "tokenB", "type": "address" },
|
|
64
|
+
{
|
|
65
|
+
"internalType": "uint256",
|
|
66
|
+
"name": "amountADesired",
|
|
67
|
+
"type": "uint256"
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
"internalType": "uint256",
|
|
71
|
+
"name": "amountBDesired",
|
|
72
|
+
"type": "uint256"
|
|
73
|
+
},
|
|
74
|
+
{ "internalType": "uint256", "name": "amountAMin", "type": "uint256" },
|
|
75
|
+
{ "internalType": "uint256", "name": "amountBMin", "type": "uint256" },
|
|
76
|
+
{ "internalType": "address", "name": "to", "type": "address" },
|
|
77
|
+
{ "internalType": "uint256", "name": "deadline", "type": "uint256" },
|
|
78
|
+
{ "internalType": "bool", "name": "stable", "type": "bool" },
|
|
79
|
+
{ "internalType": "uint256", "name": "lockerFeesP", "type": "uint256" }
|
|
80
|
+
],
|
|
81
|
+
"name": "addLiquidity",
|
|
82
|
+
"outputs": [
|
|
83
|
+
{ "internalType": "uint256", "name": "amountA", "type": "uint256" },
|
|
84
|
+
{ "internalType": "uint256", "name": "amountB", "type": "uint256" },
|
|
85
|
+
{ "internalType": "uint256", "name": "liquidity", "type": "uint256" }
|
|
86
|
+
],
|
|
87
|
+
"stateMutability": "nonpayable",
|
|
88
|
+
"type": "function"
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
"inputs": [
|
|
92
|
+
{ "internalType": "address", "name": "token", "type": "address" },
|
|
93
|
+
{
|
|
94
|
+
"internalType": "uint256",
|
|
95
|
+
"name": "amountTokenDesired",
|
|
96
|
+
"type": "uint256"
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
"internalType": "uint256",
|
|
100
|
+
"name": "amountTokenMin",
|
|
101
|
+
"type": "uint256"
|
|
102
|
+
},
|
|
103
|
+
{ "internalType": "uint256", "name": "amountETHMin", "type": "uint256" },
|
|
104
|
+
{ "internalType": "address", "name": "to", "type": "address" },
|
|
105
|
+
{ "internalType": "uint256", "name": "deadline", "type": "uint256" },
|
|
106
|
+
{ "internalType": "bool", "name": "stable", "type": "bool" },
|
|
107
|
+
{ "internalType": "uint256", "name": "lockerFeesP", "type": "uint256" }
|
|
108
|
+
],
|
|
109
|
+
"name": "addLiquidityETH",
|
|
110
|
+
"outputs": [
|
|
111
|
+
{ "internalType": "uint256", "name": "amountToken", "type": "uint256" },
|
|
112
|
+
{ "internalType": "uint256", "name": "amountETH", "type": "uint256" },
|
|
113
|
+
{ "internalType": "uint256", "name": "liquidity", "type": "uint256" }
|
|
114
|
+
],
|
|
115
|
+
"stateMutability": "payable",
|
|
116
|
+
"type": "function"
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
"inputs": [],
|
|
120
|
+
"name": "factory",
|
|
121
|
+
"outputs": [{ "internalType": "address", "name": "", "type": "address" }],
|
|
122
|
+
"stateMutability": "view",
|
|
123
|
+
"type": "function"
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
"inputs": [
|
|
127
|
+
{ "internalType": "uint256", "name": "amountIn", "type": "uint256" },
|
|
128
|
+
{ "internalType": "address", "name": "tokenIn", "type": "address" },
|
|
129
|
+
{ "internalType": "address", "name": "tokenOut", "type": "address" }
|
|
130
|
+
],
|
|
131
|
+
"name": "getAmountOut",
|
|
132
|
+
"outputs": [
|
|
133
|
+
{ "internalType": "uint256", "name": "amount", "type": "uint256" },
|
|
134
|
+
{ "internalType": "bool", "name": "stable", "type": "bool" }
|
|
135
|
+
],
|
|
136
|
+
"stateMutability": "view",
|
|
137
|
+
"type": "function"
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
"inputs": [
|
|
141
|
+
{ "internalType": "uint256", "name": "amountIn", "type": "uint256" },
|
|
142
|
+
{
|
|
143
|
+
"components": [
|
|
144
|
+
{ "internalType": "address", "name": "from", "type": "address" },
|
|
145
|
+
{ "internalType": "address", "name": "to", "type": "address" },
|
|
146
|
+
{ "internalType": "bool", "name": "stable", "type": "bool" }
|
|
147
|
+
],
|
|
148
|
+
"internalType": "struct Router.route[]",
|
|
149
|
+
"name": "routes",
|
|
150
|
+
"type": "tuple[]"
|
|
151
|
+
}
|
|
152
|
+
],
|
|
153
|
+
"name": "getAmountsOut",
|
|
154
|
+
"outputs": [
|
|
155
|
+
{ "internalType": "uint256[]", "name": "amounts", "type": "uint256[]" }
|
|
156
|
+
],
|
|
157
|
+
"stateMutability": "view",
|
|
158
|
+
"type": "function"
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
"inputs": [
|
|
162
|
+
{ "internalType": "address", "name": "tokenA", "type": "address" },
|
|
163
|
+
{ "internalType": "address", "name": "tokenB", "type": "address" },
|
|
164
|
+
{ "internalType": "bool", "name": "stable", "type": "bool" }
|
|
165
|
+
],
|
|
166
|
+
"name": "getReserves",
|
|
167
|
+
"outputs": [
|
|
168
|
+
{ "internalType": "uint256", "name": "reserveA", "type": "uint256" },
|
|
169
|
+
{ "internalType": "uint256", "name": "reserveB", "type": "uint256" }
|
|
170
|
+
],
|
|
171
|
+
"stateMutability": "view",
|
|
172
|
+
"type": "function"
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
"inputs": [
|
|
176
|
+
{ "internalType": "address", "name": "pair", "type": "address" }
|
|
177
|
+
],
|
|
178
|
+
"name": "isPair",
|
|
179
|
+
"outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],
|
|
180
|
+
"stateMutability": "view",
|
|
181
|
+
"type": "function"
|
|
182
|
+
},
|
|
183
|
+
{
|
|
184
|
+
"inputs": [],
|
|
185
|
+
"name": "lockFactory",
|
|
186
|
+
"outputs": [
|
|
187
|
+
{ "internalType": "contract ILockFactory", "name": "", "type": "address" }
|
|
188
|
+
],
|
|
189
|
+
"stateMutability": "view",
|
|
190
|
+
"type": "function"
|
|
191
|
+
},
|
|
192
|
+
{
|
|
193
|
+
"inputs": [
|
|
194
|
+
{ "internalType": "address", "name": "tokenA", "type": "address" },
|
|
195
|
+
{ "internalType": "address", "name": "tokenB", "type": "address" },
|
|
196
|
+
{ "internalType": "bool", "name": "stable", "type": "bool" }
|
|
197
|
+
],
|
|
198
|
+
"name": "pairFor",
|
|
199
|
+
"outputs": [
|
|
200
|
+
{ "internalType": "address", "name": "pair", "type": "address" }
|
|
201
|
+
],
|
|
202
|
+
"stateMutability": "view",
|
|
203
|
+
"type": "function"
|
|
204
|
+
},
|
|
205
|
+
{
|
|
206
|
+
"inputs": [
|
|
207
|
+
{ "internalType": "address", "name": "tokenA", "type": "address" },
|
|
208
|
+
{ "internalType": "address", "name": "tokenB", "type": "address" },
|
|
209
|
+
{ "internalType": "bool", "name": "stable", "type": "bool" },
|
|
210
|
+
{
|
|
211
|
+
"internalType": "uint256",
|
|
212
|
+
"name": "amountADesired",
|
|
213
|
+
"type": "uint256"
|
|
214
|
+
},
|
|
215
|
+
{ "internalType": "uint256", "name": "amountBDesired", "type": "uint256" }
|
|
216
|
+
],
|
|
217
|
+
"name": "quoteAddLiquidity",
|
|
218
|
+
"outputs": [
|
|
219
|
+
{ "internalType": "uint256", "name": "amountA", "type": "uint256" },
|
|
220
|
+
{ "internalType": "uint256", "name": "amountB", "type": "uint256" },
|
|
221
|
+
{ "internalType": "uint256", "name": "liquidity", "type": "uint256" }
|
|
222
|
+
],
|
|
223
|
+
"stateMutability": "view",
|
|
224
|
+
"type": "function"
|
|
225
|
+
},
|
|
226
|
+
{
|
|
227
|
+
"inputs": [
|
|
228
|
+
{ "internalType": "address", "name": "tokenA", "type": "address" },
|
|
229
|
+
{ "internalType": "address", "name": "tokenB", "type": "address" },
|
|
230
|
+
{ "internalType": "bool", "name": "stable", "type": "bool" },
|
|
231
|
+
{ "internalType": "uint256", "name": "liquidity", "type": "uint256" }
|
|
232
|
+
],
|
|
233
|
+
"name": "quoteRemoveLiquidity",
|
|
234
|
+
"outputs": [
|
|
235
|
+
{ "internalType": "uint256", "name": "amountA", "type": "uint256" },
|
|
236
|
+
{ "internalType": "uint256", "name": "amountB", "type": "uint256" }
|
|
237
|
+
],
|
|
238
|
+
"stateMutability": "view",
|
|
239
|
+
"type": "function"
|
|
240
|
+
},
|
|
241
|
+
{
|
|
242
|
+
"inputs": [
|
|
243
|
+
{ "internalType": "address", "name": "tokenA", "type": "address" },
|
|
244
|
+
{ "internalType": "address", "name": "tokenB", "type": "address" },
|
|
245
|
+
{ "internalType": "bool", "name": "stable", "type": "bool" },
|
|
246
|
+
{ "internalType": "uint256", "name": "liquidity", "type": "uint256" },
|
|
247
|
+
{ "internalType": "uint256", "name": "amountAMin", "type": "uint256" },
|
|
248
|
+
{ "internalType": "uint256", "name": "amountBMin", "type": "uint256" },
|
|
249
|
+
{ "internalType": "address", "name": "to", "type": "address" },
|
|
250
|
+
{ "internalType": "uint256", "name": "deadline", "type": "uint256" }
|
|
251
|
+
],
|
|
252
|
+
"name": "removeLiquidity",
|
|
253
|
+
"outputs": [
|
|
254
|
+
{ "internalType": "uint256", "name": "amountA", "type": "uint256" },
|
|
255
|
+
{ "internalType": "uint256", "name": "amountB", "type": "uint256" }
|
|
256
|
+
],
|
|
257
|
+
"stateMutability": "nonpayable",
|
|
258
|
+
"type": "function"
|
|
259
|
+
},
|
|
260
|
+
{
|
|
261
|
+
"inputs": [
|
|
262
|
+
{ "internalType": "address", "name": "token", "type": "address" },
|
|
263
|
+
{ "internalType": "bool", "name": "stable", "type": "bool" },
|
|
264
|
+
{ "internalType": "uint256", "name": "liquidity", "type": "uint256" },
|
|
265
|
+
{
|
|
266
|
+
"internalType": "uint256",
|
|
267
|
+
"name": "amountTokenMin",
|
|
268
|
+
"type": "uint256"
|
|
269
|
+
},
|
|
270
|
+
{ "internalType": "uint256", "name": "amountETHMin", "type": "uint256" },
|
|
271
|
+
{ "internalType": "address", "name": "to", "type": "address" },
|
|
272
|
+
{ "internalType": "uint256", "name": "deadline", "type": "uint256" }
|
|
273
|
+
],
|
|
274
|
+
"name": "removeLiquidityETH",
|
|
275
|
+
"outputs": [
|
|
276
|
+
{ "internalType": "uint256", "name": "amountToken", "type": "uint256" },
|
|
277
|
+
{ "internalType": "uint256", "name": "amountETH", "type": "uint256" }
|
|
278
|
+
],
|
|
279
|
+
"stateMutability": "nonpayable",
|
|
280
|
+
"type": "function"
|
|
281
|
+
},
|
|
282
|
+
{
|
|
283
|
+
"inputs": [
|
|
284
|
+
{ "internalType": "address", "name": "token", "type": "address" },
|
|
285
|
+
{ "internalType": "bool", "name": "stable", "type": "bool" },
|
|
286
|
+
{ "internalType": "uint256", "name": "liquidity", "type": "uint256" },
|
|
287
|
+
{
|
|
288
|
+
"internalType": "uint256",
|
|
289
|
+
"name": "amountTokenMin",
|
|
290
|
+
"type": "uint256"
|
|
291
|
+
},
|
|
292
|
+
{ "internalType": "uint256", "name": "amountETHMin", "type": "uint256" },
|
|
293
|
+
{ "internalType": "address", "name": "to", "type": "address" },
|
|
294
|
+
{ "internalType": "uint256", "name": "deadline", "type": "uint256" },
|
|
295
|
+
{ "internalType": "bool", "name": "approveMax", "type": "bool" },
|
|
296
|
+
{ "internalType": "uint8", "name": "v", "type": "uint8" },
|
|
297
|
+
{ "internalType": "bytes32", "name": "r", "type": "bytes32" },
|
|
298
|
+
{ "internalType": "bytes32", "name": "s", "type": "bytes32" }
|
|
299
|
+
],
|
|
300
|
+
"name": "removeLiquidityETHWithPermit",
|
|
301
|
+
"outputs": [
|
|
302
|
+
{ "internalType": "uint256", "name": "amountToken", "type": "uint256" },
|
|
303
|
+
{ "internalType": "uint256", "name": "amountETH", "type": "uint256" }
|
|
304
|
+
],
|
|
305
|
+
"stateMutability": "nonpayable",
|
|
306
|
+
"type": "function"
|
|
307
|
+
},
|
|
308
|
+
{
|
|
309
|
+
"inputs": [
|
|
310
|
+
{ "internalType": "address", "name": "tokenA", "type": "address" },
|
|
311
|
+
{ "internalType": "address", "name": "tokenB", "type": "address" },
|
|
312
|
+
{ "internalType": "bool", "name": "stable", "type": "bool" },
|
|
313
|
+
{ "internalType": "uint256", "name": "liquidity", "type": "uint256" },
|
|
314
|
+
{ "internalType": "uint256", "name": "amountAMin", "type": "uint256" },
|
|
315
|
+
{ "internalType": "uint256", "name": "amountBMin", "type": "uint256" },
|
|
316
|
+
{ "internalType": "address", "name": "to", "type": "address" },
|
|
317
|
+
{ "internalType": "uint256", "name": "deadline", "type": "uint256" },
|
|
318
|
+
{ "internalType": "bool", "name": "approveMax", "type": "bool" },
|
|
319
|
+
{ "internalType": "uint8", "name": "v", "type": "uint8" },
|
|
320
|
+
{ "internalType": "bytes32", "name": "r", "type": "bytes32" },
|
|
321
|
+
{ "internalType": "bytes32", "name": "s", "type": "bytes32" }
|
|
322
|
+
],
|
|
323
|
+
"name": "removeLiquidityWithPermit",
|
|
324
|
+
"outputs": [
|
|
325
|
+
{ "internalType": "uint256", "name": "amountA", "type": "uint256" },
|
|
326
|
+
{ "internalType": "uint256", "name": "amountB", "type": "uint256" }
|
|
327
|
+
],
|
|
328
|
+
"stateMutability": "nonpayable",
|
|
329
|
+
"type": "function"
|
|
330
|
+
},
|
|
331
|
+
{
|
|
332
|
+
"inputs": [
|
|
333
|
+
{ "internalType": "address", "name": "tokenA", "type": "address" },
|
|
334
|
+
{ "internalType": "address", "name": "tokenB", "type": "address" }
|
|
335
|
+
],
|
|
336
|
+
"name": "sortTokens",
|
|
337
|
+
"outputs": [
|
|
338
|
+
{ "internalType": "address", "name": "token0", "type": "address" },
|
|
339
|
+
{ "internalType": "address", "name": "token1", "type": "address" }
|
|
340
|
+
],
|
|
341
|
+
"stateMutability": "pure",
|
|
342
|
+
"type": "function"
|
|
343
|
+
},
|
|
344
|
+
{
|
|
345
|
+
"inputs": [
|
|
346
|
+
{ "internalType": "uint256", "name": "amountOutMin", "type": "uint256" },
|
|
347
|
+
{
|
|
348
|
+
"components": [
|
|
349
|
+
{ "internalType": "address", "name": "from", "type": "address" },
|
|
350
|
+
{ "internalType": "address", "name": "to", "type": "address" },
|
|
351
|
+
{ "internalType": "bool", "name": "stable", "type": "bool" }
|
|
352
|
+
],
|
|
353
|
+
"internalType": "struct Router.route[]",
|
|
354
|
+
"name": "routes",
|
|
355
|
+
"type": "tuple[]"
|
|
356
|
+
},
|
|
357
|
+
{ "internalType": "address", "name": "to", "type": "address" },
|
|
358
|
+
{ "internalType": "uint256", "name": "deadline", "type": "uint256" }
|
|
359
|
+
],
|
|
360
|
+
"name": "swapExactETHForTokens",
|
|
361
|
+
"outputs": [
|
|
362
|
+
{ "internalType": "uint256[]", "name": "amounts", "type": "uint256[]" }
|
|
363
|
+
],
|
|
364
|
+
"stateMutability": "payable",
|
|
365
|
+
"type": "function"
|
|
366
|
+
},
|
|
367
|
+
{
|
|
368
|
+
"inputs": [
|
|
369
|
+
{ "internalType": "uint256", "name": "amountIn", "type": "uint256" },
|
|
370
|
+
{ "internalType": "uint256", "name": "amountOutMin", "type": "uint256" },
|
|
371
|
+
{
|
|
372
|
+
"components": [
|
|
373
|
+
{ "internalType": "address", "name": "from", "type": "address" },
|
|
374
|
+
{ "internalType": "address", "name": "to", "type": "address" },
|
|
375
|
+
{ "internalType": "bool", "name": "stable", "type": "bool" }
|
|
376
|
+
],
|
|
377
|
+
"internalType": "struct Router.route[]",
|
|
378
|
+
"name": "routes",
|
|
379
|
+
"type": "tuple[]"
|
|
380
|
+
},
|
|
381
|
+
{ "internalType": "address", "name": "to", "type": "address" },
|
|
382
|
+
{ "internalType": "uint256", "name": "deadline", "type": "uint256" }
|
|
383
|
+
],
|
|
384
|
+
"name": "swapExactTokensForETH",
|
|
385
|
+
"outputs": [
|
|
386
|
+
{ "internalType": "uint256[]", "name": "amounts", "type": "uint256[]" }
|
|
387
|
+
],
|
|
388
|
+
"stateMutability": "nonpayable",
|
|
389
|
+
"type": "function"
|
|
390
|
+
},
|
|
391
|
+
{
|
|
392
|
+
"inputs": [
|
|
393
|
+
{ "internalType": "uint256", "name": "amountIn", "type": "uint256" },
|
|
394
|
+
{ "internalType": "uint256", "name": "amountOutMin", "type": "uint256" },
|
|
395
|
+
{
|
|
396
|
+
"components": [
|
|
397
|
+
{ "internalType": "address", "name": "from", "type": "address" },
|
|
398
|
+
{ "internalType": "address", "name": "to", "type": "address" },
|
|
399
|
+
{ "internalType": "bool", "name": "stable", "type": "bool" }
|
|
400
|
+
],
|
|
401
|
+
"internalType": "struct Router.route[]",
|
|
402
|
+
"name": "routes",
|
|
403
|
+
"type": "tuple[]"
|
|
404
|
+
},
|
|
405
|
+
{ "internalType": "address", "name": "to", "type": "address" },
|
|
406
|
+
{ "internalType": "uint256", "name": "deadline", "type": "uint256" }
|
|
407
|
+
],
|
|
408
|
+
"name": "swapExactTokensForTokens",
|
|
409
|
+
"outputs": [
|
|
410
|
+
{ "internalType": "uint256[]", "name": "amounts", "type": "uint256[]" }
|
|
411
|
+
],
|
|
412
|
+
"stateMutability": "nonpayable",
|
|
413
|
+
"type": "function"
|
|
414
|
+
},
|
|
415
|
+
{
|
|
416
|
+
"inputs": [
|
|
417
|
+
{ "internalType": "uint256", "name": "amountIn", "type": "uint256" },
|
|
418
|
+
{ "internalType": "uint256", "name": "amountOutMin", "type": "uint256" },
|
|
419
|
+
{ "internalType": "address", "name": "tokenFrom", "type": "address" },
|
|
420
|
+
{ "internalType": "address", "name": "tokenTo", "type": "address" },
|
|
421
|
+
{ "internalType": "bool", "name": "stable", "type": "bool" },
|
|
422
|
+
{ "internalType": "address", "name": "to", "type": "address" },
|
|
423
|
+
{ "internalType": "uint256", "name": "deadline", "type": "uint256" }
|
|
424
|
+
],
|
|
425
|
+
"name": "swapExactTokensForTokensSimple",
|
|
426
|
+
"outputs": [
|
|
427
|
+
{ "internalType": "uint256[]", "name": "amounts", "type": "uint256[]" }
|
|
428
|
+
],
|
|
429
|
+
"stateMutability": "nonpayable",
|
|
430
|
+
"type": "function"
|
|
431
|
+
},
|
|
432
|
+
{
|
|
433
|
+
"inputs": [],
|
|
434
|
+
"name": "weth",
|
|
435
|
+
"outputs": [
|
|
436
|
+
{ "internalType": "contract IWETH", "name": "", "type": "address" }
|
|
437
|
+
],
|
|
438
|
+
"stateMutability": "view",
|
|
439
|
+
"type": "function"
|
|
440
|
+
},
|
|
441
|
+
{ "stateMutability": "payable", "type": "receive" }
|
|
442
|
+
]
|
package/build/dex/index.js
CHANGED
|
@@ -62,6 +62,7 @@ const generic_rfq_1 = require("./generic-rfq/generic-rfq");
|
|
|
62
62
|
const wsteth_1 = require("./wsteth/wsteth");
|
|
63
63
|
const camelot_1 = require("./camelot/camelot");
|
|
64
64
|
const hashflow_1 = require("./hashflow/hashflow");
|
|
65
|
+
const infusion_1 = require("./infusion/infusion");
|
|
65
66
|
const solidly_ethereum_1 = require("./solidly/solidly-ethereum");
|
|
66
67
|
const maverick_v1_1 = require("./maverick-v1/maverick-v1");
|
|
67
68
|
const maverick_v2_1 = require("./maverick-v2/maverick-v2");
|
|
@@ -84,6 +85,7 @@ const etherfi_1 = require("./etherfi");
|
|
|
84
85
|
const spark_1 = require("./spark/spark");
|
|
85
86
|
const velodrome_slipstream_1 = require("./uniswap-v3/forks/velodrome-slipstream/velodrome-slipstream");
|
|
86
87
|
const aave_v3_stata_1 = require("./aave-v3-stata/aave-v3-stata");
|
|
88
|
+
const oswap_1 = require("./oswap/oswap");
|
|
87
89
|
const concentrator_arusd_1 = require("./concentrator-arusd/concentrator-arusd");
|
|
88
90
|
const fx_protocol_rusd_1 = require("./fx-protocol-rusd/fx-protocol-rusd");
|
|
89
91
|
const lite_psm_1 = require("./lite-psm/lite-psm");
|
|
@@ -148,6 +150,7 @@ const Dexes = [
|
|
|
148
150
|
curve_v1_stable_ng_1.CurveV1StableNg,
|
|
149
151
|
wsteth_1.WstETH,
|
|
150
152
|
hashflow_1.Hashflow,
|
|
153
|
+
infusion_1.Infusion,
|
|
151
154
|
maverick_v1_1.MaverickV1,
|
|
152
155
|
maverick_v2_1.MaverickV2,
|
|
153
156
|
camelot_1.Camelot,
|
|
@@ -162,6 +165,7 @@ const Dexes = [
|
|
|
162
165
|
pharaohV1_1.PharaohV1,
|
|
163
166
|
spark_1.Spark,
|
|
164
167
|
aave_v3_stata_1.AaveV3Stata,
|
|
168
|
+
oswap_1.OSwap,
|
|
165
169
|
concentrator_arusd_1.ConcentratorArusd,
|
|
166
170
|
fx_protocol_rusd_1.FxProtocolRusd,
|
|
167
171
|
lite_psm_1.LitePsm,
|
package/build/dex/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/dex/index.ts"],"names":[],"mappings":";;;;;;AAAA,oDAAuB;AAEvB,kDAA8C;AAE9C,qDAAiD;AACjD,2DAAuD;AACvD,sCAAmC;AACnC,0EAAsE;AACtE,wDAA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M,IAAI,KAAK,CACb,GAAG,MAAM,qCAAqC,IAAI,CAAC,OAAO,IAAI,CAC/D,CAAC;YACJ,OAAO,IAAI,CAAC,cAAc,CAAC;SAC5B;QACD,OAAO,MAAM,CAAC;IAChB,CAAC;IAED,UAAU,CAAC,MAAc,EAAE,IAAc;QACvC,MAAM,aAAa,GAAG,IAAI,CAAC,gBAAgB,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;QAC1D,OAAO,IAAI,KAAK,oBAAQ,CAAC,IAAI;YAC3B,CAAC,CAAC,IAAI,CAAC,YAAY,CAAC,aAAa,CAAC;YAClC,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,aAAa,CAAC,CAAC;IACtC,CAAC;IAED,qCAAqC,CAAC,MAAc;QAClD,IAAI;YACF,MAAM,GAAG,GAAG,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;YACrC,OAAO,CAAC,CAAC,GAAG,CAAC,4BAA4B,CAAC;SAC3C;QAAC,OAAO,CAAC,EAAE;YACV,OAAO,KAAK,CAAC;SACd;IACH,CAAC;CACF;AApLD,8CAoLC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.InfusionConfig = void 0;
|
|
4
|
+
const constants_1 = require("../../constants");
|
|
5
|
+
exports.InfusionConfig = {
|
|
6
|
+
Infusion: {
|
|
7
|
+
[constants_1.Network.BASE]: {
|
|
8
|
+
subgraphURL: 'https://api.goldsky.com/api/public/project_clvn0ei0x2qro0130fpihh83o/subgraphs/infusion-subgraph/1.0.0/gn',
|
|
9
|
+
factoryAddress: '0x2D9A3a2bd6400eE28d770c7254cA840c82faf23f',
|
|
10
|
+
router: '0x1E891C9F96DcA29Da8B97bE3403D16135EBe8028',
|
|
11
|
+
initCode: '0xc1ac28b1c4ebe53c0cff67bab5878c4eb68759bb1e9f73977cd266b247d149f0',
|
|
12
|
+
// updatable fees on the factory without event
|
|
13
|
+
stableFee: 2,
|
|
14
|
+
volatileFee: 2,
|
|
15
|
+
poolGasCost: 180 * 1000,
|
|
16
|
+
feeCode: 2,
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
};
|
|
20
|
+
//# sourceMappingURL=config.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../../src/dex/infusion/config.ts"],"names":[],"mappings":";;;AAEA,+CAAoD;AAEvC,QAAA,cAAc,GAA4B;IACrD,QAAQ,EAAE;QACR,CAAC,mBAAO,CAAC,IAAI,CAAC,EAAE;YACd,WAAW,EACT,2GAA2G;YAC7G,cAAc,EAAE,4CAA4C;YAC5D,MAAM,EAAE,4CAA4C;YACpD,QAAQ,EACN,oEAAoE;YACtE,8CAA8C;YAC9C,SAAS,EAAE,CAAC;YACZ,WAAW,EAAE,CAAC;YACd,WAAW,EAAE,GAAG,GAAG,IAAI;YACvB,OAAO,EAAE,CAAC;SACX;KACF;CACF,CAAC"}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.InfusionStablePool = void 0;
|
|
4
|
+
const bigint_constants_1 = require("../../bigint-constants");
|
|
5
|
+
const uniswap_v2_1 = require("../uniswap-v2/uniswap-v2");
|
|
6
|
+
const e18 = bigint_constants_1.BI_POWS[18];
|
|
7
|
+
function _k(x, y, decimals0, decimals1) {
|
|
8
|
+
const _x = (x * e18) / decimals0;
|
|
9
|
+
const _y = (y * e18) / decimals1;
|
|
10
|
+
const _a = (_x * _y) / e18;
|
|
11
|
+
const _b = (_x * _x) / e18 + (_y * _y) / e18;
|
|
12
|
+
// x3y+y3x >= k
|
|
13
|
+
return (_a * _b) / e18;
|
|
14
|
+
}
|
|
15
|
+
function _f(x0, y) {
|
|
16
|
+
return ((x0 * ((((y * y) / e18) * y) / e18)) / e18 +
|
|
17
|
+
(((((x0 * x0) / e18) * x0) / e18) * y) / e18);
|
|
18
|
+
}
|
|
19
|
+
function _d(x0, y) {
|
|
20
|
+
return (3n * x0 * ((y * y) / e18)) / e18 + (((x0 * x0) / e18) * x0) / e18;
|
|
21
|
+
}
|
|
22
|
+
function _getY(x0, xy, y) {
|
|
23
|
+
for (let i = 0; i < 255; i++) {
|
|
24
|
+
const yPrev = y;
|
|
25
|
+
const k = _f(x0, y);
|
|
26
|
+
if (k < xy) {
|
|
27
|
+
const dy = ((xy - k) * e18) / _d(x0, y);
|
|
28
|
+
y = y + dy;
|
|
29
|
+
}
|
|
30
|
+
else {
|
|
31
|
+
const dy = ((k - xy) * e18) / _d(x0, y);
|
|
32
|
+
y = y - dy;
|
|
33
|
+
}
|
|
34
|
+
if (_closeTo(y, yPrev, 1n)) {
|
|
35
|
+
break;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
return y;
|
|
39
|
+
}
|
|
40
|
+
function _closeTo(a, b, target) {
|
|
41
|
+
if (a > b) {
|
|
42
|
+
if (a - b <= target) {
|
|
43
|
+
return true;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
else {
|
|
47
|
+
if (b - a <= target) {
|
|
48
|
+
return true;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
return false;
|
|
52
|
+
}
|
|
53
|
+
class InfusionStablePool {
|
|
54
|
+
static async getSellPrice(priceParams, srcAmount, feeFactor) {
|
|
55
|
+
const { reservesIn, reservesOut, decimalsIn, decimalsOut, fee } = priceParams;
|
|
56
|
+
// FIXME: some dexes use uint112 others use uint256
|
|
57
|
+
if (BigInt(reservesIn) + srcAmount > uniswap_v2_1.RESERVE_LIMIT) {
|
|
58
|
+
return 0n;
|
|
59
|
+
}
|
|
60
|
+
const amountIn = srcAmount - (srcAmount * BigInt(fee)) / BigInt(feeFactor);
|
|
61
|
+
const reservesInN = BigInt(reservesIn);
|
|
62
|
+
const reservesOutN = BigInt(reservesOut);
|
|
63
|
+
const decimalsInN = 10n ** BigInt(decimalsIn);
|
|
64
|
+
const decimalsOutN = 10n ** BigInt(decimalsOut);
|
|
65
|
+
const xy = _k(reservesInN, reservesOutN, decimalsInN, decimalsOutN);
|
|
66
|
+
const reserveA = (reservesInN * e18) / decimalsInN;
|
|
67
|
+
const reserveB = (reservesOutN * e18) / decimalsOutN;
|
|
68
|
+
const amountInNorm = (amountIn * e18) / decimalsInN;
|
|
69
|
+
const y = reserveB - _getY(amountInNorm + reserveA, xy, reserveB);
|
|
70
|
+
return (y * decimalsOutN) / e18;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
exports.InfusionStablePool = InfusionStablePool;
|
|
74
|
+
//# sourceMappingURL=infusion-stable-pool.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"infusion-stable-pool.js","sourceRoot":"","sources":["../../../src/dex/infusion/infusion-stable-pool.ts"],"names":[],"mappings":";;;AAAA,6DAAiD;AACjD,yDAAyD;AAGzD,MAAM,GAAG,GAAG,0BAAO,CAAC,EAAE,CAAC,CAAC;AAExB,SAAS,EAAE,CACT,CAAS,EACT,CAAS,EACT,SAAiB,EACjB,SAAiB;IAEjB,MAAM,EAAE,GAAG,CAAC,CAAC,GAAG,GAAG,CAAC,GAAG,SAAS,CAAC;IACjC,MAAM,EAAE,GAAG,CAAC,CAAC,GAAG,GAAG,CAAC,GAAG,SAAS,CAAC;IACjC,MAAM,EAAE,GAAG,CAAC,EAAE,GAAG,EAAE,CAAC,GAAG,GAAG,CAAC;IAC3B,MAAM,EAAE,GAAG,CAAC,EAAE,GAAG,EAAE,CAAC,GAAG,GAAG,GAAG,CAAC,EAAE,GAAG,EAAE,CAAC,GAAG,GAAG,CAAC;IAC7C,eAAe;IACf,OAAO,CAAC,EAAE,GAAG,EAAE,CAAC,GAAG,GAAG,CAAC;AACzB,CAAC;AAED,SAAS,EAAE,CAAC,EAAU,EAAE,CAAS;IAC/B,OAAO,CACL,CAAC,EAAE,GAAG,CAAC,CAAC,C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