@merkl/api 0.10.92 → 0.10.94
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 +102 -48
- package/dist/src/index.d.ts +37 -20
- package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/helpers/tokenType.d.ts +28 -28
- package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/processor/AaveProcessor.d.ts +1 -1
- package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/processor/GenericProcessor.d.ts +10 -1
- package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/processor/MetamorphoProcessor.d.ts +1 -1
- package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/processor/SpliceProcessor.d.ts +1 -1
- package/dist/src/modules/v4/chain/chain.controller.d.ts +37 -20
- package/dist/src/modules/v4/chain/chain.model.d.ts +8 -0
- package/dist/src/modules/v4/explorer/explorer.model.d.ts +7 -0
- package/dist/src/modules/v4/explorer/explorer.repository.d.ts +13 -0
- package/dist/src/modules/v4/explorer/explorer.service.d.ts +20 -0
- package/dist/src/modules/v4/router.d.ts +37 -20
- package/dist/src/routes/v3/ERC20Campaigns.d.ts +37 -20
- package/dist/src/routes/v3/blacklist.d.ts +37 -20
- package/dist/src/routes/v3/campaigns.d.ts +37 -20
- package/dist/src/routes/v3/campaignsInfo.d.ts +37 -20
- package/dist/src/routes/v3/multiChainPositions.d.ts +37 -20
- package/dist/src/routes/v3/opportunity.d.ts +37 -20
- package/dist/src/routes/v3/positions.d.ts +37 -20
- package/dist/src/routes/v3/rewards.d.ts +37 -20
- package/dist/src/routes/v3/updates.d.ts +37 -20
- package/dist/src/routes/v3/userRewards.d.ts +37 -20
- package/dist/tsconfig.package.tsbuildinfo +1 -1
- package/package.json +1 -1
package/dist/src/eden/index.d.ts
CHANGED
|
@@ -685,18 +685,17 @@ declare const eden: {
|
|
|
685
685
|
query?: Record<string, unknown> | undefined;
|
|
686
686
|
fetch?: RequestInit | undefined;
|
|
687
687
|
} | undefined) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
|
|
688
|
-
200:
|
|
689
|
-
|
|
688
|
+
200: {
|
|
689
|
+
id: number;
|
|
690
|
+
name: string;
|
|
691
|
+
icon: string;
|
|
692
|
+
explorers: {
|
|
690
693
|
id: string;
|
|
691
694
|
type: import("../../database/api/.generated").$Enums.ExplorerType;
|
|
692
695
|
url: string;
|
|
693
696
|
chainId: number;
|
|
694
697
|
}[];
|
|
695
|
-
}
|
|
696
|
-
id: number;
|
|
697
|
-
name: string;
|
|
698
|
-
icon: string;
|
|
699
|
-
}) | null;
|
|
698
|
+
} | null;
|
|
700
699
|
}>>;
|
|
701
700
|
}) & {
|
|
702
701
|
index: {
|
|
@@ -707,18 +706,17 @@ declare const eden: {
|
|
|
707
706
|
};
|
|
708
707
|
fetch?: RequestInit | undefined;
|
|
709
708
|
}) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
|
|
710
|
-
200:
|
|
711
|
-
|
|
709
|
+
200: {
|
|
710
|
+
id: number;
|
|
711
|
+
name: string;
|
|
712
|
+
icon: string;
|
|
713
|
+
explorers: {
|
|
712
714
|
id: string;
|
|
713
715
|
type: import("../../database/api/.generated").$Enums.ExplorerType;
|
|
714
716
|
url: string;
|
|
715
717
|
chainId: number;
|
|
716
718
|
}[];
|
|
717
|
-
}
|
|
718
|
-
id: number;
|
|
719
|
-
name: string;
|
|
720
|
-
icon: string;
|
|
721
|
-
})[];
|
|
719
|
+
}[];
|
|
722
720
|
}>>;
|
|
723
721
|
};
|
|
724
722
|
count: {
|
|
@@ -732,6 +730,26 @@ declare const eden: {
|
|
|
732
730
|
200: number;
|
|
733
731
|
}>>;
|
|
734
732
|
};
|
|
733
|
+
explorers: {
|
|
734
|
+
post: (body: {
|
|
735
|
+
type: "ETHERSCAN" | "BLOCKSCOUT";
|
|
736
|
+
url: string;
|
|
737
|
+
chainId: number;
|
|
738
|
+
}, options: {
|
|
739
|
+
headers: {
|
|
740
|
+
authorization: string;
|
|
741
|
+
};
|
|
742
|
+
query?: Record<string, unknown> | undefined;
|
|
743
|
+
fetch?: RequestInit | undefined;
|
|
744
|
+
}) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
|
|
745
|
+
200: {
|
|
746
|
+
id: string;
|
|
747
|
+
type: import("../../database/api/.generated").$Enums.ExplorerType;
|
|
748
|
+
url: string;
|
|
749
|
+
chainId: number;
|
|
750
|
+
};
|
|
751
|
+
}>>;
|
|
752
|
+
};
|
|
735
753
|
};
|
|
736
754
|
prices: {
|
|
737
755
|
index: {
|
|
@@ -2387,24 +2405,21 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", fa
|
|
|
2387
2405
|
query: unknown;
|
|
2388
2406
|
headers: unknown;
|
|
2389
2407
|
response: {
|
|
2390
|
-
200:
|
|
2391
|
-
|
|
2408
|
+
200: {
|
|
2409
|
+
id: number;
|
|
2410
|
+
name: string;
|
|
2411
|
+
icon: string;
|
|
2412
|
+
explorers: {
|
|
2392
2413
|
id: string;
|
|
2393
2414
|
type: import("../../database/api/.generated").$Enums.ExplorerType;
|
|
2394
2415
|
url: string;
|
|
2395
2416
|
chainId: number;
|
|
2396
2417
|
}[];
|
|
2397
|
-
}
|
|
2398
|
-
id: number;
|
|
2399
|
-
name: string;
|
|
2400
|
-
icon: string;
|
|
2401
|
-
}) | null;
|
|
2418
|
+
} | null;
|
|
2402
2419
|
};
|
|
2403
2420
|
};
|
|
2404
2421
|
};
|
|
2405
|
-
}
|
|
2406
|
-
} & {
|
|
2407
|
-
chains: {
|
|
2422
|
+
} & {
|
|
2408
2423
|
index: {
|
|
2409
2424
|
get: {
|
|
2410
2425
|
body: unknown;
|
|
@@ -2414,24 +2429,21 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", fa
|
|
|
2414
2429
|
};
|
|
2415
2430
|
headers: unknown;
|
|
2416
2431
|
response: {
|
|
2417
|
-
200:
|
|
2418
|
-
|
|
2432
|
+
200: {
|
|
2433
|
+
id: number;
|
|
2434
|
+
name: string;
|
|
2435
|
+
icon: string;
|
|
2436
|
+
explorers: {
|
|
2419
2437
|
id: string;
|
|
2420
2438
|
type: import("../../database/api/.generated").$Enums.ExplorerType;
|
|
2421
2439
|
url: string;
|
|
2422
2440
|
chainId: number;
|
|
2423
2441
|
}[];
|
|
2424
|
-
}
|
|
2425
|
-
id: number;
|
|
2426
|
-
name: string;
|
|
2427
|
-
icon: string;
|
|
2428
|
-
})[];
|
|
2442
|
+
}[];
|
|
2429
2443
|
};
|
|
2430
2444
|
};
|
|
2431
2445
|
};
|
|
2432
|
-
}
|
|
2433
|
-
} & {
|
|
2434
|
-
chains: {
|
|
2446
|
+
} & {
|
|
2435
2447
|
count: {
|
|
2436
2448
|
get: {
|
|
2437
2449
|
body: unknown;
|
|
@@ -2445,6 +2457,29 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", fa
|
|
|
2445
2457
|
};
|
|
2446
2458
|
};
|
|
2447
2459
|
};
|
|
2460
|
+
} & {
|
|
2461
|
+
explorers: {
|
|
2462
|
+
post: {
|
|
2463
|
+
body: {
|
|
2464
|
+
type: "ETHERSCAN" | "BLOCKSCOUT";
|
|
2465
|
+
url: string;
|
|
2466
|
+
chainId: number;
|
|
2467
|
+
};
|
|
2468
|
+
params: Record<never, string>;
|
|
2469
|
+
query: unknown;
|
|
2470
|
+
headers: {
|
|
2471
|
+
authorization: string;
|
|
2472
|
+
};
|
|
2473
|
+
response: {
|
|
2474
|
+
200: {
|
|
2475
|
+
id: string;
|
|
2476
|
+
type: import("../../database/api/.generated").$Enums.ExplorerType;
|
|
2477
|
+
url: string;
|
|
2478
|
+
chainId: number;
|
|
2479
|
+
};
|
|
2480
|
+
};
|
|
2481
|
+
};
|
|
2482
|
+
};
|
|
2448
2483
|
};
|
|
2449
2484
|
};
|
|
2450
2485
|
} & {
|
|
@@ -4209,18 +4244,17 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", fa
|
|
|
4209
4244
|
query?: Record<string, unknown> | undefined;
|
|
4210
4245
|
fetch?: RequestInit | undefined;
|
|
4211
4246
|
} | undefined) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
|
|
4212
|
-
200:
|
|
4213
|
-
|
|
4247
|
+
200: {
|
|
4248
|
+
id: number;
|
|
4249
|
+
name: string;
|
|
4250
|
+
icon: string;
|
|
4251
|
+
explorers: {
|
|
4214
4252
|
id: string;
|
|
4215
4253
|
type: import("../../database/api/.generated").$Enums.ExplorerType;
|
|
4216
4254
|
url: string;
|
|
4217
4255
|
chainId: number;
|
|
4218
4256
|
}[];
|
|
4219
|
-
}
|
|
4220
|
-
id: number;
|
|
4221
|
-
name: string;
|
|
4222
|
-
icon: string;
|
|
4223
|
-
}) | null;
|
|
4257
|
+
} | null;
|
|
4224
4258
|
}>>;
|
|
4225
4259
|
}) & {
|
|
4226
4260
|
index: {
|
|
@@ -4231,18 +4265,17 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", fa
|
|
|
4231
4265
|
};
|
|
4232
4266
|
fetch?: RequestInit | undefined;
|
|
4233
4267
|
}) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
|
|
4234
|
-
200:
|
|
4235
|
-
|
|
4268
|
+
200: {
|
|
4269
|
+
id: number;
|
|
4270
|
+
name: string;
|
|
4271
|
+
icon: string;
|
|
4272
|
+
explorers: {
|
|
4236
4273
|
id: string;
|
|
4237
4274
|
type: import("../../database/api/.generated").$Enums.ExplorerType;
|
|
4238
4275
|
url: string;
|
|
4239
4276
|
chainId: number;
|
|
4240
4277
|
}[];
|
|
4241
|
-
}
|
|
4242
|
-
id: number;
|
|
4243
|
-
name: string;
|
|
4244
|
-
icon: string;
|
|
4245
|
-
})[];
|
|
4278
|
+
}[];
|
|
4246
4279
|
}>>;
|
|
4247
4280
|
};
|
|
4248
4281
|
count: {
|
|
@@ -4256,6 +4289,26 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", fa
|
|
|
4256
4289
|
200: number;
|
|
4257
4290
|
}>>;
|
|
4258
4291
|
};
|
|
4292
|
+
explorers: {
|
|
4293
|
+
post: (body: {
|
|
4294
|
+
type: "ETHERSCAN" | "BLOCKSCOUT";
|
|
4295
|
+
url: string;
|
|
4296
|
+
chainId: number;
|
|
4297
|
+
}, options: {
|
|
4298
|
+
headers: {
|
|
4299
|
+
authorization: string;
|
|
4300
|
+
};
|
|
4301
|
+
query?: Record<string, unknown> | undefined;
|
|
4302
|
+
fetch?: RequestInit | undefined;
|
|
4303
|
+
}) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
|
|
4304
|
+
200: {
|
|
4305
|
+
id: string;
|
|
4306
|
+
type: import("../../database/api/.generated").$Enums.ExplorerType;
|
|
4307
|
+
url: string;
|
|
4308
|
+
chainId: number;
|
|
4309
|
+
};
|
|
4310
|
+
}>>;
|
|
4311
|
+
};
|
|
4259
4312
|
};
|
|
4260
4313
|
prices: {
|
|
4261
4314
|
index: {
|
|
@@ -5082,6 +5135,7 @@ export type Opportunity = FromPromise<Api["v4"]["opportunities"]["index"]["get"]
|
|
|
5082
5135
|
export type Protocol = FromPromise<Api["v4"]["protocols"]["index"]["get"]>;
|
|
5083
5136
|
export type Campaign<C extends CampaignType = CampaignType> = CampaignResource<C>["model"];
|
|
5084
5137
|
export type Chain = FromPromise<Api["v4"]["chains"]["index"]["get"]>;
|
|
5138
|
+
export type Explorer = FromPromise<Api["v4"]["chains"]["index"]["get"]>["explorers"][number];
|
|
5085
5139
|
export type Token = FromPromise<Api["v4"]["tokens"]["index"]["get"]>;
|
|
5086
5140
|
export type Reward = NonNullable<Awaited<ReturnType<ReturnType<Api["v4"]["users"]>["rewards"]["full"]["get"]>>["data"]>[number];
|
|
5087
5141
|
export {};
|
package/dist/src/index.d.ts
CHANGED
|
@@ -824,24 +824,21 @@ declare const app: Elysia<"", false, {
|
|
|
824
824
|
query: unknown;
|
|
825
825
|
headers: unknown;
|
|
826
826
|
response: {
|
|
827
|
-
200:
|
|
828
|
-
|
|
827
|
+
200: {
|
|
828
|
+
id: number;
|
|
829
|
+
name: string;
|
|
830
|
+
icon: string;
|
|
831
|
+
explorers: {
|
|
829
832
|
id: string;
|
|
830
833
|
type: import("../database/api/.generated").$Enums.ExplorerType;
|
|
831
834
|
url: string;
|
|
832
835
|
chainId: number;
|
|
833
836
|
}[];
|
|
834
|
-
}
|
|
835
|
-
id: number;
|
|
836
|
-
name: string;
|
|
837
|
-
icon: string;
|
|
838
|
-
}) | null;
|
|
837
|
+
} | null;
|
|
839
838
|
};
|
|
840
839
|
};
|
|
841
840
|
};
|
|
842
|
-
}
|
|
843
|
-
} & {
|
|
844
|
-
chains: {
|
|
841
|
+
} & {
|
|
845
842
|
index: {
|
|
846
843
|
get: {
|
|
847
844
|
body: unknown;
|
|
@@ -851,24 +848,21 @@ declare const app: Elysia<"", false, {
|
|
|
851
848
|
};
|
|
852
849
|
headers: unknown;
|
|
853
850
|
response: {
|
|
854
|
-
200:
|
|
855
|
-
|
|
851
|
+
200: {
|
|
852
|
+
id: number;
|
|
853
|
+
name: string;
|
|
854
|
+
icon: string;
|
|
855
|
+
explorers: {
|
|
856
856
|
id: string;
|
|
857
857
|
type: import("../database/api/.generated").$Enums.ExplorerType;
|
|
858
858
|
url: string;
|
|
859
859
|
chainId: number;
|
|
860
860
|
}[];
|
|
861
|
-
}
|
|
862
|
-
id: number;
|
|
863
|
-
name: string;
|
|
864
|
-
icon: string;
|
|
865
|
-
})[];
|
|
861
|
+
}[];
|
|
866
862
|
};
|
|
867
863
|
};
|
|
868
864
|
};
|
|
869
|
-
}
|
|
870
|
-
} & {
|
|
871
|
-
chains: {
|
|
865
|
+
} & {
|
|
872
866
|
count: {
|
|
873
867
|
get: {
|
|
874
868
|
body: unknown;
|
|
@@ -882,6 +876,29 @@ declare const app: Elysia<"", false, {
|
|
|
882
876
|
};
|
|
883
877
|
};
|
|
884
878
|
};
|
|
879
|
+
} & {
|
|
880
|
+
explorers: {
|
|
881
|
+
post: {
|
|
882
|
+
body: {
|
|
883
|
+
type: "ETHERSCAN" | "BLOCKSCOUT";
|
|
884
|
+
url: string;
|
|
885
|
+
chainId: number;
|
|
886
|
+
};
|
|
887
|
+
params: Record<never, string>;
|
|
888
|
+
query: unknown;
|
|
889
|
+
headers: {
|
|
890
|
+
authorization: string;
|
|
891
|
+
};
|
|
892
|
+
response: {
|
|
893
|
+
200: {
|
|
894
|
+
id: string;
|
|
895
|
+
type: import("../database/api/.generated").$Enums.ExplorerType;
|
|
896
|
+
url: string;
|
|
897
|
+
chainId: number;
|
|
898
|
+
};
|
|
899
|
+
};
|
|
900
|
+
};
|
|
901
|
+
};
|
|
885
902
|
};
|
|
886
903
|
};
|
|
887
904
|
} & {
|
|
@@ -1,51 +1,51 @@
|
|
|
1
1
|
import type { Multicall3 } from "libs/sdk/src/generated/Multicall";
|
|
2
2
|
export declare enum tokenType {
|
|
3
|
-
|
|
3
|
+
aura = "aura",
|
|
4
4
|
poolside = "poolside",
|
|
5
5
|
balancerGauge = "balancerGauge",
|
|
6
|
-
balancerPool = "balancerPool",
|
|
7
|
-
unknown = "unknown",
|
|
8
6
|
gearbox = "gearbox",
|
|
7
|
+
euler_borrow = "euler_borrow",
|
|
8
|
+
euler_lend = "euler_lend",
|
|
9
|
+
filament = "filament",
|
|
10
|
+
fluid = "fluid",
|
|
9
11
|
compound = "compound",
|
|
10
|
-
radiant_borrow = "radiant_borrow",
|
|
11
12
|
radiant_lend = "radiant_lend",
|
|
12
|
-
|
|
13
|
+
radiant_borrow = "radiant_borrow",
|
|
13
14
|
ionic = "ionic",
|
|
14
|
-
|
|
15
|
-
aerodrome = "aerodrome",
|
|
16
|
-
velodrome = "velodrome",
|
|
15
|
+
layerbank = "layerbank",
|
|
17
16
|
moonwell = "moonwell",
|
|
18
|
-
|
|
17
|
+
yei_borrowing = "yei_borrowing",
|
|
18
|
+
ironclad_borrowing = "ironclad_borrowing",
|
|
19
|
+
zerolend_borrowing = "zerolend_borrowing",
|
|
20
|
+
yei_lending = "yei_lending",
|
|
21
|
+
ironclad_lending = "ironclad_lending",
|
|
22
|
+
zerolend_lending = "zerolend_lending",
|
|
19
23
|
aave_borrowing = "aave_borrowing",
|
|
20
|
-
|
|
21
|
-
curve = "curve",
|
|
24
|
+
aave_lending = "aave_lending",
|
|
22
25
|
sturdy_aggregator = "sturdy_aggregator",
|
|
23
26
|
sturdy_silo = "sturdy_silo",
|
|
27
|
+
fraxlend = "fraxlend",
|
|
28
|
+
uniswapv2 = "uniswapv2",
|
|
29
|
+
fenix = "fenix",
|
|
30
|
+
ra = "ra",
|
|
31
|
+
syncswap = "syncswap",
|
|
32
|
+
curve_2 = "curve_2",
|
|
33
|
+
silostaking = "silostaking",
|
|
34
|
+
beefy = "beefy",
|
|
35
|
+
balancerPool = "balancerPool",
|
|
36
|
+
unknown = "unknown",
|
|
37
|
+
metamorpho = "metamorpho",
|
|
38
|
+
aerodrome = "aerodrome",
|
|
39
|
+
velodrome = "velodrome",
|
|
40
|
+
curve = "curve",
|
|
24
41
|
splice = "splice",// todo
|
|
25
42
|
toros = "toros",// todo
|
|
26
|
-
curve_2 = "curve_2",
|
|
27
|
-
aura = "aura",
|
|
28
43
|
akron = "akron",
|
|
29
44
|
enzyme = "enzyme",
|
|
30
45
|
dragonswap = "dragonswap",
|
|
31
|
-
silostaking = "silostaking",
|
|
32
|
-
euler_lend = "euler_lend",
|
|
33
|
-
euler_borrow = "euler_borrow",
|
|
34
46
|
koi = "koi",
|
|
35
47
|
baseswap = "baseswap",
|
|
36
|
-
layerbank = "layerbank",
|
|
37
|
-
beefy = "beefy",
|
|
38
|
-
fenix = "fenix",
|
|
39
48
|
zkswap = "zkswap",
|
|
40
|
-
filament = "filament",
|
|
41
|
-
syncswap = "syncswap",
|
|
42
|
-
ra = "ra",
|
|
43
|
-
yei_borrowing = "yei_borrowing",
|
|
44
|
-
yei_lending = "yei_lending",
|
|
45
|
-
zerolend_borrowing = "zerolend_borrowing",
|
|
46
|
-
zerolend_lending = "zerolend_lending",
|
|
47
|
-
ironclad_lending = "ironclad_lending",
|
|
48
|
-
ironclad_borrowing = "ironclad_borrowing",
|
|
49
49
|
pendle = "pendle",
|
|
50
50
|
ironcladStaking = "ironcladStaking"
|
|
51
51
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Pricer } from "../../../../../utils/pricer";
|
|
2
|
-
import {
|
|
2
|
+
import type { Campaign, CampaignParameters } from "@sdk";
|
|
3
3
|
import type { tokenType } from "../helpers/tokenType";
|
|
4
4
|
import { GenericProcessor, type callKeys, type dataType } from "./GenericProcessor";
|
|
5
5
|
type callType = {
|
|
@@ -20,11 +20,13 @@ export type callKeys = {
|
|
|
20
20
|
tokenAddress: string;
|
|
21
21
|
blacklistedSupply: string;
|
|
22
22
|
totalSupply: string;
|
|
23
|
+
whitelistedSupply: string;
|
|
23
24
|
};
|
|
24
25
|
export type dataRaw = {
|
|
25
26
|
tokenAddress: string;
|
|
26
27
|
blacklistedSupply: string;
|
|
27
28
|
totalSupply: string;
|
|
29
|
+
whitelistedSupply: string;
|
|
28
30
|
};
|
|
29
31
|
export type dataType = {
|
|
30
32
|
tokenAddress: string;
|
|
@@ -33,6 +35,7 @@ export type dataType = {
|
|
|
33
35
|
tvl: number;
|
|
34
36
|
cardName: string;
|
|
35
37
|
priceTargetToken: number;
|
|
38
|
+
whitelistedSupplyTargetToken: number;
|
|
36
39
|
};
|
|
37
40
|
export declare class GenericProcessor<Input extends callKeys, DataRaw extends dataRaw, Output extends dataType> {
|
|
38
41
|
rounds: {
|
|
@@ -46,14 +49,20 @@ export declare class GenericProcessor<Input extends callKeys, DataRaw extends da
|
|
|
46
49
|
processingRound2(typeInfo: DataRaw): void;
|
|
47
50
|
processingRound3(typeInfo: DataRaw): void;
|
|
48
51
|
processingRound4(typeInfo: DataRaw): void;
|
|
52
|
+
handleWhiteListBlacklistRound5(typeInfo: DataRaw, campaign: CampaignParameters<Campaign.ERC20> | CampaignParameters<Campaign.EULER>): {
|
|
53
|
+
whitelistedSupplyTargetToken: number;
|
|
54
|
+
totalSupply: any;
|
|
55
|
+
blacklistedSupply: number;
|
|
56
|
+
};
|
|
49
57
|
processingRound5(index: number, type: tokenType, typeInfo: DataRaw, calls: string[], campaign: CampaignParameters<Campaign.ERC20> | CampaignParameters<Campaign.EULER>, pricer: Pricer): Promise<Output>;
|
|
50
58
|
computeRound1(type: tokenType, typeInfo: DataRaw): tokenTypeStruct;
|
|
51
59
|
computeRound2(index: number, type: tokenType, typeInfo: DataRaw, calls: string[]): tokenTypeStruct;
|
|
52
60
|
computeRound3(index: number, type: tokenType, typeInfo: DataRaw, calls: string[]): tokenTypeStruct;
|
|
53
61
|
computeRound4(index: number, type: tokenType, typeInfo: DataRaw, calls: string[], campaign: CampaignParameters<Campaign.ERC20>): tokenTypeStruct;
|
|
54
62
|
computeRound5(index: number, type: tokenType, typeInfo: DataRaw, calls: string[], campaign: CampaignParameters<Campaign.ERC20> | CampaignParameters<Campaign.EULER>, pricer: Pricer): Promise<tokenTypeStruct>;
|
|
63
|
+
generateWhitelistCall(type: tokenType, typeInfo: DataRaw, campaign: CampaignParameters<Campaign.ERC20>): Multicall3.Call3Struct[];
|
|
55
64
|
generateBlackListCall(type: tokenType, typeInfo: DataRaw, campaign: CampaignParameters<Campaign.ERC20>): Multicall3.Call3Struct[];
|
|
56
|
-
|
|
65
|
+
decodeListedSupply(index: number, decimals: number, list: string[], calls: string[]): string;
|
|
57
66
|
decodeRound(round: callType[], index: number, calls: string[], type: tokenType, data: DataRaw): void;
|
|
58
67
|
decodePreviousRound(round: roundType, calls: string[], data: DataRaw, type: tokenType, index: number): void;
|
|
59
68
|
encodeRound(round: callType[], callInfo: Input, type: tokenType): Multicall3.Call3Struct[];
|
package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/processor/MetamorphoProcessor.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Pricer } from "../../../../../utils/pricer";
|
|
2
|
-
import {
|
|
2
|
+
import type { Campaign, CampaignParameters } from "@sdk";
|
|
3
3
|
import type { tokenType, tokenTypeStruct } from "../helpers/tokenType";
|
|
4
4
|
import { GenericProcessor, type callKeys, type dataType } from "./GenericProcessor";
|
|
5
5
|
type callType = {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Pricer } from "../../../../../utils/pricer";
|
|
2
|
-
import {
|
|
2
|
+
import type { Campaign, CampaignParameters } from "@sdk";
|
|
3
3
|
import type { tokenType, tokenTypeStruct } from "../helpers/tokenType";
|
|
4
4
|
import { GenericProcessor, type callKeys, type dataType } from "./GenericProcessor";
|
|
5
5
|
type callKeysSplice = callKeys & {
|
|
@@ -21,24 +21,21 @@ export declare const ChainController: Elysia<"/chains", false, {
|
|
|
21
21
|
query: unknown;
|
|
22
22
|
headers: unknown;
|
|
23
23
|
response: {
|
|
24
|
-
200:
|
|
25
|
-
|
|
24
|
+
200: {
|
|
25
|
+
id: number;
|
|
26
|
+
name: string;
|
|
27
|
+
icon: string;
|
|
28
|
+
explorers: {
|
|
26
29
|
id: string;
|
|
27
30
|
type: import("../../../../database/api/.generated").$Enums.ExplorerType;
|
|
28
31
|
url: string;
|
|
29
32
|
chainId: number;
|
|
30
33
|
}[];
|
|
31
|
-
}
|
|
32
|
-
id: number;
|
|
33
|
-
name: string;
|
|
34
|
-
icon: string;
|
|
35
|
-
}) | null;
|
|
34
|
+
} | null;
|
|
36
35
|
};
|
|
37
36
|
};
|
|
38
37
|
};
|
|
39
|
-
}
|
|
40
|
-
} & {
|
|
41
|
-
chains: {
|
|
38
|
+
} & {
|
|
42
39
|
index: {
|
|
43
40
|
get: {
|
|
44
41
|
body: unknown;
|
|
@@ -48,24 +45,21 @@ export declare const ChainController: Elysia<"/chains", false, {
|
|
|
48
45
|
};
|
|
49
46
|
headers: unknown;
|
|
50
47
|
response: {
|
|
51
|
-
200:
|
|
52
|
-
|
|
48
|
+
200: {
|
|
49
|
+
id: number;
|
|
50
|
+
name: string;
|
|
51
|
+
icon: string;
|
|
52
|
+
explorers: {
|
|
53
53
|
id: string;
|
|
54
54
|
type: import("../../../../database/api/.generated").$Enums.ExplorerType;
|
|
55
55
|
url: string;
|
|
56
56
|
chainId: number;
|
|
57
57
|
}[];
|
|
58
|
-
}
|
|
59
|
-
id: number;
|
|
60
|
-
name: string;
|
|
61
|
-
icon: string;
|
|
62
|
-
})[];
|
|
58
|
+
}[];
|
|
63
59
|
};
|
|
64
60
|
};
|
|
65
61
|
};
|
|
66
|
-
}
|
|
67
|
-
} & {
|
|
68
|
-
chains: {
|
|
62
|
+
} & {
|
|
69
63
|
count: {
|
|
70
64
|
get: {
|
|
71
65
|
body: unknown;
|
|
@@ -79,6 +73,29 @@ export declare const ChainController: Elysia<"/chains", false, {
|
|
|
79
73
|
};
|
|
80
74
|
};
|
|
81
75
|
};
|
|
76
|
+
} & {
|
|
77
|
+
explorers: {
|
|
78
|
+
post: {
|
|
79
|
+
body: {
|
|
80
|
+
type: "ETHERSCAN" | "BLOCKSCOUT";
|
|
81
|
+
url: string;
|
|
82
|
+
chainId: number;
|
|
83
|
+
};
|
|
84
|
+
params: Record<never, string>;
|
|
85
|
+
query: unknown;
|
|
86
|
+
headers: {
|
|
87
|
+
authorization: string;
|
|
88
|
+
};
|
|
89
|
+
response: {
|
|
90
|
+
200: {
|
|
91
|
+
id: string;
|
|
92
|
+
type: import("../../../../database/api/.generated").$Enums.ExplorerType;
|
|
93
|
+
url: string;
|
|
94
|
+
chainId: number;
|
|
95
|
+
};
|
|
96
|
+
};
|
|
97
|
+
};
|
|
98
|
+
};
|
|
82
99
|
};
|
|
83
100
|
}, {
|
|
84
101
|
derive: {};
|
|
@@ -14,6 +14,14 @@ export declare const ChainUniqueDto: import("@sinclair/typebox").TObject<{
|
|
|
14
14
|
export declare const ChainArrayDto: import("@sinclair/typebox").TObject<{
|
|
15
15
|
chainId: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TNumber, import("@sinclair/typebox").TArray<import("@sinclair/typebox").TNumber>]>;
|
|
16
16
|
}>;
|
|
17
|
+
export declare const CreateChainExplorerDto: import("@sinclair/typebox").TObject<{
|
|
18
|
+
type: import("@sinclair/typebox").TEnum<{
|
|
19
|
+
ETHERSCAN: "ETHERSCAN";
|
|
20
|
+
BLOCKSCOUT: "BLOCKSCOUT";
|
|
21
|
+
}>;
|
|
22
|
+
chainId: import("@sinclair/typebox").TNumber;
|
|
23
|
+
url: import("@sinclair/typebox").TString;
|
|
24
|
+
}>;
|
|
17
25
|
export type ChainUniqueModel = typeof ChainUniqueDto.static;
|
|
18
26
|
export type ChainSearchDto = typeof GetChainQueryDto.static;
|
|
19
27
|
export type ChainsArrayModel = typeof ChainArrayDto.static;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { ExplorerType } from "../../../../database/api/.generated";
|
|
1
2
|
export declare abstract class ExplorerRepository {
|
|
2
3
|
static getByChainId(chainId: number): Promise<{
|
|
3
4
|
id: string;
|
|
@@ -5,4 +6,16 @@ export declare abstract class ExplorerRepository {
|
|
|
5
6
|
url: string;
|
|
6
7
|
chainId: number;
|
|
7
8
|
}>;
|
|
9
|
+
/**
|
|
10
|
+
* Creates an explorer
|
|
11
|
+
* @param chainId to attach explorer to
|
|
12
|
+
* @param type that defines the subsequents links for transactions, addresses...
|
|
13
|
+
* @param url base url without / suffix
|
|
14
|
+
*/
|
|
15
|
+
static create(chainId: number, type: ExplorerType, url: string): Promise<{
|
|
16
|
+
id: string;
|
|
17
|
+
type: import("../../../../database/api/.generated").$Enums.ExplorerType;
|
|
18
|
+
url: string;
|
|
19
|
+
chainId: number;
|
|
20
|
+
}>;
|
|
8
21
|
}
|
|
@@ -1,8 +1,28 @@
|
|
|
1
|
+
import type { ExplorerType } from "../../../../database/api/.generated";
|
|
2
|
+
import type { Explorer } from "./explorer.model";
|
|
1
3
|
export declare abstract class ExplorerService {
|
|
4
|
+
static hashId(type: ExplorerType, chainId: number): string;
|
|
2
5
|
static getByChainId(chainId: number): Promise<{
|
|
3
6
|
id: string;
|
|
4
7
|
type: import("../../../../database/api/.generated").$Enums.ExplorerType;
|
|
5
8
|
url: string;
|
|
6
9
|
chainId: number;
|
|
7
10
|
}>;
|
|
11
|
+
static format(explorer: Explorer["raw"]): {
|
|
12
|
+
type: import("../../../../database/api/.generated").$Enums.ExplorerType;
|
|
13
|
+
url: string;
|
|
14
|
+
chainId: number;
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* Creates an explorer
|
|
18
|
+
* @param chainId to attach explorer to
|
|
19
|
+
* @param type that defines the subsequents links for transactions, addresses...
|
|
20
|
+
* @param url base url without / suffix
|
|
21
|
+
*/
|
|
22
|
+
static create(chainId: number, type: ExplorerType, url: string): Promise<{
|
|
23
|
+
id: string;
|
|
24
|
+
type: import("../../../../database/api/.generated").$Enums.ExplorerType;
|
|
25
|
+
url: string;
|
|
26
|
+
chainId: number;
|
|
27
|
+
}>;
|
|
8
28
|
}
|