@paraswap/dex-lib 3.0.2 → 3.0.3-fix-for-rc.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.
- package/build/dex/bProtocol.js +1 -0
- package/build/dex/bProtocol.js.map +1 -1
- package/build/dex/bancor.js +1 -0
- package/build/dex/bancor.js.map +1 -1
- package/build/dex/compound.js +1 -0
- package/build/dex/compound.js.map +1 -1
- package/build/dex/dodo-v1.js +1 -0
- package/build/dex/dodo-v1.js.map +1 -1
- package/build/dex/lido.js +1 -0
- package/build/dex/lido.js.map +1 -1
- package/build/dex/onebit.js +1 -0
- package/build/dex/onebit.js.map +1 -1
- package/build/dex/smoothy.d.ts +1 -1
- package/build/dex/smoothy.js +3 -2
- package/build/dex/smoothy.js.map +1 -1
- package/build/dex/stable-pool.d.ts +1 -1
- package/build/dex/stable-pool.js +2 -1
- package/build/dex/stable-pool.js.map +1 -1
- package/build/dex/trader-joe-v2.1.js +3 -3
- package/build/dex/trader-joe-v2.1.js.map +1 -1
- package/build/executor/Executor02BytecodeBuilder.js +1 -1
- package/build/executor/Executor02BytecodeBuilder.js.map +1 -1
- package/package.json +1 -1
- package/src/executor/Executor02BytecodeBuilder.ts +1 -1
- package/tests/debug-price-route.json +1 -67
- package/.vscode/launch.json +0 -72
- package/.vscode/settings.json +0 -2
- package/.vscode/tasks.json +0 -15
- package/build/abi/AugustusV6.abi.json +0 -1454
- package/build/dex/algebra/scripts/validate-state-v1-1.d.ts +0 -1
- package/build/dex/algebra/scripts/validate-state-v1-1.js +0 -206
- package/build/dex/algebra/scripts/validate-state-v1-1.js.map +0 -1
- package/build/dex/augustus-approvals-helper.d.ts +0 -22
- package/build/dex/augustus-approvals-helper.js +0 -110
- package/build/dex/augustus-approvals-helper.js.map +0 -1
- package/build/dex/camelot/scripts/validate-state.d.ts +0 -1
- package/build/dex/camelot/scripts/validate-state.js +0 -84
- package/build/dex/camelot/scripts/validate-state.js.map +0 -1
- package/build/dex/generic-rfq/test-v6/constants.d.ts +0 -1
- package/build/dex/generic-rfq/test-v6/constants.js +0 -5
- package/build/dex/generic-rfq/test-v6/constants.js.map +0 -1
- package/build/dex/generic-rfq/test-v6/get-config.d.ts +0 -1
- package/build/dex/generic-rfq/test-v6/get-config.js +0 -63
- package/build/dex/generic-rfq/test-v6/get-config.js.map +0 -1
- package/build/dex/generic-rfq/test-v6/types.d.ts +0 -14
- package/build/dex/generic-rfq/test-v6/types.js +0 -3
- package/build/dex/generic-rfq/test-v6/types.js.map +0 -1
- package/build/dex/generic-rfq/tokens.json +0 -570
- package/build/dex/uniswap-v2/uniswap-v2-optimizer.d.ts +0 -2
- package/build/dex/uniswap-v2/uniswap-v2-optimizer.js +0 -75
- package/build/dex/uniswap-v2/uniswap-v2-optimizer.js.map +0 -1
- package/build/executor/IExecutorBytecodeBuilder.d.ts +0 -6
- package/build/executor/IExecutorBytecodeBuilder.js +0 -3
- package/build/executor/IExecutorBytecodeBuilder.js.map +0 -1
- package/build/executor/tests/utils-e2e-v6.d.ts +0 -8
- package/build/executor/tests/utils-e2e-v6.js +0 -175
- package/build/executor/tests/utils-e2e-v6.js.map +0 -1
|
@@ -1,570 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"1INCH": {
|
|
3
|
-
"symbol": "1INCH",
|
|
4
|
-
"name": "1INCH",
|
|
5
|
-
"description": "1INCH",
|
|
6
|
-
"address": "0x111111111117dC0aa78b770fA6A738034120C302",
|
|
7
|
-
"decimals": 18,
|
|
8
|
-
"type": "ERC20"
|
|
9
|
-
},
|
|
10
|
-
"AAVE": {
|
|
11
|
-
"symbol": "AAVE",
|
|
12
|
-
"name": "Aave Token",
|
|
13
|
-
"description": "Aave Token",
|
|
14
|
-
"address": "0x7Fc66500c84A76Ad7e9c93437bFc5Ac33E2DDaE9",
|
|
15
|
-
"decimals": 18,
|
|
16
|
-
"type": "ERC20"
|
|
17
|
-
},
|
|
18
|
-
"AGIX": {
|
|
19
|
-
"symbol": "AGIX",
|
|
20
|
-
"name": "AGIX",
|
|
21
|
-
"description": "AGIX",
|
|
22
|
-
"address": "0x5B7533812759B45C2B44C19e320ba2cD2681b542",
|
|
23
|
-
"decimals": 8,
|
|
24
|
-
"type": "ERC20"
|
|
25
|
-
},
|
|
26
|
-
"ANT": {
|
|
27
|
-
"symbol": "ANT",
|
|
28
|
-
"name": "Aragon",
|
|
29
|
-
"description": "Aragon",
|
|
30
|
-
"address": "0xa117000000f279D81A1D3cc75430fAA017FA5A2e",
|
|
31
|
-
"decimals": 18,
|
|
32
|
-
"type": "ERC20"
|
|
33
|
-
},
|
|
34
|
-
"APE": {
|
|
35
|
-
"symbol": "APE",
|
|
36
|
-
"name": "ApeCoin",
|
|
37
|
-
"description": "ApeCoin",
|
|
38
|
-
"address": "0x4d224452801ACEd8B2F0aebE155379bb5D594381",
|
|
39
|
-
"decimals": 18,
|
|
40
|
-
"type": "ERC20"
|
|
41
|
-
},
|
|
42
|
-
"ARB": {
|
|
43
|
-
"symbol": "ARB",
|
|
44
|
-
"name": "Arbitrum",
|
|
45
|
-
"description": "Arbitrum",
|
|
46
|
-
"address": "0xB50721BCf8d664c30412Cfbc6cf7a15145234ad1",
|
|
47
|
-
"decimals": 18,
|
|
48
|
-
"type": "ERC20"
|
|
49
|
-
},
|
|
50
|
-
"ARKM": {
|
|
51
|
-
"symbol": "ARKM",
|
|
52
|
-
"name": "Arkham",
|
|
53
|
-
"description": "Arkham",
|
|
54
|
-
"address": "0x6E2a43be0B1d33b726f0CA3b8de60b3482b8b050",
|
|
55
|
-
"decimals": 18,
|
|
56
|
-
"type": "ERC20"
|
|
57
|
-
},
|
|
58
|
-
"BAT": {
|
|
59
|
-
"symbol": "BAT",
|
|
60
|
-
"name": "BAT",
|
|
61
|
-
"description": "BAT",
|
|
62
|
-
"address": "0x0D8775F648430679A709E98d2b0Cb6250d2887EF",
|
|
63
|
-
"decimals": 18,
|
|
64
|
-
"type": "ERC20"
|
|
65
|
-
},
|
|
66
|
-
"BEAMX": {
|
|
67
|
-
"symbol": "BEAMX",
|
|
68
|
-
"name": "Beam",
|
|
69
|
-
"description": "Beam",
|
|
70
|
-
"address": "0x62D0A8458eD7719FDAF978fe5929C6D342B0bFcE",
|
|
71
|
-
"decimals": 18,
|
|
72
|
-
"type": "ERC20"
|
|
73
|
-
},
|
|
74
|
-
"BLUR": {
|
|
75
|
-
"symbol": "BLUR",
|
|
76
|
-
"name": "BLUR",
|
|
77
|
-
"description": "BLUR",
|
|
78
|
-
"address": "0x5283D291DBCF85356A21bA090E6db59121208b44",
|
|
79
|
-
"decimals": 18,
|
|
80
|
-
"type": "ERC20"
|
|
81
|
-
},
|
|
82
|
-
"BLZ": {
|
|
83
|
-
"symbol": "BLZ",
|
|
84
|
-
"name": "Bluzelle",
|
|
85
|
-
"description": "Bluzelle",
|
|
86
|
-
"address": "0x5732046A883704404F284Ce41FfADd5b007FD668",
|
|
87
|
-
"decimals": 18,
|
|
88
|
-
"type": "ERC20"
|
|
89
|
-
},
|
|
90
|
-
"BNT": {
|
|
91
|
-
"symbol": "BNT",
|
|
92
|
-
"name": "Bancor Network",
|
|
93
|
-
"description": "Bancor Network",
|
|
94
|
-
"address": "0x1F573D6Fb3F13d689FF844B4cE37794d79a7FF1C",
|
|
95
|
-
"decimals": 18,
|
|
96
|
-
"type": "ERC20"
|
|
97
|
-
},
|
|
98
|
-
"COMP": {
|
|
99
|
-
"symbol": "COMP",
|
|
100
|
-
"name": "Compound",
|
|
101
|
-
"description": "Compound",
|
|
102
|
-
"address": "0xc00e94Cb662C3520282E6f5717214004A7f26888",
|
|
103
|
-
"decimals": 18,
|
|
104
|
-
"type": "ERC20"
|
|
105
|
-
},
|
|
106
|
-
"CRV": {
|
|
107
|
-
"symbol": "CRV",
|
|
108
|
-
"name": "Curve Dao",
|
|
109
|
-
"description": "Curve Dao",
|
|
110
|
-
"address": "0xD533a949740bb3306d119CC777fa900bA034cd52",
|
|
111
|
-
"decimals": 18,
|
|
112
|
-
"type": "ERC20"
|
|
113
|
-
},
|
|
114
|
-
"CVX": {
|
|
115
|
-
"symbol": "CVX",
|
|
116
|
-
"name": "Convex",
|
|
117
|
-
"description": "Convex",
|
|
118
|
-
"address": "0x4e3FBD56CD56c3e72c1403e103b45Db9da5B9D2B",
|
|
119
|
-
"decimals": 18,
|
|
120
|
-
"type": "ERC20"
|
|
121
|
-
},
|
|
122
|
-
"CYBER": {
|
|
123
|
-
"symbol": "CYBER",
|
|
124
|
-
"name": "Cyber Connect",
|
|
125
|
-
"description": "Cyber Connect",
|
|
126
|
-
"address": "0x14778860E937f509e651192a90589dE711Fb88a9",
|
|
127
|
-
"decimals": 18,
|
|
128
|
-
"type": "ERC20"
|
|
129
|
-
},
|
|
130
|
-
"DAI": {
|
|
131
|
-
"symbol": "DAI",
|
|
132
|
-
"name": "DAI",
|
|
133
|
-
"description": "DAI",
|
|
134
|
-
"address": "0x6B175474E89094C44Da98b954EedeAC495271d0F",
|
|
135
|
-
"decimals": 18,
|
|
136
|
-
"type": "ERC20"
|
|
137
|
-
},
|
|
138
|
-
"DYDX": {
|
|
139
|
-
"symbol": "DYDX",
|
|
140
|
-
"name": "DYDX",
|
|
141
|
-
"description": "DYDX",
|
|
142
|
-
"address": "0x92D6C1e31e14520e676a687F0a93788B716BEff5",
|
|
143
|
-
"decimals": 18,
|
|
144
|
-
"type": "ERC20"
|
|
145
|
-
},
|
|
146
|
-
"ENJ": {
|
|
147
|
-
"symbol": "ENJ",
|
|
148
|
-
"name": "Enjin Coin",
|
|
149
|
-
"description": "Enjin Coin",
|
|
150
|
-
"address": "0xF629cBd94d3791C9250152BD8dfBDF380E2a3B9c",
|
|
151
|
-
"decimals": 18,
|
|
152
|
-
"type": "ERC20"
|
|
153
|
-
},
|
|
154
|
-
"ENS": {
|
|
155
|
-
"symbol": "ENS",
|
|
156
|
-
"name": "Ethereum Name Service",
|
|
157
|
-
"description": "Ethereum Name Service",
|
|
158
|
-
"address": "0xC18360217D8F7Ab5e7c516566761Ea12Ce7F9D72",
|
|
159
|
-
"decimals": 18,
|
|
160
|
-
"type": "ERC20"
|
|
161
|
-
},
|
|
162
|
-
"FET": {
|
|
163
|
-
"symbol": "FET",
|
|
164
|
-
"name": "Fetch.AI",
|
|
165
|
-
"description": "Fetch.AI",
|
|
166
|
-
"address": "0xaea46A60368A7bD060eec7DF8CBa43b7EF41Ad85",
|
|
167
|
-
"decimals": 18,
|
|
168
|
-
"type": "ERC20"
|
|
169
|
-
},
|
|
170
|
-
"FLOKI": {
|
|
171
|
-
"symbol": "FLOKI",
|
|
172
|
-
"name": "FLOKI",
|
|
173
|
-
"description": "FLOKI",
|
|
174
|
-
"address": "0xcf0C122c6b73ff809C693DB761e7BaeBe62b6a2E",
|
|
175
|
-
"decimals": 9,
|
|
176
|
-
"type": "ERC20"
|
|
177
|
-
},
|
|
178
|
-
"FTM": {
|
|
179
|
-
"symbol": "FTM",
|
|
180
|
-
"name": "Fantom",
|
|
181
|
-
"description": "Fantom",
|
|
182
|
-
"address": "0x4E15361FD6b4BB609Fa63C81A2be19d873717870",
|
|
183
|
-
"decimals": 18,
|
|
184
|
-
"type": "ERC20"
|
|
185
|
-
},
|
|
186
|
-
"FXS": {
|
|
187
|
-
"symbol": "FXS",
|
|
188
|
-
"name": "Frax Share",
|
|
189
|
-
"description": "Frax Share",
|
|
190
|
-
"address": "0x3432B6A60D23Ca0dFCa7761B7ab56459D9C964D0",
|
|
191
|
-
"decimals": 18,
|
|
192
|
-
"type": "ERC20"
|
|
193
|
-
},
|
|
194
|
-
"GALA": {
|
|
195
|
-
"symbol": "GALA",
|
|
196
|
-
"name": "Gala",
|
|
197
|
-
"description": "Gala",
|
|
198
|
-
"address": "0xd1d2Eb1B1e90B638588728b4130137D262C87cae",
|
|
199
|
-
"decimals": 8,
|
|
200
|
-
"type": "ERC20"
|
|
201
|
-
},
|
|
202
|
-
"GRT": {
|
|
203
|
-
"symbol": "GRT",
|
|
204
|
-
"name": "The graph",
|
|
205
|
-
"description": "The graph",
|
|
206
|
-
"address": "0xc944E90C64B2c07662A292be6244BDf05Cda44a7",
|
|
207
|
-
"decimals": 18,
|
|
208
|
-
"type": "ERC20"
|
|
209
|
-
},
|
|
210
|
-
"HFT": {
|
|
211
|
-
"symbol": "HFT",
|
|
212
|
-
"name": "HashFlow",
|
|
213
|
-
"description": "HashFlow",
|
|
214
|
-
"address": "0xb3999F658C0391d94A37f7FF328F3feC942BcADC",
|
|
215
|
-
"decimals": 18,
|
|
216
|
-
"type": "ERC20"
|
|
217
|
-
},
|
|
218
|
-
"ID": {
|
|
219
|
-
"symbol": "ID",
|
|
220
|
-
"name": "SpaceID",
|
|
221
|
-
"description": "SpaceID",
|
|
222
|
-
"address": "0x2dfF88A56767223A5529eA5960Da7A3F5f766406",
|
|
223
|
-
"decimals": 18,
|
|
224
|
-
"type": "ERC20"
|
|
225
|
-
},
|
|
226
|
-
"ILV": {
|
|
227
|
-
"symbol": "ILV",
|
|
228
|
-
"name": "Illuvium",
|
|
229
|
-
"description": "Illuvium",
|
|
230
|
-
"address": "0x767FE9EDC9E0dF98E07454847909b5E959D7ca0E",
|
|
231
|
-
"decimals": 18,
|
|
232
|
-
"type": "ERC20"
|
|
233
|
-
},
|
|
234
|
-
"IMX": {
|
|
235
|
-
"symbol": "IMX",
|
|
236
|
-
"name": "ImmutableX",
|
|
237
|
-
"description": "ImmutableX",
|
|
238
|
-
"address": "0xF57e7e7C23978C3cAEC3C3548E3D615c346e79fF",
|
|
239
|
-
"decimals": 18,
|
|
240
|
-
"type": "ERC20"
|
|
241
|
-
},
|
|
242
|
-
"KNC": {
|
|
243
|
-
"symbol": "KNC",
|
|
244
|
-
"name": "KNC",
|
|
245
|
-
"description": "KNC",
|
|
246
|
-
"address": "0xdeFA4e8a7bcBA345F687a2f1456F5Edd9CE97202",
|
|
247
|
-
"decimals": 18,
|
|
248
|
-
"type": "ERC20"
|
|
249
|
-
},
|
|
250
|
-
"KP3R": {
|
|
251
|
-
"symbol": "KP3R",
|
|
252
|
-
"name": "Keeper",
|
|
253
|
-
"description": "Keeper",
|
|
254
|
-
"address": "0x1cEB5cB57C4D4E2b2433641b95Dd330A33185A44",
|
|
255
|
-
"decimals": 18,
|
|
256
|
-
"type": "ERC20"
|
|
257
|
-
},
|
|
258
|
-
"LDO": {
|
|
259
|
-
"symbol": "LDO",
|
|
260
|
-
"name": "Lido Dao",
|
|
261
|
-
"description": "Lido Dao",
|
|
262
|
-
"address": "0x5A98FcBEA516Cf06857215779Fd812CA3beF1B32",
|
|
263
|
-
"decimals": 18,
|
|
264
|
-
"type": "ERC20"
|
|
265
|
-
},
|
|
266
|
-
"LINK": {
|
|
267
|
-
"symbol": "LINK",
|
|
268
|
-
"name": "ChainLink Token",
|
|
269
|
-
"description": "ChainLink Token",
|
|
270
|
-
"address": "0x514910771AF9Ca656af840dff83E8264EcF986CA",
|
|
271
|
-
"decimals": 18,
|
|
272
|
-
"type": "ERC20"
|
|
273
|
-
},
|
|
274
|
-
"LOOM": {
|
|
275
|
-
"symbol": "LOOM",
|
|
276
|
-
"name": "Loom",
|
|
277
|
-
"description": "Loom",
|
|
278
|
-
"address": "0x42476F744292107e34519F9c357927074Ea3F75D",
|
|
279
|
-
"decimals": 18,
|
|
280
|
-
"type": "ERC20"
|
|
281
|
-
},
|
|
282
|
-
"LQTY": {
|
|
283
|
-
"symbol": "LQTY",
|
|
284
|
-
"name": "Liquity",
|
|
285
|
-
"description": "Liquity",
|
|
286
|
-
"address": "0x6DEA81C8171D0bA574754EF6F8b412F2Ed88c54D",
|
|
287
|
-
"decimals": 18,
|
|
288
|
-
"type": "ERC20"
|
|
289
|
-
},
|
|
290
|
-
"LRC": {
|
|
291
|
-
"symbol": "LRC",
|
|
292
|
-
"name": "LoopringCoin v2",
|
|
293
|
-
"description": "LoopringCoin v2",
|
|
294
|
-
"address": "0xBBbbCA6A901c926F240b89EacB641d8Aec7AEafD",
|
|
295
|
-
"decimals": 18,
|
|
296
|
-
"type": "ERC20"
|
|
297
|
-
},
|
|
298
|
-
"MANA": {
|
|
299
|
-
"symbol": "MANA",
|
|
300
|
-
"name": "Decentraland",
|
|
301
|
-
"description": "Decentraland",
|
|
302
|
-
"address": "0x0F5D2fB29fb7d3CFeE444a200298f468908cC942",
|
|
303
|
-
"decimals": 18,
|
|
304
|
-
"type": "ERC20"
|
|
305
|
-
},
|
|
306
|
-
"MASK": {
|
|
307
|
-
"symbol": "MASK",
|
|
308
|
-
"name": "Mask Network",
|
|
309
|
-
"description": "Mask Network",
|
|
310
|
-
"address": "0x69af81e73A73B40adF4f3d4223Cd9b1ECE623074",
|
|
311
|
-
"decimals": 18,
|
|
312
|
-
"type": "ERC20"
|
|
313
|
-
},
|
|
314
|
-
"MATIC": {
|
|
315
|
-
"symbol": "MATIC",
|
|
316
|
-
"name": "POLYGON",
|
|
317
|
-
"description": "POLYGON",
|
|
318
|
-
"address": "0x7D1AfA7B718fb893dB30A3aBc0Cfc608AaCfeBB0",
|
|
319
|
-
"decimals": 18,
|
|
320
|
-
"type": "ERC20"
|
|
321
|
-
},
|
|
322
|
-
"MAV": {
|
|
323
|
-
"symbol": "MAV",
|
|
324
|
-
"name": "Maverick",
|
|
325
|
-
"description": "Maverick",
|
|
326
|
-
"address": "0x7448c7456a97769F6cD04F1E83A4a23cCdC46aBD",
|
|
327
|
-
"decimals": 18,
|
|
328
|
-
"type": "ERC20"
|
|
329
|
-
},
|
|
330
|
-
"MEME": {
|
|
331
|
-
"symbol": "MEME",
|
|
332
|
-
"name": "MEME",
|
|
333
|
-
"description": "MEME",
|
|
334
|
-
"address": "0xb131f4A55907B10d1F0A50d8ab8FA09EC342cd74",
|
|
335
|
-
"decimals": 18,
|
|
336
|
-
"type": "ERC20"
|
|
337
|
-
},
|
|
338
|
-
"MKR": {
|
|
339
|
-
"symbol": "MKR",
|
|
340
|
-
"name": "Maker Dao",
|
|
341
|
-
"description": "Maker Dao",
|
|
342
|
-
"address": "0x9f8F72aA9304c8B593d555F12eF6589cC3A579A2",
|
|
343
|
-
"decimals": 18,
|
|
344
|
-
"type": "ERC20"
|
|
345
|
-
},
|
|
346
|
-
"OCEAN": {
|
|
347
|
-
"symbol": "OCEAN",
|
|
348
|
-
"name": "OCEAN",
|
|
349
|
-
"description": "OCEAN",
|
|
350
|
-
"address": "0x967da4048cD07aB37855c090aAF366e4ce1b9F48",
|
|
351
|
-
"decimals": 18,
|
|
352
|
-
"type": "ERC20"
|
|
353
|
-
},
|
|
354
|
-
"OGN": {
|
|
355
|
-
"symbol": "OGN",
|
|
356
|
-
"name": "Origin",
|
|
357
|
-
"description": "Origin",
|
|
358
|
-
"address": "0x8207c1FfC5B6804F6024322CcF34F29c3541Ae26",
|
|
359
|
-
"decimals": 18,
|
|
360
|
-
"type": "ERC20"
|
|
361
|
-
},
|
|
362
|
-
"PENDLE": {
|
|
363
|
-
"symbol": "PENDLE",
|
|
364
|
-
"name": "Pendle",
|
|
365
|
-
"description": "Pendle",
|
|
366
|
-
"address": "0x808507121B80c02388fAd14726482e061B8da827",
|
|
367
|
-
"decimals": 18,
|
|
368
|
-
"type": "ERC20"
|
|
369
|
-
},
|
|
370
|
-
"PEPE": {
|
|
371
|
-
"symbol": "PEPE",
|
|
372
|
-
"name": "PEPE",
|
|
373
|
-
"description": "PEPE",
|
|
374
|
-
"address": "0x6982508145454Ce325dDbE47a25d4ec3d2311933",
|
|
375
|
-
"decimals": 18,
|
|
376
|
-
"type": "ERC20"
|
|
377
|
-
},
|
|
378
|
-
"PERP": {
|
|
379
|
-
"symbol": "PERP",
|
|
380
|
-
"name": "Perpeptual",
|
|
381
|
-
"description": "Perpeptual",
|
|
382
|
-
"address": "0xbC396689893D065F41bc2C6EcbeE5e0085233447",
|
|
383
|
-
"decimals": 18,
|
|
384
|
-
"type": "ERC20"
|
|
385
|
-
},
|
|
386
|
-
"QNT": {
|
|
387
|
-
"symbol": "QNT",
|
|
388
|
-
"name": "Quant",
|
|
389
|
-
"description": "Quant",
|
|
390
|
-
"address": "0x4a220E6096B25EADb88358cb44068A3248254675",
|
|
391
|
-
"decimals": 18,
|
|
392
|
-
"type": "ERC20"
|
|
393
|
-
},
|
|
394
|
-
"REQ": {
|
|
395
|
-
"symbol": "REQ",
|
|
396
|
-
"name": "Request Network",
|
|
397
|
-
"description": "Request Network",
|
|
398
|
-
"address": "0x8f8221aFbB33998d8584A2B05749bA73c37a938a",
|
|
399
|
-
"decimals": 18,
|
|
400
|
-
"type": "ERC20"
|
|
401
|
-
},
|
|
402
|
-
"RNDR": {
|
|
403
|
-
"symbol": "RNDR",
|
|
404
|
-
"name": "Render",
|
|
405
|
-
"description": "Render",
|
|
406
|
-
"address": "0x6De037ef9aD2725EB40118Bb1702EBb27e4Aeb24",
|
|
407
|
-
"decimals": 18,
|
|
408
|
-
"type": "ERC20"
|
|
409
|
-
},
|
|
410
|
-
"RPL": {
|
|
411
|
-
"symbol": "RPL",
|
|
412
|
-
"name": "RocketPool",
|
|
413
|
-
"description": "RocketPool",
|
|
414
|
-
"address": "0xD33526068D116cE69F19A9ee46F0bd304F21A51f",
|
|
415
|
-
"decimals": 18,
|
|
416
|
-
"type": "ERC20"
|
|
417
|
-
},
|
|
418
|
-
"SAND": {
|
|
419
|
-
"symbol": "SAND",
|
|
420
|
-
"name": "Sandbox",
|
|
421
|
-
"description": "Sandbox",
|
|
422
|
-
"address": "0x3845badAde8e6dFF049820680d1F14bD3903a5d0",
|
|
423
|
-
"decimals": 18,
|
|
424
|
-
"type": "ERC20"
|
|
425
|
-
},
|
|
426
|
-
"SHIB": {
|
|
427
|
-
"symbol": "SHIB",
|
|
428
|
-
"name": "Shiba Inu",
|
|
429
|
-
"description": "Shiba Inu",
|
|
430
|
-
"address": "0x95aD61b0a150d79219dCF64E1E6Cc01f0B64C4cE",
|
|
431
|
-
"decimals": 18,
|
|
432
|
-
"type": "ERC20"
|
|
433
|
-
},
|
|
434
|
-
"SNT": {
|
|
435
|
-
"symbol": "SNT",
|
|
436
|
-
"name": "Status Network",
|
|
437
|
-
"description": "Status Network",
|
|
438
|
-
"address": "0x744d70FDBE2Ba4CF95131626614a1763DF805B9E",
|
|
439
|
-
"decimals": 18,
|
|
440
|
-
"type": "ERC20"
|
|
441
|
-
},
|
|
442
|
-
"SNX": {
|
|
443
|
-
"symbol": "SNX",
|
|
444
|
-
"name": "Synthetix Network",
|
|
445
|
-
"description": "Synthetix Network",
|
|
446
|
-
"address": "0xC011a73ee8576Fb46F5E1c5751cA3B9Fe0af2a6F",
|
|
447
|
-
"decimals": 18,
|
|
448
|
-
"type": "ERC20"
|
|
449
|
-
},
|
|
450
|
-
"SPELL": {
|
|
451
|
-
"symbol": "SPELL",
|
|
452
|
-
"name": "SPELL",
|
|
453
|
-
"description": "SPELL",
|
|
454
|
-
"address": "0x090185f2135308BaD17527004364eBcC2D37e5F6",
|
|
455
|
-
"decimals": 18,
|
|
456
|
-
"type": "ERC20"
|
|
457
|
-
},
|
|
458
|
-
"STG": {
|
|
459
|
-
"symbol": "STG",
|
|
460
|
-
"name": "Stargate",
|
|
461
|
-
"description": "Stargate",
|
|
462
|
-
"address": "0xAf5191B0De278C7286d6C7CC6ab6BB8A73bA2Cd6",
|
|
463
|
-
"decimals": 18,
|
|
464
|
-
"type": "ERC20"
|
|
465
|
-
},
|
|
466
|
-
"SUPER": {
|
|
467
|
-
"symbol": "SUPER",
|
|
468
|
-
"name": "Superfarm",
|
|
469
|
-
"description": "Superfarm",
|
|
470
|
-
"address": "0xe53EC727dbDEB9E2d5456c3be40cFF031AB40A55",
|
|
471
|
-
"decimals": 18,
|
|
472
|
-
"type": "ERC20"
|
|
473
|
-
},
|
|
474
|
-
"SUSHI": {
|
|
475
|
-
"symbol": "SUSHI",
|
|
476
|
-
"name": "Sushi",
|
|
477
|
-
"description": "Sushi",
|
|
478
|
-
"address": "0x6B3595068778DD592e39A122f4f5a5cF09C90fE2",
|
|
479
|
-
"decimals": 18,
|
|
480
|
-
"type": "ERC20"
|
|
481
|
-
},
|
|
482
|
-
"SYN": {
|
|
483
|
-
"symbol": "SYN",
|
|
484
|
-
"name": "Synapse",
|
|
485
|
-
"description": "Synapse",
|
|
486
|
-
"address": "0x0f2D719407FdBeFF09D87557AbB7232601FD9F29",
|
|
487
|
-
"decimals": 18,
|
|
488
|
-
"type": "ERC20"
|
|
489
|
-
},
|
|
490
|
-
"UNI": {
|
|
491
|
-
"symbol": "UNI",
|
|
492
|
-
"name": "Uniswap",
|
|
493
|
-
"description": "Uniswap",
|
|
494
|
-
"address": "0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984",
|
|
495
|
-
"decimals": 18,
|
|
496
|
-
"type": "ERC20"
|
|
497
|
-
},
|
|
498
|
-
"USDC": {
|
|
499
|
-
"symbol": "USDC",
|
|
500
|
-
"name": "USD Coin",
|
|
501
|
-
"description": "USD Coin",
|
|
502
|
-
"address": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
|
|
503
|
-
"decimals": 6,
|
|
504
|
-
"type": "ERC20"
|
|
505
|
-
},
|
|
506
|
-
"USDT": {
|
|
507
|
-
"symbol": "USDT",
|
|
508
|
-
"name": "Tether USD",
|
|
509
|
-
"description": "Tether USD",
|
|
510
|
-
"address": "0xdAC17F958D2ee523a2206206994597C13D831ec7",
|
|
511
|
-
"decimals": 6,
|
|
512
|
-
"type": "ERC20"
|
|
513
|
-
},
|
|
514
|
-
"WBTC": {
|
|
515
|
-
"symbol": "WBTC",
|
|
516
|
-
"name": "Wrapped Bitcoin",
|
|
517
|
-
"description": "Wrapped Bitcoin",
|
|
518
|
-
"address": "0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599",
|
|
519
|
-
"decimals": 8,
|
|
520
|
-
"type": "ERC20"
|
|
521
|
-
},
|
|
522
|
-
"WETH": {
|
|
523
|
-
"symbol": "WETH",
|
|
524
|
-
"name": "Wrapped ETH",
|
|
525
|
-
"description": "Wrapped ETH",
|
|
526
|
-
"address": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
|
|
527
|
-
"decimals": 18,
|
|
528
|
-
"type": "ERC20"
|
|
529
|
-
},
|
|
530
|
-
"WLD": {
|
|
531
|
-
"symbol": "WLD",
|
|
532
|
-
"name": "WorldCoin",
|
|
533
|
-
"description": "WorldCoin",
|
|
534
|
-
"address": "0x163f8C2467924be0ae7B5347228CABF260318753",
|
|
535
|
-
"decimals": 18,
|
|
536
|
-
"type": "ERC20"
|
|
537
|
-
},
|
|
538
|
-
"WOO": {
|
|
539
|
-
"symbol": "WOO",
|
|
540
|
-
"name": "WooTrade Network",
|
|
541
|
-
"description": "WooTrade Network",
|
|
542
|
-
"address": "0x4691937a7508860F876c9c0a2a617E7d9E945D4B",
|
|
543
|
-
"decimals": 18,
|
|
544
|
-
"type": "ERC20"
|
|
545
|
-
},
|
|
546
|
-
"YFI": {
|
|
547
|
-
"symbol": "YFI",
|
|
548
|
-
"name": "Yearn Finance",
|
|
549
|
-
"description": "Yearn Finance",
|
|
550
|
-
"address": "0x0bc529c00C6401aEF6D220BE8C6Ea1667F6Ad93e",
|
|
551
|
-
"decimals": 18,
|
|
552
|
-
"type": "ERC20"
|
|
553
|
-
},
|
|
554
|
-
"ZRX": {
|
|
555
|
-
"symbol": "ZRX",
|
|
556
|
-
"name": "ZRX",
|
|
557
|
-
"description": "ZRX",
|
|
558
|
-
"address": "0xE41d2489571d322189246DaFA5ebDe1F4699F498",
|
|
559
|
-
"decimals": 18,
|
|
560
|
-
"type": "ERC20"
|
|
561
|
-
},
|
|
562
|
-
"stETH": {
|
|
563
|
-
"symbol": "stETH",
|
|
564
|
-
"name": "Lido Staked Ether",
|
|
565
|
-
"description": "Lido Staked Ether",
|
|
566
|
-
"address": "0xae7ab96520DE3A18E5e111B5EaAb095312D7fE84",
|
|
567
|
-
"decimals": 18,
|
|
568
|
-
"type": "ERC20"
|
|
569
|
-
}
|
|
570
|
-
}
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.uniswapOptimizer = void 0;
|
|
7
|
-
const utils_1 = require("../../utils");
|
|
8
|
-
const constants_1 = require("./constants");
|
|
9
|
-
const lodash_1 = __importDefault(require("lodash"));
|
|
10
|
-
// Refactor the optimization of swap rates for better clarity and efficiency
|
|
11
|
-
function uniswapOptimizer(rate) {
|
|
12
|
-
const optimizeSwapRoute = (swaps) => {
|
|
13
|
-
let lastOptimizedSwap = null;
|
|
14
|
-
const optimizedSwaps = swaps.reduce((accumulatedSwaps, currentSwap) => {
|
|
15
|
-
const isUniswapSwap = currentSwap.swapExchanges.length === 1 &&
|
|
16
|
-
isSwapExchangeAUniswapFork(currentSwap.swapExchanges[0].exchange);
|
|
17
|
-
if (!isUniswapSwap) {
|
|
18
|
-
lastOptimizedSwap = null;
|
|
19
|
-
accumulatedSwaps.push(currentSwap);
|
|
20
|
-
return accumulatedSwaps;
|
|
21
|
-
}
|
|
22
|
-
if (canBeMergedWithLastSwap(lastOptimizedSwap, currentSwap)) {
|
|
23
|
-
lastOptimizedSwap = mergeSwaps(lastOptimizedSwap, currentSwap);
|
|
24
|
-
}
|
|
25
|
-
else {
|
|
26
|
-
lastOptimizedSwap = lodash_1.default.cloneDeep(currentSwap);
|
|
27
|
-
accumulatedSwaps.push(lastOptimizedSwap);
|
|
28
|
-
}
|
|
29
|
-
return accumulatedSwaps;
|
|
30
|
-
}, []);
|
|
31
|
-
return optimizedSwaps;
|
|
32
|
-
};
|
|
33
|
-
rate.bestRoute = rate.bestRoute.map(route => ({
|
|
34
|
-
...route,
|
|
35
|
-
swaps: optimizeSwapRoute(route.swaps),
|
|
36
|
-
}));
|
|
37
|
-
return rate;
|
|
38
|
-
}
|
|
39
|
-
exports.uniswapOptimizer = uniswapOptimizer;
|
|
40
|
-
function isSwapExchangeAUniswapFork(exchangeName) {
|
|
41
|
-
return constants_1.AllUniswapForks.some(fork => fork.toLowerCase() === exchangeName.toLowerCase());
|
|
42
|
-
}
|
|
43
|
-
function canBeMergedWithLastSwap(lastSwap, currentSwap) {
|
|
44
|
-
return (!!lastSwap &&
|
|
45
|
-
lodash_1.default.last(lastSwap.swapExchanges[0].data.path).toLowerCase() ===
|
|
46
|
-
currentSwap.swapExchanges[0].data.path[0].toLowerCase());
|
|
47
|
-
}
|
|
48
|
-
function mergeSwaps(lastSwap, currentSwap) {
|
|
49
|
-
lastSwap.swapExchanges[0].data.path.push(currentSwap.swapExchanges[0].data.path[1]);
|
|
50
|
-
lastSwap.swapExchanges[0].exchange = deriveExchangeName(lastSwap, currentSwap);
|
|
51
|
-
lastSwap.swapExchanges[0].data.pools.push(currentSwap.swapExchanges[0].data.pools[0]);
|
|
52
|
-
lastSwap.swapExchanges[0].poolAddresses.push(currentSwap.swapExchanges[0].poolAddresses[0]);
|
|
53
|
-
lastSwap.swapExchanges[0].data.gasUSD = calculateCombinedGasUSD(lastSwap, currentSwap);
|
|
54
|
-
if ((0, utils_1.isETHAddress)(currentSwap.destToken)) {
|
|
55
|
-
lastSwap.swapExchanges[0].data.weth =
|
|
56
|
-
currentSwap.swapExchanges[0].data.weth;
|
|
57
|
-
}
|
|
58
|
-
lastSwap.destToken = currentSwap.destToken;
|
|
59
|
-
lastSwap.destDecimals = currentSwap.destDecimals;
|
|
60
|
-
lastSwap.swapExchanges[0].destAmount =
|
|
61
|
-
currentSwap.swapExchanges[0].destAmount;
|
|
62
|
-
return lastSwap;
|
|
63
|
-
}
|
|
64
|
-
function deriveExchangeName(lastSwap, currentSwap) {
|
|
65
|
-
return lastSwap.swapExchanges[0].exchange ===
|
|
66
|
-
currentSwap.swapExchanges[0].exchange
|
|
67
|
-
? lastSwap.swapExchanges[0].exchange
|
|
68
|
-
: 'UniswapForkOptimized';
|
|
69
|
-
}
|
|
70
|
-
function calculateCombinedGasUSD(lastSwap, currentSwap) {
|
|
71
|
-
const lastGasUSD = parseFloat(lastSwap.swapExchanges[0].data.gasUSD);
|
|
72
|
-
const currentGasUSD = parseFloat(currentSwap.swapExchanges[0].data.gasUSD);
|
|
73
|
-
return (lastGasUSD + currentGasUSD).toFixed(6);
|
|
74
|
-
}
|
|
75
|
-
//# sourceMappingURL=uniswap-v2-optimizer.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"uniswap-v2-optimizer.js","sourceRoot":"","sources":["../../../src/dex/uniswap-v2/uniswap-v2-optimizer.ts"],"names":[],"mappings":";;;;;;AACA,uCAA2C;AAC3C,2CAA8C;AAC9C,oDAAuB;AAEvB,4EAA4E;AAC5E,SAAgB,gBAAgB,CAAC,IAAqB;IACpD,MAAM,iBAAiB,GAAG,CAAC,KAAoB,EAAiB,EAAE;QAChE,IAAI,iBAAiB,GAAuB,IAAI,CAAC;QACjD,MAAM,cAAc,GAAG,KAAK,CAAC,MAAM,CACjC,CAAC,gBAAgB,EAAE,WAAW,EAAE,EAAE;YAChC,MAAM,aAAa,GACjB,WAAW,CAAC,aAAa,CAAC,MAAM,KAAK,CAAC;gBACtC,0BAA0B,CAAC,WAAW,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC;YAEpE,IAAI,CAAC,aAAa,EAAE;gBAClB,iBAAiB,GAAG,IAAI,CAAC;gBACzB,gBAAgB,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;gBACnC,OAAO,gBAAgB,CAAC;aACzB;YAED,IAAI,uBAAuB,CAAC,iBAAiB,EAAE,WAAW,CAAC,EAAE;gBAC3D,iBAAiB,GAAG,UAAU,CAAC,iBAAkB,EAAE,WAAW,CAAC,CAAC;aACjE;iBAAM;gBACL,iBAAiB,GAAG,gBAAC,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC;gBAC7C,gBAAgB,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC;aAC1C;YAED,OAAO,gBAAgB,CAAC;QAC1B,CAAC,EACD,EAAE,CACH,CAAC;QAEF,OAAO,cAAc,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Aa,GAAG,UAAU,CAAC,WAAW,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IAC3E,OAAO,CAAC,UAAU,GAAG,aAAa,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;AACjD,CAAC"}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { OptimalRate } from '@paraswap/core';
|
|
2
|
-
import { DexExchangeParam } from '../types';
|
|
3
|
-
import { DepositWithdrawReturn } from '../dex/weth/types';
|
|
4
|
-
export interface IExecutorBytecodeBuilder {
|
|
5
|
-
buildByteCode(priceRoute: OptimalRate, exchangeDataList: DexExchangeParam[], maybeWethCallData?: DepositWithdrawReturn): string;
|
|
6
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"IExecutorBytecodeBuilder.js","sourceRoot":"","sources":["../../src/executor/IExecutorBytecodeBuilder.ts"],"names":[],"mappings":""}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { OptimalRate } from '../../types';
|
|
2
|
-
export declare type ContractsAugustusV6 = {
|
|
3
|
-
AugustusV6: string;
|
|
4
|
-
Executor01: string;
|
|
5
|
-
Executor02: string;
|
|
6
|
-
Executor03: string;
|
|
7
|
-
};
|
|
8
|
-
export declare function runE2ETest(priceRoute: OptimalRate, senderAddress: string, forkId: string, lastTransactionId: string, contracts: ContractsAugustusV6): Promise<void>;
|