@merkl/api 0.20.139 → 0.20.140
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/src/eden/index.d.ts +3 -3
- package/dist/src/engine/deprecated/dynamicData/utils/fetchLogs.d.ts +4 -0
- package/dist/src/engine/deprecated/dynamicData/utils/fetchLogs.js +1 -1
- package/dist/src/engine/implementations/Erc20/subTypes/factories.js +3 -0
- package/dist/src/engine/implementations/Erc20/subTypes/implementations/euler/tvl.d.ts +5 -0
- package/dist/src/engine/implementations/Erc20/subTypes/implementations/euler/tvl.js +50 -0
- package/dist/src/index.d.ts +1 -1
- package/dist/src/modules/v4/coingecko/coingecko.repository.d.ts +1 -1
- package/dist/src/modules/v4/opportunity/opportunity.model.js +0 -1
- package/dist/src/modules/v4/programPayload/programPayload.controller.d.ts +1 -1
- package/dist/src/modules/v4/programPayload/programPayload.repository.d.ts +68 -2
- package/dist/src/modules/v4/programPayload/programPayload.repository.js +107 -9
- package/dist/src/modules/v4/protocol/protocol.service.js +1 -1
- package/dist/src/modules/v4/router.d.ts +1 -1
- package/dist/src/modules/v4/token/token.service.js +2 -2
- package/dist/tsconfig.package.tsbuildinfo +1 -1
- package/package.json +1 -1
package/dist/src/eden/index.d.ts
CHANGED
@@ -4148,6 +4148,7 @@ declare const eden: {
|
|
4148
4148
|
forwarders?: (string | {})[] | undefined;
|
4149
4149
|
targetToken?: string | undefined;
|
4150
4150
|
evkAddress?: string | undefined;
|
4151
|
+
subCampaignType?: number | undefined;
|
4151
4152
|
whitelist?: string[] | undefined;
|
4152
4153
|
isOutOfRangeIncentivized?: boolean | undefined;
|
4153
4154
|
weightFees?: number | undefined;
|
@@ -4157,7 +4158,6 @@ declare const eden: {
|
|
4157
4158
|
snapshotTimestamp?: number | undefined;
|
4158
4159
|
snapshotBlockNumber?: number | undefined;
|
4159
4160
|
jsonUrl?: string | undefined;
|
4160
|
-
subCampaignType?: number | undefined;
|
4161
4161
|
repository?: string | undefined;
|
4162
4162
|
capInUSD?: string | undefined;
|
4163
4163
|
compFork?: number | undefined;
|
@@ -10288,6 +10288,7 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", fa
|
|
10288
10288
|
forwarders?: (string | {})[] | undefined;
|
10289
10289
|
targetToken?: string | undefined;
|
10290
10290
|
evkAddress?: string | undefined;
|
10291
|
+
subCampaignType?: number | undefined;
|
10291
10292
|
whitelist?: string[] | undefined;
|
10292
10293
|
isOutOfRangeIncentivized?: boolean | undefined;
|
10293
10294
|
weightFees?: number | undefined;
|
@@ -10297,7 +10298,6 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", fa
|
|
10297
10298
|
snapshotTimestamp?: number | undefined;
|
10298
10299
|
snapshotBlockNumber?: number | undefined;
|
10299
10300
|
jsonUrl?: string | undefined;
|
10300
|
-
subCampaignType?: number | undefined;
|
10301
10301
|
repository?: string | undefined;
|
10302
10302
|
capInUSD?: string | undefined;
|
10303
10303
|
compFork?: number | undefined;
|
@@ -15849,6 +15849,7 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", fa
|
|
15849
15849
|
forwarders?: (string | {})[] | undefined;
|
15850
15850
|
targetToken?: string | undefined;
|
15851
15851
|
evkAddress?: string | undefined;
|
15852
|
+
subCampaignType?: number | undefined;
|
15852
15853
|
whitelist?: string[] | undefined;
|
15853
15854
|
isOutOfRangeIncentivized?: boolean | undefined;
|
15854
15855
|
weightFees?: number | undefined;
|
@@ -15858,7 +15859,6 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", fa
|
|
15858
15859
|
snapshotTimestamp?: number | undefined;
|
15859
15860
|
snapshotBlockNumber?: number | undefined;
|
15860
15861
|
jsonUrl?: string | undefined;
|
15861
|
-
subCampaignType?: number | undefined;
|
15862
15862
|
repository?: string | undefined;
|
15863
15863
|
capInUSD?: string | undefined;
|
15864
15864
|
compFork?: number | undefined;
|
@@ -7,4 +7,8 @@ export type LogType = {
|
|
7
7
|
blockHash: string;
|
8
8
|
logIndex: string;
|
9
9
|
};
|
10
|
+
export declare function fetchLogs(chainId: MerklChainId, topics: string[], addresses: string[], fromBlock: number, toBlock: number): Promise<{
|
11
|
+
logs: LogType[];
|
12
|
+
block: number;
|
13
|
+
}>;
|
10
14
|
export declare function safeFetchLogs(chainId: MerklChainId, topics: string[], addresses: string[], fromBlock: number, toBlock: number): Promise<LogType[]>;
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { log } from "@/utils/logger";
|
2
2
|
import { ChainId, ChainInteractionService, getContractCreationBlock } from "@sdk";
|
3
3
|
import axios from "axios";
|
4
|
-
async function fetchLogs(chainId, topics, addresses, fromBlock, toBlock) {
|
4
|
+
export async function fetchLogs(chainId, topics, addresses, fromBlock, toBlock) {
|
5
5
|
const url = ChainInteractionService(chainId).provider().connection.url;
|
6
6
|
if (fromBlock === undefined || fromBlock === null || !toBlock || fromBlock > toBlock) {
|
7
7
|
throw new Error(`fromBlock and toBlock are required and fromBlock must be less than toBlock - fromBlock: ${fromBlock} - toBlock:${toBlock}`);
|
@@ -1,5 +1,6 @@
|
|
1
1
|
import { Erc20SubType } from ".";
|
2
2
|
import { EulerMetadata } from "./implementations/euler/metadata";
|
3
|
+
import { EulerTVLBuilder } from "./implementations/euler/tvl";
|
3
4
|
import { GearboxMetadata } from "./implementations/gearbox/metadata";
|
4
5
|
import { GearboxTVLBuilder } from "./implementations/gearbox/tvl";
|
5
6
|
import { SuperlendMetadata } from "./implementations/superlend/metadata";
|
@@ -14,6 +15,8 @@ const tvlMap = {
|
|
14
15
|
[Erc20SubType.gearbox]: new GearboxTVLBuilder(),
|
15
16
|
[Erc20SubType.superlend_borrowing]: new SuperlendTVLBuilder(),
|
16
17
|
[Erc20SubType.superlend_lending]: new SuperlendTVLBuilder(),
|
18
|
+
[Erc20SubType.euler_borrow]: new EulerTVLBuilder(),
|
19
|
+
[Erc20SubType.euler_lend]: new EulerTVLBuilder(),
|
17
20
|
};
|
18
21
|
export const erc20SubTypeTVLBuilderFactory = (erc20Subtype) => {
|
19
22
|
if (!tvlMap[erc20Subtype]) {
|
@@ -0,0 +1,5 @@
|
|
1
|
+
import type { TVLBuilder, TVLData } from "@/engine/tvl/interface";
|
2
|
+
import { type CampaignParameters, type Campaign as CampaignType, type MerklChainId } from "@sdk";
|
3
|
+
export declare class EulerTVLBuilder implements TVLBuilder<CampaignType.EULER> {
|
4
|
+
build(computeChainId: MerklChainId, campaigns: CampaignParameters<CampaignType.EULER>[]): Promise<TVLData<CampaignType.EULER>>;
|
5
|
+
}
|
@@ -0,0 +1,50 @@
|
|
1
|
+
import { TokenService } from "@/modules/v4/token/token.service";
|
2
|
+
import { TvlType } from "@db/api";
|
3
|
+
import { BN2Number, ChainInteractionService, EulerEVKInterface, EulerSubCampaignType, bigIntToNumber, } from "@sdk";
|
4
|
+
export class EulerTVLBuilder {
|
5
|
+
async build(computeChainId, campaigns) {
|
6
|
+
const tvls = [];
|
7
|
+
const calls = [];
|
8
|
+
for (const campaign of campaigns) {
|
9
|
+
const { evkAddress, subCampaignType } = campaign.campaignParameters;
|
10
|
+
if (subCampaignType === EulerSubCampaignType.LEND) {
|
11
|
+
calls.push({
|
12
|
+
callData: EulerEVKInterface.encodeFunctionData("totalAssets"),
|
13
|
+
target: evkAddress,
|
14
|
+
key: "totalUnderlying",
|
15
|
+
decoder: (data) => BigInt(EulerEVKInterface.decodeFunctionResult("totalAssets", data)[0].toString()),
|
16
|
+
});
|
17
|
+
}
|
18
|
+
else {
|
19
|
+
calls.push({
|
20
|
+
callData: EulerEVKInterface.encodeFunctionData("totalBorrows"),
|
21
|
+
target: evkAddress,
|
22
|
+
key: "totalUnderlying",
|
23
|
+
decoder: (data) => BigInt(EulerEVKInterface.decodeFunctionResult("totalBorrows", data)[0].toString()),
|
24
|
+
});
|
25
|
+
}
|
26
|
+
}
|
27
|
+
const result = await ChainInteractionService(computeChainId).fetchAndDecodeObject(calls);
|
28
|
+
for (const [_, campaign] of campaigns.entries()) {
|
29
|
+
const totalAssets = result.totalUnderlying;
|
30
|
+
const underlylingTokenAddress = campaign.campaignParameters.addressAsset;
|
31
|
+
const underlyingToken = await TokenService.findUniqueFillOrThrow({
|
32
|
+
chainId: computeChainId,
|
33
|
+
address: underlylingTokenAddress,
|
34
|
+
});
|
35
|
+
const tvl = (bigIntToNumber(totalAssets, underlyingToken.decimals) ?? 0) * (underlyingToken.price ?? 0);
|
36
|
+
tvls.push({
|
37
|
+
campaign,
|
38
|
+
tvl,
|
39
|
+
tvlBreakdown: [
|
40
|
+
{
|
41
|
+
identifier: underlyingToken.id,
|
42
|
+
type: TvlType.TOKEN,
|
43
|
+
value: BN2Number(totalAssets, underlyingToken.decimals),
|
44
|
+
},
|
45
|
+
],
|
46
|
+
});
|
47
|
+
}
|
48
|
+
return tvls;
|
49
|
+
}
|
50
|
+
}
|
package/dist/src/index.d.ts
CHANGED
@@ -5053,6 +5053,7 @@ declare const app: Elysia<"", false, {
|
|
5053
5053
|
forwarders?: (string | {})[] | undefined;
|
5054
5054
|
targetToken?: string | undefined;
|
5055
5055
|
evkAddress?: string | undefined;
|
5056
|
+
subCampaignType?: number | undefined;
|
5056
5057
|
whitelist?: string[] | undefined;
|
5057
5058
|
isOutOfRangeIncentivized?: boolean | undefined;
|
5058
5059
|
weightFees?: number | undefined;
|
@@ -5062,7 +5063,6 @@ declare const app: Elysia<"", false, {
|
|
5062
5063
|
snapshotTimestamp?: number | undefined;
|
5063
5064
|
snapshotBlockNumber?: number | undefined;
|
5064
5065
|
jsonUrl?: string | undefined;
|
5065
|
-
subCampaignType?: number | undefined;
|
5066
5066
|
repository?: string | undefined;
|
5067
5067
|
capInUSD?: string | undefined;
|
5068
5068
|
compFork?: number | undefined;
|
@@ -59,7 +59,6 @@ export const GetOpportunitiesQueryDto = t.Object({
|
|
59
59
|
chainId: t.Optional(t.RegExp(/^\d+(,\d+)*$/, {
|
60
60
|
description: "A comma separated list of chain ids. Example: ?chainId=1,42161<br>You can get the list of all supported chains by calling [GET /v4/chains](#tag/chains/GET/v4/chains/)",
|
61
61
|
})),
|
62
|
-
//TODO: find a systemic way of handling query param arrays
|
63
62
|
action: t.Optional(t.Enum(OpportunityAction, {
|
64
63
|
description: `A comma seprated list actions. Legal values are: ${Object.values(OpportunityAction).join(", ")}`,
|
65
64
|
})),
|
@@ -202,6 +202,7 @@ export declare const ProgramPayloadController: Elysia<"/program-payload", false,
|
|
202
202
|
forwarders?: (string | {})[] | undefined;
|
203
203
|
targetToken?: string | undefined;
|
204
204
|
evkAddress?: string | undefined;
|
205
|
+
subCampaignType?: number | undefined;
|
205
206
|
whitelist?: string[] | undefined;
|
206
207
|
isOutOfRangeIncentivized?: boolean | undefined;
|
207
208
|
weightFees?: number | undefined;
|
@@ -211,7 +212,6 @@ export declare const ProgramPayloadController: Elysia<"/program-payload", false,
|
|
211
212
|
snapshotTimestamp?: number | undefined;
|
212
213
|
snapshotBlockNumber?: number | undefined;
|
213
214
|
jsonUrl?: string | undefined;
|
214
|
-
subCampaignType?: number | undefined;
|
215
215
|
repository?: string | undefined;
|
216
216
|
capInUSD?: string | undefined;
|
217
217
|
compFork?: number | undefined;
|
@@ -94,6 +94,8 @@ export declare enum swapxCampaigns {
|
|
94
94
|
}
|
95
95
|
export declare enum celoCampaigns {
|
96
96
|
UniswapV3_cUSD_USDT_Celo = "UniswapV3 cUSD/USDT Celo 0x5dC631aD6C26BEA1a59fBF2C2680CF3df43d249f",
|
97
|
+
UniswapV3_USDT_WETH_Celo = "UniswapV3 USDT/WETH Celo 0xF55791AfBB35aD42984f18D6Fe3e1fF73D81900c",
|
98
|
+
UniswapV3_USDT_cGHS_Celo = "UniswapV3 USDT/cGHS Celo 0x6BAB3AfA6d0c42d539bcbc33Ffb68C0406913413",
|
97
99
|
UniswapV3_USDC_USDT_Celo = "UniswapV3 USDC/USDT Celo 0x1a810e0B6c2dd5629AFa2f0c898b9512C6F78846",
|
98
100
|
UniswapV3_cUSD_USDC_Celo = "UniswapV3 cUSD/USDC Celo 0x34757893070B0FC5de37AaF2844255fF90F7F1E0",
|
99
101
|
UniswapV3_cEUR_USDT_Celo = "UniswapV3 cEUR/USDT Celo 0x628Cb3a5a206956423D158009612813B64B19dab",
|
@@ -106,7 +108,7 @@ export declare enum celoCampaigns {
|
|
106
108
|
UniswapV3_PUSO_USDC_Celo = "UniswapV3 PUSO/USDC Celo 0xb466d5429D6AD9999Bf112C225d9D7b15e96c658",
|
107
109
|
UniswapV3_PUSO_USDT_Celo = "UniswapV3 PUSO/USDT Celo 0x87deC9a2589d9e6511Df84C193561b3A16cF6238",
|
108
110
|
UniswapV3_cEUR_CELO_Celo = "UniswapV3 cEUR/CELO Celo 0xf130F72F8190f662522774C3367E6e8814f5e219",
|
109
|
-
UniswapV3_cCOP_USDT_Celo = "UniswapV3 cCOP/USDT Celo
|
111
|
+
UniswapV3_cCOP_USDT_Celo = "UniswapV3 cCOP/USDT Celo 0x2ac5baa668a8a58fd0e302b9896717484fd217b0",
|
110
112
|
UniswapV3_cREAL_cUSD_Celo = "UniswapV3 cREAL/cUSD Celo 0x72Dd8fe09B5b493012e5816068Dfc6Fb26a2A9e6",
|
111
113
|
UniswapV3_cEUR_cREAL_Celo = "UniswapV3 cEUR/cREAL Celo 0xb6c8f9490314394CFc6EDacb8717bFDC1EB8dab5",
|
112
114
|
UniswapV3_BRLA_USDT_Celo = "UniswapV3 BRLA/USDT Celo 0x14E577e42d45Fd2200A9B0e31D87Fe826467111a",
|
@@ -528,7 +530,11 @@ export declare enum tacCampaigns {
|
|
528
530
|
TAC_Supply_ylxSolvBTC = "TAC Supply ylxSolvBTC 0x76f31800eFdE39A5f98189447c7a514d974f4364",
|
529
531
|
TAC_Supply_ctTACUSDB = "TAC Supply ctTACUSDB 0x729fcddf4cbbc9dce721a8378c25a726fe7e43d3",
|
530
532
|
TAC_Supply_ylFBTC = "TAC Supply ylFBTC 0x6945f516413cB2d7311297e8A39E7D004dEB5566",
|
531
|
-
TAC_Supply_ylMBTC = "TAC Supply ylMBTC 0x2B11527e1fab84a5382D20efD198BF3d332f7E73"
|
533
|
+
TAC_Supply_ylMBTC = "TAC Supply ylMBTC 0x2B11527e1fab84a5382D20efD198BF3d332f7E73",
|
534
|
+
TAC_Supply_tacUSN = "TAC Supply tacUSN 0x7895A046b26CC07272B022a0C9BAFC046E6F6396",
|
535
|
+
TAC_Supply_TACyUSD = "TAC Supply TACyUSD 0x2799dE2E1e769fA58dd3787F70BcD839AF3a1F39",
|
536
|
+
TAC_Supply_tacETH9s = "TAC Supply tacETH9s 0xDe7CFf032D453Ce6B0a796043E75d380Df258812",
|
537
|
+
TAC_Supply_ylSolvBTCtac = "TAC Supply ylSolvBTC.tac 0x34d16e4fB8757A88D986f9EfE2484F0badBF22C1"
|
532
538
|
}
|
533
539
|
declare const AnglesInterfaceCampaigns: {
|
534
540
|
"0x15E96CDecA34B9DE1B31586c1206206aDb92E69D": {
|
@@ -1445,6 +1451,66 @@ declare const TACInterfaceCampaigns: {
|
|
1445
1451
|
targetTokenPricing: boolean;
|
1446
1452
|
apr: string;
|
1447
1453
|
};
|
1454
|
+
"TAC Supply tacUSN 0x7895A046b26CC07272B022a0C9BAFC046E6F6396": {
|
1455
|
+
campaignType: any;
|
1456
|
+
computeChainId: any;
|
1457
|
+
distributionChainId: any;
|
1458
|
+
targetToken: string;
|
1459
|
+
rewardToken: string;
|
1460
|
+
creator: string;
|
1461
|
+
hooks: never[];
|
1462
|
+
whitelist: never[];
|
1463
|
+
blacklist: never[];
|
1464
|
+
forwarders: never[];
|
1465
|
+
rewardTokenPricing: boolean;
|
1466
|
+
targetTokenPricing: boolean;
|
1467
|
+
apr: string;
|
1468
|
+
};
|
1469
|
+
"TAC Supply TACyUSD 0x2799dE2E1e769fA58dd3787F70BcD839AF3a1F39": {
|
1470
|
+
campaignType: any;
|
1471
|
+
computeChainId: any;
|
1472
|
+
distributionChainId: any;
|
1473
|
+
targetToken: string;
|
1474
|
+
rewardToken: string;
|
1475
|
+
creator: string;
|
1476
|
+
hooks: never[];
|
1477
|
+
whitelist: never[];
|
1478
|
+
blacklist: never[];
|
1479
|
+
forwarders: never[];
|
1480
|
+
rewardTokenPricing: boolean;
|
1481
|
+
targetTokenPricing: boolean;
|
1482
|
+
apr: string;
|
1483
|
+
};
|
1484
|
+
"TAC Supply tacETH9s 0xDe7CFf032D453Ce6B0a796043E75d380Df258812": {
|
1485
|
+
campaignType: any;
|
1486
|
+
computeChainId: any;
|
1487
|
+
distributionChainId: any;
|
1488
|
+
targetToken: string;
|
1489
|
+
rewardToken: string;
|
1490
|
+
creator: string;
|
1491
|
+
hooks: never[];
|
1492
|
+
whitelist: never[];
|
1493
|
+
blacklist: never[];
|
1494
|
+
forwarders: never[];
|
1495
|
+
rewardTokenPricing: boolean;
|
1496
|
+
targetTokenPricing: boolean;
|
1497
|
+
apr: string;
|
1498
|
+
};
|
1499
|
+
"TAC Supply ylSolvBTC.tac 0x34d16e4fB8757A88D986f9EfE2484F0badBF22C1": {
|
1500
|
+
campaignType: any;
|
1501
|
+
computeChainId: any;
|
1502
|
+
distributionChainId: any;
|
1503
|
+
targetToken: string;
|
1504
|
+
rewardToken: string;
|
1505
|
+
creator: string;
|
1506
|
+
hooks: never[];
|
1507
|
+
whitelist: never[];
|
1508
|
+
blacklist: never[];
|
1509
|
+
forwarders: never[];
|
1510
|
+
rewardTokenPricing: boolean;
|
1511
|
+
targetTokenPricing: boolean;
|
1512
|
+
apr: string;
|
1513
|
+
};
|
1448
1514
|
};
|
1449
1515
|
export declare const MerklInterfaceCampaigns: {
|
1450
1516
|
[key in program]: typeof PufferInterfaceCampaigns | typeof ZkSyncInterfaceCampaigns | typeof ModeInterfaceCampaigns | typeof VicunaInterfaceCampaigns | typeof SonicmarketInterfaceCampaigns | typeof ReserveInterfaceCampaigns | typeof BeetsInterfaceCampaigns | typeof CeloInterfaceCampaigns | typeof EtherlinkInterfaceCampaigns | typeof SwapxInterfaceCampaigns | typeof AnglesInterfaceCampaigns | typeof RoninInterfaceCampaigns | typeof TACInterfaceCampaigns;
|
@@ -161,6 +161,8 @@ export var swapxCampaigns;
|
|
161
161
|
export var celoCampaigns;
|
162
162
|
(function (celoCampaigns) {
|
163
163
|
celoCampaigns["UniswapV3_cUSD_USDT_Celo"] = "UniswapV3 cUSD/USDT Celo 0x5dC631aD6C26BEA1a59fBF2C2680CF3df43d249f";
|
164
|
+
celoCampaigns["UniswapV3_USDT_WETH_Celo"] = "UniswapV3 USDT/WETH Celo 0xF55791AfBB35aD42984f18D6Fe3e1fF73D81900c";
|
165
|
+
celoCampaigns["UniswapV3_USDT_cGHS_Celo"] = "UniswapV3 USDT/cGHS Celo 0x6BAB3AfA6d0c42d539bcbc33Ffb68C0406913413";
|
164
166
|
celoCampaigns["UniswapV3_USDC_USDT_Celo"] = "UniswapV3 USDC/USDT Celo 0x1a810e0B6c2dd5629AFa2f0c898b9512C6F78846";
|
165
167
|
celoCampaigns["UniswapV3_cUSD_USDC_Celo"] = "UniswapV3 cUSD/USDC Celo 0x34757893070B0FC5de37AaF2844255fF90F7F1E0";
|
166
168
|
celoCampaigns["UniswapV3_cEUR_USDT_Celo"] = "UniswapV3 cEUR/USDT Celo 0x628Cb3a5a206956423D158009612813B64B19dab";
|
@@ -173,7 +175,7 @@ export var celoCampaigns;
|
|
173
175
|
celoCampaigns["UniswapV3_PUSO_USDC_Celo"] = "UniswapV3 PUSO/USDC Celo 0xb466d5429D6AD9999Bf112C225d9D7b15e96c658";
|
174
176
|
celoCampaigns["UniswapV3_PUSO_USDT_Celo"] = "UniswapV3 PUSO/USDT Celo 0x87deC9a2589d9e6511Df84C193561b3A16cF6238";
|
175
177
|
celoCampaigns["UniswapV3_cEUR_CELO_Celo"] = "UniswapV3 cEUR/CELO Celo 0xf130F72F8190f662522774C3367E6e8814f5e219";
|
176
|
-
celoCampaigns["UniswapV3_cCOP_USDT_Celo"] = "UniswapV3 cCOP/USDT Celo
|
178
|
+
celoCampaigns["UniswapV3_cCOP_USDT_Celo"] = "UniswapV3 cCOP/USDT Celo 0x2ac5baa668a8a58fd0e302b9896717484fd217b0";
|
177
179
|
celoCampaigns["UniswapV3_cREAL_cUSD_Celo"] = "UniswapV3 cREAL/cUSD Celo 0x72Dd8fe09B5b493012e5816068Dfc6Fb26a2A9e6";
|
178
180
|
celoCampaigns["UniswapV3_cEUR_cREAL_Celo"] = "UniswapV3 cEUR/cREAL Celo 0xb6c8f9490314394CFc6EDacb8717bFDC1EB8dab5";
|
179
181
|
celoCampaigns["UniswapV3_BRLA_USDT_Celo"] = "UniswapV3 BRLA/USDT Celo 0x14E577e42d45Fd2200A9B0e31D87Fe826467111a";
|
@@ -604,6 +606,10 @@ export var tacCampaigns;
|
|
604
606
|
tacCampaigns["TAC_Supply_ctTACUSDB"] = "TAC Supply ctTACUSDB 0x729fcddf4cbbc9dce721a8378c25a726fe7e43d3";
|
605
607
|
tacCampaigns["TAC_Supply_ylFBTC"] = "TAC Supply ylFBTC 0x6945f516413cB2d7311297e8A39E7D004dEB5566";
|
606
608
|
tacCampaigns["TAC_Supply_ylMBTC"] = "TAC Supply ylMBTC 0x2B11527e1fab84a5382D20efD198BF3d332f7E73";
|
609
|
+
tacCampaigns["TAC_Supply_tacUSN"] = "TAC Supply tacUSN 0x7895A046b26CC07272B022a0C9BAFC046E6F6396";
|
610
|
+
tacCampaigns["TAC_Supply_TACyUSD"] = "TAC Supply TACyUSD 0x2799dE2E1e769fA58dd3787F70BcD839AF3a1F39";
|
611
|
+
tacCampaigns["TAC_Supply_tacETH9s"] = "TAC Supply tacETH9s 0xDe7CFf032D453Ce6B0a796043E75d380Df258812";
|
612
|
+
tacCampaigns["TAC_Supply_ylSolvBTCtac"] = "TAC Supply ylSolvBTC.tac 0x34d16e4fB8757A88D986f9EfE2484F0badBF22C1";
|
607
613
|
})(tacCampaigns || (tacCampaigns = {}));
|
608
614
|
const AnglesInterfaceCampaigns = {
|
609
615
|
[anglesCampaigns.Angles_supply_in_angles_liquid]: {
|
@@ -1553,6 +1559,34 @@ const CeloInterfaceCampaigns = {
|
|
1553
1559
|
weightToken0: 500,
|
1554
1560
|
weightToken1: 500,
|
1555
1561
|
},
|
1562
|
+
[celoCampaigns.UniswapV3_USDT_WETH_Celo]: {
|
1563
|
+
campaignType: Campaign.CLAMM,
|
1564
|
+
computeChainId: ChainId.CELO,
|
1565
|
+
hooks: [],
|
1566
|
+
poolAddress: "0xF55791AfBB35aD42984f18D6Fe3e1fF73D81900c",
|
1567
|
+
whitelist: [],
|
1568
|
+
blacklist: [],
|
1569
|
+
url: "https://app.uniswap.org/explore/pools/celo/0xF55791AfBB35aD42984f18D6Fe3e1fF73D81900c",
|
1570
|
+
forwarders: [],
|
1571
|
+
isOutOfRangeIncentivized: false,
|
1572
|
+
weightFees: 5000,
|
1573
|
+
weightToken0: 2500,
|
1574
|
+
weightToken1: 2500,
|
1575
|
+
},
|
1576
|
+
[celoCampaigns.UniswapV3_USDT_cGHS_Celo]: {
|
1577
|
+
campaignType: Campaign.CLAMM,
|
1578
|
+
computeChainId: ChainId.CELO,
|
1579
|
+
hooks: [],
|
1580
|
+
poolAddress: "0x6BAB3AfA6d0c42d539bcbc33Ffb68C0406913413",
|
1581
|
+
whitelist: [],
|
1582
|
+
blacklist: [],
|
1583
|
+
url: "https://app.uniswap.org/explore/pools/celo/0x6BAB3AfA6d0c42d539bcbc33Ffb68C0406913413",
|
1584
|
+
forwarders: [],
|
1585
|
+
isOutOfRangeIncentivized: false,
|
1586
|
+
weightFees: 5000,
|
1587
|
+
weightToken0: 2500,
|
1588
|
+
weightToken1: 2500,
|
1589
|
+
},
|
1556
1590
|
[celoCampaigns.UniswapV3_USDC_USDT_Celo]: {
|
1557
1591
|
campaignType: Campaign.CLAMM,
|
1558
1592
|
computeChainId: ChainId.CELO,
|
@@ -1619,9 +1653,9 @@ const CeloInterfaceCampaigns = {
|
|
1619
1653
|
url: "https://app.uniswap.org/explore/pools/celo/0x61Ef8708fc240DC7f9F2c0d81c3124Df2fd8829F",
|
1620
1654
|
forwarders: [],
|
1621
1655
|
isOutOfRangeIncentivized: false,
|
1622
|
-
weightFees:
|
1623
|
-
weightToken0:
|
1624
|
-
weightToken1:
|
1656
|
+
weightFees: 5000,
|
1657
|
+
weightToken0: 2500,
|
1658
|
+
weightToken1: 2500,
|
1625
1659
|
},
|
1626
1660
|
[celoCampaigns.UniswapV3_USDGLO_cUSD_Celo]: {
|
1627
1661
|
campaignType: Campaign.CLAMM,
|
@@ -1725,10 +1759,10 @@ const CeloInterfaceCampaigns = {
|
|
1725
1759
|
campaignType: Campaign.CLAMM,
|
1726
1760
|
computeChainId: ChainId.CELO,
|
1727
1761
|
hooks: [],
|
1728
|
-
poolAddress: "
|
1762
|
+
poolAddress: "0x2ac5baa668a8a58fd0e302b9896717484fd217b0",
|
1729
1763
|
whitelist: [],
|
1730
1764
|
blacklist: [],
|
1731
|
-
url: "https://app.uniswap.org/explore/pools/celo/
|
1765
|
+
url: "https://app.uniswap.org/explore/pools/celo/0x2ac5baa668a8a58fd0e302b9896717484fd217b0",
|
1732
1766
|
forwarders: [],
|
1733
1767
|
isOutOfRangeIncentivized: false,
|
1734
1768
|
weightFees: 5000,
|
@@ -1801,9 +1835,9 @@ const CeloInterfaceCampaigns = {
|
|
1801
1835
|
url: "https://app.uniswap.org/explore/pools/celo/0x1625fE58Cdb3726e5841Fb2bb367Dde9AAa009B3",
|
1802
1836
|
forwarders: [],
|
1803
1837
|
isOutOfRangeIncentivized: false,
|
1804
|
-
weightFees:
|
1805
|
-
weightToken0:
|
1806
|
-
weightToken1:
|
1838
|
+
weightFees: 5000,
|
1839
|
+
weightToken0: 2500,
|
1840
|
+
weightToken1: 2500,
|
1807
1841
|
},
|
1808
1842
|
[celoCampaigns.UniswapV3_cKES_cREAL_Celo]: {
|
1809
1843
|
campaignType: Campaign.CLAMM,
|
@@ -5967,6 +6001,10 @@ const ylxSolvBTCMultiplier = 1.5;
|
|
5967
6001
|
const ctTACUSDBMultiplier = 1.5;
|
5968
6002
|
const ylFBTCMultiplier = 1.5;
|
5969
6003
|
const ylMBTCMultiplier = 1.5;
|
6004
|
+
const tacUSNMultiplier = 2.5;
|
6005
|
+
const tacyUSDMultiplier = 2.5;
|
6006
|
+
const tacETH9sMultiplier = 1.75;
|
6007
|
+
const tacylSolvBTCMultiplier = 1.5;
|
5970
6008
|
const TACInterfaceCampaigns = {
|
5971
6009
|
[tacCampaigns.TAC_Supply_TACETH]: {
|
5972
6010
|
campaignType: Campaign.ERC20_FIX_APR,
|
@@ -6268,6 +6306,66 @@ const TACInterfaceCampaigns = {
|
|
6268
6306
|
targetTokenPricing: true,
|
6269
6307
|
apr: ((BaseTACREWARDS * ylMBTCMultiplier * 365) / DAILYREWARDSINDOLLAR).toFixed(2).toString(),
|
6270
6308
|
},
|
6309
|
+
[tacCampaigns.TAC_Supply_tacUSN]: {
|
6310
|
+
campaignType: Campaign.ERC20_FIX_APR,
|
6311
|
+
computeChainId: ChainId.MAINNET,
|
6312
|
+
distributionChainId: ChainId.GNOSIS,
|
6313
|
+
targetToken: "0x7895A046b26CC07272B022a0C9BAFC046E6F6396",
|
6314
|
+
rewardToken: "0xf2401de511DC0D1ad4762588722f5B0574A56b60",
|
6315
|
+
creator: "0xA9DdD91249DFdd450E81E1c56Ab60E1A62651701",
|
6316
|
+
hooks: [],
|
6317
|
+
whitelist: [],
|
6318
|
+
blacklist: [],
|
6319
|
+
forwarders: [],
|
6320
|
+
rewardTokenPricing: false,
|
6321
|
+
targetTokenPricing: true,
|
6322
|
+
apr: ((BaseTACREWARDS * tacUSNMultiplier * 365) / DAILYREWARDSINDOLLAR).toFixed(2).toString(),
|
6323
|
+
},
|
6324
|
+
[tacCampaigns.TAC_Supply_TACyUSD]: {
|
6325
|
+
campaignType: Campaign.ERC20_FIX_APR,
|
6326
|
+
computeChainId: ChainId.MAINNET,
|
6327
|
+
distributionChainId: ChainId.GNOSIS,
|
6328
|
+
targetToken: "0x2799dE2E1e769fA58dd3787F70BcD839AF3a1F39",
|
6329
|
+
rewardToken: "0xf2401de511DC0D1ad4762588722f5B0574A56b60",
|
6330
|
+
creator: "0xA9DdD91249DFdd450E81E1c56Ab60E1A62651701",
|
6331
|
+
hooks: [],
|
6332
|
+
whitelist: [],
|
6333
|
+
blacklist: [],
|
6334
|
+
forwarders: [],
|
6335
|
+
rewardTokenPricing: false,
|
6336
|
+
targetTokenPricing: true,
|
6337
|
+
apr: ((BaseTACREWARDS * tacyUSDMultiplier * 365) / DAILYREWARDSINDOLLAR).toFixed(2).toString(),
|
6338
|
+
},
|
6339
|
+
[tacCampaigns.TAC_Supply_tacETH9s]: {
|
6340
|
+
campaignType: Campaign.ERC20_FIX_APR,
|
6341
|
+
computeChainId: ChainId.MAINNET,
|
6342
|
+
distributionChainId: ChainId.GNOSIS,
|
6343
|
+
targetToken: "0xDe7CFf032D453Ce6B0a796043E75d380Df258812",
|
6344
|
+
rewardToken: "0xf2401de511DC0D1ad4762588722f5B0574A56b60",
|
6345
|
+
creator: "0xA9DdD91249DFdd450E81E1c56Ab60E1A62651701",
|
6346
|
+
hooks: [],
|
6347
|
+
whitelist: [],
|
6348
|
+
blacklist: [],
|
6349
|
+
forwarders: [],
|
6350
|
+
rewardTokenPricing: false,
|
6351
|
+
targetTokenPricing: true,
|
6352
|
+
apr: ((BaseTACREWARDS * tacETH9sMultiplier * 365) / DAILYREWARDSINDOLLAR).toFixed(2).toString(),
|
6353
|
+
},
|
6354
|
+
[tacCampaigns.TAC_Supply_ylSolvBTCtac]: {
|
6355
|
+
campaignType: Campaign.ERC20_FIX_APR,
|
6356
|
+
computeChainId: ChainId.MAINNET,
|
6357
|
+
distributionChainId: ChainId.GNOSIS,
|
6358
|
+
targetToken: "0x34d16e4fB8757A88D986f9EfE2484F0badBF22C1",
|
6359
|
+
rewardToken: "0xf2401de511DC0D1ad4762588722f5B0574A56b60",
|
6360
|
+
creator: "0xA9DdD91249DFdd450E81E1c56Ab60E1A62651701",
|
6361
|
+
hooks: [],
|
6362
|
+
whitelist: [],
|
6363
|
+
blacklist: [],
|
6364
|
+
forwarders: [],
|
6365
|
+
rewardTokenPricing: false,
|
6366
|
+
targetTokenPricing: true,
|
6367
|
+
apr: ((BaseTACREWARDS * tacylSolvBTCMultiplier * 365) / DAILYREWARDSINDOLLAR).toFixed(2).toString(),
|
6368
|
+
},
|
6271
6369
|
};
|
6272
6370
|
export const MerklInterfaceCampaigns = {
|
6273
6371
|
[program.Puffer]: PufferInterfaceCampaigns,
|
@@ -34,7 +34,7 @@ export class ProtocolService {
|
|
34
34
|
}
|
35
35
|
static async upsert(data) {
|
36
36
|
const env = process.env.ENV === "prod" ? "production" : process.env.ENV;
|
37
|
-
const iconUri = await IconService.pullPush(data.icon, new BucketService(
|
37
|
+
const iconUri = await IconService.pullPush(data.icon, new BucketService("merkl-static-assets", `angle-${env}-1`), {
|
38
38
|
name: `protocols/${data.id}`,
|
39
39
|
});
|
40
40
|
return await ProtocolRepository.upsert({
|
@@ -4923,6 +4923,7 @@ export declare const v4: Elysia<"/v4", false, {
|
|
4923
4923
|
forwarders?: (string | {})[] | undefined;
|
4924
4924
|
targetToken?: string | undefined;
|
4925
4925
|
evkAddress?: string | undefined;
|
4926
|
+
subCampaignType?: number | undefined;
|
4926
4927
|
whitelist?: string[] | undefined;
|
4927
4928
|
isOutOfRangeIncentivized?: boolean | undefined;
|
4928
4929
|
weightFees?: number | undefined;
|
@@ -4932,7 +4933,6 @@ export declare const v4: Elysia<"/v4", false, {
|
|
4932
4933
|
snapshotTimestamp?: number | undefined;
|
4933
4934
|
snapshotBlockNumber?: number | undefined;
|
4934
4935
|
jsonUrl?: string | undefined;
|
4935
|
-
subCampaignType?: number | undefined;
|
4936
4936
|
repository?: string | undefined;
|
4937
4937
|
capInUSD?: string | undefined;
|
4938
4938
|
compFork?: number | undefined;
|
@@ -354,10 +354,10 @@ export class TokenService {
|
|
354
354
|
if (!token || !token.name)
|
355
355
|
throw new HttpError(`Failed to fetch on-chain data for token ${token?.symbol} (${address} on chainId ${chainId}).`);
|
356
356
|
try {
|
357
|
-
await IconService.pullPush(iconURL, new BucketService(
|
357
|
+
await IconService.pullPush(iconURL, new BucketService("merkl-static-assets", `angle-${env}-1`), {
|
358
358
|
name: `${chainId}/${address}`,
|
359
359
|
});
|
360
|
-
token.icon = `${process.env.GCS_ENDPOINT}/merkl
|
360
|
+
token.icon = `${process.env.GCS_ENDPOINT}/merkl-static-assets/tokens/${chainId}/${address}.${extension}`;
|
361
361
|
}
|
362
362
|
catch (err) {
|
363
363
|
log.error(`[${token.id} (${chainId} | ${address})] Failed to pull / push from Notion to GCP. Using Notion URI for now.`, err);
|