@merkl/api 0.20.138 → 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 +18 -18
- 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 +6 -6
- package/dist/src/modules/v4/coingecko/coingecko.repository.d.ts +1 -1
- package/dist/src/modules/v4/opportunity/opportunity.controller.d.ts +5 -5
- package/dist/src/modules/v4/opportunity/opportunity.model.d.ts +11 -1
- package/dist/src/modules/v4/opportunity/opportunity.model.js +2 -3
- 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 +6 -6
- 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
@@ -648,7 +648,7 @@ declare const eden: {
|
|
648
648
|
tags?: string | undefined;
|
649
649
|
identifier?: string | undefined;
|
650
650
|
page?: number | undefined;
|
651
|
-
action?:
|
651
|
+
action?: "POOL" | "HOLD" | "DROP" | "LEND" | "BORROW" | "LONG" | "SHORT" | "SWAP" | "INVALID" | undefined;
|
652
652
|
campaignId?: string | undefined;
|
653
653
|
creatorAddress?: string | undefined;
|
654
654
|
chainId?: string | undefined;
|
@@ -856,7 +856,7 @@ declare const eden: {
|
|
856
856
|
tags?: string | undefined;
|
857
857
|
identifier?: string | undefined;
|
858
858
|
page?: number | undefined;
|
859
|
-
action?:
|
859
|
+
action?: "POOL" | "HOLD" | "DROP" | "LEND" | "BORROW" | "LONG" | "SHORT" | "SWAP" | "INVALID" | undefined;
|
860
860
|
campaignId?: string | undefined;
|
861
861
|
creatorAddress?: string | undefined;
|
862
862
|
chainId?: string | undefined;
|
@@ -1074,7 +1074,7 @@ declare const eden: {
|
|
1074
1074
|
tags?: string | undefined;
|
1075
1075
|
identifier?: string | undefined;
|
1076
1076
|
page?: number | undefined;
|
1077
|
-
action?:
|
1077
|
+
action?: "POOL" | "HOLD" | "DROP" | "LEND" | "BORROW" | "LONG" | "SHORT" | "SWAP" | "INVALID" | undefined;
|
1078
1078
|
campaignId?: string | undefined;
|
1079
1079
|
creatorAddress?: string | undefined;
|
1080
1080
|
chainId?: string | undefined;
|
@@ -1109,7 +1109,7 @@ declare const eden: {
|
|
1109
1109
|
tags?: string | undefined;
|
1110
1110
|
identifier?: string | undefined;
|
1111
1111
|
page?: number | undefined;
|
1112
|
-
action?:
|
1112
|
+
action?: "POOL" | "HOLD" | "DROP" | "LEND" | "BORROW" | "LONG" | "SHORT" | "SWAP" | "INVALID" | undefined;
|
1113
1113
|
campaignId?: string | undefined;
|
1114
1114
|
creatorAddress?: string | undefined;
|
1115
1115
|
chainId?: string | undefined;
|
@@ -1144,7 +1144,7 @@ declare const eden: {
|
|
1144
1144
|
tags?: string | undefined;
|
1145
1145
|
identifier?: string | undefined;
|
1146
1146
|
page?: number | undefined;
|
1147
|
-
action?:
|
1147
|
+
action?: "POOL" | "HOLD" | "DROP" | "LEND" | "BORROW" | "LONG" | "SHORT" | "SWAP" | "INVALID" | undefined;
|
1148
1148
|
campaignId?: string | undefined;
|
1149
1149
|
creatorAddress?: string | undefined;
|
1150
1150
|
chainId?: string | undefined;
|
@@ -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;
|
@@ -5700,7 +5700,7 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", fa
|
|
5700
5700
|
tags?: string | undefined;
|
5701
5701
|
identifier?: string | undefined;
|
5702
5702
|
page?: number | undefined;
|
5703
|
-
action?:
|
5703
|
+
action?: "POOL" | "HOLD" | "DROP" | "LEND" | "BORROW" | "LONG" | "SHORT" | "SWAP" | "INVALID" | undefined;
|
5704
5704
|
campaignId?: string | undefined;
|
5705
5705
|
creatorAddress?: string | undefined;
|
5706
5706
|
chainId?: string | undefined;
|
@@ -5913,7 +5913,7 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", fa
|
|
5913
5913
|
tags?: string | undefined;
|
5914
5914
|
identifier?: string | undefined;
|
5915
5915
|
page?: number | undefined;
|
5916
|
-
action?:
|
5916
|
+
action?: "POOL" | "HOLD" | "DROP" | "LEND" | "BORROW" | "LONG" | "SHORT" | "SWAP" | "INVALID" | undefined;
|
5917
5917
|
campaignId?: string | undefined;
|
5918
5918
|
creatorAddress?: string | undefined;
|
5919
5919
|
chainId?: string | undefined;
|
@@ -6435,7 +6435,7 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", fa
|
|
6435
6435
|
tags?: string | undefined;
|
6436
6436
|
identifier?: string | undefined;
|
6437
6437
|
page?: number | undefined;
|
6438
|
-
action?:
|
6438
|
+
action?: "POOL" | "HOLD" | "DROP" | "LEND" | "BORROW" | "LONG" | "SHORT" | "SWAP" | "INVALID" | undefined;
|
6439
6439
|
campaignId?: string | undefined;
|
6440
6440
|
creatorAddress?: string | undefined;
|
6441
6441
|
chainId?: string | undefined;
|
@@ -6478,7 +6478,7 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", fa
|
|
6478
6478
|
tags?: string | undefined;
|
6479
6479
|
identifier?: string | undefined;
|
6480
6480
|
page?: number | undefined;
|
6481
|
-
action?:
|
6481
|
+
action?: "POOL" | "HOLD" | "DROP" | "LEND" | "BORROW" | "LONG" | "SHORT" | "SWAP" | "INVALID" | undefined;
|
6482
6482
|
campaignId?: string | undefined;
|
6483
6483
|
creatorAddress?: string | undefined;
|
6484
6484
|
chainId?: string | undefined;
|
@@ -6522,7 +6522,7 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", fa
|
|
6522
6522
|
tags?: string | undefined;
|
6523
6523
|
identifier?: string | undefined;
|
6524
6524
|
page?: number | undefined;
|
6525
|
-
action?:
|
6525
|
+
action?: "POOL" | "HOLD" | "DROP" | "LEND" | "BORROW" | "LONG" | "SHORT" | "SWAP" | "INVALID" | undefined;
|
6526
6526
|
campaignId?: string | undefined;
|
6527
6527
|
creatorAddress?: string | undefined;
|
6528
6528
|
chainId?: string | 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;
|
@@ -12349,7 +12349,7 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", fa
|
|
12349
12349
|
tags?: string | undefined;
|
12350
12350
|
identifier?: string | undefined;
|
12351
12351
|
page?: number | undefined;
|
12352
|
-
action?:
|
12352
|
+
action?: "POOL" | "HOLD" | "DROP" | "LEND" | "BORROW" | "LONG" | "SHORT" | "SWAP" | "INVALID" | undefined;
|
12353
12353
|
campaignId?: string | undefined;
|
12354
12354
|
creatorAddress?: string | undefined;
|
12355
12355
|
chainId?: string | undefined;
|
@@ -12557,7 +12557,7 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", fa
|
|
12557
12557
|
tags?: string | undefined;
|
12558
12558
|
identifier?: string | undefined;
|
12559
12559
|
page?: number | undefined;
|
12560
|
-
action?:
|
12560
|
+
action?: "POOL" | "HOLD" | "DROP" | "LEND" | "BORROW" | "LONG" | "SHORT" | "SWAP" | "INVALID" | undefined;
|
12561
12561
|
campaignId?: string | undefined;
|
12562
12562
|
creatorAddress?: string | undefined;
|
12563
12563
|
chainId?: string | undefined;
|
@@ -12775,7 +12775,7 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", fa
|
|
12775
12775
|
tags?: string | undefined;
|
12776
12776
|
identifier?: string | undefined;
|
12777
12777
|
page?: number | undefined;
|
12778
|
-
action?:
|
12778
|
+
action?: "POOL" | "HOLD" | "DROP" | "LEND" | "BORROW" | "LONG" | "SHORT" | "SWAP" | "INVALID" | undefined;
|
12779
12779
|
campaignId?: string | undefined;
|
12780
12780
|
creatorAddress?: string | undefined;
|
12781
12781
|
chainId?: string | undefined;
|
@@ -12810,7 +12810,7 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", fa
|
|
12810
12810
|
tags?: string | undefined;
|
12811
12811
|
identifier?: string | undefined;
|
12812
12812
|
page?: number | undefined;
|
12813
|
-
action?:
|
12813
|
+
action?: "POOL" | "HOLD" | "DROP" | "LEND" | "BORROW" | "LONG" | "SHORT" | "SWAP" | "INVALID" | undefined;
|
12814
12814
|
campaignId?: string | undefined;
|
12815
12815
|
creatorAddress?: string | undefined;
|
12816
12816
|
chainId?: string | undefined;
|
@@ -12845,7 +12845,7 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", fa
|
|
12845
12845
|
tags?: string | undefined;
|
12846
12846
|
identifier?: string | undefined;
|
12847
12847
|
page?: number | undefined;
|
12848
|
-
action?:
|
12848
|
+
action?: "POOL" | "HOLD" | "DROP" | "LEND" | "BORROW" | "LONG" | "SHORT" | "SWAP" | "INVALID" | undefined;
|
12849
12849
|
campaignId?: string | undefined;
|
12850
12850
|
creatorAddress?: string | undefined;
|
12851
12851
|
chainId?: string | 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
@@ -465,7 +465,7 @@ declare const app: Elysia<"", false, {
|
|
465
465
|
tags?: string | undefined;
|
466
466
|
identifier?: string | undefined;
|
467
467
|
page?: number | undefined;
|
468
|
-
action?:
|
468
|
+
action?: "POOL" | "HOLD" | "DROP" | "LEND" | "BORROW" | "LONG" | "SHORT" | "SWAP" | "INVALID" | undefined;
|
469
469
|
campaignId?: string | undefined;
|
470
470
|
creatorAddress?: string | undefined;
|
471
471
|
chainId?: string | undefined;
|
@@ -678,7 +678,7 @@ declare const app: Elysia<"", false, {
|
|
678
678
|
tags?: string | undefined;
|
679
679
|
identifier?: string | undefined;
|
680
680
|
page?: number | undefined;
|
681
|
-
action?:
|
681
|
+
action?: "POOL" | "HOLD" | "DROP" | "LEND" | "BORROW" | "LONG" | "SHORT" | "SWAP" | "INVALID" | undefined;
|
682
682
|
campaignId?: string | undefined;
|
683
683
|
creatorAddress?: string | undefined;
|
684
684
|
chainId?: string | undefined;
|
@@ -1200,7 +1200,7 @@ declare const app: Elysia<"", false, {
|
|
1200
1200
|
tags?: string | undefined;
|
1201
1201
|
identifier?: string | undefined;
|
1202
1202
|
page?: number | undefined;
|
1203
|
-
action?:
|
1203
|
+
action?: "POOL" | "HOLD" | "DROP" | "LEND" | "BORROW" | "LONG" | "SHORT" | "SWAP" | "INVALID" | undefined;
|
1204
1204
|
campaignId?: string | undefined;
|
1205
1205
|
creatorAddress?: string | undefined;
|
1206
1206
|
chainId?: string | undefined;
|
@@ -1243,7 +1243,7 @@ declare const app: Elysia<"", false, {
|
|
1243
1243
|
tags?: string | undefined;
|
1244
1244
|
identifier?: string | undefined;
|
1245
1245
|
page?: number | undefined;
|
1246
|
-
action?:
|
1246
|
+
action?: "POOL" | "HOLD" | "DROP" | "LEND" | "BORROW" | "LONG" | "SHORT" | "SWAP" | "INVALID" | undefined;
|
1247
1247
|
campaignId?: string | undefined;
|
1248
1248
|
creatorAddress?: string | undefined;
|
1249
1249
|
chainId?: string | undefined;
|
@@ -1287,7 +1287,7 @@ declare const app: Elysia<"", false, {
|
|
1287
1287
|
tags?: string | undefined;
|
1288
1288
|
identifier?: string | undefined;
|
1289
1289
|
page?: number | undefined;
|
1290
|
-
action?:
|
1290
|
+
action?: "POOL" | "HOLD" | "DROP" | "LEND" | "BORROW" | "LONG" | "SHORT" | "SWAP" | "INVALID" | undefined;
|
1291
1291
|
campaignId?: string | undefined;
|
1292
1292
|
creatorAddress?: string | undefined;
|
1293
1293
|
chainId?: string | undefined;
|
@@ -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;
|
@@ -320,7 +320,7 @@ export declare const OpportunityController: Elysia<"/opportunities", false, {
|
|
320
320
|
tags?: string | undefined;
|
321
321
|
identifier?: string | undefined;
|
322
322
|
page?: number | undefined;
|
323
|
-
action?:
|
323
|
+
action?: "POOL" | "HOLD" | "DROP" | "LEND" | "BORROW" | "LONG" | "SHORT" | "SWAP" | "INVALID" | undefined;
|
324
324
|
campaignId?: string | undefined;
|
325
325
|
creatorAddress?: string | undefined;
|
326
326
|
chainId?: string | undefined;
|
@@ -533,7 +533,7 @@ export declare const OpportunityController: Elysia<"/opportunities", false, {
|
|
533
533
|
tags?: string | undefined;
|
534
534
|
identifier?: string | undefined;
|
535
535
|
page?: number | undefined;
|
536
|
-
action?:
|
536
|
+
action?: "POOL" | "HOLD" | "DROP" | "LEND" | "BORROW" | "LONG" | "SHORT" | "SWAP" | "INVALID" | undefined;
|
537
537
|
campaignId?: string | undefined;
|
538
538
|
creatorAddress?: string | undefined;
|
539
539
|
chainId?: string | undefined;
|
@@ -1055,7 +1055,7 @@ export declare const OpportunityController: Elysia<"/opportunities", false, {
|
|
1055
1055
|
tags?: string | undefined;
|
1056
1056
|
identifier?: string | undefined;
|
1057
1057
|
page?: number | undefined;
|
1058
|
-
action?:
|
1058
|
+
action?: "POOL" | "HOLD" | "DROP" | "LEND" | "BORROW" | "LONG" | "SHORT" | "SWAP" | "INVALID" | undefined;
|
1059
1059
|
campaignId?: string | undefined;
|
1060
1060
|
creatorAddress?: string | undefined;
|
1061
1061
|
chainId?: string | undefined;
|
@@ -1098,7 +1098,7 @@ export declare const OpportunityController: Elysia<"/opportunities", false, {
|
|
1098
1098
|
tags?: string | undefined;
|
1099
1099
|
identifier?: string | undefined;
|
1100
1100
|
page?: number | undefined;
|
1101
|
-
action?:
|
1101
|
+
action?: "POOL" | "HOLD" | "DROP" | "LEND" | "BORROW" | "LONG" | "SHORT" | "SWAP" | "INVALID" | undefined;
|
1102
1102
|
campaignId?: string | undefined;
|
1103
1103
|
creatorAddress?: string | undefined;
|
1104
1104
|
chainId?: string | undefined;
|
@@ -1142,7 +1142,7 @@ export declare const OpportunityController: Elysia<"/opportunities", false, {
|
|
1142
1142
|
tags?: string | undefined;
|
1143
1143
|
identifier?: string | undefined;
|
1144
1144
|
page?: number | undefined;
|
1145
|
-
action?:
|
1145
|
+
action?: "POOL" | "HOLD" | "DROP" | "LEND" | "BORROW" | "LONG" | "SHORT" | "SWAP" | "INVALID" | undefined;
|
1146
1146
|
campaignId?: string | undefined;
|
1147
1147
|
creatorAddress?: string | undefined;
|
1148
1148
|
chainId?: string | undefined;
|
@@ -309,7 +309,17 @@ export declare const GetOpportunitiesQueryDto: import("@sinclair/typebox").TObje
|
|
309
309
|
search: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
310
310
|
campaignId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
311
311
|
chainId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TRegExp>;
|
312
|
-
action: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").
|
312
|
+
action: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TEnum<{
|
313
|
+
POOL: "POOL";
|
314
|
+
HOLD: "HOLD";
|
315
|
+
DROP: "DROP";
|
316
|
+
LEND: "LEND";
|
317
|
+
BORROW: "BORROW";
|
318
|
+
LONG: "LONG";
|
319
|
+
SHORT: "SHORT";
|
320
|
+
SWAP: "SWAP";
|
321
|
+
INVALID: "INVALID";
|
322
|
+
}>>;
|
313
323
|
type: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
314
324
|
creatorAddress: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
315
325
|
tags: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
@@ -59,9 +59,8 @@ 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
|
-
|
63
|
-
|
64
|
-
description: "A comma seprated list actions. Legal values are: `POOL`, `HOLD`, `DROP`, `LEND`, `BORROW`",
|
62
|
+
action: t.Optional(t.Enum(OpportunityAction, {
|
63
|
+
description: `A comma seprated list actions. Legal values are: ${Object.values(OpportunityAction).join(", ")}`,
|
65
64
|
})),
|
66
65
|
type: t.Optional(t.String({ description: "A comma separated list of Opportunity type" })),
|
67
66
|
creatorAddress: t.Optional(t.String({ description: "Filter by creator address" })),
|
@@ -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;
|