@paraswap/dex-lib 4.7.28 → 4.8.1-ekubo-v3.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/abi/clear/ClearFactory.json +71 -0
- package/build/abi/clear/ClearSwap.json +334 -0
- package/build/abi/clear/ClearVault.json +28 -0
- package/build/dex/algebra/config.js +0 -30
- package/build/dex/algebra/config.js.map +1 -1
- package/build/dex/algebra-integral/config.js +0 -7
- package/build/dex/algebra-integral/config.js.map +1 -1
- package/build/dex/angle-staked-stable/config.js +0 -32
- package/build/dex/angle-staked-stable/config.js.map +1 -1
- package/build/dex/angle-transmuter/config.js +0 -20
- package/build/dex/angle-transmuter/config.js.map +1 -1
- package/build/dex/clear/clear-factory.d.ts +40 -0
- package/build/dex/clear/clear-factory.js +152 -0
- package/build/dex/clear/clear-factory.js.map +1 -0
- package/build/dex/clear/clear.d.ts +56 -0
- package/build/dex/clear/clear.js +325 -0
- package/build/dex/clear/clear.js.map +1 -0
- package/build/dex/clear/config.d.ts +3 -0
- package/build/dex/clear/config.js +17 -0
- package/build/dex/clear/config.js.map +1 -0
- package/build/dex/clear/types.d.ts +30 -0
- package/build/dex/clear/types.js +3 -0
- package/build/dex/clear/types.js.map +1 -0
- package/build/dex/curve-v1/constants.js +2 -4
- package/build/dex/curve-v1/constants.js.map +1 -1
- package/build/dex/dodo-v1/config.js +0 -10
- package/build/dex/dodo-v1/config.js.map +1 -1
- package/build/dex/dodo-v2.js +0 -3
- package/build/dex/dodo-v2.js.map +1 -1
- package/build/dex/ekubo-v3/ekubo-v3-pool-manager.js +10 -11
- package/build/dex/ekubo-v3/ekubo-v3-pool-manager.js.map +1 -1
- package/build/dex/ekubo-v3/ekubo-v3.js +1 -1
- package/build/dex/ekubo-v3/ekubo-v3.js.map +1 -1
- package/build/dex/ekubo-v3/types.d.ts +0 -8
- package/build/dex/erc4626/config.js +0 -22
- package/build/dex/erc4626/config.js.map +1 -1
- package/build/dex/index.js +2 -28
- package/build/dex/index.js.map +1 -1
- package/build/dex/nerve/config.js +0 -435
- package/build/dex/nerve/config.js.map +1 -1
- package/build/dex/oswap/oswap-pool.js.map +1 -1
- package/build/dex/stable-pool/stable-pool.js +1 -1
- package/build/dex/stable-pool/stable-pool.js.map +1 -1
- package/build/dex/trader-joe-v2.1/config.d.ts +0 -3
- package/build/dex/trader-joe-v2.1/config.js +1 -8
- package/build/dex/trader-joe-v2.1/config.js.map +1 -1
- package/build/dex/uniswap-v2/config.js +0 -8
- package/build/dex/uniswap-v2/config.js.map +1 -1
- package/build/dex/uniswap-v2/uniswap-v2.js +0 -10
- package/build/dex/uniswap-v2/uniswap-v2.js.map +1 -1
- package/package.json +3 -3
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"inputs": [],
|
|
4
|
+
"name": "vaultsLength",
|
|
5
|
+
"outputs": [
|
|
6
|
+
{
|
|
7
|
+
"internalType": "uint256",
|
|
8
|
+
"name": "",
|
|
9
|
+
"type": "uint256"
|
|
10
|
+
}
|
|
11
|
+
],
|
|
12
|
+
"stateMutability": "view",
|
|
13
|
+
"type": "function"
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"inputs": [
|
|
17
|
+
{
|
|
18
|
+
"internalType": "uint256[]",
|
|
19
|
+
"name": "_indexes",
|
|
20
|
+
"type": "uint256[]"
|
|
21
|
+
}
|
|
22
|
+
],
|
|
23
|
+
"name": "getBatchVaultAddresses",
|
|
24
|
+
"outputs": [
|
|
25
|
+
{
|
|
26
|
+
"internalType": "address[]",
|
|
27
|
+
"name": "",
|
|
28
|
+
"type": "address[]"
|
|
29
|
+
}
|
|
30
|
+
],
|
|
31
|
+
"stateMutability": "view",
|
|
32
|
+
"type": "function"
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"anonymous": false,
|
|
36
|
+
"inputs": [
|
|
37
|
+
{
|
|
38
|
+
"indexed": true,
|
|
39
|
+
"internalType": "uint256",
|
|
40
|
+
"name": "index",
|
|
41
|
+
"type": "uint256"
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"indexed": true,
|
|
45
|
+
"internalType": "address",
|
|
46
|
+
"name": "implementation",
|
|
47
|
+
"type": "address"
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
"indexed": false,
|
|
51
|
+
"internalType": "address",
|
|
52
|
+
"name": "vault",
|
|
53
|
+
"type": "address"
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
"indexed": false,
|
|
57
|
+
"internalType": "string",
|
|
58
|
+
"name": "name",
|
|
59
|
+
"type": "string"
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
"indexed": false,
|
|
63
|
+
"internalType": "string",
|
|
64
|
+
"name": "symbol",
|
|
65
|
+
"type": "string"
|
|
66
|
+
}
|
|
67
|
+
],
|
|
68
|
+
"name": "NewClearVault",
|
|
69
|
+
"type": "event"
|
|
70
|
+
}
|
|
71
|
+
]
|
|
@@ -0,0 +1,334 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"inputs": [],
|
|
4
|
+
"stateMutability": "nonpayable",
|
|
5
|
+
"type": "constructor"
|
|
6
|
+
},
|
|
7
|
+
{
|
|
8
|
+
"inputs": [
|
|
9
|
+
{
|
|
10
|
+
"internalType": "address",
|
|
11
|
+
"name": "authority",
|
|
12
|
+
"type": "address"
|
|
13
|
+
}
|
|
14
|
+
],
|
|
15
|
+
"name": "AccessManagedInvalidAuthority",
|
|
16
|
+
"type": "error"
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
"inputs": [
|
|
20
|
+
{
|
|
21
|
+
"internalType": "address",
|
|
22
|
+
"name": "caller",
|
|
23
|
+
"type": "address"
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"internalType": "uint32",
|
|
27
|
+
"name": "delay",
|
|
28
|
+
"type": "uint32"
|
|
29
|
+
}
|
|
30
|
+
],
|
|
31
|
+
"name": "AccessManagedRequiredDelay",
|
|
32
|
+
"type": "error"
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"inputs": [
|
|
36
|
+
{
|
|
37
|
+
"internalType": "address",
|
|
38
|
+
"name": "caller",
|
|
39
|
+
"type": "address"
|
|
40
|
+
}
|
|
41
|
+
],
|
|
42
|
+
"name": "AccessManagedUnauthorized",
|
|
43
|
+
"type": "error"
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"inputs": [],
|
|
47
|
+
"name": "AssetIsNotDepeg",
|
|
48
|
+
"type": "error"
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
"inputs": [],
|
|
52
|
+
"name": "EnforcedPause",
|
|
53
|
+
"type": "error"
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
"inputs": [],
|
|
57
|
+
"name": "ExpectedPause",
|
|
58
|
+
"type": "error"
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
"inputs": [],
|
|
62
|
+
"name": "InsufficientAmountOut",
|
|
63
|
+
"type": "error"
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
"inputs": [],
|
|
67
|
+
"name": "InvalidInitialization",
|
|
68
|
+
"type": "error"
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
"inputs": [],
|
|
72
|
+
"name": "NotInitializing",
|
|
73
|
+
"type": "error"
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
"inputs": [],
|
|
77
|
+
"name": "RedemptionNotOpened",
|
|
78
|
+
"type": "error"
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
"inputs": [
|
|
82
|
+
{
|
|
83
|
+
"internalType": "address",
|
|
84
|
+
"name": "token",
|
|
85
|
+
"type": "address"
|
|
86
|
+
}
|
|
87
|
+
],
|
|
88
|
+
"name": "SafeERC20FailedOperation",
|
|
89
|
+
"type": "error"
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
"anonymous": false,
|
|
93
|
+
"inputs": [
|
|
94
|
+
{
|
|
95
|
+
"indexed": false,
|
|
96
|
+
"internalType": "address",
|
|
97
|
+
"name": "authority",
|
|
98
|
+
"type": "address"
|
|
99
|
+
}
|
|
100
|
+
],
|
|
101
|
+
"name": "AuthorityUpdated",
|
|
102
|
+
"type": "event"
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
"anonymous": false,
|
|
106
|
+
"inputs": [
|
|
107
|
+
{
|
|
108
|
+
"indexed": false,
|
|
109
|
+
"internalType": "uint64",
|
|
110
|
+
"name": "version",
|
|
111
|
+
"type": "uint64"
|
|
112
|
+
}
|
|
113
|
+
],
|
|
114
|
+
"name": "Initialized",
|
|
115
|
+
"type": "event"
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
"anonymous": false,
|
|
119
|
+
"inputs": [
|
|
120
|
+
{
|
|
121
|
+
"indexed": false,
|
|
122
|
+
"internalType": "address",
|
|
123
|
+
"name": "account",
|
|
124
|
+
"type": "address"
|
|
125
|
+
}
|
|
126
|
+
],
|
|
127
|
+
"name": "Paused",
|
|
128
|
+
"type": "event"
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
"anonymous": false,
|
|
132
|
+
"inputs": [
|
|
133
|
+
{
|
|
134
|
+
"indexed": false,
|
|
135
|
+
"internalType": "address",
|
|
136
|
+
"name": "account",
|
|
137
|
+
"type": "address"
|
|
138
|
+
}
|
|
139
|
+
],
|
|
140
|
+
"name": "Unpaused",
|
|
141
|
+
"type": "event"
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
"inputs": [],
|
|
145
|
+
"name": "authority",
|
|
146
|
+
"outputs": [
|
|
147
|
+
{
|
|
148
|
+
"internalType": "address",
|
|
149
|
+
"name": "",
|
|
150
|
+
"type": "address"
|
|
151
|
+
}
|
|
152
|
+
],
|
|
153
|
+
"stateMutability": "view",
|
|
154
|
+
"type": "function"
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
"inputs": [
|
|
158
|
+
{
|
|
159
|
+
"internalType": "address",
|
|
160
|
+
"name": "_initialAuthority",
|
|
161
|
+
"type": "address"
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
"internalType": "address",
|
|
165
|
+
"name": "_oracle",
|
|
166
|
+
"type": "address"
|
|
167
|
+
}
|
|
168
|
+
],
|
|
169
|
+
"name": "initialize",
|
|
170
|
+
"outputs": [],
|
|
171
|
+
"stateMutability": "nonpayable",
|
|
172
|
+
"type": "function"
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
"inputs": [],
|
|
176
|
+
"name": "isConsumingScheduledOp",
|
|
177
|
+
"outputs": [
|
|
178
|
+
{
|
|
179
|
+
"internalType": "bytes4",
|
|
180
|
+
"name": "",
|
|
181
|
+
"type": "bytes4"
|
|
182
|
+
}
|
|
183
|
+
],
|
|
184
|
+
"stateMutability": "view",
|
|
185
|
+
"type": "function"
|
|
186
|
+
},
|
|
187
|
+
{
|
|
188
|
+
"inputs": [],
|
|
189
|
+
"name": "paused",
|
|
190
|
+
"outputs": [
|
|
191
|
+
{
|
|
192
|
+
"internalType": "bool",
|
|
193
|
+
"name": "",
|
|
194
|
+
"type": "bool"
|
|
195
|
+
}
|
|
196
|
+
],
|
|
197
|
+
"stateMutability": "view",
|
|
198
|
+
"type": "function"
|
|
199
|
+
},
|
|
200
|
+
{
|
|
201
|
+
"inputs": [
|
|
202
|
+
{
|
|
203
|
+
"internalType": "address",
|
|
204
|
+
"name": "_vault",
|
|
205
|
+
"type": "address"
|
|
206
|
+
},
|
|
207
|
+
{
|
|
208
|
+
"internalType": "address",
|
|
209
|
+
"name": "_from",
|
|
210
|
+
"type": "address"
|
|
211
|
+
},
|
|
212
|
+
{
|
|
213
|
+
"internalType": "address",
|
|
214
|
+
"name": "_to",
|
|
215
|
+
"type": "address"
|
|
216
|
+
},
|
|
217
|
+
{
|
|
218
|
+
"internalType": "uint256",
|
|
219
|
+
"name": "_amountIn",
|
|
220
|
+
"type": "uint256"
|
|
221
|
+
}
|
|
222
|
+
],
|
|
223
|
+
"name": "previewSwap",
|
|
224
|
+
"outputs": [
|
|
225
|
+
{
|
|
226
|
+
"internalType": "uint256",
|
|
227
|
+
"name": "amountOut",
|
|
228
|
+
"type": "uint256"
|
|
229
|
+
},
|
|
230
|
+
{
|
|
231
|
+
"internalType": "uint256",
|
|
232
|
+
"name": "ious",
|
|
233
|
+
"type": "uint256"
|
|
234
|
+
}
|
|
235
|
+
],
|
|
236
|
+
"stateMutability": "view",
|
|
237
|
+
"type": "function"
|
|
238
|
+
},
|
|
239
|
+
{
|
|
240
|
+
"inputs": [
|
|
241
|
+
{
|
|
242
|
+
"internalType": "address",
|
|
243
|
+
"name": "_receiver",
|
|
244
|
+
"type": "address"
|
|
245
|
+
},
|
|
246
|
+
{
|
|
247
|
+
"internalType": "address",
|
|
248
|
+
"name": "_vault",
|
|
249
|
+
"type": "address"
|
|
250
|
+
},
|
|
251
|
+
{
|
|
252
|
+
"internalType": "address",
|
|
253
|
+
"name": "_token",
|
|
254
|
+
"type": "address"
|
|
255
|
+
},
|
|
256
|
+
{
|
|
257
|
+
"internalType": "uint256",
|
|
258
|
+
"name": "_amount",
|
|
259
|
+
"type": "uint256"
|
|
260
|
+
}
|
|
261
|
+
],
|
|
262
|
+
"name": "redeemIOU",
|
|
263
|
+
"outputs": [],
|
|
264
|
+
"stateMutability": "nonpayable",
|
|
265
|
+
"type": "function"
|
|
266
|
+
},
|
|
267
|
+
{
|
|
268
|
+
"inputs": [
|
|
269
|
+
{
|
|
270
|
+
"internalType": "address",
|
|
271
|
+
"name": "newAuthority",
|
|
272
|
+
"type": "address"
|
|
273
|
+
}
|
|
274
|
+
],
|
|
275
|
+
"name": "setAuthority",
|
|
276
|
+
"outputs": [],
|
|
277
|
+
"stateMutability": "nonpayable",
|
|
278
|
+
"type": "function"
|
|
279
|
+
},
|
|
280
|
+
{
|
|
281
|
+
"inputs": [
|
|
282
|
+
{
|
|
283
|
+
"internalType": "address",
|
|
284
|
+
"name": "_receiver",
|
|
285
|
+
"type": "address"
|
|
286
|
+
},
|
|
287
|
+
{
|
|
288
|
+
"internalType": "address",
|
|
289
|
+
"name": "_vault",
|
|
290
|
+
"type": "address"
|
|
291
|
+
},
|
|
292
|
+
{
|
|
293
|
+
"internalType": "address",
|
|
294
|
+
"name": "_from",
|
|
295
|
+
"type": "address"
|
|
296
|
+
},
|
|
297
|
+
{
|
|
298
|
+
"internalType": "address",
|
|
299
|
+
"name": "_to",
|
|
300
|
+
"type": "address"
|
|
301
|
+
},
|
|
302
|
+
{
|
|
303
|
+
"internalType": "uint256",
|
|
304
|
+
"name": "_amountIn",
|
|
305
|
+
"type": "uint256"
|
|
306
|
+
},
|
|
307
|
+
{
|
|
308
|
+
"internalType": "uint256",
|
|
309
|
+
"name": "_minAmountOut",
|
|
310
|
+
"type": "uint256"
|
|
311
|
+
},
|
|
312
|
+
{
|
|
313
|
+
"internalType": "bool",
|
|
314
|
+
"name": "_receiveIOU",
|
|
315
|
+
"type": "bool"
|
|
316
|
+
}
|
|
317
|
+
],
|
|
318
|
+
"name": "swap",
|
|
319
|
+
"outputs": [
|
|
320
|
+
{
|
|
321
|
+
"internalType": "uint256",
|
|
322
|
+
"name": "amountOut",
|
|
323
|
+
"type": "uint256"
|
|
324
|
+
},
|
|
325
|
+
{
|
|
326
|
+
"internalType": "uint256",
|
|
327
|
+
"name": "ious",
|
|
328
|
+
"type": "uint256"
|
|
329
|
+
}
|
|
330
|
+
],
|
|
331
|
+
"stateMutability": "nonpayable",
|
|
332
|
+
"type": "function"
|
|
333
|
+
}
|
|
334
|
+
]
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"inputs": [],
|
|
4
|
+
"name": "tokens",
|
|
5
|
+
"outputs": [
|
|
6
|
+
{
|
|
7
|
+
"internalType": "address[]",
|
|
8
|
+
"name": "assets",
|
|
9
|
+
"type": "address[]"
|
|
10
|
+
}
|
|
11
|
+
],
|
|
12
|
+
"stateMutability": "view",
|
|
13
|
+
"type": "function"
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"inputs": [],
|
|
17
|
+
"name": "decimals",
|
|
18
|
+
"outputs": [
|
|
19
|
+
{
|
|
20
|
+
"internalType": "uint8",
|
|
21
|
+
"name": "",
|
|
22
|
+
"type": "uint8"
|
|
23
|
+
}
|
|
24
|
+
],
|
|
25
|
+
"stateMutability": "view",
|
|
26
|
+
"type": "function"
|
|
27
|
+
}
|
|
28
|
+
]
|
|
@@ -18,36 +18,6 @@ exports.AlgebraConfig = {
|
|
|
18
18
|
version: 'v1.1',
|
|
19
19
|
},
|
|
20
20
|
},
|
|
21
|
-
ZyberSwapV3: {
|
|
22
|
-
[constants_1.Network.ARBITRUM]: {
|
|
23
|
-
factory: '0x9C2ABD632771b433E5E7507BcaA41cA3b25D8544',
|
|
24
|
-
router: '0xFa58b8024B49836772180f2Df902f231ba712F72',
|
|
25
|
-
quoter: '0xAeD211346Fa2E6A5063b4f273BCf7DDbD0368d62',
|
|
26
|
-
initHash: '0x6ec6c9c8091d160c0aa74b2b14ba9c1717e95093bd3ac085cee99a49aab294a4',
|
|
27
|
-
chunksCount: 10,
|
|
28
|
-
initRetryFrequency: 10,
|
|
29
|
-
algebraStateMulticall: '0xcd7C50ba57136b6B461168D1f634E2CffA4c298D',
|
|
30
|
-
subgraphURL: '7ZP9MeeuXno2y9pWR5LzA96UtYuZYWTA4WYZDZR7ghbN',
|
|
31
|
-
uniswapMulticall: '0x1F98415757620B543A52E61c46B32eB19261F984',
|
|
32
|
-
deployer: '0x24e85f5f94c6017d2d87b434394e87df4e4d56e3',
|
|
33
|
-
version: 'v1.1',
|
|
34
|
-
},
|
|
35
|
-
[constants_1.Network.OPTIMISM]: {
|
|
36
|
-
factory: '0x0C8f7b0cb986b31c67D994fb5c224592A03A4AfD',
|
|
37
|
-
router: '0xEDB4E3E3bB11255fF14C2762C6A6A28F1D3A36f2',
|
|
38
|
-
quoter: '0xf4211E7709D2294Cd10799E41623006dFB0D66aF',
|
|
39
|
-
initHash: '0xbce37a54eab2fcd71913a0d40723e04238970e7fc1159bfd58ad5b79531697e7',
|
|
40
|
-
chunksCount: 10,
|
|
41
|
-
initRetryFrequency: 10,
|
|
42
|
-
algebraStateMulticall: '0x30F6B9b6485ff0B67E881f5ac80D3F1c70A4B23d',
|
|
43
|
-
subgraphURL: '3CA9ffebLkS3N2otXaSj8XaDDdspty75upBjKTUS79qY',
|
|
44
|
-
uniswapMulticall: '0x1F98415757620B543A52E61c46B32eB19261F984',
|
|
45
|
-
deployer: '0xc0d4323426c709e8d04b5b130e7f059523464a91',
|
|
46
|
-
// optimism fork uses v1.9-bidirectional-fee (with TickSpacing event and simple `fee` in globalState),
|
|
47
|
-
// not sure why v1.1 is used here
|
|
48
|
-
version: 'v1.1',
|
|
49
|
-
},
|
|
50
|
-
},
|
|
51
21
|
CamelotV3: {
|
|
52
22
|
[constants_1.Network.ARBITRUM]: {
|
|
53
23
|
factory: '0x1a3c9B1d2F0529D97f2afC5136Cc23e58f1FD35B',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../../src/dex/algebra/config.ts"],"names":[],"mappings":";;;AAEA,+CAAoD;AAEvC,QAAA,aAAa,GAA4B;IACpD,WAAW,EAAE;QACX,CAAC,mBAAO,CAAC,OAAO,CAAC,EAAE;YACjB,OAAO,EAAE,4CAA4C;YACrD,MAAM,EAAE,4CAA4C;YACpD,MAAM,EAAE,4CAA4C;YACpD,QAAQ,EACN,oEAAoE;YACtE,WAAW,EAAE,EAAE;YACf,kBAAkB,EAAE,EAAE;YACtB,qBAAqB,EAAE,4CAA4C;YACnE,WAAW,EAAE,8CAA8C;YAC3D,gBAAgB,EAAE,4CAA4C;YAC9D,QAAQ,EAAE,4CAA4C;YACtD,OAAO,EAAE,MAAM;SAChB;KACF;IACD,
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../../src/dex/algebra/config.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../constants");
|
|
5
5
|
exports.AlgebraIntegralConfig = {
|
|
6
6
|
QuickSwapV4: {
|
|
7
|
-
[constants_1.Network.POLYGON]: {
|
|
8
|
-
factory: '0x96117a894c2c99aafeeacb972c3310e6ac83e810',
|
|
9
|
-
subgraphURL: 'B8VaWM5T8miDW4TKdGRAkZXvLekpptQykxNV8vVP8fhg',
|
|
10
|
-
quoter: '0xae65e71bcd7c84c8bc53532f6f784ed15a68f8b7',
|
|
11
|
-
router: '0xee2a7a531bcf524392dc3db67bb400bae3833991',
|
|
12
|
-
chunksCount: 10,
|
|
13
|
-
},
|
|
14
7
|
[constants_1.Network.BASE]: {
|
|
15
8
|
factory: '0xC5396866754799B9720125B104AE01d935Ab9C7b',
|
|
16
9
|
subgraphURL: 'U65NKb6BsDPGqugPAda58ebMLa1RqeMFT76fndB77oe',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../../src/dex/algebra-integral/config.ts"],"names":[],"mappings":";;;AAEA,+CAA0C;AAE7B,QAAA,qBAAqB,GAA4B;IAC5D,WAAW,EAAE;QACX,CAAC,mBAAO,CAAC,
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../../src/dex/algebra-integral/config.ts"],"names":[],"mappings":";;;AAEA,+CAA0C;AAE7B,QAAA,qBAAqB,GAA4B;IAC5D,WAAW,EAAE;QACX,CAAC,mBAAO,CAAC,IAAI,CAAC,EAAE;YACd,OAAO,EAAE,4CAA4C;YACrD,WAAW,EAAE,6CAA6C;YAC1D,MAAM,EAAE,4CAA4C;YACpD,MAAM,EAAE,4CAA4C;YACpD,WAAW,EAAE,EAAE;SAChB;KACF;IACD,WAAW,EAAE;QACX,CAAC,mBAAO,CAAC,SAAS,CAAC,EAAE;YACnB,OAAO,EAAE,4CAA4C;YACrD,WAAW,EACT,oHAAoH;YACtH,MAAM,EAAE,4CAA4C;YACpD,MAAM,EAAE,4CAA4C;YACpD,WAAW,EAAE,EAAE;SAChB;KACF;CACF,CAAC"}
|
|
@@ -5,49 +5,17 @@ const constants_1 = require("../../constants");
|
|
|
5
5
|
exports.AngleStakedStableConfig = {
|
|
6
6
|
// USDA <-> stUSD
|
|
7
7
|
AngleStakedStableUSD: {
|
|
8
|
-
[constants_1.Network.ARBITRUM]: {
|
|
9
|
-
agToken: '0x0000206329b97db379d5e1bf586bbdb969c63274',
|
|
10
|
-
stakeToken: '0x0022228a2cc5e7ef0274a7baa600d44da5ab5776',
|
|
11
|
-
},
|
|
12
8
|
[constants_1.Network.MAINNET]: {
|
|
13
9
|
agToken: '0x0000206329b97db379d5e1bf586bbdb969c63274',
|
|
14
10
|
stakeToken: '0x0022228a2cc5e7ef0274a7baa600d44da5ab5776',
|
|
15
11
|
},
|
|
16
|
-
[constants_1.Network.OPTIMISM]: {
|
|
17
|
-
agToken: '0x0000206329b97db379d5e1bf586bbdb969c63274',
|
|
18
|
-
stakeToken: '0x0022228a2cc5e7ef0274a7baa600d44da5ab5776',
|
|
19
|
-
},
|
|
20
|
-
[constants_1.Network.POLYGON]: {
|
|
21
|
-
agToken: '0x0000206329b97db379d5e1bf586bbdb969c63274',
|
|
22
|
-
stakeToken: '0x0022228a2cc5e7ef0274a7baa600d44da5ab5776',
|
|
23
|
-
},
|
|
24
|
-
[constants_1.Network.BASE]: {
|
|
25
|
-
agToken: '0x0000206329b97db379d5e1bf586bbdb969c63274',
|
|
26
|
-
stakeToken: '0x0022228a2cc5e7ef0274a7baa600d44da5ab5776',
|
|
27
|
-
},
|
|
28
|
-
[constants_1.Network.BSC]: {
|
|
29
|
-
agToken: '0x0000206329b97db379d5e1bf586bbdb969c63274',
|
|
30
|
-
stakeToken: '0x0022228a2cc5e7ef0274a7baa600d44da5ab5776',
|
|
31
|
-
},
|
|
32
12
|
},
|
|
33
13
|
// EURA <-> stEUR
|
|
34
14
|
AngleStakedStableEUR: {
|
|
35
|
-
[constants_1.Network.ARBITRUM]: {
|
|
36
|
-
agToken: '0xfa5ed56a203466cbbc2430a43c66b9d8723528e7',
|
|
37
|
-
stakeToken: '0x004626a008b1acdc4c74ab51644093b155e59a23',
|
|
38
|
-
},
|
|
39
15
|
[constants_1.Network.MAINNET]: {
|
|
40
16
|
agToken: '0x1a7e4e63778b4f12a199c062f3efdd288afcbce8',
|
|
41
17
|
stakeToken: '0x004626a008b1acdc4c74ab51644093b155e59a23',
|
|
42
18
|
},
|
|
43
|
-
[constants_1.Network.OPTIMISM]: {
|
|
44
|
-
agToken: '0x9485aca5bbbe1667ad97c7fe7c4531a624c8b1ed',
|
|
45
|
-
stakeToken: '0x004626a008b1acdc4c74ab51644093b155e59a23',
|
|
46
|
-
},
|
|
47
|
-
[constants_1.Network.POLYGON]: {
|
|
48
|
-
agToken: '0xe0b52e49357fd4daf2c15e02058dce6bc0057db4',
|
|
49
|
-
stakeToken: '0x004626a008b1acdc4c74ab51644093b155e59a23',
|
|
50
|
-
},
|
|
51
19
|
},
|
|
52
20
|
};
|
|
53
21
|
exports.Adapters = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../../src/dex/angle-staked-stable/config.ts"],"names":[],"mappings":";;;AAEA,+CAAoD;AAEvC,QAAA,uBAAuB,GAA4B;IAC9D,iBAAiB;IACjB,oBAAoB,EAAE;QACpB,CAAC,mBAAO,CAAC,
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../../src/dex/angle-staked-stable/config.ts"],"names":[],"mappings":";;;AAEA,+CAAoD;AAEvC,QAAA,uBAAuB,GAA4B;IAC9D,iBAAiB;IACjB,oBAAoB,EAAE;QACpB,CAAC,mBAAO,CAAC,OAAO,CAAC,EAAE;YACjB,OAAO,EAAE,4CAA4C;YACrD,UAAU,EAAE,4CAA4C;SACzD;KACF;IACD,iBAAiB;IACjB,oBAAoB,EAAE;QACpB,CAAC,mBAAO,CAAC,OAAO,CAAC,EAAE;YACjB,OAAO,EAAE,4CAA4C;YACrD,UAAU,EAAE,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kBAAkB;gBACxB,KAAK,EAAE,EAAE;aACV;SACF;QACD,CAAC,oBAAQ,CAAC,GAAG,CAAC,EAAE;YACd;gBACE,IAAI,EAAE,mBAAmB;gBACzB,KAAK,EAAE,CAAC;aACT;SACF;KACF;IACD,CAAC,mBAAO,CAAC,GAAG,CAAC,EAAE;QACb,CAAC,oBAAQ,CAAC,IAAI,CAAC,EAAE;YACf;gBACE,IAAI,EAAE,cAAc;gBACpB,KAAK,EAAE,EAAE;aACV;SACF;QACD,CAAC,oBAAQ,CAAC,GAAG,CAAC,EAAE;YACd;gBACE,IAAI,EAAE,eAAe;gBACrB,KAAK,EAAE,CAAC;aACT;SACF;KACF;CACF,CAAC"}
|
|
@@ -22,26 +22,6 @@ exports.AngleTransmuterConfig = {
|
|
|
22
22
|
pyth: '0x4305FB66699C3B2702D4d05CF36551390A4c69C6',
|
|
23
23
|
},
|
|
24
24
|
},
|
|
25
|
-
[constants_1.Network.ARBITRUM]: {
|
|
26
|
-
USD: {
|
|
27
|
-
stablecoin: {
|
|
28
|
-
address: '0x0000206329b97DB379d5E1Bf586BbDB969C63274',
|
|
29
|
-
decimals: 18,
|
|
30
|
-
},
|
|
31
|
-
transmuter: '0xD253b62108d1831aEd298Fc2434A5A8e4E418053',
|
|
32
|
-
pyth: '0xff1a0f4744e8582DF1aE09D5611b887B6a12925C',
|
|
33
|
-
},
|
|
34
|
-
},
|
|
35
|
-
[constants_1.Network.BASE]: {
|
|
36
|
-
USD: {
|
|
37
|
-
stablecoin: {
|
|
38
|
-
address: '0x0000206329b97DB379d5E1Bf586BbDB969C63274',
|
|
39
|
-
decimals: 18,
|
|
40
|
-
},
|
|
41
|
-
transmuter: '0x222222880e079445Df703c0604706E71a538Fd4f',
|
|
42
|
-
pyth: '0x8250f4aF4B972684F7b336503E2D6dFeDeB1487a',
|
|
43
|
-
},
|
|
44
|
-
},
|
|
45
25
|
},
|
|
46
26
|
};
|
|
47
27
|
exports.Adapters = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../../src/dex/angle-transmuter/config.ts"],"names":[],"mappings":";;;AAEA,+CAAoD;AAEvC,QAAA,qBAAqB,GAA4B;IAC5D,eAAe,EAAE;QACf,CAAC,mBAAO,CAAC,OAAO,CAAC,EAAE;YACjB,GAAG,EAAE;gBACH,UAAU,EAAE;oBACV,OAAO,EAAE,4CAA4C;oBACrD,QAAQ,EAAE,EAAE;iBACb;gBACD,UAAU,EAAE,4CAA4C;gBACxD,IAAI,EAAE,4CAA4C;aACnD;YACD,GAAG,EAAE;gBACH,UAAU,EAAE;oBACV,OAAO,EAAE,4CAA4C;oBACrD,QAAQ,EAAE,EAAE;iBACb;gBACD,UAAU,EAAE,4CAA4C;gBACxD,IAAI,EAAE,4CAA4C;aACnD;SACF;
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../../src/dex/angle-transmuter/config.ts"],"names":[],"mappings":";;;AAEA,+CAAoD;AAEvC,QAAA,qBAAqB,GAA4B;IAC5D,eAAe,EAAE;QACf,CAAC,mBAAO,CAAC,OAAO,CAAC,EAAE;YACjB,GAAG,EAAE;gBACH,UAAU,EAAE;oBACV,OAAO,EAAE,4CAA4C;oBACrD,QAAQ,EAAE,EAAE;iBACb;gBACD,UAAU,EAAE,4CAA4C;gBACxD,IAAI,EAAE,4CAA4C;aACnD;YACD,GAAG,EAAE;gBACH,UAAU,EAAE;oBACV,OAAO,EAAE,4CAA4C;oBACrD,QAAQ,EAAE,EAAE;iBACb;gBACD,UAAU,EAAE,4CAA4C;gBACxD,IAAI,EAAE,4CAA4C;aACnD;SACF;KACF;CACF,CAAC;AAEW,QAAA,QAAQ,GAAoC;IACvD,CAAC,mBAAO,CAAC,OAAO,CAAC,EAAE,EAAE,CAAC,oBAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC,EAAE;CACjE,CAAC"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { Interface } from '@ethersproject/abi';
|
|
2
|
+
import { DeepReadonly } from 'ts-essentials';
|
|
3
|
+
import { Log, Logger } from '../../types';
|
|
4
|
+
import { StatefulEventSubscriber } from '../../stateful-event-subscriber';
|
|
5
|
+
import { IDexHelper } from '../../dex-helper';
|
|
6
|
+
import { Address } from '../../types';
|
|
7
|
+
import { ClearVault, DexParams } from './types';
|
|
8
|
+
type OnVaultCreatedCallback = (vaults: DeepReadonly<ClearVault[]>) => void;
|
|
9
|
+
export declare class ClearFactory extends StatefulEventSubscriber<ClearVault[]> {
|
|
10
|
+
readonly parentName: string;
|
|
11
|
+
readonly config: DexParams;
|
|
12
|
+
protected network: number;
|
|
13
|
+
protected dexHelper: IDexHelper;
|
|
14
|
+
protected readonly onVaultCreated: OnVaultCreatedCallback;
|
|
15
|
+
handlers: {
|
|
16
|
+
[event: string]: (event: any, state: DeepReadonly<ClearVault[]>, log: Readonly<Log>) => Promise<DeepReadonly<ClearVault[]> | null>;
|
|
17
|
+
};
|
|
18
|
+
logDecoder: (log: Log) => any;
|
|
19
|
+
addressesSubscribed: Address[];
|
|
20
|
+
protected factoryIface: Interface;
|
|
21
|
+
protected vaultIface: Interface;
|
|
22
|
+
constructor(parentName: string, config: DexParams, network: number, dexHelper: IDexHelper, logger: Logger, onVaultCreated: OnVaultCreatedCallback);
|
|
23
|
+
/**
|
|
24
|
+
* Handle NewClearVault event - regenerate state when a new vault is created
|
|
25
|
+
*/
|
|
26
|
+
handleNewClearVault(): Promise<DeepReadonly<ClearVault[]> | null>;
|
|
27
|
+
/**
|
|
28
|
+
* Process incoming logs and dispatch to appropriate handlers
|
|
29
|
+
*/
|
|
30
|
+
processLog(state: DeepReadonly<ClearVault[]>, log: Readonly<Log>): Promise<DeepReadonly<ClearVault[]> | null>;
|
|
31
|
+
getStateOrGenerate(blockNumber: number, readonly?: boolean): Promise<DeepReadonly<ClearVault[]>>;
|
|
32
|
+
/**
|
|
33
|
+
* Generate state using on-chain calls:
|
|
34
|
+
* 1. Call vaultsLength() to get total count
|
|
35
|
+
* 2. Call getBatchVaultAddresses() to get all addresses
|
|
36
|
+
* 3. Call tokens() on each vault to get supported tokens
|
|
37
|
+
*/
|
|
38
|
+
generateState(blockNumber: number): Promise<DeepReadonly<ClearVault[]>>;
|
|
39
|
+
}
|
|
40
|
+
export {};
|