@merkl/api 0.20.51 → 0.20.53
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/backgroundJobs/index.js +5 -3
- package/dist/src/eden/index.d.ts +1169 -976
- package/dist/src/engine/dynamicData/factory.js +6 -0
- package/dist/src/engine/dynamicData/implementations/Erc20.d.ts +2 -2
- package/dist/src/engine/dynamicData/implementations/Erc20.js +16 -2
- package/dist/src/engine/dynamicData/implementations/UniswapV4.js +1 -1
- package/dist/src/engine/erc20SubTypeProcessors/helpers/tokenType.d.ts +2 -1
- package/dist/src/engine/erc20SubTypeProcessors/helpers/tokenType.js +5 -0
- package/dist/src/engine/erc20SubTypeProcessors/implementations/processorMapping.js +1 -0
- package/dist/src/engine/erc20SubTypeProcessors/subtypesRound1.js +2 -0
- package/dist/src/engine/opportunityMetadata/factory.js +6 -0
- package/dist/src/engine/opportunityMetadata/implementations/Erc20.js +1 -1
- package/dist/src/index.d.ts +246 -185
- package/dist/src/jobs/update-uniswap-v4-pools.js +3 -2
- package/dist/src/modules/v4/accounting/accounting.repository.js +72 -18
- package/dist/src/modules/v4/campaign/campaign.controller.d.ts +0 -169
- package/dist/src/modules/v4/campaign/campaign.controller.js +1 -65
- package/dist/src/modules/v4/campaign/campaign.test.controller.d.ts +193 -0
- package/dist/src/modules/v4/campaign/campaign.test.controller.js +71 -0
- package/dist/src/modules/v4/programPayload/programPayload.repository.d.ts +67 -2
- package/dist/src/modules/v4/programPayload/programPayload.repository.js +67 -0
- package/dist/src/modules/v4/protocol/protocol.controller.d.ts +1 -1
- package/dist/src/modules/v4/protocol/protocol.controller.js +2 -2
- package/dist/src/modules/v4/protocol/protocol.repository.d.ts +1 -9
- package/dist/src/modules/v4/protocol/protocol.repository.js +1 -4
- package/dist/src/modules/v4/protocol/protocol.service.d.ts +1 -2
- package/dist/src/modules/v4/protocol/protocol.service.js +2 -6
- package/dist/src/modules/v4/router.d.ts +246 -185
- package/dist/src/modules/v4/router.js +2 -0
- package/dist/src/modules/v4/uniswap/uniswap.controller.d.ts +72 -15
- package/dist/src/modules/v4/uniswap/uniswap.controller.js +49 -6
- package/dist/src/modules/v4/uniswap/uniswap.model.d.ts +35 -16
- package/dist/src/modules/v4/uniswap/uniswap.model.js +22 -8
- package/dist/src/modules/v4/uniswap/uniswap.repository.d.ts +2 -2
- package/dist/src/modules/v4/uniswap/uniswap.repository.js +2 -2
- package/dist/src/modules/v4/uniswap/uniswap.service.d.ts +4 -19
- package/dist/src/modules/v4/uniswap/uniswap.service.js +20 -80
- package/dist/src/routes/v3/uniswapv4.js +5 -5
- package/dist/src/utils/decodeCalls.js +10 -1
- package/dist/src/utils/encodeCalls.js +3 -0
- package/dist/src/utils/generateCardName.js +5 -0
- package/dist/tsconfig.package.tsbuildinfo +1 -1
- package/package.json +14 -14
- package/dist/src/engine/dynamicData/utils/getUniswapV4Pools.d.ts +0 -10
- package/dist/src/engine/dynamicData/utils/getUniswapV4Pools.js +0 -188
@@ -51,5 +51,11 @@ const map = {
|
|
51
51
|
[Campaign.MORPHOSUPPLY]: new DefaultDynamicData(), // TODO
|
52
52
|
[Campaign.SYNCSWAP_VAULT]: new DefaultDynamicData(), // TODO
|
53
53
|
[Campaign.MAVERICK_BP]: new DefaultDynamicData(), // TODO
|
54
|
+
[Campaign.ERC6909]: new DefaultDynamicData(), // TODO
|
55
|
+
[Campaign.ERC6909FIXAPR]: new DefaultDynamicData(), // TODO
|
56
|
+
[Campaign.COMPOUND_V3]: new DefaultDynamicData(), // TODO,
|
57
|
+
[Campaign.COMPOUND_V3_FIXAPR]: new DefaultDynamicData(), // TODO
|
58
|
+
[Campaign.ERC1155]: new DefaultDynamicData(), // TODO
|
59
|
+
[Campaign.ERC1155FIXAPR]: new DefaultDynamicData(), // TODO
|
54
60
|
};
|
55
61
|
export const dynamicDataBuilderFactory = (campaignType) => map[campaignType];
|
@@ -1,6 +1,6 @@
|
|
1
|
-
import {
|
1
|
+
import { Campaign, type CampaignParameters, type MerklChainId } from "@sdk";
|
2
2
|
import type { DynamicDataBuilder } from "../interface";
|
3
|
-
export type ERC20SupportedCampaignType = Campaign.ERC20 | Campaign.ERC20LOGPROCESSOR | Campaign.ERC20REBASELOGPROCESSOR | Campaign.EULER;
|
3
|
+
export type ERC20SupportedCampaignType = Campaign.ERC20 | Campaign.ERC20LOGPROCESSOR | Campaign.ERC20REBASELOGPROCESSOR | Campaign.EULER | Campaign.ERC20_FIX_APR;
|
4
4
|
export declare class Erc20DynamicData implements DynamicDataBuilder<ERC20SupportedCampaignType> {
|
5
5
|
build(chainId: MerklChainId, campaigns: CampaignParameters<ERC20SupportedCampaignType>[]): Promise<any[]>;
|
6
6
|
}
|
@@ -9,7 +9,7 @@ import { TokenRepository } from "@/modules/v4/token/token.repository";
|
|
9
9
|
import { TokenService } from "@/modules/v4/token/token.service";
|
10
10
|
import { log } from "@/utils/logger";
|
11
11
|
import { Pricer } from "@/utils/pricer";
|
12
|
-
import { BN2Number, BalancerPoolInterface, BalancerV3StablePoolInterface, ChainId, ChainInteractionService, ERC20Interface, EnzymeInterface, FactoryInterface, LayerBankERC20Interface, MetamorphoInterface, YEAR, getEnv, } from "@sdk";
|
12
|
+
import { BN2Number, BalancerPoolInterface, BalancerV3StablePoolInterface, Campaign, ChainId, ChainInteractionService, ERC20Interface, EnzymeInterface, FactoryInterface, LayerBankERC20Interface, MetamorphoInterface, YEAR, getEnv, } from "@sdk";
|
13
13
|
export class Erc20DynamicData {
|
14
14
|
async build(chainId, campaigns) {
|
15
15
|
const pricer = await Pricer.load();
|
@@ -157,7 +157,21 @@ export class Erc20DynamicData {
|
|
157
157
|
{ chainId: campaign.chainId, address: campaign.rewardToken },
|
158
158
|
]);
|
159
159
|
const rewardToken = rewardTokens[0];
|
160
|
-
|
160
|
+
if (rewardToken.isPoint) {
|
161
|
+
apr = apr / 365 / 100;
|
162
|
+
}
|
163
|
+
else if (campaign.campaignType === Campaign.ERC20_FIX_APR &&
|
164
|
+
["tacBTC", "tacETH", "tacUSD"].includes(campaign.campaignParameters.symbolTargetToken)) {
|
165
|
+
if (campaign.campaignParameters.symbolTargetToken === "tacBTC") {
|
166
|
+
apr = 27.92;
|
167
|
+
}
|
168
|
+
else if (campaign.campaignParameters.symbolTargetToken === "tacETH") {
|
169
|
+
apr = 32.58;
|
170
|
+
}
|
171
|
+
else if (campaign.campaignParameters.symbolTargetToken === "tacUSD") {
|
172
|
+
apr = 46.54;
|
173
|
+
}
|
174
|
+
}
|
161
175
|
if (campaign.chainId === ChainId.ETHERLINK) {
|
162
176
|
whitelistedSupplyTargetToken = tokenTypesByCampaign[campaign.campaignId].typeInfo.totalSupply;
|
163
177
|
}
|
@@ -121,7 +121,7 @@ export class UniswapV4DynamicData {
|
|
121
121
|
chainId: chainId,
|
122
122
|
symbol: symbolCurrency1,
|
123
123
|
}));
|
124
|
-
const {
|
124
|
+
const { amount0, amount1 } = await computeUniV4PoolTVLFromMostRecentStateSave(chainId, pool.poolId, priceToken0, priceToken1, decimalsCurrency0, decimalsCurrency1);
|
125
125
|
poolBalanceToken0 += amount0;
|
126
126
|
poolBalanceToken1 += amount1;
|
127
127
|
/** Iterate over distributions to compute APRs */
|
@@ -96,7 +96,8 @@ export declare enum tokenType {
|
|
96
96
|
xU308 = "xU308",
|
97
97
|
bunniV2 = "bunniV2",
|
98
98
|
beratrax_vault = "beratrax_vault",
|
99
|
-
beraborrow_gauge = "beraborrow_gauge"
|
99
|
+
beraborrow_gauge = "beraborrow_gauge",
|
100
|
+
curve_gauge = "curve_gauge"
|
100
101
|
}
|
101
102
|
export declare const tokenTypeToProtocolAndAction: Record<tokenType, {
|
102
103
|
protocol: ProtocolId | undefined;
|
@@ -97,6 +97,7 @@ export var tokenType;
|
|
97
97
|
tokenType["bunniV2"] = "bunniV2";
|
98
98
|
tokenType["beratrax_vault"] = "beratrax_vault";
|
99
99
|
tokenType["beraborrow_gauge"] = "beraborrow_gauge";
|
100
|
+
tokenType["curve_gauge"] = "curve_gauge";
|
100
101
|
})(tokenType || (tokenType = {}));
|
101
102
|
export const tokenTypeToProtocolAndAction = {
|
102
103
|
[tokenType.aave_borrowing]: { protocol: "aave", action: OpportunityAction.BORROW },
|
@@ -209,4 +210,8 @@ export const tokenTypeToProtocolAndAction = {
|
|
209
210
|
protocol: "xlend",
|
210
211
|
action: OpportunityAction.BORROW,
|
211
212
|
},
|
213
|
+
[tokenType.curve_gauge]: {
|
214
|
+
protocol: "curve",
|
215
|
+
action: OpportunityAction.POOL,
|
216
|
+
},
|
212
217
|
};
|
@@ -87,6 +87,8 @@ function satisfiesNameConditions(name, type) {
|
|
87
87
|
return ((lowerCaseName.startsWith("extrafi x") || lowerCaseName.startsWith("extrax")) && !lowerCaseName.includes("debt"));
|
88
88
|
case tokenType.xlend_borrowing:
|
89
89
|
return ((lowerCaseName.startsWith("extrafi x") || lowerCaseName.startsWith("extrax")) && lowerCaseName.includes("debt"));
|
90
|
+
case tokenType.curve_gauge:
|
91
|
+
return lowerCaseName.startsWith("curve.fi") && lowerCaseName.includes("gauge");
|
90
92
|
case tokenType.vicuna_lending:
|
91
93
|
return lowerCaseName.startsWith("vicuna sonic") && !lowerCaseName.includes("debt");
|
92
94
|
case tokenType.vicuna_borrowing:
|
@@ -54,5 +54,11 @@ const map = {
|
|
54
54
|
[Campaign.EVENT_BASED]: new EventBasedMetadata(),
|
55
55
|
[Campaign.ERC20REBASEFIXAPR]: new Erc20Metadata(),
|
56
56
|
[Campaign.MAVERICK_BP]: new DefaultMetadata(), // TODO
|
57
|
+
[Campaign.ERC6909]: new DefaultMetadata(), // TODO
|
58
|
+
[Campaign.ERC6909FIXAPR]: new DefaultMetadata(), // TODO
|
59
|
+
[Campaign.COMPOUND_V3]: new DefaultMetadata(), // TODO,
|
60
|
+
[Campaign.COMPOUND_V3_FIXAPR]: new DefaultMetadata(), // TODO
|
61
|
+
[Campaign.ERC1155]: new DefaultMetadata(), // TODO
|
62
|
+
[Campaign.ERC1155FIXAPR]: new DefaultMetadata(), // TODO
|
57
63
|
};
|
58
64
|
export const metadataBuilderFactory = (campaignType) => map[campaignType];
|
@@ -28,7 +28,7 @@ export class Erc20Metadata {
|
|
28
28
|
action = dynamicData?.typeInfo?.action ?? action;
|
29
29
|
name = dynamicData?.typeInfo?.cardName;
|
30
30
|
mainProtocolId = dynamicData?.typeInfo?.protocol?.toLowerCase().replace(" ", "");
|
31
|
-
const protocol = !!mainProtocolId ?
|
31
|
+
const protocol = !!mainProtocolId ? await ProtocolService.findUnique(mainProtocolId) : undefined;
|
32
32
|
if (!!protocol) {
|
33
33
|
mainProtocolId = protocol?.id;
|
34
34
|
}
|
package/dist/src/index.d.ts
CHANGED
@@ -1347,175 +1347,6 @@ declare const app: Elysia<"", false, {
|
|
1347
1347
|
};
|
1348
1348
|
};
|
1349
1349
|
};
|
1350
|
-
} & {
|
1351
|
-
"dry-run": {
|
1352
|
-
":campaignId": {
|
1353
|
-
"dynamic-data": {
|
1354
|
-
get: {
|
1355
|
-
body: unknown;
|
1356
|
-
params: {
|
1357
|
-
campaignId: string;
|
1358
|
-
};
|
1359
|
-
query: unknown;
|
1360
|
-
headers: {
|
1361
|
-
authorization: string;
|
1362
|
-
};
|
1363
|
-
response: {
|
1364
|
-
200: unknown[];
|
1365
|
-
};
|
1366
|
-
};
|
1367
|
-
};
|
1368
|
-
};
|
1369
|
-
};
|
1370
|
-
} & {
|
1371
|
-
"dry-run": {
|
1372
|
-
"dynamic-data": {
|
1373
|
-
list: {
|
1374
|
-
post: {
|
1375
|
-
body: string[];
|
1376
|
-
params: {};
|
1377
|
-
query: unknown;
|
1378
|
-
headers: {
|
1379
|
-
authorization: string;
|
1380
|
-
};
|
1381
|
-
response: {
|
1382
|
-
200: unknown[];
|
1383
|
-
};
|
1384
|
-
};
|
1385
|
-
};
|
1386
|
-
};
|
1387
|
-
};
|
1388
|
-
} & {
|
1389
|
-
"dry-run": {
|
1390
|
-
"dynamic-data": {
|
1391
|
-
post: {
|
1392
|
-
body: {
|
1393
|
-
id?: string | undefined;
|
1394
|
-
subType?: number | undefined;
|
1395
|
-
campaignId?: string | undefined;
|
1396
|
-
amount?: string | undefined;
|
1397
|
-
creatorAddress?: string | undefined;
|
1398
|
-
type: string;
|
1399
|
-
params: any;
|
1400
|
-
computeChainId: number;
|
1401
|
-
distributionChainId: number;
|
1402
|
-
startTimestamp: number;
|
1403
|
-
endTimestamp: number;
|
1404
|
-
rewardToken: string;
|
1405
|
-
};
|
1406
|
-
params: {};
|
1407
|
-
query: unknown;
|
1408
|
-
headers: {
|
1409
|
-
authorization: string;
|
1410
|
-
};
|
1411
|
-
response: {
|
1412
|
-
200: unknown[];
|
1413
|
-
};
|
1414
|
-
};
|
1415
|
-
};
|
1416
|
-
};
|
1417
|
-
} & {
|
1418
|
-
"dry-run": {
|
1419
|
-
metadata: {
|
1420
|
-
post: {
|
1421
|
-
body: {
|
1422
|
-
id?: string | undefined;
|
1423
|
-
subType?: number | undefined;
|
1424
|
-
campaignId?: string | undefined;
|
1425
|
-
amount?: string | undefined;
|
1426
|
-
creatorAddress?: string | undefined;
|
1427
|
-
type: string;
|
1428
|
-
params: any;
|
1429
|
-
computeChainId: number;
|
1430
|
-
distributionChainId: number;
|
1431
|
-
startTimestamp: number;
|
1432
|
-
endTimestamp: number;
|
1433
|
-
rewardToken: string;
|
1434
|
-
};
|
1435
|
-
params: {};
|
1436
|
-
query: unknown;
|
1437
|
-
headers: {
|
1438
|
-
authorization: string;
|
1439
|
-
};
|
1440
|
-
response: {
|
1441
|
-
200: {
|
1442
|
-
id: string;
|
1443
|
-
chainId: number;
|
1444
|
-
type: string;
|
1445
|
-
identifier: string;
|
1446
|
-
name: string;
|
1447
|
-
status: "PAST" | "LIVE" | "SOON";
|
1448
|
-
action: any;
|
1449
|
-
tokens: ({
|
1450
|
-
symbol: string;
|
1451
|
-
id: string;
|
1452
|
-
name: string | null;
|
1453
|
-
icon: string;
|
1454
|
-
address: string;
|
1455
|
-
chainId: number;
|
1456
|
-
decimals: number;
|
1457
|
-
verified: boolean;
|
1458
|
-
isTest: boolean;
|
1459
|
-
isPoint: boolean;
|
1460
|
-
isNative: boolean;
|
1461
|
-
} & {
|
1462
|
-
price?: number | null | undefined;
|
1463
|
-
})[];
|
1464
|
-
mainProtocol: "splice" | "morpho" | "quickswap" | "euler" | "ambient" | "uniswap" | "arthswap" | "base-swap" | "camelot" | "crust" | "fenix" | "horiza" | "izumi" | "kim" | "pancake-swap" | "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" | "syncswap" | "neptune" | "zkSwapThreePool" | "rfx" | "ra" | "maverick" | "trader-joe" | "hanji" | "radiant" | "aave" | "fraxlend" | "ironclad" | "gearbox" | "compound" | "sturdy" | "frax" | "ionic" | "moonwell" | "fluid" | "silo" | "dolomite" | "badger" | "ajna" | "layerbank" | "ion" | "venus" | "woofi" | "reactor_fusion" | "eigenlayer" | "vest" | "zerolend" | "hyperdrive" | "gamma" | "oku" | "hourglass" | "veda" | "kyo" | "sonex" | "lendle" | "tako-tako" | "equalizer" | "spectra" | "beraborrow" | "superlend" | "avalon" | "iguana" | "xlend" | "angles" | "enzyme" | "toros" | "vicuna" | "bunni" | "beratrax" | "concrete" | "cian" | "pendle" | "yei" | "filament" | "gammaswap" | "maha" | "tempest" | "uranium" | "holdstation" | "katana" | "satlayer" | undefined;
|
1465
|
-
depositUrl: any;
|
1466
|
-
explorerAddress: string | undefined;
|
1467
|
-
tags: string[];
|
1468
|
-
};
|
1469
|
-
};
|
1470
|
-
};
|
1471
|
-
};
|
1472
|
-
};
|
1473
|
-
} & {
|
1474
|
-
"dry-run": {
|
1475
|
-
metadata: {
|
1476
|
-
get: {
|
1477
|
-
body: unknown;
|
1478
|
-
params: {};
|
1479
|
-
query: {
|
1480
|
-
campaignId: string;
|
1481
|
-
distributionChain: number;
|
1482
|
-
};
|
1483
|
-
headers: {
|
1484
|
-
authorization: string;
|
1485
|
-
};
|
1486
|
-
response: {
|
1487
|
-
200: {
|
1488
|
-
id: string;
|
1489
|
-
chainId: number;
|
1490
|
-
type: string;
|
1491
|
-
identifier: string;
|
1492
|
-
name: string;
|
1493
|
-
status: "PAST" | "LIVE" | "SOON";
|
1494
|
-
action: any;
|
1495
|
-
tokens: ({
|
1496
|
-
symbol: string;
|
1497
|
-
id: string;
|
1498
|
-
name: string | null;
|
1499
|
-
icon: string;
|
1500
|
-
address: string;
|
1501
|
-
chainId: number;
|
1502
|
-
decimals: number;
|
1503
|
-
verified: boolean;
|
1504
|
-
isTest: boolean;
|
1505
|
-
isPoint: boolean;
|
1506
|
-
isNative: boolean;
|
1507
|
-
} & {
|
1508
|
-
price?: number | null | undefined;
|
1509
|
-
})[];
|
1510
|
-
mainProtocol: "splice" | "morpho" | "quickswap" | "euler" | "ambient" | "uniswap" | "arthswap" | "base-swap" | "camelot" | "crust" | "fenix" | "horiza" | "izumi" | "kim" | "pancake-swap" | "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" | "syncswap" | "neptune" | "zkSwapThreePool" | "rfx" | "ra" | "maverick" | "trader-joe" | "hanji" | "radiant" | "aave" | "fraxlend" | "ironclad" | "gearbox" | "compound" | "sturdy" | "frax" | "ionic" | "moonwell" | "fluid" | "silo" | "dolomite" | "badger" | "ajna" | "layerbank" | "ion" | "venus" | "woofi" | "reactor_fusion" | "eigenlayer" | "vest" | "zerolend" | "hyperdrive" | "gamma" | "oku" | "hourglass" | "veda" | "kyo" | "sonex" | "lendle" | "tako-tako" | "equalizer" | "spectra" | "beraborrow" | "superlend" | "avalon" | "iguana" | "xlend" | "angles" | "enzyme" | "toros" | "vicuna" | "bunni" | "beratrax" | "concrete" | "cian" | "pendle" | "yei" | "filament" | "gammaswap" | "maha" | "tempest" | "uranium" | "holdstation" | "katana" | "satlayer" | undefined;
|
1511
|
-
depositUrl: any;
|
1512
|
-
explorerAddress: string | undefined;
|
1513
|
-
tags: string[];
|
1514
|
-
};
|
1515
|
-
};
|
1516
|
-
};
|
1517
|
-
};
|
1518
|
-
};
|
1519
1350
|
} & {
|
1520
1351
|
index: {
|
1521
1352
|
get: {
|
@@ -2059,6 +1890,179 @@ declare const app: Elysia<"", false, {
|
|
2059
1890
|
};
|
2060
1891
|
};
|
2061
1892
|
};
|
1893
|
+
} & {
|
1894
|
+
v4: {
|
1895
|
+
campaigns: {
|
1896
|
+
"dry-run": {
|
1897
|
+
":campaignId": {
|
1898
|
+
"dynamic-data": {
|
1899
|
+
get: {
|
1900
|
+
body: unknown;
|
1901
|
+
params: {
|
1902
|
+
campaignId: string;
|
1903
|
+
};
|
1904
|
+
query: unknown;
|
1905
|
+
headers: {
|
1906
|
+
authorization: string;
|
1907
|
+
};
|
1908
|
+
response: {
|
1909
|
+
200: unknown[];
|
1910
|
+
};
|
1911
|
+
};
|
1912
|
+
};
|
1913
|
+
};
|
1914
|
+
};
|
1915
|
+
} & {
|
1916
|
+
"dry-run": {
|
1917
|
+
"dynamic-data": {
|
1918
|
+
list: {
|
1919
|
+
post: {
|
1920
|
+
body: string[];
|
1921
|
+
params: {};
|
1922
|
+
query: unknown;
|
1923
|
+
headers: {
|
1924
|
+
authorization: string;
|
1925
|
+
};
|
1926
|
+
response: {
|
1927
|
+
200: unknown[];
|
1928
|
+
};
|
1929
|
+
};
|
1930
|
+
};
|
1931
|
+
};
|
1932
|
+
};
|
1933
|
+
} & {
|
1934
|
+
"dry-run": {
|
1935
|
+
"dynamic-data": {
|
1936
|
+
post: {
|
1937
|
+
body: {
|
1938
|
+
id?: string | undefined;
|
1939
|
+
subType?: number | undefined;
|
1940
|
+
campaignId?: string | undefined;
|
1941
|
+
amount?: string | undefined;
|
1942
|
+
creatorAddress?: string | undefined;
|
1943
|
+
type: string;
|
1944
|
+
params: any;
|
1945
|
+
computeChainId: number;
|
1946
|
+
distributionChainId: number;
|
1947
|
+
startTimestamp: number;
|
1948
|
+
endTimestamp: number;
|
1949
|
+
rewardToken: string;
|
1950
|
+
};
|
1951
|
+
params: {};
|
1952
|
+
query: unknown;
|
1953
|
+
headers: {
|
1954
|
+
authorization: string;
|
1955
|
+
};
|
1956
|
+
response: {
|
1957
|
+
200: unknown[];
|
1958
|
+
};
|
1959
|
+
};
|
1960
|
+
};
|
1961
|
+
};
|
1962
|
+
} & {
|
1963
|
+
"dry-run": {
|
1964
|
+
metadata: {
|
1965
|
+
post: {
|
1966
|
+
body: {
|
1967
|
+
id?: string | undefined;
|
1968
|
+
subType?: number | undefined;
|
1969
|
+
campaignId?: string | undefined;
|
1970
|
+
amount?: string | undefined;
|
1971
|
+
creatorAddress?: string | undefined;
|
1972
|
+
type: string;
|
1973
|
+
params: any;
|
1974
|
+
computeChainId: number;
|
1975
|
+
distributionChainId: number;
|
1976
|
+
startTimestamp: number;
|
1977
|
+
endTimestamp: number;
|
1978
|
+
rewardToken: string;
|
1979
|
+
};
|
1980
|
+
params: {};
|
1981
|
+
query: unknown;
|
1982
|
+
headers: {
|
1983
|
+
authorization: string;
|
1984
|
+
};
|
1985
|
+
response: {
|
1986
|
+
200: {
|
1987
|
+
id: string;
|
1988
|
+
chainId: number;
|
1989
|
+
type: string;
|
1990
|
+
identifier: string;
|
1991
|
+
name: string;
|
1992
|
+
status: "PAST" | "LIVE" | "SOON";
|
1993
|
+
action: any;
|
1994
|
+
tokens: ({
|
1995
|
+
symbol: string;
|
1996
|
+
id: string;
|
1997
|
+
name: string | null;
|
1998
|
+
icon: string;
|
1999
|
+
address: string;
|
2000
|
+
chainId: number;
|
2001
|
+
decimals: number;
|
2002
|
+
verified: boolean;
|
2003
|
+
isTest: boolean;
|
2004
|
+
isPoint: boolean;
|
2005
|
+
isNative: boolean;
|
2006
|
+
} & {
|
2007
|
+
price?: number | null | undefined;
|
2008
|
+
})[];
|
2009
|
+
mainProtocol: "splice" | "morpho" | "quickswap" | "euler" | "ambient" | "uniswap" | "arthswap" | "base-swap" | "camelot" | "crust" | "fenix" | "horiza" | "izumi" | "kim" | "pancake-swap" | "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" | "syncswap" | "neptune" | "zkSwapThreePool" | "rfx" | "ra" | "maverick" | "trader-joe" | "hanji" | "radiant" | "aave" | "fraxlend" | "ironclad" | "gearbox" | "compound" | "sturdy" | "frax" | "ionic" | "moonwell" | "fluid" | "silo" | "dolomite" | "badger" | "ajna" | "layerbank" | "ion" | "venus" | "woofi" | "reactor_fusion" | "eigenlayer" | "vest" | "zerolend" | "hyperdrive" | "gamma" | "oku" | "hourglass" | "veda" | "kyo" | "sonex" | "lendle" | "tako-tako" | "equalizer" | "spectra" | "beraborrow" | "superlend" | "avalon" | "iguana" | "xlend" | "angles" | "enzyme" | "toros" | "vicuna" | "bunni" | "beratrax" | "concrete" | "cian" | "pendle" | "yei" | "filament" | "gammaswap" | "maha" | "tempest" | "uranium" | "holdstation" | "katana" | "satlayer" | undefined;
|
2010
|
+
depositUrl: any;
|
2011
|
+
explorerAddress: string | undefined;
|
2012
|
+
tags: string[];
|
2013
|
+
};
|
2014
|
+
};
|
2015
|
+
};
|
2016
|
+
};
|
2017
|
+
};
|
2018
|
+
} & {
|
2019
|
+
"dry-run": {
|
2020
|
+
metadata: {
|
2021
|
+
get: {
|
2022
|
+
body: unknown;
|
2023
|
+
params: {};
|
2024
|
+
query: {
|
2025
|
+
campaignId: string;
|
2026
|
+
distributionChain: number;
|
2027
|
+
};
|
2028
|
+
headers: {
|
2029
|
+
authorization: string;
|
2030
|
+
};
|
2031
|
+
response: {
|
2032
|
+
200: {
|
2033
|
+
id: string;
|
2034
|
+
chainId: number;
|
2035
|
+
type: string;
|
2036
|
+
identifier: string;
|
2037
|
+
name: string;
|
2038
|
+
status: "PAST" | "LIVE" | "SOON";
|
2039
|
+
action: any;
|
2040
|
+
tokens: ({
|
2041
|
+
symbol: string;
|
2042
|
+
id: string;
|
2043
|
+
name: string | null;
|
2044
|
+
icon: string;
|
2045
|
+
address: string;
|
2046
|
+
chainId: number;
|
2047
|
+
decimals: number;
|
2048
|
+
verified: boolean;
|
2049
|
+
isTest: boolean;
|
2050
|
+
isPoint: boolean;
|
2051
|
+
isNative: boolean;
|
2052
|
+
} & {
|
2053
|
+
price?: number | null | undefined;
|
2054
|
+
})[];
|
2055
|
+
mainProtocol: "splice" | "morpho" | "quickswap" | "euler" | "ambient" | "uniswap" | "arthswap" | "base-swap" | "camelot" | "crust" | "fenix" | "horiza" | "izumi" | "kim" | "pancake-swap" | "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" | "syncswap" | "neptune" | "zkSwapThreePool" | "rfx" | "ra" | "maverick" | "trader-joe" | "hanji" | "radiant" | "aave" | "fraxlend" | "ironclad" | "gearbox" | "compound" | "sturdy" | "frax" | "ionic" | "moonwell" | "fluid" | "silo" | "dolomite" | "badger" | "ajna" | "layerbank" | "ion" | "venus" | "woofi" | "reactor_fusion" | "eigenlayer" | "vest" | "zerolend" | "hyperdrive" | "gamma" | "oku" | "hourglass" | "veda" | "kyo" | "sonex" | "lendle" | "tako-tako" | "equalizer" | "spectra" | "beraborrow" | "superlend" | "avalon" | "iguana" | "xlend" | "angles" | "enzyme" | "toros" | "vicuna" | "bunni" | "beratrax" | "concrete" | "cian" | "pendle" | "yei" | "filament" | "gammaswap" | "maha" | "tempest" | "uranium" | "holdstation" | "katana" | "satlayer" | undefined;
|
2056
|
+
depositUrl: any;
|
2057
|
+
explorerAddress: string | undefined;
|
2058
|
+
tags: string[];
|
2059
|
+
};
|
2060
|
+
};
|
2061
|
+
};
|
2062
|
+
};
|
2063
|
+
};
|
2064
|
+
};
|
2065
|
+
};
|
2062
2066
|
} & {
|
2063
2067
|
v4: {
|
2064
2068
|
protocols: {
|
@@ -2138,7 +2142,7 @@ declare const app: Elysia<"", false, {
|
|
2138
2142
|
dailyRewards?: number | undefined;
|
2139
2143
|
numberOfLiveCampaigns?: number | undefined;
|
2140
2144
|
opportunityLiveTags?: string[] | undefined;
|
2141
|
-
}
|
2145
|
+
};
|
2142
2146
|
};
|
2143
2147
|
};
|
2144
2148
|
};
|
@@ -5026,26 +5030,83 @@ declare const app: Elysia<"", false, {
|
|
5026
5030
|
get: {
|
5027
5031
|
body: unknown;
|
5028
5032
|
params: {};
|
5029
|
-
query:
|
5033
|
+
query: unknown;
|
5034
|
+
headers: unknown;
|
5035
|
+
response: {
|
5036
|
+
200: {
|
5037
|
+
[x: string]: {
|
5038
|
+
[poolId: string]: UniswapV4PoolType;
|
5039
|
+
} | undefined;
|
5040
|
+
};
|
5041
|
+
};
|
5042
|
+
};
|
5043
|
+
};
|
5044
|
+
};
|
5045
|
+
} & {
|
5046
|
+
v4pools: {
|
5047
|
+
":chainId": {
|
5048
|
+
get: {
|
5049
|
+
body: unknown;
|
5050
|
+
params: {
|
5030
5051
|
chainId: number;
|
5031
5052
|
};
|
5053
|
+
query: unknown;
|
5032
5054
|
headers: unknown;
|
5033
5055
|
response: {
|
5034
5056
|
200: {
|
5035
|
-
[x: string]:
|
5036
|
-
|
5037
|
-
|
5038
|
-
|
5039
|
-
|
5040
|
-
|
5041
|
-
|
5042
|
-
|
5043
|
-
|
5044
|
-
|
5045
|
-
|
5046
|
-
|
5047
|
-
|
5048
|
-
|
5057
|
+
[x: string]: any;
|
5058
|
+
};
|
5059
|
+
};
|
5060
|
+
};
|
5061
|
+
};
|
5062
|
+
};
|
5063
|
+
} & {
|
5064
|
+
v4: {
|
5065
|
+
":poolId": {
|
5066
|
+
get: {
|
5067
|
+
body: unknown;
|
5068
|
+
params: {
|
5069
|
+
poolId: string;
|
5070
|
+
};
|
5071
|
+
query: unknown;
|
5072
|
+
headers: unknown;
|
5073
|
+
response: {
|
5074
|
+
200: UniswapV4PoolType[];
|
5075
|
+
};
|
5076
|
+
};
|
5077
|
+
};
|
5078
|
+
};
|
5079
|
+
} & {
|
5080
|
+
v4: {
|
5081
|
+
update: {
|
5082
|
+
post: {
|
5083
|
+
body: unknown;
|
5084
|
+
params: {};
|
5085
|
+
query: unknown;
|
5086
|
+
headers: {
|
5087
|
+
authorization: string;
|
5088
|
+
};
|
5089
|
+
response: {
|
5090
|
+
200: void;
|
5091
|
+
};
|
5092
|
+
};
|
5093
|
+
};
|
5094
|
+
};
|
5095
|
+
} & {
|
5096
|
+
v4: {
|
5097
|
+
update: {
|
5098
|
+
":chainId": {
|
5099
|
+
post: {
|
5100
|
+
body: unknown;
|
5101
|
+
params: {
|
5102
|
+
chainId: number;
|
5103
|
+
};
|
5104
|
+
query: unknown;
|
5105
|
+
headers: {
|
5106
|
+
authorization: string;
|
5107
|
+
};
|
5108
|
+
response: {
|
5109
|
+
200: void;
|
5049
5110
|
};
|
5050
5111
|
};
|
5051
5112
|
};
|
@@ -1,8 +1,9 @@
|
|
1
|
-
import {
|
1
|
+
import { CacheService } from "@/modules/v4/cache";
|
2
|
+
import { TTLPresets } from "@/modules/v4/cache/cache.model";
|
2
3
|
import { UniswapService } from "@/modules/v4/uniswap/uniswap.service";
|
3
4
|
async function main() {
|
4
5
|
try {
|
5
|
-
await
|
6
|
+
await CacheService.set(TTLPresets.DAY_1, UniswapService.getUniswapV4Pools);
|
6
7
|
process.exit(0);
|
7
8
|
}
|
8
9
|
catch (err) {
|