@merkl/api 0.13.3 → 0.13.5

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.
@@ -270,12 +270,24 @@ export const extractOpportunities = {
270
270
  "syncswap",
271
271
  "rfx",
272
272
  ],
273
- borrow: ["radiant_borrow", "aave_borrowing", "euler_borrow", "zerolend_borrowing"],
273
+ borrow: [
274
+ "radiant_borrow",
275
+ "aave_borrowing",
276
+ "euler_borrow",
277
+ "zerolend_borrowing",
278
+ "vicuna_borrowing",
279
+ "takotako_borrowing",
280
+ "lendle_borrowing",
281
+ ],
274
282
  lend: [
275
283
  "gearbox",
276
284
  "compound",
277
285
  "radiant_lend",
278
286
  "aave_lending",
287
+ "vicune_lending",
288
+ "takotako_lending",
289
+ "lendle_lending",
290
+ "vicuna_lending",
279
291
  "sturdy_aggregator",
280
292
  "sturdy_silo",
281
293
  "fraxlend",
@@ -662,12 +674,23 @@ export const extractOpportunities = {
662
674
  "syncswap",
663
675
  "rfx",
664
676
  ],
665
- borrow: ["radiant_borrow", "aave_borrowing", "euler_borrow", "zerolend_borrowing"],
677
+ borrow: [
678
+ "radiant_borrow",
679
+ "aave_borrowing",
680
+ "euler_borrow",
681
+ "zerolend_borrowing",
682
+ "takotako_borrowing",
683
+ "lendle_borrowing",
684
+ "vicuna_borrowing",
685
+ ],
666
686
  lend: [
667
687
  "gearbox",
668
688
  "compound",
669
689
  "radiant_lend",
670
690
  "aave_lending",
691
+ "vicuna_lending",
692
+ "takotako_lending",
693
+ "lendle_lending",
671
694
  "sturdy_aggregator",
672
695
  "sturdy_silo",
673
696
  "fraxlend",
@@ -757,12 +780,13 @@ export const extractOpportunities = {
757
780
  "syncswap",
758
781
  "rfx",
759
782
  ],
760
- borrow: ["radiant_borrow", "aave_borrowing", "euler_borrow", "zerolend_borrowing"],
783
+ borrow: ["radiant_borrow", "aave_borrowing", "euler_borrow", "zerolend_borrowing", "vicuna_borrowing"],
761
784
  lend: [
762
785
  "gearbox",
763
786
  "compound",
764
787
  "radiant_lend",
765
788
  "aave_lending",
789
+ "vicuna_lending",
766
790
  "sturdy_aggregator",
767
791
  "sturdy_silo",
768
792
  "fraxlend",
@@ -859,12 +883,14 @@ export const extractOpportunities = {
859
883
  "zerolend_borrowing",
860
884
  "takotako_borrowing",
861
885
  "lendle_borrowing",
886
+ "vicuna_borrowing",
862
887
  ],
863
888
  lend: [
864
889
  "gearbox",
865
890
  "compound",
866
891
  "radiant_lend",
867
892
  "aave_lending",
893
+ "vicuna_lending",
868
894
  "sturdy_aggregator",
869
895
  "sturdy_silo",
870
896
  "fraxlend",
@@ -79,7 +79,9 @@ export declare enum tokenType {
79
79
  lendle_lending = "lendle_lending",
80
80
  takotako_borrowing = "takotako_borrowing",
81
81
  takotako_lending = "takotako_lending",
82
- equalizer_gauge = "equalizer_gauge"
82
+ equalizer_gauge = "equalizer_gauge",
83
+ vicuna_lending = "vicuna_lending",
84
+ vicuna_borrowing = "vicuna_borrowing"
83
85
  }
84
86
  export declare const tokenTypeToProtocol: {
85
87
  [key in tokenType]: {
@@ -81,6 +81,8 @@ export var tokenType;
81
81
  tokenType["takotako_borrowing"] = "takotako_borrowing";
82
82
  tokenType["takotako_lending"] = "takotako_lending";
83
83
  tokenType["equalizer_gauge"] = "equalizer_gauge";
84
+ tokenType["vicuna_lending"] = "vicuna_lending";
85
+ tokenType["vicuna_borrowing"] = "vicuna_borrowing";
84
86
  })(tokenType || (tokenType = {}));
85
87
  export const tokenTypeToProtocol = {
86
88
  [tokenType.aave_borrowing]: { protocol: "Aave" },
@@ -193,4 +195,6 @@ export const tokenTypeToProtocol = {
193
195
  [tokenType.takotako_borrowing]: { protocol: "TakoTako" },
194
196
  [tokenType.takotako_lending]: { protocol: "TakoTako" },
195
197
  [tokenType.equalizer_gauge]: { protocol: "Equalizer" },
198
+ [tokenType.vicuna_lending]: { protocol: "Vicuna" },
199
+ [tokenType.vicuna_borrowing]: { protocol: "Vicuna" },
196
200
  };
@@ -118,4 +118,6 @@ export const processorMapping = {
118
118
  [tokenType.takotako_lending]: AaveProcessor,
119
119
  [tokenType.takotako_borrowing]: AaveProcessor,
120
120
  [tokenType.equalizer_gauge]: EqualizerGaugeProcessor,
121
+ [tokenType.vicuna_borrowing]: AaveProcessor,
122
+ [tokenType.vicuna_lending]: AaveProcessor,
121
123
  };
@@ -72,6 +72,10 @@ function satisfiesNameConditions(name, type) {
72
72
  return lowerCaseName.includes("aave");
73
73
  case tokenType.aave_borrowing:
74
74
  return lowerCaseName.includes("aave") && lowerCaseName.includes("debt");
75
+ case tokenType.vicuna_lending:
76
+ return lowerCaseName.startsWith("vicuna sonic") && !lowerCaseName.includes("debt");
77
+ case tokenType.vicuna_borrowing:
78
+ return lowerCaseName.startsWith("vicuna sonic variable debt");
75
79
  case tokenType.yei_borrowing:
76
80
  return ((lowerCaseName.startsWith("yei") || (lowerCaseName.includes("aave") && lowerCaseName.includes("yei"))) &&
77
81
  lowerCaseName.includes("debt"));
@@ -1,9 +1,10 @@
1
1
  import { ETH_ADDRESS, ETH_ZKSYNC_ADDRESS } from "@sdk";
2
2
  import { decodeFunctionResult, encodeFunctionData, parseAbi } from "viem";
3
3
  import { ChainInteractionService } from "../chainInteraction";
4
+ import { EnsoService } from "../enso/enso.service";
4
5
  import { KyberZapService } from "../kyberzap/kyberzap.service";
5
6
  export class InteractionService {
6
- static routers = [KyberZapService].map(service => service.getRouter());
7
+ static routers = [KyberZapService, EnsoService].map(service => service.getRouter());
7
8
  /**
8
9
  * Returns a target entry for each router, indicating the possiblity to deposit
9
10
  * @param chainId compute
@@ -53,7 +53,7 @@ export class StatusRepository {
53
53
  data: {
54
54
  computedUntil,
55
55
  status: "SUCCESS",
56
- error: undefined,
56
+ error: "",
57
57
  details: "{}",
58
58
  },
59
59
  });
@@ -78,7 +78,7 @@ export class StatusRepository {
78
78
  data: {
79
79
  status: "PROCESSING",
80
80
  processingStarted: moment().unix(),
81
- error: undefined,
81
+ error: "",
82
82
  details: "{}",
83
83
  },
84
84
  });
@@ -87,6 +87,8 @@ export function decodeReturnValue(returnData, key, type) {
87
87
  case tokenType.superlend_borrowing:
88
88
  case tokenType.takotako_lending:
89
89
  case tokenType.takotako_borrowing:
90
+ case tokenType.vicuna_borrowing:
91
+ case tokenType.vicuna_lending:
90
92
  case tokenType.lendle_lending:
91
93
  case tokenType.lendle_borrowing:
92
94
  case tokenType.yei_borrowing:
@@ -145,6 +145,8 @@ export function createCall(target, key, type, metaData) {
145
145
  case tokenType.takotako_borrowing:
146
146
  case tokenType.yei_borrowing:
147
147
  case tokenType.yei_lending:
148
+ case tokenType.vicuna_borrowing:
149
+ case tokenType.vicuna_lending:
148
150
  return { allowFailure: true, callData: AaveInterface.encodeFunctionData("UNDERLYING_ASSET_ADDRESS"), target };
149
151
  default:
150
152
  throw new Error(`Need tokenType for this key ${key}, or unknown type ${type}`);
@@ -46,6 +46,7 @@ export function generateCardName(type, typeInfo, campaign, symbols = [""], displ
46
46
  return `Supply ${typeInfo.symbolShortToken}-${typeInfo.symbolLongToken} on ${typeInfo.protocol}`;
47
47
  case tokenType.radiant_borrow:
48
48
  case tokenType.aave_borrowing:
49
+ case tokenType.vicuna_borrowing:
49
50
  case tokenType.yei_borrowing:
50
51
  case tokenType.ironclad_borrowing:
51
52
  case tokenType.zerolend_borrowing:
@@ -60,6 +61,7 @@ export function generateCardName(type, typeInfo, campaign, symbols = [""], displ
60
61
  case tokenType.moonwell:
61
62
  case tokenType.splice:
62
63
  case tokenType.aave_lending:
64
+ case tokenType.vicuna_lending:
63
65
  case tokenType.yei_lending:
64
66
  case tokenType.ironclad_lending:
65
67
  case tokenType.zerolend_lending: