@merkl/api 0.10.257 → 0.10.259

Sign up to get free protection for your applications and to get access to all the features.
@@ -15,7 +15,7 @@ export class CampaignService {
15
15
  }
16
16
  static async create(campaign) {
17
17
  const id = CampaignService.hashId({ distributionChain: campaign.chainId, campaignId: campaign.campaignId });
18
- await OpportunityService.createFromCampaign(campaign);
18
+ await OpportunityService.createFromCampaign(campaign); // TODO REMOVE TRUE
19
19
  return await CampaignRepository.upsert({ id, ...campaign });
20
20
  }
21
21
  static async createMany(campaigns) {
@@ -25,7 +25,7 @@ export class CampaignService {
25
25
  const id = CampaignService.hashId({ distributionChain: campaign.chainId, campaignId: campaign.campaignId });
26
26
  campaign.computeChainId = campaign.computeChainId === 0 ? campaign.chainId : campaign.computeChainId;
27
27
  try {
28
- await OpportunityService.createFromCampaign(campaign);
28
+ await OpportunityService.createFromCampaign(campaign, true); // TODO REMOVE TRUE
29
29
  campaignsToInsert.push({ id, ...campaign });
30
30
  }
31
31
  catch (err) {
@@ -34,7 +34,7 @@ export class ProtocolService {
34
34
  [AMMV3.AERODROME]: "aerodrome",
35
35
  [AMMV3.zkSwap]: "zkswap",
36
36
  [AMMV3.ThirdTrade]: "thirdtrade",
37
- [AMMV3.SyncswapV3]: "syncswap-v3",
37
+ [AMMV3.SyncswapV3]: "syncswap",
38
38
  [AMMV3.Neptune]: "neptune",
39
39
  }[amm];
40
40
  }
@@ -14,22 +14,22 @@ export function generateCardName(type, typeInfo, campaign, symbols = [""]) {
14
14
  case tokenType.ra:
15
15
  case tokenType.syncswap:
16
16
  case tokenType.pancakeswap:
17
- return `Provide liquidity to ${typeInfo.protocol} ${typeInfo.symbolToken0}/${typeInfo.symbolToken1}`;
17
+ return `Provide liquidity to ${typeInfo.protocol} ${typeInfo.symbolToken0}-${typeInfo.symbolToken1}`;
18
18
  case tokenType.pendleYT:
19
19
  return `Hold ${typeInfo.protocol} ${typeInfo.name}`;
20
20
  case tokenType.pendle:
21
21
  return `Provide ${typeInfo.symbolUnderlyingToken} on ${typeInfo.protocol}`;
22
22
  case tokenType.balancerGauge:
23
- return `${typeInfo.protocol} ${symbols.join("/")}`;
23
+ return `${typeInfo.protocol} ${symbols.join("-")}`;
24
24
  case tokenType.balancerPool: {
25
- let cardName = `Provide liquidity to ${typeInfo.protocol} ${symbols.join("/")}`;
25
+ let cardName = `Provide liquidity to ${typeInfo.protocol} ${symbols.join("-")}`;
26
26
  if (typeInfo.vault === "0xFB43069f6d0473B85686a85F4Ce4Fc1FD8F00875") {
27
- cardName = `Provide liquidity to Jellyverse Pool ${symbols.join("/")}`;
27
+ cardName = `Provide liquidity to Jellyverse Pool ${symbols.join("-")}`;
28
28
  }
29
29
  return cardName;
30
30
  }
31
31
  case tokenType.aura:
32
- return `Provide liquidity to ${typeInfo.protocol} ${symbols.join("/")}`;
32
+ return `Provide liquidity to ${typeInfo.protocol} ${symbols.join("-")}`;
33
33
  case tokenType.gearbox:
34
34
  return `${typeInfo.protocol} ${typeInfo.symbolUnderlyingToken} Deposit`;
35
35
  case tokenType.compound:
@@ -42,7 +42,7 @@ export function generateCardName(type, typeInfo, campaign, symbols = [""]) {
42
42
  return `Lend ${cardToken} on ${typeInfo.protocol}`;
43
43
  }
44
44
  case tokenType.rfx:
45
- return `Supply ${typeInfo.symbolShortToken}/${typeInfo.symbolLongToken} on ${typeInfo.protocol}`;
45
+ return `Supply ${typeInfo.symbolShortToken}-${typeInfo.symbolLongToken} on ${typeInfo.protocol}`;
46
46
  case tokenType.radiant_borrow:
47
47
  case tokenType.aave_borrowing:
48
48
  case tokenType.yei_borrowing:
@@ -71,7 +71,7 @@ export function generateCardName(type, typeInfo, campaign, symbols = [""]) {
71
71
  return `Supply ${typeInfo.symbolUnderlyingToken} on ${typeInfo.protocol} ${typeInfo.symbolCollateral} Silo`;
72
72
  case tokenType.curve:
73
73
  case tokenType.curve_2:
74
- return `Provide liquidity to ${typeInfo.protocol} ${Object.values(typeInfo.poolTokens).join("/")}`;
74
+ return `Provide liquidity to ${typeInfo.protocol} ${Object.values(typeInfo.poolTokens).join("-")}`;
75
75
  case tokenType.fluid:
76
76
  return `Lend ${typeInfo.symbolUnderlyingToken} on ${typeInfo.protocol}`;
77
77
  case tokenType.enzyme:
@@ -81,7 +81,7 @@ export function generateCardName(type, typeInfo, campaign, symbols = [""]) {
81
81
  case tokenType.silostaking:
82
82
  return `Stake ${typeInfo.symbolUnderlyingToken} on ${typeInfo.protocol}`;
83
83
  case tokenType.beefy:
84
- return `Provide liquidity to ${typeInfo.protocol} ${typeInfo.symbolToken0}/${typeInfo.symbolToken1}`;
84
+ return `Provide liquidity to ${typeInfo.protocol} ${typeInfo.symbolToken0}-${typeInfo.symbolToken1}`;
85
85
  case tokenType.toros:
86
86
  return `${typeInfo.name} (${campaign.campaignParameters.symbolTargetToken}) on ${typeInfo.protocol}`;
87
87
  case tokenType.ironcladStaking:
@@ -91,18 +91,18 @@ export function generateCardName(type, typeInfo, campaign, symbols = [""]) {
91
91
  case tokenType.maverickBoostedPosition:
92
92
  return `Maverick Boosted Position ${campaign.campaignParameters.symbolTargetToken}`;
93
93
  case tokenType.zkSwapThreePool:
94
- return `Provide liquidity to ${typeInfo.protocol} ${typeInfo.symbolToken0}/${typeInfo.symbolToken1}/${typeInfo.symbolToken2}`;
94
+ return `Provide liquidity to ${typeInfo.protocol} ${typeInfo.symbolToken0}-${typeInfo.symbolToken1}-${typeInfo.symbolToken2}`;
95
95
  case tokenType.maha:
96
- return `Stake ${typeInfo.symbolToken0}/${typeInfo.symbolToken1} LP on ${typeInfo.protocol}`;
96
+ return `Stake ${typeInfo.symbolToken0}-${typeInfo.symbolToken1} LP on ${typeInfo.protocol}`;
97
97
  case tokenType.tempest:
98
98
  case tokenType.tempestStaking:
99
- return `Deposit into ${typeInfo.symbolToken0}/${typeInfo.symbolToken1} vault on ${typeInfo.protocol}`;
99
+ return `Deposit into ${typeInfo.symbolToken0}-${typeInfo.symbolToken1} vault on ${typeInfo.protocol}`;
100
100
  case tokenType.holdstation:
101
101
  return `Hold vault token ${campaign.campaignParameters.symbolTargetToken} on ${typeInfo.protocol}`;
102
102
  case tokenType.staking:
103
103
  return `${typeInfo.lockNFT !== undefined ? "Lock" : "Stake"} ${campaign.campaignParameters.symbolTargetToken} on ${typeInfo.stakingSymbol}`;
104
104
  case tokenType.cpmmGamma:
105
- return `Provide ${typeInfo.symbolToken0}/${typeInfo.symbolToken1} on ${typeInfo.protocol}`;
105
+ return `Provide ${typeInfo.symbolToken0}-${typeInfo.symbolToken1} on ${typeInfo.protocol}`;
106
106
  case tokenType.crosscurve:
107
107
  if (typeInfo.name.toLowerCase() === "eywa/usdt") {
108
108
  return `Curve ${typeInfo.name}`;