@merkl/api 0.12.4 → 0.12.6
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 +115 -75
- package/dist/src/index.d.ts +23 -15
- package/dist/src/libs/positions/EigenLayer/index.js +3 -3
- package/dist/src/libs/positions/types.d.ts +1 -1
- package/dist/src/modules/v4/campaign/campaign.controller.d.ts +1 -1
- package/dist/src/modules/v4/campaign/campaign.repository.d.ts +9 -9
- package/dist/src/modules/v4/campaign/campaign.service.d.ts +1 -1
- package/dist/src/modules/v4/dynamicData/dynamicData.controller.d.ts +1 -1
- package/dist/src/modules/v4/opportunity/opportunity.controller.d.ts +3 -3
- package/dist/src/modules/v4/opportunity/opportunity.model.d.ts +5 -5
- package/dist/src/modules/v4/opportunity/opportunity.repository.d.ts +72 -72
- package/dist/src/modules/v4/opportunity/opportunity.service.d.ts +1 -1
- package/dist/src/modules/v4/programPayload/programPayload.repository.d.ts +5 -1
- package/dist/src/modules/v4/programPayload/programPayload.repository.js +48 -0
- package/dist/src/modules/v4/reward/reward.controller.d.ts +12 -4
- package/dist/src/modules/v4/reward/reward.repository.d.ts +11 -7
- package/dist/src/modules/v4/reward/reward.service.d.ts +10 -5
- package/dist/src/modules/v4/router.d.ts +23 -15
- package/dist/src/modules/v4/status/status.controller.d.ts +6 -6
- package/dist/src/modules/v4/status/status.repository.d.ts +6 -6
- package/dist/src/modules/v4/status/status.service.d.ts +6 -6
- package/dist/src/modules/v4/token/token.repository.d.ts +2 -2
- package/dist/src/modules/v4/token/token.service.d.ts +2 -3
- package/dist/src/modules/v4/user/user.repository.d.ts +1 -1
- package/dist/src/modules/v4/user/user.service.d.ts +1 -1
- package/dist/src/utils/prisma.d.ts +16 -3
- package/dist/src/utils/prisma.js +2 -1
- package/dist/tsconfig.package.tsbuildinfo +1 -1
- package/package.json +1 -1
@@ -58,6 +58,7 @@ export var zkSyncCampaigns;
|
|
58
58
|
zkSyncCampaigns["Zerolend_USDC"] = "Zerolend USDC 0x9e20e83d636870a887ce7c85cecfb8b3e95c9db2";
|
59
59
|
zkSyncCampaigns["Zerolend_M_BTC"] = "Zerolend M_BTC 0xafe91971600af83d23ab691b0a1a566d5f8e42c0";
|
60
60
|
zkSyncCampaigns["Zerolend_ZK"] = "Zerolend ZK 0x072416442a0e40135e75c0eefb4be708b74b6c8a";
|
61
|
+
zkSyncCampaigns["Zerolend_USN"] = "Zerolend USN 0xe2b026b30dea792e56201308bd566c1e1f43fb2c";
|
61
62
|
zkSyncCampaigns["ReactorFusion_USDCe"] = "ReactorFusion USDCe 0x04e9db37d8ea0760072e1ace3f2a219988fdac29";
|
62
63
|
zkSyncCampaigns["ReactorFusion_WETH"] = "ReactorFusion WETH 0xc5db68f30d21cbe0c9eac7be5ea83468d69297e6";
|
63
64
|
zkSyncCampaigns["ReactorFusion_ZK"] = "ReactorFusion ZK 0x0e392b6b05c112677096920ad938a0752d1451f3";
|
@@ -106,6 +107,7 @@ export var zkSyncCampaigns;
|
|
106
107
|
zkSyncCampaigns["SyncSwap_USDC_ETH_Range"] = "SyncSwap USDC/ETH Range Pool 0xe955c98e8411ee4c7332ebe48df7f0ca12711dc2";
|
107
108
|
zkSyncCampaigns["Woofi_ETH"] = "Woofi ETH 0x1d686250bbffa9fe120b591f5992dd7fc0fd99a4";
|
108
109
|
zkSyncCampaigns["Woofi_USDC"] = "Woofi USDC 0xdca324bdd4ebb6b8a1802959324ce125b5d57921";
|
110
|
+
zkSyncCampaigns["Woofi_ZK"] = "Woofi ZK 0x85167f7f3f367e0be7b4d3a8c2b1648f56dfdb45";
|
109
111
|
zkSyncCampaigns["ZKSwap_wrsETH_ETH"] = "ZKSwap Finance wrsETH/ETH v2 0.1pct 0xeb9fd198b20dc73e63668b89a735b7dc84e13ea0";
|
110
112
|
zkSyncCampaigns["ZKSwap_ETH_USDCe"] = "ZKSwap Finance ETH/USDC.e v2 0.1pct 0x7642e38867860d4512fcce1116e2fb539c5cdd21";
|
111
113
|
zkSyncCampaigns["ZKSwap_USDC_USDCe_USDT"] = "ZKSwap Finance USDC/USDC.e/USDT Stable 0.01pct 0x15309aaf4fedf346e5204331027b4ef7b75b1dd7";
|
@@ -126,6 +128,8 @@ export var zkSyncCampaigns;
|
|
126
128
|
zkSyncCampaigns["ReactorFusion_WBTC"] = "ReactorFusion WBTC 0x0a976e1e7d3052beb46085acbe1e0daccf4a19cf";
|
127
129
|
zkSyncCampaigns["Venus_wUSDM"] = "Venus wUSDM 0x183de3c349fcf546aae925e1c7f364ea6fb4033c";
|
128
130
|
zkSyncCampaigns["Zerolend_WBTC"] = "Zerolend WBTC 0x7c65e6ec6feceb333092e6fe69672a3475c591fb";
|
131
|
+
zkSyncCampaigns["raffle_jumper_2"] = "raffle jumper 14/02/25";
|
132
|
+
zkSyncCampaigns["airdrop_jumper_2"] = "airdrop jumper 14/02/25";
|
129
133
|
})(zkSyncCampaigns || (zkSyncCampaigns = {}));
|
130
134
|
export var modeCampaigns;
|
131
135
|
(function (modeCampaigns) {
|
@@ -1232,6 +1236,30 @@ const ModeInterfaceCampaigns = {
|
|
1232
1236
|
},
|
1233
1237
|
};
|
1234
1238
|
const ZkSyncInterfaceCampaigns = {
|
1239
|
+
[zkSyncCampaigns.airdrop_jumper_2]: {
|
1240
|
+
campaignType: Campaign.JSON_AIRDROP,
|
1241
|
+
computeChainId: ChainId.ZKSYNC,
|
1242
|
+
hooks: [],
|
1243
|
+
jsonUrl: "https://angle-blog.infura-ipfs.io/ipfs/QmTeSBGB2sMt4kg8A8mHE7k1LehVeVHWwbcwvrHVh5bc73",
|
1244
|
+
}, // amount needs to be exactly 24170610000000001879390
|
1245
|
+
[zkSyncCampaigns.raffle_jumper_2]: {
|
1246
|
+
campaignType: Campaign.JSON_AIRDROP,
|
1247
|
+
computeChainId: ChainId.ZKSYNC,
|
1248
|
+
hooks: [
|
1249
|
+
{
|
1250
|
+
hookType: HOOK.RAFFLE,
|
1251
|
+
resolutionIndex: 0,
|
1252
|
+
selectionMethod: selectionRaffleMethod.RANDOM,
|
1253
|
+
numberOfWinners: 5,
|
1254
|
+
multipleWinningPossible: false,
|
1255
|
+
weightIncreasesRewards: false,
|
1256
|
+
weightedSelection: true,
|
1257
|
+
blacklistWinnersFromRounds: [],
|
1258
|
+
weightOfTotalRewards: 10000000,
|
1259
|
+
},
|
1260
|
+
],
|
1261
|
+
jsonUrl: "https://angle-blog.infura-ipfs.io/ipfs/QmVX5h6JZetY6W71aBo9A9XUKnba6DPMom6FFaQvB3oFU6",
|
1262
|
+
}, // amount needs to be exactly 24170610000000001879390
|
1235
1263
|
[zkSyncCampaigns.airdrop_jumper]: {
|
1236
1264
|
campaignType: Campaign.JSON_AIRDROP,
|
1237
1265
|
computeChainId: ChainId.ZKSYNC,
|
@@ -1416,6 +1444,16 @@ const ZkSyncInterfaceCampaigns = {
|
|
1416
1444
|
url: "https://one.zerolend.xyz/reserve-overview/?underlyingAsset=0x1d17cbcf0d6d143135ae902365d2e5e2a16538d4&marketName=proto_zksync_era_v3&utm_source=merkl&utm_medium=website&utm_campaign=merkl30",
|
1417
1445
|
forwarders: [],
|
1418
1446
|
},
|
1447
|
+
[zkSyncCampaigns.Zerolend_USN]: {
|
1448
|
+
campaignType: Campaign.ERC20,
|
1449
|
+
computeChainId: ChainId.ZKSYNC,
|
1450
|
+
hooks: [],
|
1451
|
+
targetToken: "0xe2b026b30deA792e56201308Bd566C1e1F43FB2C",
|
1452
|
+
whitelist: [],
|
1453
|
+
blacklist: [],
|
1454
|
+
url: "",
|
1455
|
+
forwarders: [],
|
1456
|
+
},
|
1419
1457
|
[zkSyncCampaigns.Aave_WstETH]: {
|
1420
1458
|
campaignType: Campaign.ERC20,
|
1421
1459
|
computeChainId: ChainId.ZKSYNC,
|
@@ -2307,6 +2345,16 @@ const ZkSyncInterfaceCampaigns = {
|
|
2307
2345
|
url: "https://woofi.com/earn",
|
2308
2346
|
forwarders: [],
|
2309
2347
|
},
|
2348
|
+
[zkSyncCampaigns.Woofi_ZK]: {
|
2349
|
+
campaignType: Campaign.ERC20,
|
2350
|
+
computeChainId: ChainId.ZKSYNC,
|
2351
|
+
targetToken: "0x85167f7f3f367E0Be7b4d3a8C2B1648f56dfdB45",
|
2352
|
+
hooks: [],
|
2353
|
+
whitelist: [],
|
2354
|
+
blacklist: [],
|
2355
|
+
url: "https://woofi.com/earn",
|
2356
|
+
forwarders: [],
|
2357
|
+
},
|
2310
2358
|
};
|
2311
2359
|
const PufferInterfaceCampaigns = {
|
2312
2360
|
[pufferCampaigns.CARROT_USDC]: {
|
@@ -81,8 +81,12 @@ export declare const RewardController: Elysia<"/rewards", false, {
|
|
81
81
|
};
|
82
82
|
headers: unknown;
|
83
83
|
response: {
|
84
|
-
|
85
|
-
|
84
|
+
200: {
|
85
|
+
amount: string;
|
86
|
+
claimed: string;
|
87
|
+
pending: string;
|
88
|
+
recipient: string;
|
89
|
+
}[];
|
86
90
|
};
|
87
91
|
};
|
88
92
|
};
|
@@ -146,8 +150,12 @@ export declare const RewardController: Elysia<"/rewards", false, {
|
|
146
150
|
};
|
147
151
|
headers: unknown;
|
148
152
|
response: {
|
149
|
-
|
150
|
-
|
153
|
+
200: {
|
154
|
+
amount: string;
|
155
|
+
claimed: string;
|
156
|
+
pending: string;
|
157
|
+
recipient: string;
|
158
|
+
}[];
|
151
159
|
};
|
152
160
|
};
|
153
161
|
};
|
@@ -1,9 +1,8 @@
|
|
1
|
-
import type { Prisma } from "../../../../database/api/.generated";
|
2
1
|
import type { ChainId } from "@sdk";
|
3
2
|
import type { BreakdownForCampaignsRaw, CampaignIdModel, CampaignIdWithoutPageModel, CreateManyBreakdownModel, CreateManyRewardModel, TokenIdModel } from "./reward.model";
|
4
3
|
export declare abstract class RewardRepository {
|
5
|
-
static createManyReward(rewards: CreateManyRewardModel): Promise<
|
6
|
-
static createManyBreakdown(data: CreateManyBreakdownModel): Promise<
|
4
|
+
static createManyReward(rewards: CreateManyRewardModel): Promise<import("database/api/.generated/runtime/library").GetBatchResult>;
|
5
|
+
static createManyBreakdown(data: CreateManyBreakdownModel): Promise<import("database/api/.generated/runtime/library").GetBatchResult>;
|
7
6
|
static getByRecipient(recipient: string, roots: string[], withToken: boolean, withTestTokens: boolean, chainFilter?: ChainId[]): Promise<({
|
8
7
|
RewardToken: {
|
9
8
|
symbol: string;
|
@@ -20,7 +19,6 @@ export declare abstract class RewardRepository {
|
|
20
19
|
};
|
21
20
|
Breakdown: ({
|
22
21
|
Campaign: {
|
23
|
-
campaignId: string;
|
24
22
|
Opportunity: {
|
25
23
|
Chain: {
|
26
24
|
name: string;
|
@@ -71,6 +69,7 @@ export declare abstract class RewardRepository {
|
|
71
69
|
apr: number;
|
72
70
|
dailyRewards: number;
|
73
71
|
};
|
72
|
+
campaignId: string;
|
74
73
|
};
|
75
74
|
} & {
|
76
75
|
reason: string;
|
@@ -121,8 +120,8 @@ export declare abstract class RewardRepository {
|
|
121
120
|
rewardCount: number;
|
122
121
|
breakdownCount: number;
|
123
122
|
}>;
|
124
|
-
static updateRewardClaimed(recipient: string, rewardTokenId: string, amount: string): Promise<
|
125
|
-
static updateBreakdownClaimed(recipient: string, rewardTokenId: string, campaignId: string, reason: string, amount: string): Promise<
|
123
|
+
static updateRewardClaimed(recipient: string, rewardTokenId: string, amount: string): Promise<import("database/api/.generated/runtime/library").GetBatchResult>;
|
124
|
+
static updateBreakdownClaimed(recipient: string, rewardTokenId: string, campaignId: string, reason: string, amount: string): Promise<import("database/api/.generated/runtime/library").GetBatchResult>;
|
126
125
|
static findManyRootsWithRewardOnChain(chainId: number): Promise<string[]>;
|
127
126
|
static breakdownForCampaign(root: string, id: string, query: CampaignIdModel): Promise<BreakdownForCampaignsRaw[]>;
|
128
127
|
static totalForCampaign(campaignId: string, root: string): Promise<{
|
@@ -132,7 +131,12 @@ export declare abstract class RewardRepository {
|
|
132
131
|
static countForCampaign(campaignId: string, root: string): Promise<{
|
133
132
|
count: number;
|
134
133
|
}>;
|
135
|
-
static breakdownForToken(root: string, id: string, query: TokenIdModel): Promise<
|
134
|
+
static breakdownForToken(root: string, id: string, query: TokenIdModel): Promise<{
|
135
|
+
amount: string;
|
136
|
+
claimed: string;
|
137
|
+
pending: string;
|
138
|
+
recipient: string;
|
139
|
+
}[]>;
|
136
140
|
static totalForToken(tokenId: string, root: string): Promise<{
|
137
141
|
tokenId: string;
|
138
142
|
amount: bigint;
|
@@ -7,7 +7,7 @@ import { RewardRepository } from "./reward.repository";
|
|
7
7
|
export declare abstract class RewardService {
|
8
8
|
static hashId(root: string, recipient: string, rewardTokenId: string): string;
|
9
9
|
static hashDailyRewardsRecordId(opportunityId: string, timestamp: bigint): string;
|
10
|
-
static createManyReward(rewards: CreateManyRewardModel): Promise<import("
|
10
|
+
static createManyReward(rewards: CreateManyRewardModel): Promise<import("database/api/.generated/runtime/library").GetBatchResult>;
|
11
11
|
/**
|
12
12
|
* Format the reward breakdown to conform to its resource model declaration
|
13
13
|
* @param breakdown straight from db
|
@@ -153,7 +153,7 @@ export declare abstract class RewardService {
|
|
153
153
|
root: string;
|
154
154
|
proofs: string[];
|
155
155
|
}[];
|
156
|
-
static createManyBreakdown(data: CreateManyBreakdownModel): Promise<import("
|
156
|
+
static createManyBreakdown(data: CreateManyBreakdownModel): Promise<import("database/api/.generated/runtime/library").GetBatchResult | undefined>;
|
157
157
|
static getByRecipient(recipient: string, roots: string[], withToken?: boolean, withTestTokens?: boolean, chainFilter?: ChainId[]): Promise<({
|
158
158
|
RewardToken: {
|
159
159
|
symbol: string;
|
@@ -170,7 +170,6 @@ export declare abstract class RewardService {
|
|
170
170
|
};
|
171
171
|
Breakdown: ({
|
172
172
|
Campaign: {
|
173
|
-
campaignId: string;
|
174
173
|
Opportunity: {
|
175
174
|
Chain: {
|
176
175
|
name: string;
|
@@ -221,6 +220,7 @@ export declare abstract class RewardService {
|
|
221
220
|
apr: number;
|
222
221
|
dailyRewards: number;
|
223
222
|
};
|
223
|
+
campaignId: string;
|
224
224
|
};
|
225
225
|
} & {
|
226
226
|
reason: string;
|
@@ -459,7 +459,6 @@ export declare abstract class RewardService {
|
|
459
459
|
};
|
460
460
|
Breakdown: ({
|
461
461
|
Campaign: {
|
462
|
-
campaignId: string;
|
463
462
|
Opportunity: {
|
464
463
|
Chain: {
|
465
464
|
name: string;
|
@@ -510,6 +509,7 @@ export declare abstract class RewardService {
|
|
510
509
|
apr: number;
|
511
510
|
dailyRewards: number;
|
512
511
|
};
|
512
|
+
campaignId: string;
|
513
513
|
};
|
514
514
|
} & {
|
515
515
|
reason: string;
|
@@ -550,7 +550,12 @@ export declare abstract class RewardService {
|
|
550
550
|
campaignId: string;
|
551
551
|
amount: bigint;
|
552
552
|
}>;
|
553
|
-
static breakdownForToken(query: TokenIdModel): Promise<
|
553
|
+
static breakdownForToken(query: TokenIdModel): Promise<{
|
554
|
+
amount: string;
|
555
|
+
claimed: string;
|
556
|
+
pending: string;
|
557
|
+
recipient: string;
|
558
|
+
}[]>;
|
554
559
|
static countForToken(query: TokenIdModel): Promise<{
|
555
560
|
count: number;
|
556
561
|
}>;
|
@@ -281,7 +281,6 @@ export declare const v4: Elysia<"/v4", false, {
|
|
281
281
|
tags: string[];
|
282
282
|
icon: string;
|
283
283
|
} | null | undefined;
|
284
|
-
depositUrl?: string | undefined;
|
285
284
|
aprRecord?: {
|
286
285
|
timestamp: string | bigint;
|
287
286
|
cumulated: number;
|
@@ -293,6 +292,7 @@ export declare const v4: Elysia<"/v4", false, {
|
|
293
292
|
aprRecordId: string;
|
294
293
|
}[];
|
295
294
|
} | undefined;
|
295
|
+
depositUrl?: string | undefined;
|
296
296
|
tvlRecord?: {
|
297
297
|
total: number;
|
298
298
|
timestamp: string | bigint;
|
@@ -405,7 +405,6 @@ export declare const v4: Elysia<"/v4", false, {
|
|
405
405
|
tags: string[];
|
406
406
|
icon: string;
|
407
407
|
} | null | undefined;
|
408
|
-
depositUrl?: string | undefined;
|
409
408
|
aprRecord?: {
|
410
409
|
timestamp: string | bigint;
|
411
410
|
cumulated: number;
|
@@ -417,6 +416,7 @@ export declare const v4: Elysia<"/v4", false, {
|
|
417
416
|
aprRecordId: string;
|
418
417
|
}[];
|
419
418
|
} | undefined;
|
419
|
+
depositUrl?: string | undefined;
|
420
420
|
tvlRecord?: {
|
421
421
|
total: number;
|
422
422
|
timestamp: string | bigint;
|
@@ -564,7 +564,6 @@ export declare const v4: Elysia<"/v4", false, {
|
|
564
564
|
tags: string[];
|
565
565
|
icon: string;
|
566
566
|
} | null | undefined;
|
567
|
-
depositUrl?: string | undefined;
|
568
567
|
aprRecord?: {
|
569
568
|
timestamp: string | bigint;
|
570
569
|
cumulated: number;
|
@@ -576,6 +575,7 @@ export declare const v4: Elysia<"/v4", false, {
|
|
576
575
|
aprRecordId: string;
|
577
576
|
}[];
|
578
577
|
} | undefined;
|
578
|
+
depositUrl?: string | undefined;
|
579
579
|
tvlRecord?: {
|
580
580
|
total: number;
|
581
581
|
timestamp: string | bigint;
|
@@ -1056,10 +1056,10 @@ export declare const v4: Elysia<"/v4", false, {
|
|
1056
1056
|
response: {
|
1057
1057
|
200: {
|
1058
1058
|
endTimestamp: bigint;
|
1059
|
-
campaignId: string;
|
1060
1059
|
CampaignStatus: {
|
1061
1060
|
computedUntil: bigint;
|
1062
1061
|
}[];
|
1062
|
+
campaignId: string;
|
1063
1063
|
}[];
|
1064
1064
|
};
|
1065
1065
|
};
|
@@ -1576,8 +1576,12 @@ export declare const v4: Elysia<"/v4", false, {
|
|
1576
1576
|
};
|
1577
1577
|
headers: unknown;
|
1578
1578
|
response: {
|
1579
|
-
|
1580
|
-
|
1579
|
+
200: {
|
1580
|
+
amount: string;
|
1581
|
+
claimed: string;
|
1582
|
+
pending: string;
|
1583
|
+
recipient: string;
|
1584
|
+
}[];
|
1581
1585
|
};
|
1582
1586
|
};
|
1583
1587
|
};
|
@@ -1641,8 +1645,12 @@ export declare const v4: Elysia<"/v4", false, {
|
|
1641
1645
|
};
|
1642
1646
|
headers: unknown;
|
1643
1647
|
response: {
|
1644
|
-
|
1645
|
-
|
1648
|
+
200: {
|
1649
|
+
amount: string;
|
1650
|
+
claimed: string;
|
1651
|
+
pending: string;
|
1652
|
+
recipient: string;
|
1653
|
+
}[];
|
1646
1654
|
};
|
1647
1655
|
};
|
1648
1656
|
};
|
@@ -2959,13 +2967,13 @@ export declare const v4: Elysia<"/v4", false, {
|
|
2959
2967
|
chainId?: number | undefined;
|
2960
2968
|
startTimestamp?: string | undefined;
|
2961
2969
|
endTimestamp?: string | undefined;
|
2970
|
+
campaignStatus?: {} | undefined;
|
2962
2971
|
distributionChainId?: number | undefined;
|
2963
2972
|
campaignId?: string | undefined;
|
2964
2973
|
rewardTokenId?: string | undefined;
|
2965
2974
|
amount?: string | undefined;
|
2966
2975
|
opportunityId?: string | undefined;
|
2967
2976
|
creatorAddress?: string | undefined;
|
2968
|
-
campaignStatus?: {} | undefined;
|
2969
2977
|
rewardToken?: {} | undefined;
|
2970
2978
|
rewardTokenAddress?: string | undefined;
|
2971
2979
|
distributionChain?: {} | undefined;
|
@@ -3139,12 +3147,6 @@ export declare const v4: Elysia<"/v4", false, {
|
|
3139
3147
|
delayFormatted: string;
|
3140
3148
|
startTimestamp: bigint;
|
3141
3149
|
endTimestamp: bigint;
|
3142
|
-
computeChainId: number;
|
3143
|
-
distributionChainId: number;
|
3144
|
-
campaignId: string;
|
3145
|
-
Opportunity: {
|
3146
|
-
name: string;
|
3147
|
-
};
|
3148
3150
|
CampaignStatus: {
|
3149
3151
|
error: string;
|
3150
3152
|
details: import("database/api/.generated/runtime/library").JsonValue;
|
@@ -3153,6 +3155,12 @@ export declare const v4: Elysia<"/v4", false, {
|
|
3153
3155
|
computedUntil: bigint;
|
3154
3156
|
processingStarted: bigint;
|
3155
3157
|
}[];
|
3158
|
+
Opportunity: {
|
3159
|
+
name: string;
|
3160
|
+
};
|
3161
|
+
computeChainId: number;
|
3162
|
+
distributionChainId: number;
|
3163
|
+
campaignId: string;
|
3156
3164
|
}[];
|
3157
3165
|
};
|
3158
3166
|
};
|
@@ -130,12 +130,6 @@ export declare const StatusController: Elysia<"/campaign-status", false, {
|
|
130
130
|
delayFormatted: string;
|
131
131
|
startTimestamp: bigint;
|
132
132
|
endTimestamp: bigint;
|
133
|
-
computeChainId: number;
|
134
|
-
distributionChainId: number;
|
135
|
-
campaignId: string;
|
136
|
-
Opportunity: {
|
137
|
-
name: string;
|
138
|
-
};
|
139
133
|
CampaignStatus: {
|
140
134
|
error: string;
|
141
135
|
details: import("database/api/.generated/runtime/library").JsonValue;
|
@@ -144,6 +138,12 @@ export declare const StatusController: Elysia<"/campaign-status", false, {
|
|
144
138
|
computedUntil: bigint;
|
145
139
|
processingStarted: bigint;
|
146
140
|
}[];
|
141
|
+
Opportunity: {
|
142
|
+
name: string;
|
143
|
+
};
|
144
|
+
computeChainId: number;
|
145
|
+
distributionChainId: number;
|
146
|
+
campaignId: string;
|
147
147
|
}[];
|
148
148
|
};
|
149
149
|
};
|
@@ -70,12 +70,6 @@ export declare class StatusRepository {
|
|
70
70
|
static findManyDelay(query: DelayModel): Promise<{
|
71
71
|
startTimestamp: bigint;
|
72
72
|
endTimestamp: bigint;
|
73
|
-
computeChainId: number;
|
74
|
-
distributionChainId: number;
|
75
|
-
campaignId: string;
|
76
|
-
Opportunity: {
|
77
|
-
name: string;
|
78
|
-
};
|
79
73
|
CampaignStatus: {
|
80
74
|
error: string;
|
81
75
|
details: Prisma.JsonValue;
|
@@ -84,5 +78,11 @@ export declare class StatusRepository {
|
|
84
78
|
computedUntil: bigint;
|
85
79
|
processingStarted: bigint;
|
86
80
|
}[];
|
81
|
+
Opportunity: {
|
82
|
+
name: string;
|
83
|
+
};
|
84
|
+
computeChainId: number;
|
85
|
+
distributionChainId: number;
|
86
|
+
campaignId: string;
|
87
87
|
}[]>;
|
88
88
|
}
|
@@ -40,12 +40,6 @@ export declare class StatusService {
|
|
40
40
|
delayFormatted: string;
|
41
41
|
startTimestamp: bigint;
|
42
42
|
endTimestamp: bigint;
|
43
|
-
computeChainId: number;
|
44
|
-
distributionChainId: number;
|
45
|
-
campaignId: string;
|
46
|
-
Opportunity: {
|
47
|
-
name: string;
|
48
|
-
};
|
49
43
|
CampaignStatus: {
|
50
44
|
error: string;
|
51
45
|
details: import("database/api/.generated/runtime/library").JsonValue;
|
@@ -54,5 +48,11 @@ export declare class StatusService {
|
|
54
48
|
computedUntil: bigint;
|
55
49
|
processingStarted: bigint;
|
56
50
|
}[];
|
51
|
+
Opportunity: {
|
52
|
+
name: string;
|
53
|
+
};
|
54
|
+
computeChainId: number;
|
55
|
+
distributionChainId: number;
|
56
|
+
campaignId: string;
|
57
57
|
}[]>;
|
58
58
|
}
|
@@ -67,14 +67,14 @@ export declare abstract class TokenRepository {
|
|
67
67
|
* @param price value
|
68
68
|
* @param excludeAddresses to not update even if symbol match
|
69
69
|
*/
|
70
|
-
static updateSymbolPrices(symbol: string, price: number, excludeAddresses: string[]): Promise<import("
|
70
|
+
static updateSymbolPrices(symbol: string, price: number, excludeAddresses: string[]): Promise<import("database/api/.generated/runtime/library").GetBatchResult>;
|
71
71
|
/**
|
72
72
|
* Updates price of tokens that share the same address
|
73
73
|
* @param address
|
74
74
|
* @param price value
|
75
75
|
* @param chainId
|
76
76
|
*/
|
77
|
-
static updateAddressPrices(address: string, price: number, chainId?: number): Promise<import("
|
77
|
+
static updateAddressPrices(address: string, price: number, chainId?: number): Promise<import("database/api/.generated/runtime/library").GetBatchResult>;
|
78
78
|
static findChains(): Promise<Record<string, ChainId>>;
|
79
79
|
/**
|
80
80
|
* create a token on database
|
@@ -1,6 +1,5 @@
|
|
1
1
|
import type { CreateTokenModel, GetTokenQueryModel, Token, TokenModel, TokenUnique, UpdateTokenModel } from "./";
|
2
2
|
import type { Pricer } from "../../../utils/pricer";
|
3
|
-
import { Prisma } from "../../../../database/api/.generated";
|
4
3
|
import { type ChainId } from "@sdk";
|
5
4
|
import { TokenRepository } from "./token.repository";
|
6
5
|
export declare abstract class TokenService {
|
@@ -72,14 +71,14 @@ export declare abstract class TokenService {
|
|
72
71
|
* @param price value
|
73
72
|
* @param excludeAddresses to not update symbols that defined using addresses
|
74
73
|
*/
|
75
|
-
static updateSymbolPrices(symbol: string, price: number, excludeAddresses: string[]): Promise<
|
74
|
+
static updateSymbolPrices(symbol: string, price: number, excludeAddresses: string[]): Promise<import("database/api/.generated/runtime/library").GetBatchResult>;
|
76
75
|
/**
|
77
76
|
* Updates price of tokens that share the same address
|
78
77
|
* @param address
|
79
78
|
* @param price value
|
80
79
|
* @param chainId
|
81
80
|
*/
|
82
|
-
static updateAddressPrices(address: string, price: number, chainId?: number): Promise<
|
81
|
+
static updateAddressPrices(address: string, price: number, chainId?: number): Promise<import("database/api/.generated/runtime/library").GetBatchResult>;
|
83
82
|
/**
|
84
83
|
* Updates price of tokens that share the same symbol
|
85
84
|
* @param symbol
|
@@ -20,7 +20,7 @@ export declare abstract class UserRepository {
|
|
20
20
|
address: string;
|
21
21
|
creatorId: string | null;
|
22
22
|
}>;
|
23
|
-
static createMany(users: UserModel[]): Promise<import("
|
23
|
+
static createMany(users: UserModel[]): Promise<import("database/api/.generated/runtime/library").GetBatchResult>;
|
24
24
|
static updateTags(address: string, tags: string[]): Promise<{
|
25
25
|
tags: string[];
|
26
26
|
address: string;
|
@@ -20,7 +20,7 @@ export declare abstract class UserService {
|
|
20
20
|
address: string;
|
21
21
|
creatorId: string | null;
|
22
22
|
}>;
|
23
|
-
static createMany(users: UserModel[]): Promise<import("
|
23
|
+
static createMany(users: UserModel[]): Promise<import("database/api/.generated/runtime/library").GetBatchResult>;
|
24
24
|
static updateTags(user: string, tags: string[]): Promise<{
|
25
25
|
tags: string[];
|
26
26
|
address: string;
|
@@ -1,12 +1,25 @@
|
|
1
|
-
import { PrismaClient as ApiPrismaClient } from "../../database/api/.generated";
|
2
1
|
import { PrismaClient as EnginePrismaClient } from "../../database/engine/.generated";
|
3
|
-
export declare const apiDbClient:
|
2
|
+
export declare const apiDbClient: import("database/api/.generated/runtime/library").DynamicClientExtensionThis<import("../../database/api/.generated").Prisma.TypeMap<import("database/api/.generated/runtime/library").InternalArgs & {
|
3
|
+
result: {};
|
4
|
+
model: {};
|
5
|
+
query: {};
|
6
|
+
client: {
|
7
|
+
$drizzle: () => import("drizzle-orm/prisma/pg").PrismaPgDatabase;
|
8
|
+
};
|
9
|
+
}, import("../../database/api/.generated").Prisma.PrismaClientOptions>, import("../../database/api/.generated").Prisma.TypeMapCb, {
|
10
|
+
result: {};
|
11
|
+
model: {};
|
12
|
+
query: {};
|
13
|
+
client: {
|
14
|
+
$drizzle: () => import("drizzle-orm/prisma/pg").PrismaPgDatabase;
|
15
|
+
};
|
16
|
+
}, {
|
4
17
|
datasources: {
|
5
18
|
db: {
|
6
19
|
url: string;
|
7
20
|
};
|
8
21
|
};
|
9
|
-
}
|
22
|
+
}>;
|
10
23
|
export declare const engineDbClient: EnginePrismaClient<{
|
11
24
|
datasources: {
|
12
25
|
db: {
|
package/dist/src/utils/prisma.js
CHANGED
@@ -1,8 +1,9 @@
|
|
1
1
|
import { PrismaClient as ApiPrismaClient } from "../../database/api/.generated";
|
2
2
|
import { PrismaClient as EnginePrismaClient } from "../../database/engine/.generated";
|
3
|
+
import { drizzle } from "drizzle-orm/prisma/pg";
|
3
4
|
export const apiDbClient = new ApiPrismaClient({
|
4
5
|
datasources: { db: { url: `${process.env.DATABASE_API_URL}&connection_limit=250&pool_timeout=15` } },
|
5
|
-
});
|
6
|
+
}).$extends(drizzle());
|
6
7
|
export const engineDbClient = new EnginePrismaClient({
|
7
8
|
datasources: {
|
8
9
|
db: {
|