@merkl/api 0.20.158 → 0.20.160
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.
- package/dist/database/api/.generated/edge.js +6 -2
- package/dist/database/api/.generated/index.js +10 -2
- package/dist/database/api/.generated/libquery_engine-linux-arm64-openssl-3.0.x.so.node +0 -0
- package/dist/database/api/.generated/package.json +1 -1
- package/dist/database/api/.generated/schema.prisma +1 -1
- package/dist/database/engine/.generated/edge.js +6 -2
- package/dist/database/engine/.generated/index.js +10 -2
- package/dist/database/engine/.generated/libquery_engine-linux-arm64-openssl-3.0.x.so.node +0 -0
- package/dist/database/engine/.generated/package.json +1 -1
- package/dist/database/engine/.generated/schema.prisma +1 -1
- package/dist/src/eden/index.d.ts +747 -747
- package/dist/src/engine/deprecated/dynamicData/factory.js +1 -0
- package/dist/src/engine/deprecated/dynamicData/implementations/EventBased.js +29 -5
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/processorMapping.d.ts +1 -3
- package/dist/src/engine/implementations/Erc20/subTypes/implementations/lendleVaults/tvl.js +1 -2
- package/dist/src/engine/implementations/JsonAirdrop/metadata.d.ts +2 -2
- package/dist/src/engine/implementations/Locker/metadata.d.ts +24 -0
- package/dist/src/engine/implementations/Locker/metadata.js +36 -0
- package/dist/src/engine/implementations/Locker/tvl.d.ts +7 -0
- package/dist/src/engine/implementations/Locker/tvl.js +21 -0
- package/dist/src/engine/implementations/MultiLog/tvl.d.ts +1 -12
- package/dist/src/engine/implementations/MultiLog/tvl.js +1 -61
- package/dist/src/engine/metadata/factory.js +1 -0
- package/dist/src/engine/tvl/logStates.d.ts +17 -0
- package/dist/src/engine/tvl/logStates.js +106 -0
- package/dist/src/index.d.ts +255 -255
- package/dist/src/index.js +2 -2
- package/dist/src/modules/v4/boost/boost.controller.d.ts +1 -1
- package/dist/src/modules/v4/bucket/bucket.service.d.ts +2 -0
- package/dist/src/modules/v4/bucket/bucket.service.js +3 -0
- package/dist/src/modules/v4/campaign/campaign.controller.d.ts +41 -41
- package/dist/src/modules/v4/campaign/campaign.controller.js +0 -1
- package/dist/src/modules/v4/campaign/campaign.repository.d.ts +36 -36
- package/dist/src/modules/v4/campaign/campaign.service.d.ts +76 -76
- package/dist/src/modules/v4/campaign/campaign.test.controller.d.ts +18 -18
- package/dist/src/modules/v4/chain/chain.controller.d.ts +11 -11
- package/dist/src/modules/v4/chain/chain.repository.d.ts +13 -13
- package/dist/src/modules/v4/chain/chain.service.d.ts +14 -14
- package/dist/src/modules/v4/computedValue/computedValue.controller.d.ts +1 -1
- package/dist/src/modules/v4/computedValue/computedValue.repository.d.ts +1 -1
- package/dist/src/modules/v4/computedValue/computedValue.service.d.ts +1 -1
- package/dist/src/modules/v4/creator/creator.controller.d.ts +5 -5
- package/dist/src/modules/v4/creator/creator.repository.d.ts +5 -5
- package/dist/src/modules/v4/creator/creator.service.d.ts +4 -4
- package/dist/src/modules/v4/enso/enso.service.d.ts +2 -2
- package/dist/src/modules/v4/explorer/explorer.controller.d.ts +3 -3
- package/dist/src/modules/v4/explorer/explorer.repository.d.ts +4 -4
- package/dist/src/modules/v4/explorer/explorer.service.d.ts +5 -5
- package/dist/src/modules/v4/interaction/interaction.controller.d.ts +2 -2
- package/dist/src/modules/v4/opportunity/opportunity.controller.d.ts +105 -105
- package/dist/src/modules/v4/opportunity/opportunity.model.d.ts +3 -3
- package/dist/src/modules/v4/opportunity/opportunity.repository.d.ts +117 -117
- package/dist/src/modules/v4/opportunity/opportunity.service.d.ts +122 -122
- package/dist/src/modules/v4/price/price.controller.d.ts +4 -4
- package/dist/src/modules/v4/price/price.repository.d.ts +5 -5
- package/dist/src/modules/v4/price/price.service.d.ts +4 -4
- package/dist/src/modules/v4/programPayload/programPayload.model.d.ts +18 -1
- package/dist/src/modules/v4/programPayload/programPayload.repository.d.ts +14 -7
- package/dist/src/modules/v4/programPayload/programPayload.repository.js +128 -8
- package/dist/src/modules/v4/protocol/protocol.controller.d.ts +24 -24
- package/dist/src/modules/v4/protocol/protocol.model.d.ts +1 -1
- package/dist/src/modules/v4/protocol/protocol.model.js +1 -0
- package/dist/src/modules/v4/protocol/protocol.repository.d.ts +14 -14
- package/dist/src/modules/v4/protocol/protocol.service.d.ts +6 -6
- package/dist/src/modules/v4/reward/reward.controller.d.ts +1 -1
- package/dist/src/modules/v4/reward/reward.controller.js +0 -1
- package/dist/src/modules/v4/reward/reward.repository.d.ts +12 -12
- package/dist/src/modules/v4/reward/reward.service.d.ts +82 -82
- package/dist/src/modules/v4/router.d.ts +255 -255
- package/dist/src/modules/v4/status/status.controller.d.ts +5 -5
- package/dist/src/modules/v4/status/status.repository.d.ts +11 -11
- package/dist/src/modules/v4/status/status.service.d.ts +7 -7
- package/dist/src/modules/v4/token/token.controller.d.ts +11 -11
- package/dist/src/modules/v4/token/token.repository.d.ts +4 -4
- package/dist/src/modules/v4/token/token.service.d.ts +14 -14
- package/dist/src/modules/v4/token/token.service.js +3 -3
- package/dist/src/modules/v4/uniswap/uniswap.repository.d.ts +1 -1
- package/dist/src/modules/v4/user/user.controller.d.ts +24 -24
- package/dist/tsconfig.package.tsbuildinfo +1 -1
- package/package.json +3 -3
@@ -69,8 +69,8 @@ export declare const PriceController: Elysia<"/prices", false, {
|
|
69
69
|
200: {
|
70
70
|
symbol: string;
|
71
71
|
method: import("@db/api").$Enums.PriceSourceMethod;
|
72
|
-
id: number;
|
73
72
|
args: import("database/api/.generated/runtime/library").JsonValue | null;
|
73
|
+
id: number;
|
74
74
|
}[];
|
75
75
|
};
|
76
76
|
};
|
@@ -91,8 +91,8 @@ export declare const PriceController: Elysia<"/prices", false, {
|
|
91
91
|
200: {
|
92
92
|
symbol: string;
|
93
93
|
method: import("@db/api").$Enums.PriceSourceMethod;
|
94
|
-
id: number;
|
95
94
|
args: import("database/api/.generated/runtime/library").JsonValue | null;
|
95
|
+
id: number;
|
96
96
|
};
|
97
97
|
};
|
98
98
|
};
|
@@ -140,8 +140,8 @@ export declare const PriceController: Elysia<"/prices", false, {
|
|
140
140
|
200: {
|
141
141
|
symbol: string;
|
142
142
|
method: import("@db/api").$Enums.PriceSourceMethod;
|
143
|
-
id: number;
|
144
143
|
args: import("database/api/.generated/runtime/library").JsonValue | null;
|
144
|
+
id: number;
|
145
145
|
};
|
146
146
|
};
|
147
147
|
};
|
@@ -165,8 +165,8 @@ export declare const PriceController: Elysia<"/prices", false, {
|
|
165
165
|
200: {
|
166
166
|
symbol: string;
|
167
167
|
method: import("@db/api").$Enums.PriceSourceMethod;
|
168
|
-
id: number;
|
169
168
|
args: import("database/api/.generated/runtime/library").JsonValue | null;
|
169
|
+
id: number;
|
170
170
|
};
|
171
171
|
};
|
172
172
|
};
|
@@ -4,33 +4,33 @@ export declare class PriceRepository {
|
|
4
4
|
static findBySymbolOrThrow(symbol: string): Promise<{
|
5
5
|
symbol: string;
|
6
6
|
method: import("@db/api").$Enums.PriceSourceMethod;
|
7
|
-
id: number;
|
8
7
|
args: import("database/api/.generated/runtime/library").JsonValue | null;
|
8
|
+
id: number;
|
9
9
|
}>;
|
10
10
|
static findManyPriceSources(query: {
|
11
11
|
method?: PriceSourceMethod;
|
12
12
|
}): Promise<{
|
13
13
|
symbol: string;
|
14
14
|
method: import("@db/api").$Enums.PriceSourceMethod;
|
15
|
-
id: number;
|
16
15
|
args: import("database/api/.generated/runtime/library").JsonValue | null;
|
16
|
+
id: number;
|
17
17
|
}[]>;
|
18
18
|
static create(priceSource: CreatePriceSourceModel): Promise<{
|
19
19
|
symbol: string;
|
20
20
|
method: import("@db/api").$Enums.PriceSourceMethod;
|
21
|
-
id: number;
|
22
21
|
args: import("database/api/.generated/runtime/library").JsonValue | null;
|
22
|
+
id: number;
|
23
23
|
}>;
|
24
24
|
static updateBySymbol(unique: string, newPriceSource: UpdatePriceSourceModel): Promise<{
|
25
25
|
symbol: string;
|
26
26
|
method: import("@db/api").$Enums.PriceSourceMethod;
|
27
|
-
id: number;
|
28
27
|
args: import("database/api/.generated/runtime/library").JsonValue | null;
|
28
|
+
id: number;
|
29
29
|
}>;
|
30
30
|
static deleteBySymbol(symbol: string): Promise<{
|
31
31
|
symbol: string;
|
32
32
|
method: import("@db/api").$Enums.PriceSourceMethod;
|
33
|
-
id: number;
|
34
33
|
args: import("database/api/.generated/runtime/library").JsonValue | null;
|
34
|
+
id: number;
|
35
35
|
}>;
|
36
36
|
}
|
@@ -13,28 +13,28 @@ export declare class PriceService {
|
|
13
13
|
static getPriceSourceBySymbol(symbol: string): Promise<{
|
14
14
|
symbol: string;
|
15
15
|
method: import("@db/api").$Enums.PriceSourceMethod;
|
16
|
-
id: number;
|
17
16
|
args: import("database/api/.generated/runtime/library").JsonValue | null;
|
17
|
+
id: number;
|
18
18
|
}>;
|
19
19
|
static findManyPriceSources(query: {
|
20
20
|
method?: PriceSourceMethod;
|
21
21
|
}): Promise<{
|
22
22
|
symbol: string;
|
23
23
|
method: import("@db/api").$Enums.PriceSourceMethod;
|
24
|
-
id: number;
|
25
24
|
args: import("database/api/.generated/runtime/library").JsonValue | null;
|
25
|
+
id: number;
|
26
26
|
}[]>;
|
27
27
|
static createPriceSource(priceSource: CreatePriceSourceModel): Promise<number>;
|
28
28
|
static updatePriceSource(symbol: string, newPriceSource: UpdatePriceSourceModel): Promise<{
|
29
29
|
symbol: string;
|
30
30
|
method: import("@db/api").$Enums.PriceSourceMethod;
|
31
|
-
id: number;
|
32
31
|
args: import("database/api/.generated/runtime/library").JsonValue | null;
|
32
|
+
id: number;
|
33
33
|
}>;
|
34
34
|
static deletePriceSource(symbol: string): Promise<{
|
35
35
|
symbol: string;
|
36
36
|
method: import("@db/api").$Enums.PriceSourceMethod;
|
37
|
-
id: number;
|
38
37
|
args: import("database/api/.generated/runtime/library").JsonValue | null;
|
38
|
+
id: number;
|
39
39
|
}>;
|
40
40
|
}
|
@@ -1,4 +1,6 @@
|
|
1
1
|
import type { Campaign, CompFork, CompoundSubCampaignType, CompoundV3SubCampaignType, ComputeScoreMethod, ComputeScoreParameters, Forwarder, ForwarderParameters, GenericCampaignConfigComposed, HOOK, HookParameters, MerklChainId, MorphoSubCampaignType } from "@sdk";
|
2
|
+
import type { LockerEventSchema } from "libs/sdk/src/types/merkl/campaignTypes/locker";
|
3
|
+
import type { ComputeCurveMethod, ComputeCurveParameters } from "libs/sdk/src/types/merkl/computeCurve";
|
2
4
|
export declare const CampaignPayloadInputDto: import("@sinclair/typebox").TObject<{
|
3
5
|
campaign: import("@sinclair/typebox").TString;
|
4
6
|
program: import("@sinclair/typebox").TString;
|
@@ -223,7 +225,22 @@ export type partialConfigAirdrop = {
|
|
223
225
|
hooks?: (HookParameters<HOOK> | string)[];
|
224
226
|
campaignType: Campaign;
|
225
227
|
};
|
226
|
-
export type
|
228
|
+
export type partialConfigLocker = {
|
229
|
+
url?: string;
|
230
|
+
computeChainId?: MerklChainId;
|
231
|
+
hooks?: (HookParameters<HOOK> | string)[];
|
232
|
+
campaignType: Campaign;
|
233
|
+
lockerContract: string;
|
234
|
+
whitelist: string[];
|
235
|
+
blacklist: string[];
|
236
|
+
forwarders: string[];
|
237
|
+
computeScoreParameters: ComputeScoreParameters<ComputeScoreMethod> | string;
|
238
|
+
curveParameters: ComputeCurveParameters<ComputeCurveMethod>;
|
239
|
+
hasSlots: boolean;
|
240
|
+
lockEvent: LockerEventSchema;
|
241
|
+
unlockEvent: LockerEventSchema;
|
242
|
+
};
|
243
|
+
export type partialConfig = partialConfigERC20 | partialConfigMorpho | partialConfigCLAMM | partialConfigIonic | partialConfigCompoundV3 | partialConfigMultiLog | partialConfigLocker | partialConfigAirdrop;
|
227
244
|
export declare const safeTemplate: {
|
228
245
|
version: string;
|
229
246
|
chainId: string;
|
@@ -265,7 +265,11 @@ export declare enum pufferCampaigns {
|
|
265
265
|
sonex_pufETH_USDCe_1 = "0x4A0e0E8d5DF4AEC0a08359e599720628b179F7eD",
|
266
266
|
sonex_pufETH_USDCe_5 = "0x2646FAD13ef9BD063790d2719De1da290865D58f",
|
267
267
|
kyo_pufETH_ETH = "0x8C4f743C763aBe5CBAe4E50358b05C7D45921638",
|
268
|
-
apufETH = "0x0526CF96Ad808f8E11A5a9F1012edf67F4BAf519"
|
268
|
+
apufETH = "0x0526CF96Ad808f8E11A5a9F1012edf67F4BAf519",
|
269
|
+
carrot_Staking = "0x48e8dE138C246c14248C94d2D616a2F9eb4590D2",
|
270
|
+
xpufETH_zircuit = "0x9346A5043C590133FE900aec643D9622EDddBA57",
|
271
|
+
tac_puf_eth = "0x78f314241df1ac151bFD0413EEB51979515f6Abd",
|
272
|
+
pufETH_TermMax = "0xE8a7A6dD9218202996D9cF825426Ab283b3396eD"
|
269
273
|
}
|
270
274
|
export declare enum zkSyncCampaigns {
|
271
275
|
Izumi_Finance_Zk_Weth = "Izumi Finance ZK/WETH 0xd62bc9f19bd94fde9c41df4b6eb6419ea6b8e25c",
|
@@ -1015,8 +1019,9 @@ declare const EtherlinkInterfaceCampaigns: {
|
|
1015
1019
|
topicToData: {
|
1016
1020
|
topicIndex: number;
|
1017
1021
|
decodeKeyTopic: string;
|
1018
|
-
|
1019
|
-
|
1022
|
+
dataIndexes: number[];
|
1023
|
+
multipliers: string[];
|
1024
|
+
computeFormula: string;
|
1020
1025
|
}[];
|
1021
1026
|
computeScoreParameters: {
|
1022
1027
|
computeMethod: any;
|
@@ -1053,8 +1058,9 @@ declare const EtherlinkInterfaceCampaigns: {
|
|
1053
1058
|
topicToData: {
|
1054
1059
|
topicIndex: number;
|
1055
1060
|
decodeKeyTopic: string;
|
1056
|
-
|
1057
|
-
|
1061
|
+
dataIndexes: number[];
|
1062
|
+
multipliers: string[];
|
1063
|
+
computeFormula: string;
|
1058
1064
|
}[];
|
1059
1065
|
computeScoreParameters: {
|
1060
1066
|
computeMethod: any;
|
@@ -1091,8 +1097,9 @@ declare const EtherlinkInterfaceCampaigns: {
|
|
1091
1097
|
topicToData: {
|
1092
1098
|
topicIndex: number;
|
1093
1099
|
decodeKeyTopic: string;
|
1094
|
-
|
1095
|
-
|
1100
|
+
dataIndexes: number[];
|
1101
|
+
multipliers: string[];
|
1102
|
+
computeFormula: string;
|
1096
1103
|
}[];
|
1097
1104
|
computeScoreParameters: {
|
1098
1105
|
computeMethod: any;
|
@@ -1,5 +1,6 @@
|
|
1
|
-
import { BalanceCallType, Campaign, ChainId, CompFork, ComposedType, CompoundSubCampaignType, CompoundV3SubCampaignType, ComputeScoreMethod, Forwarder, HOOK, MorphoSubCampaignType, StandardType, boostingFunction, boostingReferralFunction, contractStateBoost, defaultBoost, defaultReferralBoost, selectionRaffleMethod, } from "@sdk";
|
1
|
+
import { BASE_9, BalanceCallType, Campaign, ChainId, CompFork, ComposedType, CompoundSubCampaignType, CompoundV3SubCampaignType, ComputeScoreMethod, DAY, Forwarder, HOOK, MorphoSubCampaignType, StandardType, boostingFunction, boostingReferralFunction, contractStateBoost, defaultBoost, defaultReferralBoost, selectionRaffleMethod, } from "@sdk";
|
2
2
|
import { id } from "ethers/lib/utils";
|
3
|
+
import { ComputeCurveMethod } from "libs/sdk/src/types/merkl/computeCurve";
|
3
4
|
export var program;
|
4
5
|
(function (program) {
|
5
6
|
program["Puffer"] = "Puffer";
|
@@ -338,6 +339,10 @@ export var pufferCampaigns;
|
|
338
339
|
pufferCampaigns["sonex_pufETH_USDCe_5"] = "0x2646FAD13ef9BD063790d2719De1da290865D58f";
|
339
340
|
pufferCampaigns["kyo_pufETH_ETH"] = "0x8C4f743C763aBe5CBAe4E50358b05C7D45921638";
|
340
341
|
pufferCampaigns["apufETH"] = "0x0526CF96Ad808f8E11A5a9F1012edf67F4BAf519";
|
342
|
+
pufferCampaigns["carrot_Staking"] = "0x48e8dE138C246c14248C94d2D616a2F9eb4590D2";
|
343
|
+
pufferCampaigns["xpufETH_zircuit"] = "0x9346A5043C590133FE900aec643D9622EDddBA57";
|
344
|
+
pufferCampaigns["tac_puf_eth"] = "0x78f314241df1ac151bFD0413EEB51979515f6Abd";
|
345
|
+
pufferCampaigns["pufETH_TermMax"] = "0xE8a7A6dD9218202996D9cF825426Ab283b3396eD";
|
341
346
|
})(pufferCampaigns || (pufferCampaigns = {}));
|
342
347
|
export var zkSyncCampaigns;
|
343
348
|
(function (zkSyncCampaigns) {
|
@@ -880,7 +885,13 @@ const EtherlinkInterfaceCampaigns = {
|
|
880
885
|
contract: "0xd0bc067cf877f7b76ceb331891331d9e6acda1a7",
|
881
886
|
eventID: id("OrderPlaced(address,uint64,bool,uint128,uint72,uint128,uint128,uint128,uint128,uint128,bool,bool)"),
|
882
887
|
topicToData: [
|
883
|
-
{
|
888
|
+
{
|
889
|
+
topicIndex: 1,
|
890
|
+
decodeKeyTopic: "address",
|
891
|
+
dataIndexes: [6],
|
892
|
+
multipliers: [(10n * 10n ** 20n).toString()],
|
893
|
+
computeFormula: "6",
|
894
|
+
},
|
884
895
|
],
|
885
896
|
computeScoreParameters: {
|
886
897
|
computeMethod: ComputeScoreMethod.cappedScorePercentageHistorical,
|
@@ -912,7 +923,13 @@ const EtherlinkInterfaceCampaigns = {
|
|
912
923
|
contract: "0x65ea4dd7f789c71c0f57ed84b3bdc3062898d3cb",
|
913
924
|
eventID: id("OrderPlaced(address,uint64,bool,uint128,uint72,uint128,uint128,uint128,uint128,uint128,bool,bool)"),
|
914
925
|
topicToData: [
|
915
|
-
{
|
926
|
+
{
|
927
|
+
topicIndex: 1,
|
928
|
+
decodeKeyTopic: "address",
|
929
|
+
dataIndexes: [6],
|
930
|
+
multipliers: [(10n * 10n ** 20n).toString()],
|
931
|
+
computeFormula: "6",
|
932
|
+
},
|
916
933
|
],
|
917
934
|
computeScoreParameters: {
|
918
935
|
computeMethod: ComputeScoreMethod.cappedScorePercentageHistorical,
|
@@ -944,7 +961,13 @@ const EtherlinkInterfaceCampaigns = {
|
|
944
961
|
contract: "0xbb6b01d94e3f6ebae8647cb56d544f57928ab758",
|
945
962
|
eventID: id("OrderPlaced(address,uint64,bool,uint128,uint72,uint128,uint128,uint128,uint128,uint128,bool,bool)"),
|
946
963
|
topicToData: [
|
947
|
-
{
|
964
|
+
{
|
965
|
+
topicIndex: 1,
|
966
|
+
decodeKeyTopic: "address",
|
967
|
+
dataIndexes: [6],
|
968
|
+
multipliers: [(10n * 10n ** 20n).toString()],
|
969
|
+
computeFormula: "6",
|
970
|
+
},
|
948
971
|
],
|
949
972
|
computeScoreParameters: {
|
950
973
|
computeMethod: ComputeScoreMethod.cappedScorePercentageHistorical,
|
@@ -2542,7 +2565,7 @@ function generateComposedCampaignForTradingCompetitionForReserve(pool, wethIndex
|
|
2542
2565
|
eventID: id("Swap(address,address,int256,int256,uint160,uint128,int24)"),
|
2543
2566
|
topicToData: [
|
2544
2567
|
{
|
2545
|
-
topicIndex:
|
2568
|
+
topicIndex: 0,
|
2546
2569
|
decodeKeyTopic: "address",
|
2547
2570
|
dataIndexes: [wethIndex],
|
2548
2571
|
multipliers: ["ETH"],
|
@@ -2550,7 +2573,11 @@ function generateComposedCampaignForTradingCompetitionForReserve(pool, wethIndex
|
|
2550
2573
|
},
|
2551
2574
|
],
|
2552
2575
|
computeScoreParameters: {
|
2553
|
-
computeMethod: ComputeScoreMethod.
|
2576
|
+
computeMethod: ComputeScoreMethod.cappedScorePercentageHistorical,
|
2577
|
+
computeSettings: {
|
2578
|
+
// This is only to get the historicalValue so I'm capping it at 100%
|
2579
|
+
maxRewards: BASE_9.toString(),
|
2580
|
+
},
|
2554
2581
|
},
|
2555
2582
|
decodeDataValue: ["int256", "int256", "uint160", "uint128", "int24"],
|
2556
2583
|
expectedChecks: [
|
@@ -2573,7 +2600,7 @@ function generateComposedCampaignForTradingCompetitionForReserve(pool, wethIndex
|
|
2573
2600
|
eventID: id("Swap(address,address,int256,int256,uint160,uint128,int24)"),
|
2574
2601
|
topicToData: [
|
2575
2602
|
{
|
2576
|
-
topicIndex:
|
2603
|
+
topicIndex: 0,
|
2577
2604
|
decodeKeyTopic: "address",
|
2578
2605
|
dataIndexes: [wethIndex],
|
2579
2606
|
multipliers: ["ETH"],
|
@@ -2581,7 +2608,11 @@ function generateComposedCampaignForTradingCompetitionForReserve(pool, wethIndex
|
|
2581
2608
|
},
|
2582
2609
|
],
|
2583
2610
|
computeScoreParameters: {
|
2584
|
-
computeMethod: ComputeScoreMethod.
|
2611
|
+
computeMethod: ComputeScoreMethod.cappedScorePercentageHistorical,
|
2612
|
+
computeSettings: {
|
2613
|
+
// This is only to get the historicalValue so I'm capping it at 100%
|
2614
|
+
maxRewards: BASE_9.toString(),
|
2615
|
+
},
|
2585
2616
|
},
|
2586
2617
|
decodeDataValue: ["int256", "int256", "uint160", "uint128", "int24"],
|
2587
2618
|
expectedChecks: [
|
@@ -5978,6 +6009,95 @@ const PufferInterfaceCampaigns = {
|
|
5978
6009
|
url: "https://app.sakefinance.com/market/0x6c460b2c6d6719562d5da43e5152b375e79b9a8b",
|
5979
6010
|
forwarders: [],
|
5980
6011
|
},
|
6012
|
+
[pufferCampaigns.carrot_Staking]: {
|
6013
|
+
campaignType: Campaign.LOCKER,
|
6014
|
+
computeScoreParameters: {
|
6015
|
+
computeMethod: ComputeScoreMethod.genericTimeWeighted,
|
6016
|
+
},
|
6017
|
+
curveParameters: {
|
6018
|
+
curveMethod: ComputeCurveMethod.boostPerThreshold,
|
6019
|
+
curveSettings: [
|
6020
|
+
{
|
6021
|
+
threshold: (0).toString(),
|
6022
|
+
boost: (0n * BASE_9.toBigInt()).toString(),
|
6023
|
+
},
|
6024
|
+
{
|
6025
|
+
threshold: (DAY * 30 * 1).toString(),
|
6026
|
+
boost: (1n * BASE_9.toBigInt()).toString(),
|
6027
|
+
},
|
6028
|
+
{
|
6029
|
+
threshold: (DAY * 30 * 2).toString(),
|
6030
|
+
boost: (2n * BASE_9.toBigInt()).toString(),
|
6031
|
+
},
|
6032
|
+
{
|
6033
|
+
threshold: (DAY * 30 * 3).toString(),
|
6034
|
+
boost: (3n * BASE_9.toBigInt()).toString(),
|
6035
|
+
},
|
6036
|
+
{
|
6037
|
+
threshold: (DAY * 30 * 6).toString(),
|
6038
|
+
boost: (6n * BASE_9.toBigInt()).toString(),
|
6039
|
+
},
|
6040
|
+
{
|
6041
|
+
threshold: (DAY * 30 * 12).toString(),
|
6042
|
+
boost: (12n * BASE_9.toBigInt()).toString(),
|
6043
|
+
},
|
6044
|
+
],
|
6045
|
+
},
|
6046
|
+
hasSlots: true,
|
6047
|
+
lockEvent: {
|
6048
|
+
eventID: id("Deposited(address,address,uint128,uint128)"),
|
6049
|
+
recipientIndex: 1,
|
6050
|
+
slotIndex: -1,
|
6051
|
+
amountIndex: 0,
|
6052
|
+
endLockIndex: 1,
|
6053
|
+
decodeDataValue: ["uint128", "uint128"],
|
6054
|
+
expectedChecks: [{ index: 2, key: "address", expectedValue: "0x282A69142bac47855C3fbE1693FcC4bA3B4d5Ed6" }],
|
6055
|
+
}, // event to lock the token will create a new state
|
6056
|
+
unlockEvent: {
|
6057
|
+
eventID: id("Withdrawn(address,address,uint128,address)"),
|
6058
|
+
recipientIndex: 1,
|
6059
|
+
slotIndex: -1,
|
6060
|
+
amountIndex: 0,
|
6061
|
+
endLockIndex: -1,
|
6062
|
+
decodeDataValue: ["uint128"],
|
6063
|
+
expectedChecks: [{ index: 2, key: "address", expectedValue: "0x282A69142bac47855C3fbE1693FcC4bA3B4d5Ed6" }],
|
6064
|
+
}, // event to unlock will modify a state
|
6065
|
+
lockerContract: "0x48e8dE138C246c14248C94d2D616a2F9eb4590D2",
|
6066
|
+
whitelist: [],
|
6067
|
+
blacklist: [],
|
6068
|
+
hooks: [],
|
6069
|
+
forwarders: [],
|
6070
|
+
url: "https://app.puffer.fi/stake",
|
6071
|
+
},
|
6072
|
+
[pufferCampaigns.xpufETH_zircuit]: {
|
6073
|
+
campaignType: Campaign.ERC20,
|
6074
|
+
computeChainId: ChainId.ZIRCUIT,
|
6075
|
+
hooks: [],
|
6076
|
+
targetToken: "0x9346A5043C590133FE900aec643D9622EDddBA57",
|
6077
|
+
whitelist: [],
|
6078
|
+
blacklist: [],
|
6079
|
+
url: "https://app.zircuit.com/liquidity-hub",
|
6080
|
+
forwarders: [],
|
6081
|
+
},
|
6082
|
+
[pufferCampaigns.tac_puf_eth]: {
|
6083
|
+
campaignType: Campaign.ERC20,
|
6084
|
+
computeChainId: ChainId.MAINNET,
|
6085
|
+
hooks: [],
|
6086
|
+
targetToken: "0x78f314241df1ac151bFD0413EEB51979515f6Abd",
|
6087
|
+
whitelist: [],
|
6088
|
+
blacklist: [],
|
6089
|
+
forwarders: [],
|
6090
|
+
},
|
6091
|
+
[pufferCampaigns.pufETH_TermMax]: {
|
6092
|
+
campaignType: Campaign.ERC20,
|
6093
|
+
computeChainId: ChainId.MAINNET,
|
6094
|
+
// TODO : Correctly change this campaign
|
6095
|
+
hooks: [],
|
6096
|
+
targetToken: "0x5db7A477dEdE7d12feA665312282E052e0207FC1",
|
6097
|
+
whitelist: ["0xBebB5CEe893110cF477901AF7FA94E4840606421"],
|
6098
|
+
blacklist: [],
|
6099
|
+
forwarders: [],
|
6100
|
+
},
|
5981
6101
|
};
|
5982
6102
|
const BaseTACREWARDS = 3.4;
|
5983
6103
|
const DAILYREWARDSINDOLLAR = 1000;
|
@@ -18,8 +18,8 @@ export declare const ProtocolController: Elysia<"/protocols", false, {
|
|
18
18
|
body: unknown;
|
19
19
|
params: {};
|
20
20
|
query: {
|
21
|
-
id?: string | undefined;
|
22
21
|
name?: string | undefined;
|
22
|
+
id?: string | undefined;
|
23
23
|
items?: number | undefined;
|
24
24
|
tags?: string[] | undefined;
|
25
25
|
page?: number | undefined;
|
@@ -30,10 +30,10 @@ export declare const ProtocolController: Elysia<"/protocols", false, {
|
|
30
30
|
headers: unknown;
|
31
31
|
response: {
|
32
32
|
200: ({
|
33
|
-
id: string;
|
34
|
-
name: string;
|
35
33
|
url: string;
|
34
|
+
name: string;
|
36
35
|
description: string;
|
36
|
+
id: string;
|
37
37
|
tags: string[];
|
38
38
|
icon: string;
|
39
39
|
} & {
|
@@ -50,8 +50,8 @@ export declare const ProtocolController: Elysia<"/protocols", false, {
|
|
50
50
|
body: unknown;
|
51
51
|
params: {};
|
52
52
|
query: {
|
53
|
-
id?: string | undefined;
|
54
53
|
name?: string | undefined;
|
54
|
+
id?: string | undefined;
|
55
55
|
items?: number | undefined;
|
56
56
|
tags?: string[] | undefined;
|
57
57
|
page?: number | undefined;
|
@@ -76,10 +76,10 @@ export declare const ProtocolController: Elysia<"/protocols", false, {
|
|
76
76
|
headers: unknown;
|
77
77
|
response: {
|
78
78
|
200: {
|
79
|
-
id: string;
|
80
|
-
name: string;
|
81
79
|
url: string;
|
80
|
+
name: string;
|
82
81
|
description: string;
|
82
|
+
id: string;
|
83
83
|
tags: string[];
|
84
84
|
icon: string;
|
85
85
|
dailyRewards?: number | undefined;
|
@@ -93,8 +93,8 @@ export declare const ProtocolController: Elysia<"/protocols", false, {
|
|
93
93
|
":id": {
|
94
94
|
patch: {
|
95
95
|
body: {
|
96
|
-
name?: string | undefined;
|
97
96
|
url?: string | undefined;
|
97
|
+
name?: string | undefined;
|
98
98
|
description?: string | undefined;
|
99
99
|
icon?: string | undefined;
|
100
100
|
};
|
@@ -107,10 +107,10 @@ export declare const ProtocolController: Elysia<"/protocols", false, {
|
|
107
107
|
};
|
108
108
|
response: {
|
109
109
|
200: {
|
110
|
-
id: string;
|
111
|
-
name: string;
|
112
110
|
url: string;
|
111
|
+
name: string;
|
113
112
|
description: string;
|
113
|
+
id: string;
|
114
114
|
tags: string[];
|
115
115
|
icon: string;
|
116
116
|
};
|
@@ -121,10 +121,10 @@ export declare const ProtocolController: Elysia<"/protocols", false, {
|
|
121
121
|
index: {
|
122
122
|
post: {
|
123
123
|
body: {
|
124
|
-
id: string;
|
125
|
-
name: string;
|
126
124
|
url: string;
|
125
|
+
name: string;
|
127
126
|
description: string;
|
127
|
+
id: string;
|
128
128
|
tags: string[];
|
129
129
|
icon: string;
|
130
130
|
};
|
@@ -135,10 +135,10 @@ export declare const ProtocolController: Elysia<"/protocols", false, {
|
|
135
135
|
};
|
136
136
|
response: {
|
137
137
|
200: {
|
138
|
-
id: string;
|
139
|
-
name: string;
|
140
138
|
url: string;
|
139
|
+
name: string;
|
141
140
|
description: string;
|
141
|
+
id: string;
|
142
142
|
tags: string[];
|
143
143
|
icon: string;
|
144
144
|
};
|
@@ -152,25 +152,25 @@ export declare const ProtocolController: Elysia<"/protocols", false, {
|
|
152
152
|
body: {
|
153
153
|
data: {
|
154
154
|
properties: {
|
155
|
-
|
156
|
-
|
155
|
+
url: {
|
156
|
+
url: string;
|
157
|
+
};
|
158
|
+
name: {
|
159
|
+
rich_text: {
|
157
160
|
text: {
|
158
161
|
content: string;
|
159
162
|
};
|
160
163
|
}[];
|
161
164
|
};
|
162
|
-
|
165
|
+
description: {
|
163
166
|
rich_text: {
|
164
167
|
text: {
|
165
168
|
content: string;
|
166
169
|
};
|
167
170
|
}[];
|
168
171
|
};
|
169
|
-
|
170
|
-
|
171
|
-
};
|
172
|
-
description: {
|
173
|
-
rich_text: {
|
172
|
+
id: {
|
173
|
+
title: {
|
174
174
|
text: {
|
175
175
|
content: string;
|
176
176
|
};
|
@@ -185,10 +185,10 @@ export declare const ProtocolController: Elysia<"/protocols", false, {
|
|
185
185
|
};
|
186
186
|
icon: {
|
187
187
|
files: ({
|
188
|
+
name: string;
|
188
189
|
file: {
|
189
190
|
url: string;
|
190
191
|
};
|
191
|
-
name: string;
|
192
192
|
} | {
|
193
193
|
external: {
|
194
194
|
url: string;
|
@@ -205,10 +205,10 @@ export declare const ProtocolController: Elysia<"/protocols", false, {
|
|
205
205
|
};
|
206
206
|
response: {
|
207
207
|
200: {
|
208
|
-
id: string;
|
209
|
-
name: string;
|
210
208
|
url: string;
|
209
|
+
name: string;
|
211
210
|
description: string;
|
211
|
+
id: string;
|
212
212
|
tags: string[];
|
213
213
|
icon: string;
|
214
214
|
};
|
@@ -9,7 +9,7 @@ export type Protocol = Resource<"Protocol", undefined, {
|
|
9
9
|
numberOfLiveCampaigns?: number;
|
10
10
|
opportunityLiveTags?: string[];
|
11
11
|
}>;
|
12
|
-
export declare const protocolIdList: readonly ["uniswap", "ambient", "arthswap", "base-swap", "camelot", "crust", "fenix", "horiza", "izumi", "kim", "pancake-swap", "quickswap", "ramses", "retro", "stryke", "sushi-swap", "swapr", "thruster", "voltage", "zero", "koi", "supswap", "zk-swap", "thirdtrade", "swap-x", "velodrome", "aerodrome", "balancer", "curve", "cross_curve", "curveNPool", "aura", "akron", "beefy", "dragonswap", "poolside", "koi", "syncswap", "neptune", "zkSwapThreePool", "syncswap", "rfx", "ra", "maverick", "trader-joe", "velodrome", "hanji", "reserve", "radiant", "aave", "fraxlend", "ironclad", "euler", "gearbox", "compound", "sturdy", "frax", "ionic", "moonwell", "fluid", "silo", "morpho", "dolomite", "badger", "ajna", "layerbank", "ion", "venus", "woofi", "reactor_fusion", "eigenlayer", "vest", "zerolend", "lnd", "hyperdrive", "gamma", "oku", "hourglass", "veda", "kyo", "sonex", "lendle", "tako-tako", "equalizer", "spectra", "beraborrow", "superlend", "avalon", "iguana", "xlend", "sake", "sonicmarket", "stability", "angles", "enzyme", "toros", "vicuna", "bunni", "beratrax", "concrete", "cian", "pendle", "splice", "sturdy", "yei", "filament", "gammaswap", "maha", "tempest", "uranium", "hanji", "holdstation", "katana", "satlayer"];
|
12
|
+
export declare const protocolIdList: readonly ["uniswap", "ambient", "arthswap", "base-swap", "camelot", "crust", "fenix", "horiza", "izumi", "kim", "pancake-swap", "quickswap", "ramses", "retro", "stryke", "sushi-swap", "swapr", "thruster", "voltage", "zero", "koi", "supswap", "zk-swap", "thirdtrade", "swap-x", "velodrome", "aerodrome", "balancer", "curve", "cross_curve", "curveNPool", "aura", "akron", "beefy", "dragonswap", "poolside", "koi", "syncswap", "neptune", "zkSwapThreePool", "syncswap", "rfx", "ra", "maverick", "trader-joe", "velodrome", "hanji", "reserve", "radiant", "aave", "fraxlend", "ironclad", "euler", "gearbox", "compound", "sturdy", "frax", "ionic", "moonwell", "fluid", "silo", "morpho", "dolomite", "badger", "ajna", "layerbank", "ion", "venus", "woofi", "reactor_fusion", "eigenlayer", "vest", "zerolend", "lnd", "hyperdrive", "gamma", "oku", "hourglass", "veda", "kyo", "sonex", "lendle", "tako-tako", "equalizer", "spectra", "beraborrow", "superlend", "avalon", "iguana", "xlend", "sake", "sonicmarket", "stability", "angles", "enzyme", "toros", "vicuna", "bunni", "beratrax", "concrete", "cian", "pendle", "splice", "sturdy", "yei", "filament", "gammaswap", "maha", "tempest", "uranium", "hanji", "holdstation", "katana", "satlayer", "puffer"];
|
13
13
|
export type ProtocolId = (typeof protocolIdList)[number];
|
14
14
|
export declare const ProtocolResourceDto: import("@sinclair/typebox").TObject<{
|
15
15
|
id: import("@sinclair/typebox").TString;
|
@@ -2,36 +2,36 @@ import type { CreateProtocolModel, GetProtocolsQueryModel, UpdateProtocolModel }
|
|
2
2
|
export declare abstract class ProtocolRepository {
|
3
3
|
#private;
|
4
4
|
static create(data: CreateProtocolModel): Promise<{
|
5
|
-
id: string;
|
6
|
-
name: string;
|
7
5
|
url: string;
|
6
|
+
name: string;
|
8
7
|
description: string;
|
8
|
+
id: string;
|
9
9
|
tags: string[];
|
10
10
|
icon: string;
|
11
11
|
}>;
|
12
12
|
static upsert(data: CreateProtocolModel): Promise<{
|
13
|
-
id: string;
|
14
|
-
name: string;
|
15
13
|
url: string;
|
14
|
+
name: string;
|
16
15
|
description: string;
|
16
|
+
id: string;
|
17
17
|
tags: string[];
|
18
18
|
icon: string;
|
19
19
|
}>;
|
20
20
|
static changeId(oldId: string, newId: string): Promise<void>;
|
21
21
|
static findUnique(type: string): Promise<{
|
22
|
-
id: string;
|
23
|
-
name: string;
|
24
22
|
url: string;
|
23
|
+
name: string;
|
25
24
|
description: string;
|
25
|
+
id: string;
|
26
26
|
tags: string[];
|
27
27
|
icon: string;
|
28
28
|
} | null>;
|
29
29
|
static findMany(query: GetProtocolsQueryModel): Promise<({
|
30
30
|
MainOpportunities: ({
|
31
31
|
Campaigns: {
|
32
|
-
id: string;
|
33
32
|
type: string;
|
34
33
|
description: string | null;
|
34
|
+
id: string;
|
35
35
|
params: import("database/api/.generated/runtime/library").JsonValue;
|
36
36
|
subType: number | null;
|
37
37
|
computeChainId: number;
|
@@ -48,11 +48,11 @@ export declare abstract class ProtocolRepository {
|
|
48
48
|
createdAt: Date;
|
49
49
|
}[];
|
50
50
|
} & {
|
51
|
-
id: string;
|
52
|
-
name: string;
|
53
|
-
type: string;
|
54
51
|
status: import("@db/api").$Enums.Status;
|
52
|
+
type: string;
|
53
|
+
name: string;
|
55
54
|
description: string;
|
55
|
+
id: string;
|
56
56
|
tags: string[];
|
57
57
|
identifier: string;
|
58
58
|
action: import("@db/api").$Enums.OpportunityAction;
|
@@ -68,19 +68,19 @@ export declare abstract class ProtocolRepository {
|
|
68
68
|
lastCampaignCreatedAt: Date;
|
69
69
|
})[];
|
70
70
|
} & {
|
71
|
-
id: string;
|
72
|
-
name: string;
|
73
71
|
url: string;
|
72
|
+
name: string;
|
74
73
|
description: string;
|
74
|
+
id: string;
|
75
75
|
tags: string[];
|
76
76
|
icon: string;
|
77
77
|
})[]>;
|
78
78
|
static countMany(query: GetProtocolsQueryModel): Promise<number>;
|
79
79
|
static update(id: string, data: UpdateProtocolModel): Promise<{
|
80
|
-
id: string;
|
81
|
-
name: string;
|
82
80
|
url: string;
|
81
|
+
name: string;
|
83
82
|
description: string;
|
83
|
+
id: string;
|
84
84
|
tags: string[];
|
85
85
|
icon: string;
|
86
86
|
}>;
|