@merkl/api 0.20.102 → 0.20.103

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 (48) hide show
  1. package/dist/src/eden/index.d.ts +54 -36
  2. package/dist/src/engine/campaignTVL/factory.d.ts +1 -1
  3. package/dist/src/engine/campaignTVL/factory.js +9 -3
  4. package/dist/src/engine/campaignTVL/implementations/Erc20/Erc20SubType.d.ts +2 -0
  5. package/dist/src/engine/campaignTVL/implementations/Erc20/computeSubTypes.d.ts +2 -3
  6. package/dist/src/engine/campaignTVL/implementations/Erc20/computeSubTypes.js +117 -0
  7. package/dist/src/engine/campaignTVL/implementations/Erc20/factory.d.ts +3 -0
  8. package/dist/src/engine/campaignTVL/implementations/Erc20/factory.js +13 -0
  9. package/dist/src/engine/campaignTVL/implementations/Erc20/index.d.ts +2 -2
  10. package/dist/src/engine/campaignTVL/implementations/Erc20/index.js +20 -1
  11. package/dist/src/engine/dynamicData/implementations/Erc20.d.ts +1 -1
  12. package/dist/src/engine/dynamicData/implementations/Erc20.js +3 -9
  13. package/dist/src/engine/dynamicData/implementations/Radiant.js +2 -2
  14. package/dist/src/engine/erc20SubTypeProcessors/GenericProcessor.d.ts +1 -2
  15. package/dist/src/engine/erc20SubTypeProcessors/subtypesRound1.d.ts +1 -0
  16. package/dist/src/engine/erc20SubTypeProcessors/subtypesRound1.js +4 -4
  17. package/dist/src/engine/erc20SubTypeProcessors/subtypesRound2.d.ts +1 -2
  18. package/dist/src/engine/opportunityMetadata/factory.js +4 -2
  19. package/dist/src/engine/opportunityMetadata/implementations/ERCMultiToken.d.ts +14 -2
  20. package/dist/src/engine/opportunityMetadata/implementations/ERCMultiToken.js +52 -2
  21. package/dist/src/engine/opportunityMetadata/implementations/JsonAirdrop.d.ts +2 -2
  22. package/dist/src/index.d.ts +18 -12
  23. package/dist/src/modules/v4/campaign/campaign.service.d.ts +6 -0
  24. package/dist/src/modules/v4/campaign/campaign.service.js +9 -0
  25. package/dist/src/modules/v4/campaign/campaign.test.controller.d.ts +2 -2
  26. package/dist/src/modules/v4/campaign/campaign.test.controller.js +1 -1
  27. package/dist/src/modules/v4/computedValue/computedValue.controller.js +2 -1
  28. package/dist/src/modules/v4/computedValue/computedValue.service.d.ts +1 -1
  29. package/dist/src/modules/v4/computedValue/computedValue.service.js +5 -10
  30. package/dist/src/modules/v4/dynamicData/dynamicData.service.js +2 -2
  31. package/dist/src/modules/v4/opportunity/opportunity.controller.d.ts +7 -7
  32. package/dist/src/modules/v4/opportunity/opportunity.service.d.ts +3 -3
  33. package/dist/src/modules/v4/programPayload/programPayload.controller.d.ts +1 -1
  34. package/dist/src/modules/v4/protocol/protocol.controller.d.ts +2 -2
  35. package/dist/src/modules/v4/protocol/protocol.model.d.ts +1 -1
  36. package/dist/src/modules/v4/protocol/protocol.model.js +1 -0
  37. package/dist/src/modules/v4/router.d.ts +18 -12
  38. package/dist/src/modules/v4/token/token.controller.d.ts +6 -0
  39. package/dist/src/modules/v4/token/token.controller.js +1 -1
  40. package/dist/src/modules/v4/token/token.model.d.ts +3 -0
  41. package/dist/src/modules/v4/token/token.model.js +3 -0
  42. package/dist/src/modules/v4/token/token.repository.js +47 -25
  43. package/dist/src/modules/v4/token/token.service.d.ts +27 -6
  44. package/dist/src/modules/v4/token/token.service.js +29 -79
  45. package/dist/tsconfig.package.tsbuildinfo +1 -1
  46. package/package.json +1 -1
  47. package/dist/src/modules/v4/computedValue/index.d.ts +0 -2
  48. package/dist/src/modules/v4/computedValue/index.js +0 -2
@@ -1,10 +1,127 @@
1
+ import { Erc20SubType } from "@/engine/campaignTVL/implementations/Erc20/Erc20SubType";
2
+ import { getTypeFromFactoryAddress } from "@/engine/erc20SubTypeProcessors/helpers/factoryFinder";
3
+ import { getTypeFromAddressChain } from "@/engine/erc20SubTypeProcessors/helpers/hardcoded";
4
+ import { getTypeFromOwnerAddress } from "@/engine/erc20SubTypeProcessors/helpers/ownerFinder";
5
+ import { processNamingConditionsInOrder } from "@/engine/erc20SubTypeProcessors/subtypesRound1";
6
+ import { decodeReturnValue } from "@/utils/decodeCalls";
7
+ import { BalancerPoolInterface, BalancerV3StablePoolInterface, ChainInteractionService, ERC20Interface, EnzymeInterface, FactoryInterface, LayerBankERC20Interface, MetamorphoInterface, } from "@sdk";
1
8
  /**
2
9
  * @notice Compute the subtypes of the campaigns
3
10
  * @warning
4
11
  * @dev This function should return an array of length campaigns.length
5
12
  */
6
13
  export const computeSubTypes = async (chainId, campaigns) => {
14
+ // 1. Do a generic multicall per campaign to see which functions are supported
15
+ const callsPerCampaign = 7;
16
+ const calls = [];
17
+ for (const [index, campaign] of campaigns.entries()) {
18
+ const { targetToken } = campaign.campaignParameters;
19
+ calls.push({
20
+ allowFailure: true,
21
+ callData: FactoryInterface.encodeFunctionData("factory"),
22
+ target: targetToken,
23
+ }, {
24
+ allowFailure: true,
25
+ callData: MetamorphoInterface.encodeFunctionData("MORPHO"),
26
+ target: targetToken,
27
+ }, {
28
+ allowFailure: true,
29
+ callData: ERC20Interface.encodeFunctionData("name"),
30
+ target: targetToken,
31
+ }, {
32
+ allowFailure: true,
33
+ callData: BalancerPoolInterface.encodeFunctionData("getPoolId"),
34
+ target: targetToken,
35
+ }, {
36
+ allowFailure: true,
37
+ callData: EnzymeInterface.encodeFunctionData("getCreator"),
38
+ target: targetToken,
39
+ }, {
40
+ allowFailure: true,
41
+ callData: LayerBankERC20Interface.encodeFunctionData("owner"),
42
+ target: targetToken,
43
+ }, {
44
+ allowFailure: true,
45
+ callData: BalancerV3StablePoolInterface.encodeFunctionData("getVault"),
46
+ target: targetToken,
47
+ });
48
+ if (calls.length !== callsPerCampaign * index)
49
+ throw new Error("computeSubTypes: calls.length !== callsPerCampaign * index");
50
+ }
51
+ const callResult = await ChainInteractionService(chainId).fetchState(calls);
52
+ // 2. Decode result from the multicalls and using try catch, try to interprete the result
7
53
  const res = [];
54
+ let index = -callsPerCampaign;
55
+ for (const campaign of campaigns) {
56
+ const { targetToken } = campaign.campaignParameters;
57
+ index += callsPerCampaign;
58
+ const values = {
59
+ factory: callResult[index].returnData,
60
+ metamorpho: callResult[index + 1].returnData,
61
+ name: callResult[index + 2].returnData,
62
+ poolId: callResult[index + 3].returnData,
63
+ creator: callResult[index + 4].returnData,
64
+ owner: callResult[index + 5].returnData,
65
+ vault: callResult[index + 6].returnData,
66
+ };
67
+ // Get erc20SubType from factory address
68
+ try {
69
+ const factory = decodeReturnValue(values.factory, "factory");
70
+ res.push(getTypeFromFactoryAddress(factory));
71
+ continue;
72
+ }
73
+ catch { }
74
+ // Get erc20SubType from owner address
75
+ try {
76
+ const owner = decodeReturnValue(values.owner, "owner");
77
+ res.push(getTypeFromOwnerAddress(owner));
78
+ continue;
79
+ }
80
+ catch { }
81
+ // Get erc20SubType from address
82
+ try {
83
+ res.push(getTypeFromAddressChain(chainId, targetToken));
84
+ continue;
85
+ }
86
+ catch { }
87
+ // Get erc20SubType for enzyme (factory is replaced by dispatcher)
88
+ try {
89
+ const factory = decodeReturnValue(values.creator, "getCreator");
90
+ res.push(getTypeFromFactoryAddress(factory));
91
+ continue;
92
+ }
93
+ catch { }
94
+ // Get erc20SubType for morpho
95
+ try {
96
+ decodeReturnValue(values.metamorpho, "MORPHO");
97
+ res.push(Erc20SubType.metamorpho);
98
+ }
99
+ catch { }
100
+ // Starting from this point, assume the name is working
101
+ try {
102
+ const name = decodeReturnValue(values.name, "name");
103
+ // Get erc20SubType for balancer
104
+ try {
105
+ decodeReturnValue(values.poolId, "getPoolId");
106
+ res.push(Erc20SubType.balancerPool);
107
+ }
108
+ catch { }
109
+ try {
110
+ decodeReturnValue(values.vault, "getVault");
111
+ res.push(Erc20SubType.balancerPool);
112
+ }
113
+ catch { }
114
+ // Get erc20SubType by parsing information from the erc20 name
115
+ const typeInfoFromName = processNamingConditionsInOrder(name, targetToken, campaign);
116
+ if (!!typeInfoFromName) {
117
+ res.push(typeInfoFromName.type);
118
+ continue;
119
+ }
120
+ }
121
+ catch { }
122
+ // Default
123
+ res.push(Erc20SubType.unknown);
124
+ }
8
125
  if (res.length !== campaigns.length)
9
126
  throw new Error("computeSubTypes: res.length !== campaigns.length");
10
127
  return [];
@@ -0,0 +1,3 @@
1
+ import type { CampaignTVLBuilder } from "../../interface";
2
+ import type { Erc20SubType } from "./Erc20SubType";
3
+ export declare const erc20SubTypeTVLBuilderFactory: (erc20Subtype: Erc20SubType) => CampaignTVLBuilder<any> | null;
@@ -0,0 +1,13 @@
1
+ /**
2
+ * @dev TYPE SAFETY DISABLED FOR NOW AS WE DON'T HAVE ALL THE CAMPAIGNS IMPLEMENTED
3
+ *
4
+ * @dev Casts are made to enforce type safety
5
+ * @dev A type error must be thrown if a new erc20Subtype is added and the corresponding builder is not implemented
6
+ */
7
+ const map = {};
8
+ export const erc20SubTypeTVLBuilderFactory = (erc20Subtype) => {
9
+ if (!map[erc20Subtype]) {
10
+ return null;
11
+ }
12
+ return map[erc20Subtype];
13
+ };
@@ -1,6 +1,6 @@
1
- import type { Campaign, CampaignParameters, MerklChainId } from "@sdk";
1
+ import type { CampaignParameters, MerklChainId } from "@sdk";
2
2
  import type { CampaignTVLBuilder, TVLData } from "../../interface";
3
- export type Erc20LikeCampaignEnum = Campaign.ERC20 | Campaign.ERC20LOGPROCESSOR | Campaign.ERC20REBASELOGPROCESSOR | Campaign.EULER | Campaign.ERC20_FIX_APR;
3
+ import type { Erc20LikeCampaignEnum } from "./Erc20SubType";
4
4
  export declare class Erc20CampaignTVLBuilder implements CampaignTVLBuilder<Erc20LikeCampaignEnum> {
5
5
  build(chainId: MerklChainId, campaigns: CampaignParameters<Erc20LikeCampaignEnum>[]): Promise<TVLData>;
6
6
  }
@@ -1,8 +1,27 @@
1
+ import { Erc20DynamicData } from "@/engine/dynamicData/implementations/Erc20";
1
2
  import { computeSubTypes } from "./computeSubTypes";
3
+ import { erc20SubTypeTVLBuilderFactory } from "./factory";
2
4
  export class Erc20CampaignTVLBuilder {
3
5
  async build(chainId, campaigns) {
4
6
  const subTypes = await computeSubTypes(chainId, campaigns);
5
- const tvls = [];
7
+ let tvls = [];
8
+ for (const subtype of new Set(subTypes)) {
9
+ const builder = erc20SubTypeTVLBuilderFactory(subtype);
10
+ if (!!builder) {
11
+ tvls = tvls.concat(await builder.build(chainId, campaigns.filter((_campaign, index) => subTypes[index] === subtype)));
12
+ }
13
+ else {
14
+ // @deprecated In case we don't have the new builder, use the old erc20 dynamic data
15
+ const dynamicDataList = await new Erc20DynamicData().build(chainId, campaigns);
16
+ for (const [index, dynamicData] of dynamicDataList.entries()) {
17
+ tvls.push({
18
+ campaign: campaigns[index],
19
+ tvl: dynamicData.tvl,
20
+ tvlBreakdown: [],
21
+ });
22
+ }
23
+ }
24
+ }
6
25
  return tvls;
7
26
  }
8
27
  }
@@ -1,4 +1,4 @@
1
- import type { Erc20LikeCampaignEnum } from "@/engine/campaignTVL/implementations/Erc20";
1
+ import { type Erc20LikeCampaignEnum } from "@/engine/campaignTVL/implementations/Erc20/Erc20SubType";
2
2
  import { type CampaignParameters, type MerklChainId } from "@sdk";
3
3
  import type { DynamicDataBuilder } from "../interface";
4
4
  export declare class Erc20DynamicData implements DynamicDataBuilder<Erc20LikeCampaignEnum> {
@@ -4,7 +4,7 @@ import { getTokenTypeRound1 } from "@/engine/erc20SubTypeProcessors/subtypesRoun
4
4
  import { getTokenTypeRound2 } from "@/engine/erc20SubTypeProcessors/subtypesRound2";
5
5
  import { getTokenTypeRound3 } from "@/engine/erc20SubTypeProcessors/subtypesRound3";
6
6
  import { getTokenTypeRound4 } from "@/engine/erc20SubTypeProcessors/subtypesRound4";
7
- import { ComputedValueService } from "@/modules/v4/computedValue";
7
+ import { ComputedValueService } from "@/modules/v4/computedValue/computedValue.service";
8
8
  import { TokenRepository } from "@/modules/v4/token/token.repository";
9
9
  import { TokenService } from "@/modules/v4/token/token.service";
10
10
  import { log } from "@/utils/logger";
@@ -133,18 +133,12 @@ export class Erc20DynamicData {
133
133
  let lastEligibilityRatio = 1;
134
134
  if (!!campaign.campaignParameters.hooks?.length) {
135
135
  lastEligibilityRatio =
136
- (await ComputedValueService.findCampaignValue({
137
- campaignId: `${campaign.campaignId}-${chainId}`,
138
- field: "averageBoost",
139
- }))?.averageBoost ?? 1;
136
+ (await ComputedValueService.findCampaignValue(Bun.hash(`${campaign.chainId}${campaign.campaignId}`).toString(), "averageBoost"))?.averageBoost ?? 1;
140
137
  }
141
138
  const forfeitingBoost = 1;
142
139
  if (!!campaign.campaignParameters.hooks?.length) {
143
140
  lastEligibilityRatio =
144
- (await ComputedValueService.findCampaignValue({
145
- campaignId: `${campaign.campaignId}-${chainId}`,
146
- field: "forfeitingBoost",
147
- }))?.forfeitingBoost ?? 1;
141
+ (await ComputedValueService.findCampaignValue(Bun.hash(`${campaign.chainId}${campaign.campaignId}`).toString(), "forfeitingBoost"))?.forfeitingBoost ?? 1;
148
142
  }
149
143
  let apr = (lastEligibilityRatio *
150
144
  forfeitingBoost *
@@ -1,4 +1,4 @@
1
- import { ComputedValueService } from "@/modules/v4/computedValue";
1
+ import { CampaignService } from "@/modules/v4/campaign";
2
2
  import { TokenService } from "@/modules/v4/token/token.service";
3
3
  import { engineDbClient } from "@db";
4
4
  import { BN2Number, ChainInteractionService, ERC20Interface, NULL_ADDRESS, RadiantInterface, RadiantPoolInterface, YEAR, } from "@sdk";
@@ -57,7 +57,7 @@ export class RadiantDynamicData {
57
57
  if (!!campaign.campaignParameters.hooks?.length) {
58
58
  for (const campaignId of [campaign.campaignId, ...backupCampaignIds]) {
59
59
  lastEligibilityRatio =
60
- (await ComputedValueService.findCampaignValue({
60
+ (await CampaignService.findCampaignValue({
61
61
  campaignId: `${campaignId}-${chainId}`,
62
62
  field: "averageBoost",
63
63
  }))?.averageBoost ?? 1;
@@ -1,7 +1,6 @@
1
1
  import type { Pricer } from "@/utils/pricer";
2
2
  import { type CallDto, type Campaign, type CampaignParameters } from "@sdk";
3
- import type { Erc20LikeCampaignEnum } from "../campaignTVL/implementations/Erc20";
4
- import type { Erc20SubType } from "../campaignTVL/implementations/Erc20/Erc20SubType";
3
+ import type { Erc20LikeCampaignEnum, Erc20SubType } from "../campaignTVL/implementations/Erc20/Erc20SubType";
5
4
  import type { tokenTypeStruct } from "./tokenTypeStruct";
6
5
  export declare enum Round {
7
6
  one = "round1",
@@ -1,3 +1,4 @@
1
1
  import type { Campaign, CampaignParameters, ResultDto } from "@sdk";
2
2
  import type { tokenTypeStruct } from "./tokenTypeStruct";
3
+ export declare function processNamingConditionsInOrder(name: string, targetToken: string, campaign: CampaignParameters<Campaign.ERC20> | CampaignParameters<Campaign.ERC20LOGPROCESSOR> | CampaignParameters<Campaign.ERC20REBASELOGPROCESSOR> | CampaignParameters<Campaign.EULER>): tokenTypeStruct | undefined;
3
4
  export declare function getTokenTypeRound1(calls: ResultDto[], targetToken: string, index: number, campaign: CampaignParameters<Campaign.ERC20> | CampaignParameters<Campaign.ERC20LOGPROCESSOR> | CampaignParameters<Campaign.ERC20REBASELOGPROCESSOR> | CampaignParameters<Campaign.EULER>): tokenTypeStruct;
@@ -191,7 +191,9 @@ function processNamingConditions(type, name, targetToken, campaign) {
191
191
  return generateResult(type, name, targetToken, {}, campaign);
192
192
  }
193
193
  }
194
- function processNamingConditionsInOrder(types, name, targetToken, campaign) {
194
+ export function processNamingConditionsInOrder(name, targetToken, campaign) {
195
+ // Order matters
196
+ const types = Object.values(Erc20SubType).filter(value => typeof value === "string");
195
197
  for (const type of types) {
196
198
  const result = processNamingConditions(type, name, targetToken, campaign);
197
199
  if (result)
@@ -337,9 +339,7 @@ export function getTokenTypeRound1(calls, targetToken, index, campaign) {
337
339
  result = parseForBalancer(returnValue, targetToken, name);
338
340
  if (result)
339
341
  return result;
340
- // Order matters
341
- const ordered_token_Type = Object.values(Erc20SubType).filter(value => typeof value === "string");
342
- result = processNamingConditionsInOrder(ordered_token_Type, name, targetToken, campaign);
342
+ result = processNamingConditionsInOrder(name, targetToken, campaign);
343
343
  if (result)
344
344
  return result;
345
345
  return generateResult(Erc20SubType.unknown, name, targetToken, {}, campaign);
@@ -1,4 +1,3 @@
1
1
  import type { CampaignParameters, ResultDto } from "@sdk";
2
- import type { Erc20LikeCampaignEnum } from "../campaignTVL/implementations/Erc20";
3
- import type { Erc20SubType } from "../campaignTVL/implementations/Erc20/Erc20SubType";
2
+ import type { Erc20LikeCampaignEnum, Erc20SubType } from "../campaignTVL/implementations/Erc20/Erc20SubType";
4
3
  export declare function getTokenTypeRound2(index: number, type: Erc20SubType, typeInfo: any, calls: ResultDto[], campaign?: CampaignParameters<Erc20LikeCampaignEnum>): import("./tokenTypeStruct").tokenTypeStruct;
@@ -23,8 +23,10 @@ import { RadiantMetadata } from "./implementations/Radiant";
23
23
  import { SiloMetadata } from "./implementations/Silo";
24
24
  import { UniswapV4Metadata } from "./implementations/UniswapV4";
25
25
  import { VestMetadata } from "./implementations/Vest";
26
- // @dev Casts are made to enforce type safety
27
- // @dev A type error must be thrown if a new campaign type is added and the corresponding builder is not implemented
26
+ /**
27
+ * @dev Casts are made to enforce type safety
28
+ * @dev A type error must be thrown if a new campaign type is added and the corresponding builder is not implemented
29
+ */
28
30
  const map = {
29
31
  [Campaign.INVALID]: new InvalidMetadata(),
30
32
  [Campaign.ERC20]: new Erc20Metadata(),
@@ -1,4 +1,5 @@
1
- import type { Campaign as CampaignEnum, CampaignParameters, ChainId } from "@sdk";
1
+ import type { ProtocolId } from "@/modules/v4/protocol/protocol.model";
2
+ import { type Campaign as CampaignEnum, type CampaignParameters, type ChainId } from "@sdk";
2
3
  import type { MetadataBuilder } from "../interface";
3
4
  type campaignType = CampaignEnum.ERC1155 | CampaignEnum.ERC1155FIXAPR | CampaignEnum.ERC6909 | CampaignEnum.ERC6909FIXAPR;
4
5
  export declare class ERCMultiTokenMetadata implements MetadataBuilder<campaignType> {
@@ -7,8 +8,19 @@ export declare class ERCMultiTokenMetadata implements MetadataBuilder<campaignTy
7
8
  name: string;
8
9
  tokens: {
9
10
  chainId: ChainId;
10
- address: any;
11
+ address: CampaignParameters<any>;
11
12
  }[];
13
+ explorerAddress: CampaignParameters<any>;
14
+ mainProtocol: ProtocolId;
15
+ depositUrl: string;
16
+ } | {
17
+ action: "HOLD";
18
+ name: string;
19
+ tokens: {
20
+ chainId: ChainId;
21
+ address: CampaignParameters<any>;
22
+ }[];
23
+ explorerAddress: CampaignParameters<any>;
12
24
  mainProtocol: undefined;
13
25
  depositUrl: undefined;
14
26
  }>;
@@ -1,10 +1,60 @@
1
1
  import { OpportunityAction } from "@db/api";
2
+ import { ChainInteractionService, TokenInteractionService, } from "@sdk";
3
+ import { utils } from "ethers";
2
4
  export class ERCMultiTokenMetadata {
3
5
  async build(computeChainId, params) {
6
+ const { targetToken, tokenId } = params;
7
+ // Sonic Market Case
8
+ try {
9
+ const BOOK_MANAGER = "0xD4aD5Ed9E1436904624b6dB8B1BE31f36317C636";
10
+ const tokenInterface = new utils.Interface(["function getBookPairs(bytes32) view returns (uint192,uint192)"]);
11
+ const bookManagerInterface = new utils.Interface([
12
+ "function getBookKey(uint192) view returns (address,uint64,address,uint64,address,uint64)",
13
+ ]);
14
+ const callResult1 = await ChainInteractionService(computeChainId).fetchState([
15
+ {
16
+ target: targetToken,
17
+ callData: tokenInterface.encodeFunctionData("getBookPairs", [tokenId]),
18
+ allowFailure: true,
19
+ },
20
+ ]);
21
+ const pairAId = tokenInterface.decodeFunctionResult("getBookPairs", callResult1[0].returnData)[0];
22
+ const pairBId = tokenInterface.decodeFunctionResult("getBookPairs", callResult1[0].returnData)[1];
23
+ const callResult2 = await ChainInteractionService(computeChainId).fetchState([
24
+ {
25
+ target: BOOK_MANAGER,
26
+ callData: bookManagerInterface.encodeFunctionData("getBookKey", [pairAId]),
27
+ allowFailure: true,
28
+ },
29
+ {
30
+ target: BOOK_MANAGER,
31
+ callData: bookManagerInterface.encodeFunctionData("getBookKey", [pairBId]),
32
+ allowFailure: true,
33
+ },
34
+ ]);
35
+ const baseCurrency = bookManagerInterface.decodeFunctionResult("getBookKey", callResult2[0].returnData)[0];
36
+ const quoteCurrency = bookManagerInterface.decodeFunctionResult("getBookKey", callResult2[1].returnData)[0];
37
+ const baseCurrencyInfo = await TokenInteractionService(computeChainId).info(baseCurrency);
38
+ const quoteCurrencyInfo = await TokenInteractionService(computeChainId).info(quoteCurrency);
39
+ return {
40
+ action: OpportunityAction.HOLD,
41
+ name: `Participate to Sonic Market ${baseCurrencyInfo.symbol}-${quoteCurrencyInfo.symbol}`,
42
+ tokens: [
43
+ { chainId: computeChainId, address: targetToken },
44
+ { chainId: computeChainId, address: baseCurrency },
45
+ { chainId: computeChainId, address: quoteCurrency },
46
+ ],
47
+ explorerAddress: targetToken,
48
+ mainProtocol: "sonicmarket",
49
+ depositUrl: `https://www.sonic.market/earn/${tokenId}?chain=${computeChainId}`,
50
+ };
51
+ }
52
+ catch { }
4
53
  return {
5
54
  action: OpportunityAction.HOLD,
6
- name: `Hold ${params.symbolTargetToken} with token ID ${params.tokenId}`,
7
- tokens: [{ chainId: computeChainId, address: params.targetToken }],
55
+ name: `Hold ${params.symbolTargetToken} with token ID ${tokenId}`,
56
+ tokens: [{ chainId: computeChainId, address: targetToken }],
57
+ explorerAddress: targetToken,
8
58
  mainProtocol: undefined,
9
59
  depositUrl: undefined,
10
60
  };
@@ -9,13 +9,13 @@ export declare class JsonAirdropMetadata implements MetadataBuilder<campaignType
9
9
  chainId: ChainId;
10
10
  address: string;
11
11
  }[];
12
- mainProtocol: "splice" | "morpho" | "quickswap" | "euler" | "ambient" | "aura" | "poolside" | "gearbox" | "filament" | "fluid" | "compound" | "ionic" | "layerbank" | "moonwell" | "fraxlend" | "fenix" | "ra" | "syncswap" | "beefy" | "aerodrome" | "velodrome" | "curve" | "toros" | "akron" | "enzyme" | "dragonswap" | "koi" | "rfx" | "woofi" | "pendle" | "zkSwapThreePool" | "maha" | "tempest" | "holdstation" | "venus" | "reactor_fusion" | "vicuna" | "curveNPool" | "satlayer" | "veda" | "cian" | "concrete" | "hourglass" | "katana" | "gamma" | "uniswap" | "arthswap" | "base-swap" | "camelot" | "crust" | "horiza" | "izumi" | "kim" | "pancake-swap" | "ramses" | "retro" | "stryke" | "sushi-swap" | "swapr" | "thruster" | "voltage" | "zero" | "supswap" | "zk-swap" | "thirdtrade" | "swap-x" | "balancer" | "cross_curve" | "neptune" | "maverick" | "trader-joe" | "hanji" | "radiant" | "aave" | "ironclad" | "sturdy" | "frax" | "silo" | "dolomite" | "badger" | "ajna" | "ion" | "eigenlayer" | "vest" | "zerolend" | "hyperdrive" | "oku" | "kyo" | "sonex" | "lendle" | "tako-tako" | "equalizer" | "spectra" | "beraborrow" | "superlend" | "avalon" | "iguana" | "xlend" | "sake" | "angles" | "bunni" | "beratrax" | "yei" | "gammaswap" | "uranium" | undefined;
12
+ mainProtocol: "splice" | "morpho" | "quickswap" | "euler" | "ambient" | "aura" | "poolside" | "gearbox" | "filament" | "fluid" | "compound" | "ionic" | "layerbank" | "moonwell" | "fraxlend" | "fenix" | "ra" | "syncswap" | "beefy" | "aerodrome" | "velodrome" | "curve" | "toros" | "akron" | "enzyme" | "dragonswap" | "koi" | "rfx" | "woofi" | "pendle" | "zkSwapThreePool" | "maha" | "tempest" | "holdstation" | "venus" | "reactor_fusion" | "vicuna" | "curveNPool" | "satlayer" | "veda" | "cian" | "concrete" | "hourglass" | "katana" | "gamma" | "uniswap" | "arthswap" | "base-swap" | "camelot" | "crust" | "horiza" | "izumi" | "kim" | "pancake-swap" | "ramses" | "retro" | "stryke" | "sushi-swap" | "swapr" | "thruster" | "voltage" | "zero" | "supswap" | "zk-swap" | "thirdtrade" | "swap-x" | "balancer" | "cross_curve" | "neptune" | "maverick" | "trader-joe" | "hanji" | "radiant" | "aave" | "ironclad" | "sturdy" | "frax" | "silo" | "dolomite" | "badger" | "ajna" | "ion" | "eigenlayer" | "vest" | "zerolend" | "hyperdrive" | "oku" | "kyo" | "sonex" | "lendle" | "tako-tako" | "equalizer" | "spectra" | "beraborrow" | "superlend" | "avalon" | "iguana" | "xlend" | "sake" | "sonicmarket" | "angles" | "bunni" | "beratrax" | "yei" | "gammaswap" | "uranium" | undefined;
13
13
  depositUrl?: undefined;
14
14
  } | {
15
15
  action: "DROP";
16
16
  name: string;
17
17
  tokens: never[];
18
- mainProtocol: "splice" | "morpho" | "quickswap" | "euler" | "ambient" | "aura" | "poolside" | "gearbox" | "filament" | "fluid" | "compound" | "ionic" | "layerbank" | "moonwell" | "fraxlend" | "fenix" | "ra" | "syncswap" | "beefy" | "aerodrome" | "velodrome" | "curve" | "toros" | "akron" | "enzyme" | "dragonswap" | "koi" | "rfx" | "woofi" | "pendle" | "zkSwapThreePool" | "maha" | "tempest" | "holdstation" | "venus" | "reactor_fusion" | "vicuna" | "curveNPool" | "satlayer" | "veda" | "cian" | "concrete" | "hourglass" | "katana" | "gamma" | "uniswap" | "arthswap" | "base-swap" | "camelot" | "crust" | "horiza" | "izumi" | "kim" | "pancake-swap" | "ramses" | "retro" | "stryke" | "sushi-swap" | "swapr" | "thruster" | "voltage" | "zero" | "supswap" | "zk-swap" | "thirdtrade" | "swap-x" | "balancer" | "cross_curve" | "neptune" | "maverick" | "trader-joe" | "hanji" | "radiant" | "aave" | "ironclad" | "sturdy" | "frax" | "silo" | "dolomite" | "badger" | "ajna" | "ion" | "eigenlayer" | "vest" | "zerolend" | "hyperdrive" | "oku" | "kyo" | "sonex" | "lendle" | "tako-tako" | "equalizer" | "spectra" | "beraborrow" | "superlend" | "avalon" | "iguana" | "xlend" | "sake" | "angles" | "bunni" | "beratrax" | "yei" | "gammaswap" | "uranium" | undefined;
18
+ mainProtocol: "splice" | "morpho" | "quickswap" | "euler" | "ambient" | "aura" | "poolside" | "gearbox" | "filament" | "fluid" | "compound" | "ionic" | "layerbank" | "moonwell" | "fraxlend" | "fenix" | "ra" | "syncswap" | "beefy" | "aerodrome" | "velodrome" | "curve" | "toros" | "akron" | "enzyme" | "dragonswap" | "koi" | "rfx" | "woofi" | "pendle" | "zkSwapThreePool" | "maha" | "tempest" | "holdstation" | "venus" | "reactor_fusion" | "vicuna" | "curveNPool" | "satlayer" | "veda" | "cian" | "concrete" | "hourglass" | "katana" | "gamma" | "uniswap" | "arthswap" | "base-swap" | "camelot" | "crust" | "horiza" | "izumi" | "kim" | "pancake-swap" | "ramses" | "retro" | "stryke" | "sushi-swap" | "swapr" | "thruster" | "voltage" | "zero" | "supswap" | "zk-swap" | "thirdtrade" | "swap-x" | "balancer" | "cross_curve" | "neptune" | "maverick" | "trader-joe" | "hanji" | "radiant" | "aave" | "ironclad" | "sturdy" | "frax" | "silo" | "dolomite" | "badger" | "ajna" | "ion" | "eigenlayer" | "vest" | "zerolend" | "hyperdrive" | "oku" | "kyo" | "sonex" | "lendle" | "tako-tako" | "equalizer" | "spectra" | "beraborrow" | "superlend" | "avalon" | "iguana" | "xlend" | "sake" | "sonicmarket" | "angles" | "bunni" | "beratrax" | "yei" | "gammaswap" | "uranium" | undefined;
19
19
  depositUrl: any;
20
20
  }>;
21
21
  static generateUrl(_computeChainId: ChainId, params: CampaignParameters<campaignType>["campaignParameters"]): any;
@@ -301,7 +301,7 @@ declare const app: Elysia<"", false, {
301
301
  } & {
302
302
  price?: number | null | undefined;
303
303
  })[];
304
- mainProtocol: "splice" | "morpho" | "quickswap" | "euler" | "ambient" | "aura" | "poolside" | "gearbox" | "filament" | "fluid" | "compound" | "ionic" | "layerbank" | "moonwell" | "fraxlend" | "fenix" | "ra" | "syncswap" | "beefy" | "aerodrome" | "velodrome" | "curve" | "toros" | "akron" | "enzyme" | "dragonswap" | "koi" | "rfx" | "woofi" | "pendle" | "zkSwapThreePool" | "maha" | "tempest" | "holdstation" | "venus" | "reactor_fusion" | "vicuna" | "curveNPool" | "satlayer" | "veda" | "cian" | "concrete" | "hourglass" | "katana" | "gamma" | "uniswap" | "arthswap" | "base-swap" | "camelot" | "crust" | "horiza" | "izumi" | "kim" | "pancake-swap" | "ramses" | "retro" | "stryke" | "sushi-swap" | "swapr" | "thruster" | "voltage" | "zero" | "supswap" | "zk-swap" | "thirdtrade" | "swap-x" | "balancer" | "cross_curve" | "neptune" | "maverick" | "trader-joe" | "hanji" | "radiant" | "aave" | "ironclad" | "sturdy" | "frax" | "silo" | "dolomite" | "badger" | "ajna" | "ion" | "eigenlayer" | "vest" | "zerolend" | "hyperdrive" | "oku" | "kyo" | "sonex" | "lendle" | "tako-tako" | "equalizer" | "spectra" | "beraborrow" | "superlend" | "avalon" | "iguana" | "xlend" | "sake" | "angles" | "bunni" | "beratrax" | "yei" | "gammaswap" | "uranium" | undefined;
304
+ mainProtocol: "splice" | "morpho" | "quickswap" | "euler" | "ambient" | "aura" | "poolside" | "gearbox" | "filament" | "fluid" | "compound" | "ionic" | "layerbank" | "moonwell" | "fraxlend" | "fenix" | "ra" | "syncswap" | "beefy" | "aerodrome" | "velodrome" | "curve" | "toros" | "akron" | "enzyme" | "dragonswap" | "koi" | "rfx" | "woofi" | "pendle" | "zkSwapThreePool" | "maha" | "tempest" | "holdstation" | "venus" | "reactor_fusion" | "vicuna" | "curveNPool" | "satlayer" | "veda" | "cian" | "concrete" | "hourglass" | "katana" | "gamma" | "uniswap" | "arthswap" | "base-swap" | "camelot" | "crust" | "horiza" | "izumi" | "kim" | "pancake-swap" | "ramses" | "retro" | "stryke" | "sushi-swap" | "swapr" | "thruster" | "voltage" | "zero" | "supswap" | "zk-swap" | "thirdtrade" | "swap-x" | "balancer" | "cross_curve" | "neptune" | "maverick" | "trader-joe" | "hanji" | "radiant" | "aave" | "ironclad" | "sturdy" | "frax" | "silo" | "dolomite" | "badger" | "ajna" | "ion" | "eigenlayer" | "vest" | "zerolend" | "hyperdrive" | "oku" | "kyo" | "sonex" | "lendle" | "tako-tako" | "equalizer" | "spectra" | "beraborrow" | "superlend" | "avalon" | "iguana" | "xlend" | "sake" | "sonicmarket" | "angles" | "bunni" | "beratrax" | "yei" | "gammaswap" | "uranium" | undefined;
305
305
  depositUrl: any;
306
306
  explorerAddress: string | undefined;
307
307
  tags: string[];
@@ -365,7 +365,7 @@ declare const app: Elysia<"", false, {
365
365
  } & {
366
366
  price?: number | null | undefined;
367
367
  })[];
368
- mainProtocol: "splice" | "morpho" | "quickswap" | "euler" | "ambient" | "aura" | "poolside" | "gearbox" | "filament" | "fluid" | "compound" | "ionic" | "layerbank" | "moonwell" | "fraxlend" | "fenix" | "ra" | "syncswap" | "beefy" | "aerodrome" | "velodrome" | "curve" | "toros" | "akron" | "enzyme" | "dragonswap" | "koi" | "rfx" | "woofi" | "pendle" | "zkSwapThreePool" | "maha" | "tempest" | "holdstation" | "venus" | "reactor_fusion" | "vicuna" | "curveNPool" | "satlayer" | "veda" | "cian" | "concrete" | "hourglass" | "katana" | "gamma" | "uniswap" | "arthswap" | "base-swap" | "camelot" | "crust" | "horiza" | "izumi" | "kim" | "pancake-swap" | "ramses" | "retro" | "stryke" | "sushi-swap" | "swapr" | "thruster" | "voltage" | "zero" | "supswap" | "zk-swap" | "thirdtrade" | "swap-x" | "balancer" | "cross_curve" | "neptune" | "maverick" | "trader-joe" | "hanji" | "radiant" | "aave" | "ironclad" | "sturdy" | "frax" | "silo" | "dolomite" | "badger" | "ajna" | "ion" | "eigenlayer" | "vest" | "zerolend" | "hyperdrive" | "oku" | "kyo" | "sonex" | "lendle" | "tako-tako" | "equalizer" | "spectra" | "beraborrow" | "superlend" | "avalon" | "iguana" | "xlend" | "sake" | "angles" | "bunni" | "beratrax" | "yei" | "gammaswap" | "uranium" | undefined;
368
+ mainProtocol: "splice" | "morpho" | "quickswap" | "euler" | "ambient" | "aura" | "poolside" | "gearbox" | "filament" | "fluid" | "compound" | "ionic" | "layerbank" | "moonwell" | "fraxlend" | "fenix" | "ra" | "syncswap" | "beefy" | "aerodrome" | "velodrome" | "curve" | "toros" | "akron" | "enzyme" | "dragonswap" | "koi" | "rfx" | "woofi" | "pendle" | "zkSwapThreePool" | "maha" | "tempest" | "holdstation" | "venus" | "reactor_fusion" | "vicuna" | "curveNPool" | "satlayer" | "veda" | "cian" | "concrete" | "hourglass" | "katana" | "gamma" | "uniswap" | "arthswap" | "base-swap" | "camelot" | "crust" | "horiza" | "izumi" | "kim" | "pancake-swap" | "ramses" | "retro" | "stryke" | "sushi-swap" | "swapr" | "thruster" | "voltage" | "zero" | "supswap" | "zk-swap" | "thirdtrade" | "swap-x" | "balancer" | "cross_curve" | "neptune" | "maverick" | "trader-joe" | "hanji" | "radiant" | "aave" | "ironclad" | "sturdy" | "frax" | "silo" | "dolomite" | "badger" | "ajna" | "ion" | "eigenlayer" | "vest" | "zerolend" | "hyperdrive" | "oku" | "kyo" | "sonex" | "lendle" | "tako-tako" | "equalizer" | "spectra" | "beraborrow" | "superlend" | "avalon" | "iguana" | "xlend" | "sake" | "sonicmarket" | "angles" | "bunni" | "beratrax" | "yei" | "gammaswap" | "uranium" | undefined;
369
369
  depositUrl: any;
370
370
  explorerAddress: string | undefined;
371
371
  tags: string[];
@@ -398,9 +398,9 @@ declare const app: Elysia<"", false, {
398
398
  mainProtocolId?: string | undefined;
399
399
  campaigns?: boolean | undefined;
400
400
  point?: boolean | undefined;
401
- test?: boolean | undefined;
402
401
  rewardTokenSymbol?: string | undefined;
403
402
  order?: string | undefined;
403
+ test?: boolean | undefined;
404
404
  minimumTvl?: number | undefined;
405
405
  };
406
406
  headers: unknown;
@@ -601,9 +601,9 @@ declare const app: Elysia<"", false, {
601
601
  mainProtocolId?: string | undefined;
602
602
  campaigns?: boolean | undefined;
603
603
  point?: boolean | undefined;
604
- test?: boolean | undefined;
605
604
  rewardTokenSymbol?: string | undefined;
606
605
  order?: string | undefined;
606
+ test?: boolean | undefined;
607
607
  minimumTvl?: number | undefined;
608
608
  };
609
609
  headers: unknown;
@@ -1107,9 +1107,9 @@ declare const app: Elysia<"", false, {
1107
1107
  mainProtocolId?: string | undefined;
1108
1108
  campaigns?: boolean | undefined;
1109
1109
  point?: boolean | undefined;
1110
- test?: boolean | undefined;
1111
1110
  rewardTokenSymbol?: string | undefined;
1112
1111
  order?: string | undefined;
1112
+ test?: boolean | undefined;
1113
1113
  minimumTvl?: number | undefined;
1114
1114
  };
1115
1115
  headers: unknown;
@@ -1150,9 +1150,9 @@ declare const app: Elysia<"", false, {
1150
1150
  mainProtocolId?: string | undefined;
1151
1151
  campaigns?: boolean | undefined;
1152
1152
  point?: boolean | undefined;
1153
- test?: boolean | undefined;
1154
1153
  rewardTokenSymbol?: string | undefined;
1155
1154
  order?: string | undefined;
1155
+ test?: boolean | undefined;
1156
1156
  minimumTvl?: number | undefined;
1157
1157
  };
1158
1158
  headers: unknown;
@@ -1194,9 +1194,9 @@ declare const app: Elysia<"", false, {
1194
1194
  mainProtocolId?: string | undefined;
1195
1195
  campaigns?: boolean | undefined;
1196
1196
  point?: boolean | undefined;
1197
- test?: boolean | undefined;
1198
1197
  rewardTokenSymbol?: string | undefined;
1199
1198
  order?: string | undefined;
1199
+ test?: boolean | undefined;
1200
1200
  minimumTvl?: number | undefined;
1201
1201
  };
1202
1202
  headers: unknown;
@@ -2045,7 +2045,7 @@ declare const app: Elysia<"", false, {
2045
2045
  } & {
2046
2046
  price?: number | null | undefined;
2047
2047
  })[];
2048
- mainProtocol: "splice" | "morpho" | "quickswap" | "euler" | "ambient" | "aura" | "poolside" | "gearbox" | "filament" | "fluid" | "compound" | "ionic" | "layerbank" | "moonwell" | "fraxlend" | "fenix" | "ra" | "syncswap" | "beefy" | "aerodrome" | "velodrome" | "curve" | "toros" | "akron" | "enzyme" | "dragonswap" | "koi" | "rfx" | "woofi" | "pendle" | "zkSwapThreePool" | "maha" | "tempest" | "holdstation" | "venus" | "reactor_fusion" | "vicuna" | "curveNPool" | "satlayer" | "veda" | "cian" | "concrete" | "hourglass" | "katana" | "gamma" | "uniswap" | "arthswap" | "base-swap" | "camelot" | "crust" | "horiza" | "izumi" | "kim" | "pancake-swap" | "ramses" | "retro" | "stryke" | "sushi-swap" | "swapr" | "thruster" | "voltage" | "zero" | "supswap" | "zk-swap" | "thirdtrade" | "swap-x" | "balancer" | "cross_curve" | "neptune" | "maverick" | "trader-joe" | "hanji" | "radiant" | "aave" | "ironclad" | "sturdy" | "frax" | "silo" | "dolomite" | "badger" | "ajna" | "ion" | "eigenlayer" | "vest" | "zerolend" | "hyperdrive" | "oku" | "kyo" | "sonex" | "lendle" | "tako-tako" | "equalizer" | "spectra" | "beraborrow" | "superlend" | "avalon" | "iguana" | "xlend" | "sake" | "angles" | "bunni" | "beratrax" | "yei" | "gammaswap" | "uranium" | undefined;
2048
+ mainProtocol: "splice" | "morpho" | "quickswap" | "euler" | "ambient" | "aura" | "poolside" | "gearbox" | "filament" | "fluid" | "compound" | "ionic" | "layerbank" | "moonwell" | "fraxlend" | "fenix" | "ra" | "syncswap" | "beefy" | "aerodrome" | "velodrome" | "curve" | "toros" | "akron" | "enzyme" | "dragonswap" | "koi" | "rfx" | "woofi" | "pendle" | "zkSwapThreePool" | "maha" | "tempest" | "holdstation" | "venus" | "reactor_fusion" | "vicuna" | "curveNPool" | "satlayer" | "veda" | "cian" | "concrete" | "hourglass" | "katana" | "gamma" | "uniswap" | "arthswap" | "base-swap" | "camelot" | "crust" | "horiza" | "izumi" | "kim" | "pancake-swap" | "ramses" | "retro" | "stryke" | "sushi-swap" | "swapr" | "thruster" | "voltage" | "zero" | "supswap" | "zk-swap" | "thirdtrade" | "swap-x" | "balancer" | "cross_curve" | "neptune" | "maverick" | "trader-joe" | "hanji" | "radiant" | "aave" | "ironclad" | "sturdy" | "frax" | "silo" | "dolomite" | "badger" | "ajna" | "ion" | "eigenlayer" | "vest" | "zerolend" | "hyperdrive" | "oku" | "kyo" | "sonex" | "lendle" | "tako-tako" | "equalizer" | "spectra" | "beraborrow" | "superlend" | "avalon" | "iguana" | "xlend" | "sake" | "sonicmarket" | "angles" | "bunni" | "beratrax" | "yei" | "gammaswap" | "uranium" | undefined;
2049
2049
  depositUrl: any;
2050
2050
  explorerAddress: string | undefined;
2051
2051
  tags: string[];
@@ -2108,7 +2108,7 @@ declare const app: Elysia<"", false, {
2108
2108
  } & {
2109
2109
  price?: number | null | undefined;
2110
2110
  })[];
2111
- mainProtocol: "splice" | "morpho" | "quickswap" | "euler" | "ambient" | "aura" | "poolside" | "gearbox" | "filament" | "fluid" | "compound" | "ionic" | "layerbank" | "moonwell" | "fraxlend" | "fenix" | "ra" | "syncswap" | "beefy" | "aerodrome" | "velodrome" | "curve" | "toros" | "akron" | "enzyme" | "dragonswap" | "koi" | "rfx" | "woofi" | "pendle" | "zkSwapThreePool" | "maha" | "tempest" | "holdstation" | "venus" | "reactor_fusion" | "vicuna" | "curveNPool" | "satlayer" | "veda" | "cian" | "concrete" | "hourglass" | "katana" | "gamma" | "uniswap" | "arthswap" | "base-swap" | "camelot" | "crust" | "horiza" | "izumi" | "kim" | "pancake-swap" | "ramses" | "retro" | "stryke" | "sushi-swap" | "swapr" | "thruster" | "voltage" | "zero" | "supswap" | "zk-swap" | "thirdtrade" | "swap-x" | "balancer" | "cross_curve" | "neptune" | "maverick" | "trader-joe" | "hanji" | "radiant" | "aave" | "ironclad" | "sturdy" | "frax" | "silo" | "dolomite" | "badger" | "ajna" | "ion" | "eigenlayer" | "vest" | "zerolend" | "hyperdrive" | "oku" | "kyo" | "sonex" | "lendle" | "tako-tako" | "equalizer" | "spectra" | "beraborrow" | "superlend" | "avalon" | "iguana" | "xlend" | "sake" | "angles" | "bunni" | "beratrax" | "yei" | "gammaswap" | "uranium" | undefined;
2111
+ mainProtocol: "splice" | "morpho" | "quickswap" | "euler" | "ambient" | "aura" | "poolside" | "gearbox" | "filament" | "fluid" | "compound" | "ionic" | "layerbank" | "moonwell" | "fraxlend" | "fenix" | "ra" | "syncswap" | "beefy" | "aerodrome" | "velodrome" | "curve" | "toros" | "akron" | "enzyme" | "dragonswap" | "koi" | "rfx" | "woofi" | "pendle" | "zkSwapThreePool" | "maha" | "tempest" | "holdstation" | "venus" | "reactor_fusion" | "vicuna" | "curveNPool" | "satlayer" | "veda" | "cian" | "concrete" | "hourglass" | "katana" | "gamma" | "uniswap" | "arthswap" | "base-swap" | "camelot" | "crust" | "horiza" | "izumi" | "kim" | "pancake-swap" | "ramses" | "retro" | "stryke" | "sushi-swap" | "swapr" | "thruster" | "voltage" | "zero" | "supswap" | "zk-swap" | "thirdtrade" | "swap-x" | "balancer" | "cross_curve" | "neptune" | "maverick" | "trader-joe" | "hanji" | "radiant" | "aave" | "ironclad" | "sturdy" | "frax" | "silo" | "dolomite" | "badger" | "ajna" | "ion" | "eigenlayer" | "vest" | "zerolend" | "hyperdrive" | "oku" | "kyo" | "sonex" | "lendle" | "tako-tako" | "equalizer" | "spectra" | "beraborrow" | "superlend" | "avalon" | "iguana" | "xlend" | "sake" | "sonicmarket" | "angles" | "bunni" | "beratrax" | "yei" | "gammaswap" | "uranium" | undefined;
2112
2112
  depositUrl: any;
2113
2113
  explorerAddress: string | undefined;
2114
2114
  tags: string[];
@@ -2132,8 +2132,8 @@ declare const app: Elysia<"", false, {
2132
2132
  items?: number | undefined;
2133
2133
  tags?: string[] | undefined;
2134
2134
  page?: number | undefined;
2135
- test?: boolean | undefined;
2136
2135
  ids?: string[] | undefined;
2136
+ test?: boolean | undefined;
2137
2137
  opportunityTag?: string | undefined;
2138
2138
  };
2139
2139
  headers: unknown;
@@ -2166,8 +2166,8 @@ declare const app: Elysia<"", false, {
2166
2166
  items?: number | undefined;
2167
2167
  tags?: string[] | undefined;
2168
2168
  page?: number | undefined;
2169
- test?: boolean | undefined;
2170
2169
  ids?: string[] | undefined;
2170
+ test?: boolean | undefined;
2171
2171
  opportunityTag?: string | undefined;
2172
2172
  };
2173
2173
  headers: unknown;
@@ -2427,7 +2427,10 @@ declare const app: Elysia<"", false, {
2427
2427
  query: {
2428
2428
  symbol?: string | undefined;
2429
2429
  id?: string[] | undefined;
2430
+ search?: string | undefined;
2430
2431
  name?: string | undefined;
2432
+ items?: number | undefined;
2433
+ page?: number | undefined;
2431
2434
  address?: string | undefined;
2432
2435
  chainId?: number | undefined;
2433
2436
  displaySymbol?: string | undefined;
@@ -2465,7 +2468,10 @@ declare const app: Elysia<"", false, {
2465
2468
  query: {
2466
2469
  symbol?: string | undefined;
2467
2470
  id?: string[] | undefined;
2471
+ search?: string | undefined;
2468
2472
  name?: string | undefined;
2473
+ items?: number | undefined;
2474
+ page?: number | undefined;
2469
2475
  address?: string | undefined;
2470
2476
  chainId?: number | undefined;
2471
2477
  displaySymbol?: string | undefined;
@@ -4644,9 +4650,9 @@ declare const app: Elysia<"", false, {
4644
4650
  marketId?: string | undefined;
4645
4651
  strategy?: string | undefined;
4646
4652
  poolId?: string | undefined;
4653
+ targetToken?: string | undefined;
4647
4654
  forwarders?: (string | {})[] | undefined;
4648
4655
  whitelist?: string[] | undefined;
4649
- targetToken?: string | undefined;
4650
4656
  isOutOfRangeIncentivized?: boolean | undefined;
4651
4657
  weightFees?: number | undefined;
4652
4658
  weightToken0?: number | undefined;
@@ -1,6 +1,7 @@
1
1
  import type { CampaignConfigMinimalModel, CampaignUnique, CampaignWithParams, CreateCampaignModel, GetCampaignQueryModel, UpdateCampaignCreatorModel, UpdateCampaignModel, UpdateMetaDataCampaignModel } from "@/modules/v4/campaign";
2
2
  import type { CampaignManualOverride } from "@db/api";
3
3
  import { Campaign as CampaignEnum, type CampaignParameters, type ChainId } from "@sdk";
4
+ import type { GetCampaignComputedValueModel } from "../computedValue/computedValue.model";
4
5
  import { CampaignRepository } from "./campaign.repository";
5
6
  export declare abstract class CampaignService {
6
7
  static hashId(campaign: CampaignUnique): string;
@@ -635,6 +636,11 @@ export declare abstract class CampaignService {
635
636
  manualOverrides: import("@db/api").$Enums.CampaignManualOverride[];
636
637
  createdAt: Date;
637
638
  }>;
639
+ static findCampaignValue(params: GetCampaignComputedValueModel): Promise<{
640
+ averageBoost: number | null;
641
+ totalDistributedInUSD: number | null;
642
+ forfeitingBoost: number | null;
643
+ } | null>;
638
644
  static removeManualOverride(campaign: CampaignUnique | string, field: CampaignManualOverride): Promise<void>;
639
645
  static findCampaignsToProcess(distributionChainId: ChainId): Promise<{
640
646
  campaignId: string;