@gearbox-protocol/sdk 10.0.0 → 10.1.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.
Files changed (25) hide show
  1. package/dist/cjs/abi/router/midasWorker.js +541 -0
  2. package/dist/cjs/plugins/adapters/AdaptersPlugin.js +5 -2
  3. package/dist/cjs/plugins/adapters/abi/actionAbi.js +6 -0
  4. package/dist/cjs/plugins/adapters/abi/conctructorAbi.js +6 -0
  5. package/dist/cjs/plugins/adapters/abi/conctructorAbiPatterns.js +7 -0
  6. package/dist/cjs/plugins/adapters/contracts/MidasIssuanceVaultAdapterContract.js +51 -0
  7. package/dist/cjs/plugins/adapters/contracts/MidasRedemptionVaultAdapterContract.js +51 -0
  8. package/dist/cjs/plugins/adapters/contracts/index.js +6 -0
  9. package/dist/cjs/plugins/adapters/types.js +2 -0
  10. package/dist/esm/abi/router/midasWorker.js +517 -0
  11. package/dist/esm/plugins/adapters/AdaptersPlugin.js +7 -1
  12. package/dist/esm/plugins/adapters/abi/actionAbi.js +6 -0
  13. package/dist/esm/plugins/adapters/abi/conctructorAbi.js +7 -0
  14. package/dist/esm/plugins/adapters/abi/conctructorAbiPatterns.js +6 -0
  15. package/dist/esm/plugins/adapters/contracts/MidasIssuanceVaultAdapterContract.js +27 -0
  16. package/dist/esm/plugins/adapters/contracts/MidasRedemptionVaultAdapterContract.js +27 -0
  17. package/dist/esm/plugins/adapters/contracts/index.js +3 -0
  18. package/dist/esm/plugins/adapters/types.js +2 -0
  19. package/dist/types/abi/router/midasWorker.d.ts +726 -0
  20. package/dist/types/plugins/adapters/abi/conctructorAbiPatterns.d.ts +10 -0
  21. package/dist/types/plugins/adapters/contracts/MidasIssuanceVaultAdapterContract.d.ts +13 -0
  22. package/dist/types/plugins/adapters/contracts/MidasRedemptionVaultAdapterContract.d.ts +13 -0
  23. package/dist/types/plugins/adapters/contracts/index.d.ts +3 -0
  24. package/dist/types/plugins/adapters/types.d.ts +3 -1
  25. package/package.json +1 -1
@@ -0,0 +1,51 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+ var MidasRedemptionVaultAdapterContract_exports = {};
20
+ __export(MidasRedemptionVaultAdapterContract_exports, {
21
+ MidasRedemptionVaultAdapterContract: () => MidasRedemptionVaultAdapterContract
22
+ });
23
+ module.exports = __toCommonJS(MidasRedemptionVaultAdapterContract_exports);
24
+ var import_viem = require("viem");
25
+ var import_AbstractAdapter = require("./AbstractAdapter.js");
26
+ const abi = [];
27
+ class MidasRedemptionVaultAdapterContract extends import_AbstractAdapter.AbstractAdapterContract {
28
+ gateway;
29
+ mToken;
30
+ allowedTokens;
31
+ constructor(sdk, args) {
32
+ super(sdk, { ...args, abi });
33
+ const decoded = (0, import_viem.decodeAbiParameters)(
34
+ [
35
+ { type: "address", name: "creditManager" },
36
+ { type: "address", name: "targetContract" },
37
+ { type: "address", name: "gateway" },
38
+ { type: "address", name: "mToken" },
39
+ { type: "address[]", name: "allowedTokens" }
40
+ ],
41
+ args.baseParams.serializedParams
42
+ );
43
+ this.gateway = decoded[2];
44
+ this.mToken = decoded[3];
45
+ this.allowedTokens = [...decoded[4]];
46
+ }
47
+ }
48
+ // Annotate the CommonJS export names for ESM import in node:
49
+ 0 && (module.exports = {
50
+ MidasRedemptionVaultAdapterContract
51
+ });
@@ -18,6 +18,7 @@ module.exports = __toCommonJS(contracts_exports);
18
18
  __reExport(contracts_exports, require("./AbstractAdapter.js"), module.exports);
19
19
  __reExport(contracts_exports, require("./BalancerV2VaultAdapterContract.js"), module.exports);
20
20
  __reExport(contracts_exports, require("./BalancerV3RouterAdapterContract.js"), module.exports);
21
+ __reExport(contracts_exports, require("./BalancerV3WrapperAdapterContract.js"), module.exports);
21
22
  __reExport(contracts_exports, require("./CamelotV3AdapterContract.js"), module.exports);
22
23
  __reExport(contracts_exports, require("./ConvexV1BaseRewardPoolAdapterContract.js"), module.exports);
23
24
  __reExport(contracts_exports, require("./ConvexV1BoosterAdapterContract.js"), module.exports);
@@ -40,6 +41,8 @@ __reExport(contracts_exports, require("./MellowDVVAdapterContract.js"), module.e
40
41
  __reExport(contracts_exports, require("./MellowERC4626VaultAdapterContract.js"), module.exports);
41
42
  __reExport(contracts_exports, require("./MellowVaultAdapterContract.js"), module.exports);
42
43
  __reExport(contracts_exports, require("./MellowWrapperAdapterContract.js"), module.exports);
44
+ __reExport(contracts_exports, require("./MidasIssuanceVaultAdapterContract.js"), module.exports);
45
+ __reExport(contracts_exports, require("./MidasRedemptionVaultAdapterContract.js"), module.exports);
43
46
  __reExport(contracts_exports, require("./PendleRouterAdapterContract.js"), module.exports);
44
47
  __reExport(contracts_exports, require("./StakingRewardsAdapterContract.js"), module.exports);
45
48
  __reExport(contracts_exports, require("./TraderJoeRouterAdapterContract.js"), module.exports);
@@ -55,6 +58,7 @@ __reExport(contracts_exports, require("./YearnV2AdapterContract.js"), module.exp
55
58
  ...require("./AbstractAdapter.js"),
56
59
  ...require("./BalancerV2VaultAdapterContract.js"),
57
60
  ...require("./BalancerV3RouterAdapterContract.js"),
61
+ ...require("./BalancerV3WrapperAdapterContract.js"),
58
62
  ...require("./CamelotV3AdapterContract.js"),
59
63
  ...require("./ConvexV1BaseRewardPoolAdapterContract.js"),
60
64
  ...require("./ConvexV1BoosterAdapterContract.js"),
@@ -77,6 +81,8 @@ __reExport(contracts_exports, require("./YearnV2AdapterContract.js"), module.exp
77
81
  ...require("./MellowERC4626VaultAdapterContract.js"),
78
82
  ...require("./MellowVaultAdapterContract.js"),
79
83
  ...require("./MellowWrapperAdapterContract.js"),
84
+ ...require("./MidasIssuanceVaultAdapterContract.js"),
85
+ ...require("./MidasRedemptionVaultAdapterContract.js"),
80
86
  ...require("./PendleRouterAdapterContract.js"),
81
87
  ...require("./StakingRewardsAdapterContract.js"),
82
88
  ...require("./TraderJoeRouterAdapterContract.js"),
@@ -48,6 +48,8 @@ var AdapterType = /* @__PURE__ */ ((AdapterType2) => {
48
48
  AdapterType2["MELLOW_ERC4626_VAULT"] = "MELLOW_ERC4626_VAULT";
49
49
  AdapterType2["MELLOW_LRT_VAULT"] = "MELLOW_LRT_VAULT";
50
50
  AdapterType2["MELLOW_WRAPPER"] = "MELLOW_WRAPPER";
51
+ AdapterType2["MIDAS_ISSUANCE_VAULT"] = "MIDAS_ISSUANCE_VAULT";
52
+ AdapterType2["MIDAS_REDEMPTION_VAULT"] = "MIDAS_REDEMPTION_VAULT";
51
53
  AdapterType2["PENDLE_ROUTER"] = "PENDLE_ROUTER";
52
54
  AdapterType2["STAKING_REWARDS"] = "STAKING_REWARDS";
53
55
  AdapterType2["TRADERJOE_ROUTER"] = "TRADERJOE_ROUTER";
@@ -0,0 +1,517 @@
1
+ const midasWorkerAbi = [
2
+ {
3
+ type: "constructor",
4
+ inputs: [{ name: "_router", type: "address", internalType: "address" }],
5
+ stateMutability: "nonpayable"
6
+ },
7
+ {
8
+ type: "function",
9
+ name: "buildEdges",
10
+ inputs: [
11
+ {
12
+ name: "graph",
13
+ type: "tuple",
14
+ internalType: "struct Graph",
15
+ components: [
16
+ {
17
+ name: "vertices",
18
+ type: "tuple[]",
19
+ internalType: "struct Vertex[]",
20
+ components: [
21
+ { name: "token", type: "address", internalType: "address" },
22
+ { name: "balance", type: "uint256", internalType: "uint256" },
23
+ {
24
+ name: "leftoverBalance",
25
+ type: "uint256",
26
+ internalType: "uint256"
27
+ },
28
+ { name: "numSplits", type: "uint256", internalType: "uint256" },
29
+ {
30
+ name: "currentOptimalEdge",
31
+ type: "uint256",
32
+ internalType: "uint256"
33
+ }
34
+ ]
35
+ },
36
+ {
37
+ name: "edges",
38
+ type: "tuple[]",
39
+ internalType: "struct Edge[]",
40
+ components: [
41
+ { name: "id", type: "uint256", internalType: "uint256" },
42
+ { name: "tokenIn", type: "address", internalType: "address" },
43
+ { name: "tokenOut", type: "address", internalType: "address" },
44
+ { name: "adapter", type: "address", internalType: "address" },
45
+ { name: "worker", type: "address", internalType: "address" },
46
+ { name: "extraData", type: "bytes", internalType: "bytes" },
47
+ {
48
+ name: "amountInTotal",
49
+ type: "uint256",
50
+ internalType: "uint256"
51
+ },
52
+ {
53
+ name: "amountOutTotal",
54
+ type: "uint256",
55
+ internalType: "uint256"
56
+ },
57
+ {
58
+ name: "amountInCurrent",
59
+ type: "uint256",
60
+ internalType: "uint256"
61
+ },
62
+ {
63
+ name: "amountOutCurrent",
64
+ type: "uint256",
65
+ internalType: "uint256"
66
+ }
67
+ ]
68
+ }
69
+ ]
70
+ },
71
+ { name: "adapter", type: "address", internalType: "address" }
72
+ ],
73
+ outputs: [
74
+ {
75
+ name: "",
76
+ type: "tuple",
77
+ internalType: "struct Graph",
78
+ components: [
79
+ {
80
+ name: "vertices",
81
+ type: "tuple[]",
82
+ internalType: "struct Vertex[]",
83
+ components: [
84
+ { name: "token", type: "address", internalType: "address" },
85
+ { name: "balance", type: "uint256", internalType: "uint256" },
86
+ {
87
+ name: "leftoverBalance",
88
+ type: "uint256",
89
+ internalType: "uint256"
90
+ },
91
+ { name: "numSplits", type: "uint256", internalType: "uint256" },
92
+ {
93
+ name: "currentOptimalEdge",
94
+ type: "uint256",
95
+ internalType: "uint256"
96
+ }
97
+ ]
98
+ },
99
+ {
100
+ name: "edges",
101
+ type: "tuple[]",
102
+ internalType: "struct Edge[]",
103
+ components: [
104
+ { name: "id", type: "uint256", internalType: "uint256" },
105
+ { name: "tokenIn", type: "address", internalType: "address" },
106
+ { name: "tokenOut", type: "address", internalType: "address" },
107
+ { name: "adapter", type: "address", internalType: "address" },
108
+ { name: "worker", type: "address", internalType: "address" },
109
+ { name: "extraData", type: "bytes", internalType: "bytes" },
110
+ {
111
+ name: "amountInTotal",
112
+ type: "uint256",
113
+ internalType: "uint256"
114
+ },
115
+ {
116
+ name: "amountOutTotal",
117
+ type: "uint256",
118
+ internalType: "uint256"
119
+ },
120
+ {
121
+ name: "amountInCurrent",
122
+ type: "uint256",
123
+ internalType: "uint256"
124
+ },
125
+ {
126
+ name: "amountOutCurrent",
127
+ type: "uint256",
128
+ internalType: "uint256"
129
+ }
130
+ ]
131
+ }
132
+ ]
133
+ }
134
+ ],
135
+ stateMutability: "view"
136
+ },
137
+ {
138
+ type: "function",
139
+ name: "contractType",
140
+ inputs: [],
141
+ outputs: [{ name: "", type: "bytes32", internalType: "bytes32" }],
142
+ stateMutability: "view"
143
+ },
144
+ {
145
+ type: "function",
146
+ name: "getEdgeAmountOutCurrent",
147
+ inputs: [
148
+ {
149
+ name: "edge",
150
+ type: "tuple",
151
+ internalType: "struct Edge",
152
+ components: [
153
+ { name: "id", type: "uint256", internalType: "uint256" },
154
+ { name: "tokenIn", type: "address", internalType: "address" },
155
+ { name: "tokenOut", type: "address", internalType: "address" },
156
+ { name: "adapter", type: "address", internalType: "address" },
157
+ { name: "worker", type: "address", internalType: "address" },
158
+ { name: "extraData", type: "bytes", internalType: "bytes" },
159
+ { name: "amountInTotal", type: "uint256", internalType: "uint256" },
160
+ { name: "amountOutTotal", type: "uint256", internalType: "uint256" },
161
+ { name: "amountInCurrent", type: "uint256", internalType: "uint256" },
162
+ {
163
+ name: "amountOutCurrent",
164
+ type: "uint256",
165
+ internalType: "uint256"
166
+ }
167
+ ]
168
+ }
169
+ ],
170
+ outputs: [
171
+ { name: "amountOutCurrent", type: "uint256", internalType: "uint256" }
172
+ ],
173
+ stateMutability: "view"
174
+ },
175
+ {
176
+ type: "function",
177
+ name: "getMulticalls",
178
+ inputs: [
179
+ {
180
+ name: "edge",
181
+ type: "tuple",
182
+ internalType: "struct Edge",
183
+ components: [
184
+ { name: "id", type: "uint256", internalType: "uint256" },
185
+ { name: "tokenIn", type: "address", internalType: "address" },
186
+ { name: "tokenOut", type: "address", internalType: "address" },
187
+ { name: "adapter", type: "address", internalType: "address" },
188
+ { name: "worker", type: "address", internalType: "address" },
189
+ { name: "extraData", type: "bytes", internalType: "bytes" },
190
+ { name: "amountInTotal", type: "uint256", internalType: "uint256" },
191
+ { name: "amountOutTotal", type: "uint256", internalType: "uint256" },
192
+ { name: "amountInCurrent", type: "uint256", internalType: "uint256" },
193
+ {
194
+ name: "amountOutCurrent",
195
+ type: "uint256",
196
+ internalType: "uint256"
197
+ }
198
+ ]
199
+ },
200
+ { name: "currentBalance", type: "uint256", internalType: "uint256" }
201
+ ],
202
+ outputs: [
203
+ {
204
+ name: "calls",
205
+ type: "tuple[]",
206
+ internalType: "struct MultiCall[]",
207
+ components: [
208
+ { name: "target", type: "address", internalType: "address" },
209
+ { name: "callData", type: "bytes", internalType: "bytes" }
210
+ ]
211
+ }
212
+ ],
213
+ stateMutability: "pure"
214
+ },
215
+ {
216
+ type: "function",
217
+ name: "isNonLinear",
218
+ inputs: [],
219
+ outputs: [{ name: "", type: "bool", internalType: "bool" }],
220
+ stateMutability: "view"
221
+ },
222
+ {
223
+ type: "function",
224
+ name: "migrate",
225
+ inputs: [],
226
+ outputs: [],
227
+ stateMutability: "nonpayable"
228
+ },
229
+ {
230
+ type: "function",
231
+ name: "processClaims",
232
+ inputs: [
233
+ {
234
+ name: "",
235
+ type: "tuple",
236
+ internalType: "struct Edge",
237
+ components: [
238
+ { name: "id", type: "uint256", internalType: "uint256" },
239
+ { name: "tokenIn", type: "address", internalType: "address" },
240
+ { name: "tokenOut", type: "address", internalType: "address" },
241
+ { name: "adapter", type: "address", internalType: "address" },
242
+ { name: "worker", type: "address", internalType: "address" },
243
+ { name: "extraData", type: "bytes", internalType: "bytes" },
244
+ { name: "amountInTotal", type: "uint256", internalType: "uint256" },
245
+ { name: "amountOutTotal", type: "uint256", internalType: "uint256" },
246
+ { name: "amountInCurrent", type: "uint256", internalType: "uint256" },
247
+ {
248
+ name: "amountOutCurrent",
249
+ type: "uint256",
250
+ internalType: "uint256"
251
+ }
252
+ ]
253
+ },
254
+ {
255
+ name: "graph",
256
+ type: "tuple",
257
+ internalType: "struct Graph",
258
+ components: [
259
+ {
260
+ name: "vertices",
261
+ type: "tuple[]",
262
+ internalType: "struct Vertex[]",
263
+ components: [
264
+ { name: "token", type: "address", internalType: "address" },
265
+ { name: "balance", type: "uint256", internalType: "uint256" },
266
+ {
267
+ name: "leftoverBalance",
268
+ type: "uint256",
269
+ internalType: "uint256"
270
+ },
271
+ { name: "numSplits", type: "uint256", internalType: "uint256" },
272
+ {
273
+ name: "currentOptimalEdge",
274
+ type: "uint256",
275
+ internalType: "uint256"
276
+ }
277
+ ]
278
+ },
279
+ {
280
+ name: "edges",
281
+ type: "tuple[]",
282
+ internalType: "struct Edge[]",
283
+ components: [
284
+ { name: "id", type: "uint256", internalType: "uint256" },
285
+ { name: "tokenIn", type: "address", internalType: "address" },
286
+ { name: "tokenOut", type: "address", internalType: "address" },
287
+ { name: "adapter", type: "address", internalType: "address" },
288
+ { name: "worker", type: "address", internalType: "address" },
289
+ { name: "extraData", type: "bytes", internalType: "bytes" },
290
+ {
291
+ name: "amountInTotal",
292
+ type: "uint256",
293
+ internalType: "uint256"
294
+ },
295
+ {
296
+ name: "amountOutTotal",
297
+ type: "uint256",
298
+ internalType: "uint256"
299
+ },
300
+ {
301
+ name: "amountInCurrent",
302
+ type: "uint256",
303
+ internalType: "uint256"
304
+ },
305
+ {
306
+ name: "amountOutCurrent",
307
+ type: "uint256",
308
+ internalType: "uint256"
309
+ }
310
+ ]
311
+ }
312
+ ]
313
+ },
314
+ { name: "", type: "address", internalType: "address" }
315
+ ],
316
+ outputs: [
317
+ {
318
+ name: "",
319
+ type: "tuple",
320
+ internalType: "struct Graph",
321
+ components: [
322
+ {
323
+ name: "vertices",
324
+ type: "tuple[]",
325
+ internalType: "struct Vertex[]",
326
+ components: [
327
+ { name: "token", type: "address", internalType: "address" },
328
+ { name: "balance", type: "uint256", internalType: "uint256" },
329
+ {
330
+ name: "leftoverBalance",
331
+ type: "uint256",
332
+ internalType: "uint256"
333
+ },
334
+ { name: "numSplits", type: "uint256", internalType: "uint256" },
335
+ {
336
+ name: "currentOptimalEdge",
337
+ type: "uint256",
338
+ internalType: "uint256"
339
+ }
340
+ ]
341
+ },
342
+ {
343
+ name: "edges",
344
+ type: "tuple[]",
345
+ internalType: "struct Edge[]",
346
+ components: [
347
+ { name: "id", type: "uint256", internalType: "uint256" },
348
+ { name: "tokenIn", type: "address", internalType: "address" },
349
+ { name: "tokenOut", type: "address", internalType: "address" },
350
+ { name: "adapter", type: "address", internalType: "address" },
351
+ { name: "worker", type: "address", internalType: "address" },
352
+ { name: "extraData", type: "bytes", internalType: "bytes" },
353
+ {
354
+ name: "amountInTotal",
355
+ type: "uint256",
356
+ internalType: "uint256"
357
+ },
358
+ {
359
+ name: "amountOutTotal",
360
+ type: "uint256",
361
+ internalType: "uint256"
362
+ },
363
+ {
364
+ name: "amountInCurrent",
365
+ type: "uint256",
366
+ internalType: "uint256"
367
+ },
368
+ {
369
+ name: "amountOutCurrent",
370
+ type: "uint256",
371
+ internalType: "uint256"
372
+ }
373
+ ]
374
+ }
375
+ ]
376
+ },
377
+ {
378
+ name: "",
379
+ type: "tuple[]",
380
+ internalType: "struct MultiCall[]",
381
+ components: [
382
+ { name: "target", type: "address", internalType: "address" },
383
+ { name: "callData", type: "bytes", internalType: "bytes" }
384
+ ]
385
+ }
386
+ ],
387
+ stateMutability: "pure"
388
+ },
389
+ {
390
+ type: "function",
391
+ name: "router",
392
+ inputs: [],
393
+ outputs: [
394
+ { name: "", type: "address", internalType: "contract IGearboxRouter" }
395
+ ],
396
+ stateMutability: "view"
397
+ },
398
+ {
399
+ type: "function",
400
+ name: "trimSpecialVertex",
401
+ inputs: [
402
+ {
403
+ name: "edge",
404
+ type: "tuple",
405
+ internalType: "struct Edge",
406
+ components: [
407
+ { name: "id", type: "uint256", internalType: "uint256" },
408
+ { name: "tokenIn", type: "address", internalType: "address" },
409
+ { name: "tokenOut", type: "address", internalType: "address" },
410
+ { name: "adapter", type: "address", internalType: "address" },
411
+ { name: "worker", type: "address", internalType: "address" },
412
+ { name: "extraData", type: "bytes", internalType: "bytes" },
413
+ { name: "amountInTotal", type: "uint256", internalType: "uint256" },
414
+ { name: "amountOutTotal", type: "uint256", internalType: "uint256" },
415
+ { name: "amountInCurrent", type: "uint256", internalType: "uint256" },
416
+ {
417
+ name: "amountOutCurrent",
418
+ type: "uint256",
419
+ internalType: "uint256"
420
+ }
421
+ ]
422
+ },
423
+ {
424
+ name: "graph",
425
+ type: "tuple",
426
+ internalType: "struct Graph",
427
+ components: [
428
+ {
429
+ name: "vertices",
430
+ type: "tuple[]",
431
+ internalType: "struct Vertex[]",
432
+ components: [
433
+ { name: "token", type: "address", internalType: "address" },
434
+ { name: "balance", type: "uint256", internalType: "uint256" },
435
+ {
436
+ name: "leftoverBalance",
437
+ type: "uint256",
438
+ internalType: "uint256"
439
+ },
440
+ { name: "numSplits", type: "uint256", internalType: "uint256" },
441
+ {
442
+ name: "currentOptimalEdge",
443
+ type: "uint256",
444
+ internalType: "uint256"
445
+ }
446
+ ]
447
+ },
448
+ {
449
+ name: "edges",
450
+ type: "tuple[]",
451
+ internalType: "struct Edge[]",
452
+ components: [
453
+ { name: "id", type: "uint256", internalType: "uint256" },
454
+ { name: "tokenIn", type: "address", internalType: "address" },
455
+ { name: "tokenOut", type: "address", internalType: "address" },
456
+ { name: "adapter", type: "address", internalType: "address" },
457
+ { name: "worker", type: "address", internalType: "address" },
458
+ { name: "extraData", type: "bytes", internalType: "bytes" },
459
+ {
460
+ name: "amountInTotal",
461
+ type: "uint256",
462
+ internalType: "uint256"
463
+ },
464
+ {
465
+ name: "amountOutTotal",
466
+ type: "uint256",
467
+ internalType: "uint256"
468
+ },
469
+ {
470
+ name: "amountInCurrent",
471
+ type: "uint256",
472
+ internalType: "uint256"
473
+ },
474
+ {
475
+ name: "amountOutCurrent",
476
+ type: "uint256",
477
+ internalType: "uint256"
478
+ }
479
+ ]
480
+ }
481
+ ]
482
+ },
483
+ { name: "targetToken", type: "address", internalType: "address" }
484
+ ],
485
+ outputs: [{ name: "", type: "bool", internalType: "bool" }],
486
+ stateMutability: "view"
487
+ },
488
+ {
489
+ type: "function",
490
+ name: "updateRouter",
491
+ inputs: [{ name: "newRouter", type: "address", internalType: "address" }],
492
+ outputs: [],
493
+ stateMutability: "nonpayable"
494
+ },
495
+ {
496
+ type: "function",
497
+ name: "version",
498
+ inputs: [],
499
+ outputs: [{ name: "", type: "uint256", internalType: "uint256" }],
500
+ stateMutability: "view"
501
+ },
502
+ {
503
+ type: "event",
504
+ name: "NewRouter",
505
+ inputs: [
506
+ { name: "", type: "address", indexed: true, internalType: "address" }
507
+ ],
508
+ anonymous: false
509
+ },
510
+ { type: "error", name: "FutureRouterOnlyException", inputs: [] },
511
+ { type: "error", name: "MigrationErrorException", inputs: [] },
512
+ { type: "error", name: "RouterOnlyException", inputs: [] },
513
+ { type: "error", name: "RouterOwnerOnlyException", inputs: [] }
514
+ ];
515
+ export {
516
+ midasWorkerAbi
517
+ };
@@ -1,8 +1,8 @@
1
1
  import { BasePlugin, bytes32ToString } from "../../sdk/index.js";
2
- import { BalancerV3WrapperAdapterContract } from "./contracts/BalancerV3WrapperAdapterContract.js";
3
2
  import {
4
3
  BalancerV2VaultAdapterContract,
5
4
  BalancerV3RouterAdapterContract,
5
+ BalancerV3WrapperAdapterContract,
6
6
  CamelotV3AdapterContract,
7
7
  ConvexV1BaseRewardPoolAdapterContract,
8
8
  ConvexV1BoosterAdapterContract,
@@ -25,6 +25,8 @@ import {
25
25
  MellowERC4626VaultAdapterContract,
26
26
  MellowVaultAdapterContract,
27
27
  MellowWrapperAdapterContract,
28
+ MidasIssuanceVaultAdapterContract,
29
+ MidasRedemptionVaultAdapterContract,
28
30
  PendleRouterAdapterContract,
29
31
  StakingRewardsAdapterContract,
30
32
  TraderJoeRouterAdapterContract,
@@ -97,6 +99,10 @@ class AdaptersPlugin extends BasePlugin {
97
99
  return new MellowVaultAdapterContract(this.sdk, args);
98
100
  case "ADAPTER::MELLOW_WRAPPER":
99
101
  return new MellowWrapperAdapterContract(this.sdk, args);
102
+ case "ADAPTER::MIDAS_ISSUANCE_VAULT":
103
+ return new MidasIssuanceVaultAdapterContract(this.sdk, args);
104
+ case "ADAPTER::MIDAS_REDEMPTION_VAULT":
105
+ return new MidasRedemptionVaultAdapterContract(this.sdk, args);
100
106
  case "ADAPTER::PENDLE_ROUTER":
101
107
  return new PendleRouterAdapterContract(this.sdk, args);
102
108
  case "ADAPTER::STAKING_REWARDS":
@@ -26,6 +26,12 @@ const adapterActionSignatures = {
26
26
  [AdapterType.MELLOW_WRAPPER]: {
27
27
  310: "function setVaultStatusBatch((address,bool)[])"
28
28
  },
29
+ [AdapterType.MIDAS_ISSUANCE_VAULT]: {
30
+ 310: "function setTokenAllowedStatusBatch(address[],bool[])"
31
+ },
32
+ [AdapterType.MIDAS_REDEMPTION_VAULT]: {
33
+ 310: "function setTokenAllowedStatusBatch((address,address,bool)[])"
34
+ },
29
35
  [AdapterType.PENDLE_ROUTER]: {
30
36
  310: "function setPairStatusBatch((address,address,address,uint8)[])",
31
37
  311: "function setPairStatusBatch((address,address,address,uint8,uint8)[])"
@@ -7,6 +7,7 @@ import {
7
7
  CURVE_V1_WRAPPER_ADAPTER_ABI,
8
8
  GATEWAY_ADAPTER_ABI,
9
9
  LP_ADAPTER_ABI,
10
+ REFERER_ID_ADAPTER_ABI,
10
11
  STAKED_TOKEN_ADAPTER_ABI,
11
12
  STAKING_REWARDS_ADAPTER_ABI,
12
13
  UINT_REFERRAL_ADAPTER_ABI
@@ -44,6 +45,9 @@ const adapterConstructorAbi = {
44
45
  [AdapterType.LIDO_WSTETH_V1]: {
45
46
  310: BASIC_ADAPTER_ABI
46
47
  },
48
+ [AdapterType.MIDAS_REDEMPTION_VAULT]: {
49
+ 310: BASIC_ADAPTER_ABI
50
+ },
47
51
  [AdapterType.PENDLE_ROUTER]: {
48
52
  310: BASIC_ADAPTER_ABI,
49
53
  311: BASIC_ADAPTER_ABI
@@ -139,6 +143,9 @@ const adapterConstructorAbi = {
139
143
  310: STAKED_TOKEN_ADAPTER_ABI,
140
144
  311: STAKING_REWARDS_ADAPTER_ABI,
141
145
  312: STAKING_REWARDS_ADAPTER_ABI
146
+ },
147
+ [AdapterType.MIDAS_ISSUANCE_VAULT]: {
148
+ 310: REFERER_ID_ADAPTER_ABI
142
149
  }
143
150
  };
144
151
  export {