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