@merkl/api 0.19.46 → 0.19.48
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/engine/dynamicData/implementations/Morpho.d.ts +2 -0
- package/dist/src/engine/dynamicData/implementations/Morpho.js +36 -16
- package/dist/src/modules/v4/programPayload/programPayload.repository.d.ts +59 -3
- package/dist/src/modules/v4/programPayload/programPayload.repository.js +131 -6
- package/dist/src/utils/prices/priceService.js +1 -1
- package/dist/tsconfig.package.tsbuildinfo +1 -1
- package/package.json +1 -1
@@ -1,6 +1,8 @@
|
|
1
1
|
import { type Campaign, type CampaignParameters, type MerklChainId } from "@sdk";
|
2
|
+
import { utils } from "ethers";
|
2
3
|
import type { DynamicDataBuilder } from "../interface";
|
3
4
|
type campaignType = Campaign.MORPHO;
|
5
|
+
export declare const MORPHO_INTERFACE: utils.Interface;
|
4
6
|
export declare class MorphoDynamicData implements DynamicDataBuilder<campaignType> {
|
5
7
|
build(chainId: MerklChainId, campaigns: CampaignParameters<campaignType>[]): Promise<MorphoCampaignDynamicData[]>;
|
6
8
|
}
|
@@ -1,7 +1,15 @@
|
|
1
1
|
import { TokenService } from "@/modules/v4/token/token.service";
|
2
|
-
import { BN2Number, ChainInteractionService, MetamorphoInterface, MorphoSubCampaignType, YEAR, } from "@sdk";
|
2
|
+
import { BN2Number, ChainInteractionService, MetamorphoInterface, MorphoSubCampaignType, YEAR, morphoAddresses, } from "@sdk";
|
3
3
|
import axios from "axios";
|
4
|
+
import { utils } from "ethers";
|
5
|
+
import { zeroAddress } from "viem";
|
4
6
|
import { Pricer } from "../../../utils/pricer";
|
7
|
+
// TODO add the ABI
|
8
|
+
const MORPHO_ABI = [
|
9
|
+
"function position(bytes32,address) external view returns (uint256,uint128,uint128)",
|
10
|
+
"function market(bytes32) external view returns (uint128,uint128,uint128,uint128,uint128,uint128)",
|
11
|
+
];
|
12
|
+
export const MORPHO_INTERFACE = new utils.Interface(MORPHO_ABI);
|
5
13
|
export class MorphoDynamicData {
|
6
14
|
async build(chainId, campaigns) {
|
7
15
|
const pricer = await Pricer.load();
|
@@ -22,6 +30,14 @@ export class MorphoDynamicData {
|
|
22
30
|
target: campaign.campaignParameters.targetToken,
|
23
31
|
});
|
24
32
|
}
|
33
|
+
if (campaign.campaignSubType === MorphoSubCampaignType.BORROWING_BLUE ||
|
34
|
+
campaign.campaignSubType === MorphoSubCampaignType.SUPPLY_BLUE) {
|
35
|
+
calls.push({
|
36
|
+
allowFailure: true,
|
37
|
+
callData: MORPHO_INTERFACE.encodeFunctionData("market", [campaign.campaignParameters.marketId]),
|
38
|
+
target: morphoAddresses[campaign.computeChainId] ?? zeroAddress,
|
39
|
+
});
|
40
|
+
}
|
25
41
|
}
|
26
42
|
const result = await ChainInteractionService(chainId).fetchState(calls);
|
27
43
|
const dynamicData = [];
|
@@ -45,9 +61,23 @@ export class MorphoDynamicData {
|
|
45
61
|
tvl = priceAsset * totalAssets;
|
46
62
|
totalSupplyTargetToken = totalSupply;
|
47
63
|
}
|
48
|
-
if (campaign.campaignSubType === MorphoSubCampaignType.SUPPLY_BLUE
|
49
|
-
|
50
|
-
|
64
|
+
if (campaign.campaignSubType === MorphoSubCampaignType.SUPPLY_BLUE) {
|
65
|
+
const totalSupplyAssets = BN2Number(MORPHO_INTERFACE.decodeFunctionResult("market", result[index++].returnData)[0], Number(campaign.campaignParameters.decimalsLoanToken));
|
66
|
+
const priceAsset = (await pricer.get({
|
67
|
+
symbol: campaign.campaignParameters.symbolLoanToken,
|
68
|
+
})) ?? 0;
|
69
|
+
tvl = priceAsset * totalSupplyAssets;
|
70
|
+
totalSupplyTargetToken = totalSupplyAssets;
|
71
|
+
}
|
72
|
+
if (campaign.campaignSubType === MorphoSubCampaignType.BORROWING_BLUE) {
|
73
|
+
const totalBorrowAssets = BN2Number(MORPHO_INTERFACE.decodeFunctionResult("market", result[index++].returnData)[2], Number(campaign.campaignParameters.decimalsLoanToken));
|
74
|
+
const priceAsset = (await pricer.get({
|
75
|
+
symbol: campaign.campaignParameters.symbolLoanToken,
|
76
|
+
})) ?? 0;
|
77
|
+
tvl = priceAsset * totalBorrowAssets;
|
78
|
+
totalSupplyTargetToken = totalBorrowAssets;
|
79
|
+
}
|
80
|
+
if (campaign.campaignSubType === MorphoSubCampaignType.COLLATERAL_BLUE) {
|
51
81
|
const graphqlQueryMarket = {
|
52
82
|
query: `query MarketByUniqueKey($uniqueKey: String!, $chainId: Int) {
|
53
83
|
marketByUniqueKey(uniqueKey: $uniqueKey, chainId: $chainId) {
|
@@ -74,18 +104,8 @@ export class MorphoDynamicData {
|
|
74
104
|
headers: headers,
|
75
105
|
data: graphqlQueryMarket,
|
76
106
|
});
|
77
|
-
|
78
|
-
|
79
|
-
totalSupplyTargetToken = response.data.data.marketByUniqueKey.state.supplyAssets;
|
80
|
-
}
|
81
|
-
if (campaign.campaignSubType === MorphoSubCampaignType.BORROWING_BLUE) {
|
82
|
-
tvl = response.data.data.marketByUniqueKey.state.borrowAssetsUsd;
|
83
|
-
totalSupplyTargetToken = response.data.data.marketByUniqueKey.state.borrowAssets;
|
84
|
-
}
|
85
|
-
if (campaign.campaignSubType === MorphoSubCampaignType.COLLATERAL_BLUE) {
|
86
|
-
tvl = response.data.data.marketByUniqueKey.state.collateralAssetsUsd;
|
87
|
-
totalSupplyTargetToken = response.data.data.marketByUniqueKey.state.collateralAssets;
|
88
|
-
}
|
107
|
+
tvl = response.data.data.marketByUniqueKey.state.collateralAssetsUsd;
|
108
|
+
totalSupplyTargetToken = response.data.data.marketByUniqueKey.state.collateralAssets;
|
89
109
|
}
|
90
110
|
catch (e) {
|
91
111
|
console.log(e);
|
@@ -25,6 +25,8 @@ export declare enum etherlinkCampaigns {
|
|
25
25
|
Superlend_Supply_USDC_Etherlink = "Superlend Supply USDC Etherlink 0xd03bfdF9B26DB1e6764724d914d7c3d18106a9Fb",
|
26
26
|
Superlend_Supply_USDT_Etherlink = "Superlend Supply USDT Etherlink 0x998098A1B2E95e2b8f15360676428EdFd976861f",
|
27
27
|
Superlend_Supply_WXTZ_Etherlink = "Superlend Supply WXTZ Etherlink 0x008ae222661B6A42e3A097bd7AAC15412829106b",
|
28
|
+
Superlend_Supply_mTBILL_Etherlink = "Superlend Supply mTBILL Etherlink 0x187B7b83e8CaB442AD0BFEAe38067f3eb38a2d72",
|
29
|
+
Superlend_Supply_mBASIS_Etherlink = "Superlend Supply mBASIS Etherlink 0x660ADeF5993167ACdb490DF287f4Db6Cc226fFeB",
|
28
30
|
Iguana_WETH_WXTZ = "Iguana WETH/WXTZ Etherlink 0x478F067b0Ed73d120BBcd8c6f4f33438FC483912",
|
29
31
|
Iguana_USDC_USDT = "Iguana USDC/USDT Etherlink 0x86456e2E2A203Da82E61ed34eF4137Fbe545f0DC",
|
30
32
|
Iguana_XTZ_USDC = "Iguana XTZ/USDT Etherlink 0x508060A01f11d6a2Eb774B55aEba95931265E0cc",
|
@@ -71,7 +73,9 @@ export declare enum swapxCampaigns {
|
|
71
73
|
Swapx_scUSD_OS_Swapx = "Swapx scUSD/OS Swapx 0x370428430503B3b5970Ccaf530CbC71d02C3B61a",
|
72
74
|
Swapx_V2_USDCe_scUSD_Swapx = "Swapx V2 USDCe/scUSD 0xBb8aE5b889243561ac9261F22F592B72250AFd1F",
|
73
75
|
Swapx_wstkscUSD_scUSD_wstkscUSD_gauge_Swapx = "Swapx wstkscUSD/scUSD wstkscUSD gauge Swapx 0xEd08f5caD599E7F523d6B3FD598005B43aA003bb",
|
74
|
-
Swapx_wstkscUSD_scUSD_scUSD_gauge_Swapx = "Swapx wstkscUSD/scUSD scUSD gauge Swapx 0xEd08f5caD599E7F523d6B3FD598005B43aA003bb"
|
76
|
+
Swapx_wstkscUSD_scUSD_scUSD_gauge_Swapx = "Swapx wstkscUSD/scUSD scUSD gauge Swapx 0xEd08f5caD599E7F523d6B3FD598005B43aA003bb",
|
77
|
+
Swapx_wstkscUSD_bUSDCe20_wstkscUSD_gauge_Swapx = "Swapx wstkscUSD/bUSDC.e-20 wstkscUSD gauge Swapx 0x85279f76f6ce5bb26f721931ba4e3188cd28ad51",
|
78
|
+
Swapx_wstkscUSD_bUSDCe20_bUSDCe20_gauge_Swapx = "Swapx wstkscUSD/bUSDC.e-20 bUSDC.e-20 gauge Swapx 0x85279f76f6ce5bb26f721931ba4e3188cd28ad51"
|
75
79
|
}
|
76
80
|
export declare enum celoCampaigns {
|
77
81
|
UniswapV3_cUSD_USDT_Celo = "UniswapV3 cUSD/USDT Celo 0x5dC631aD6C26BEA1a59fBF2C2680CF3df43d249f",
|
@@ -190,7 +194,10 @@ export declare enum vicunaCampaigns {
|
|
190
194
|
Swapx_SWAPX_scUSD_USDC_Stable_market_Vicuna = "Swapx SWAPX scUSD-USDC Stable market Vicuna 0xb31fb82458CaD3Bfa658659ef4a464176Ff2F155",
|
191
195
|
Swapx_SWAPX_USDC_USDT_Stable_market_Vicuna = "Swapx SWAPX USDC-USDT Stable market Vicuna 0x6895439e47C362c1fBEFCcaCB8f4CC0d36AEf231",
|
192
196
|
Swapx_SWAPX_USDC_scUSD_Stable_market_Vicuna = "Swapx SWAPX USDC-scUSD Stable market Vicuna 0xa52d70EFf22A8302e91A86f2ac9D95318063Da10",
|
193
|
-
Swapx_SWAPX_USDT_USDC_Stable_market_Vicuna = "Swapx SWAPX USDT-USDC Stable market Vicuna 0xd320C24844EADb0710B31F92E4215Dd7fE480460"
|
197
|
+
Swapx_SWAPX_USDT_USDC_Stable_market_Vicuna = "Swapx SWAPX USDT-USDC Stable market Vicuna 0xd320C24844EADb0710B31F92E4215Dd7fE480460",
|
198
|
+
Vicuna_Sonic_wOS_Sonic_Market_Vicuna = "Vicuna Sonic wOS (Sonic Market) 0xdf19a33B4f542203d1E99329694bd57882d862A6",
|
199
|
+
SWAPX_OS_wS_Sonic_Market_Vicuna = "SWAPX OS-wS (Sonic Market) 0x52E30abd7505227d6853E882fA4C71D2826f1AC4",
|
200
|
+
SWAPX_wS_OS_Sonic_Market_Vicuna = "SWAPX wS-OS(Sonic Market) 0x9a349528E79b0e773C9dAcDAAd6f56B26Eb25a71"
|
194
201
|
}
|
195
202
|
export declare enum pufferCampaigns {
|
196
203
|
Zircuit_Restaking_Pool = "0xF047ab4c75cebf0eB9ed34Ae2c186f3611aEAfa6",
|
@@ -226,7 +233,8 @@ export declare enum pufferCampaigns {
|
|
226
233
|
CARROT_USDC = "0xf00032d0F95e8f43E750C51d0188DCa33cC5a8eA",
|
227
234
|
sonex_pufETH_USDCe_1 = "0x4A0e0E8d5DF4AEC0a08359e599720628b179F7eD",
|
228
235
|
sonex_pufETH_USDCe_5 = "0x2646FAD13ef9BD063790d2719De1da290865D58f",
|
229
|
-
kyo_pufETH_ETH = "0x8C4f743C763aBe5CBAe4E50358b05C7D45921638"
|
236
|
+
kyo_pufETH_ETH = "0x8C4f743C763aBe5CBAe4E50358b05C7D45921638",
|
237
|
+
apufETH = "0x0526CF96Ad808f8E11A5a9F1012edf67F4BAf519"
|
230
238
|
}
|
231
239
|
export declare enum zkSyncCampaigns {
|
232
240
|
Izumi_Finance_Zk_Weth = "Izumi Finance ZK/WETH 0xd62bc9f19bd94fde9c41df4b6eb6419ea6b8e25c",
|
@@ -587,6 +595,54 @@ declare const EtherlinkInterfaceCampaigns: {
|
|
587
595
|
url: string;
|
588
596
|
forwarders: never[];
|
589
597
|
};
|
598
|
+
"Superlend Supply mBASIS Etherlink 0x660ADeF5993167ACdb490DF287f4Db6Cc226fFeB": {
|
599
|
+
campaignType: any;
|
600
|
+
computeChainId: any;
|
601
|
+
hooks: {
|
602
|
+
hookType: any;
|
603
|
+
key: string;
|
604
|
+
chainId: any;
|
605
|
+
contractAddress: string;
|
606
|
+
contractState: any;
|
607
|
+
boostForReferrer: any;
|
608
|
+
valueForBoostForReferrer: number;
|
609
|
+
boostForInvited: any;
|
610
|
+
valueForBoostForInvited: number;
|
611
|
+
defaultBoost: any;
|
612
|
+
maximumBoostReferrer: number;
|
613
|
+
maximumBoostInvited: number;
|
614
|
+
cumulativeBoost: boolean;
|
615
|
+
}[];
|
616
|
+
targetToken: string;
|
617
|
+
whitelist: never[];
|
618
|
+
blacklist: string[];
|
619
|
+
url: string;
|
620
|
+
forwarders: never[];
|
621
|
+
};
|
622
|
+
"Superlend Supply mTBILL Etherlink 0x187B7b83e8CaB442AD0BFEAe38067f3eb38a2d72": {
|
623
|
+
campaignType: any;
|
624
|
+
computeChainId: any;
|
625
|
+
hooks: {
|
626
|
+
hookType: any;
|
627
|
+
key: string;
|
628
|
+
chainId: any;
|
629
|
+
contractAddress: string;
|
630
|
+
contractState: any;
|
631
|
+
boostForReferrer: any;
|
632
|
+
valueForBoostForReferrer: number;
|
633
|
+
boostForInvited: any;
|
634
|
+
valueForBoostForInvited: number;
|
635
|
+
defaultBoost: any;
|
636
|
+
maximumBoostReferrer: number;
|
637
|
+
maximumBoostInvited: number;
|
638
|
+
cumulativeBoost: boolean;
|
639
|
+
}[];
|
640
|
+
targetToken: string;
|
641
|
+
whitelist: never[];
|
642
|
+
blacklist: string[];
|
643
|
+
url: string;
|
644
|
+
forwarders: never[];
|
645
|
+
};
|
590
646
|
"Uranium Hold xU308 Etherlink 0x79052Ab3C166D4899a1e0DD033aC3b379AF0B1fD": {
|
591
647
|
campaignType: any;
|
592
648
|
computeChainId: any;
|
@@ -29,6 +29,8 @@ export var etherlinkCampaigns;
|
|
29
29
|
etherlinkCampaigns["Superlend_Supply_USDC_Etherlink"] = "Superlend Supply USDC Etherlink 0xd03bfdF9B26DB1e6764724d914d7c3d18106a9Fb";
|
30
30
|
etherlinkCampaigns["Superlend_Supply_USDT_Etherlink"] = "Superlend Supply USDT Etherlink 0x998098A1B2E95e2b8f15360676428EdFd976861f";
|
31
31
|
etherlinkCampaigns["Superlend_Supply_WXTZ_Etherlink"] = "Superlend Supply WXTZ Etherlink 0x008ae222661B6A42e3A097bd7AAC15412829106b";
|
32
|
+
etherlinkCampaigns["Superlend_Supply_mTBILL_Etherlink"] = "Superlend Supply mTBILL Etherlink 0x187B7b83e8CaB442AD0BFEAe38067f3eb38a2d72";
|
33
|
+
etherlinkCampaigns["Superlend_Supply_mBASIS_Etherlink"] = "Superlend Supply mBASIS Etherlink 0x660ADeF5993167ACdb490DF287f4Db6Cc226fFeB";
|
32
34
|
etherlinkCampaigns["Iguana_WETH_WXTZ"] = "Iguana WETH/WXTZ Etherlink 0x478F067b0Ed73d120BBcd8c6f4f33438FC483912";
|
33
35
|
etherlinkCampaigns["Iguana_USDC_USDT"] = "Iguana USDC/USDT Etherlink 0x86456e2E2A203Da82E61ed34eF4137Fbe545f0DC";
|
34
36
|
etherlinkCampaigns["Iguana_XTZ_USDC"] = "Iguana XTZ/USDT Etherlink 0x508060A01f11d6a2Eb774B55aEba95931265E0cc";
|
@@ -65,6 +67,35 @@ const blacklistEtherlink = [
|
|
65
67
|
"0x6c1b204185A55E9DaA0bF026720Fe94458ddd89F",
|
66
68
|
"0x56A8b583276278513Eb78c3d132a80c1e81B9405",
|
67
69
|
"0x6a2f09Bc9E6b82b38FCa096792B94f36FAd657Ac",
|
70
|
+
"0xf99Fdd1e71838433516DE7aD98aa82BFa3f17AE2",
|
71
|
+
"0xf1fAD4fecd686a79Fd2a4618F657f0BA0332e18A",
|
72
|
+
"0x51832D40579d86fb95Cc843EF32326BD51904956",
|
73
|
+
"0x0D1C515CCb1B723eCBA2Cbb14c458168078529DA",
|
74
|
+
"0x4d6ab6cBd964Fa1D33dA0232DA21fA3E5d23d05D",
|
75
|
+
"0x6ECEc7954b61Da887B8f3e56111D7Dd6bebc3877",
|
76
|
+
"0x41Be85bf6c460b1DC35efBE2C3143F9732CD6496",
|
77
|
+
"0x635518E05BAe895F85680Ce66Fb8EA92EE64FE2f",
|
78
|
+
"0xB05D1019772a14bb8853A94469B45ECfC7A985E8",
|
79
|
+
"0x82DAa20C1781d142295a7cF2a8913798695E50a2",
|
80
|
+
"0xbC086a895F6c1fF7Dd09022cC7fDEd52a2451Be5",
|
81
|
+
"0xFdAD5D95246E8b5B5147bCDE23ddCc6BbF1f7fC0",
|
82
|
+
"0x19f898d95295D072235272C015B80787B177140e",
|
83
|
+
"0xE0133f4027c14eB3D5cD758E052B5AD1bC380C70",
|
84
|
+
"0x05e6e1DF3eA666E1fEa7920026F6Bf1cA1A64F48",
|
85
|
+
"0x45c1FE080f5d38889DAa81614b46DEdBC360A0E6",
|
86
|
+
"0x3f7F401a04564f4789bC8e9b8A1BDe0F44CDc322",
|
87
|
+
"0xbc11274F5779ee4E81b09CCcd4fA4360f7c78F9E",
|
88
|
+
"0x196A8F57ff3AfB509f0014EDBa108A0BFeF0a84a",
|
89
|
+
"0x2366C17D8E825ec799292bBEf04b414938526594",
|
90
|
+
"0x208F27ec5d040618610a536a1f25a93Df6079eb1",
|
91
|
+
"0xE4cC0ceBF07D98f9a6b05E5283cb4d8A53c8beb8",
|
92
|
+
"0xa9D957545BA1AA6582690adbAFCaD12119ce834B",
|
93
|
+
"0xfc03b2f8B4Fb6438cE7d4E4B5F91372157A514cd",
|
94
|
+
"0xa660FA94B26FAA4D20E061D7FCa3d7b1411C30f0",
|
95
|
+
"0x0893cA2b0f0b8B87815B61c7717C25B8Bf834082",
|
96
|
+
"0x9D0E0e95305872E0f8065093b66E5FA224B5826f",
|
97
|
+
"0xa0E147eA78D8d696D73bbd43dE353b3ab076B3a0",
|
98
|
+
"0x196A8F57ff3AfB509f0014EDBa108A0BFeF0a84a",
|
68
99
|
];
|
69
100
|
export var swapxCampaigns;
|
70
101
|
(function (swapxCampaigns) {
|
@@ -103,6 +134,8 @@ export var swapxCampaigns;
|
|
103
134
|
swapxCampaigns["Swapx_V2_USDCe_scUSD_Swapx"] = "Swapx V2 USDCe/scUSD 0xBb8aE5b889243561ac9261F22F592B72250AFd1F";
|
104
135
|
swapxCampaigns["Swapx_wstkscUSD_scUSD_wstkscUSD_gauge_Swapx"] = "Swapx wstkscUSD/scUSD wstkscUSD gauge Swapx 0xEd08f5caD599E7F523d6B3FD598005B43aA003bb";
|
105
136
|
swapxCampaigns["Swapx_wstkscUSD_scUSD_scUSD_gauge_Swapx"] = "Swapx wstkscUSD/scUSD scUSD gauge Swapx 0xEd08f5caD599E7F523d6B3FD598005B43aA003bb";
|
137
|
+
swapxCampaigns["Swapx_wstkscUSD_bUSDCe20_wstkscUSD_gauge_Swapx"] = "Swapx wstkscUSD/bUSDC.e-20 wstkscUSD gauge Swapx 0x85279f76f6ce5bb26f721931ba4e3188cd28ad51";
|
138
|
+
swapxCampaigns["Swapx_wstkscUSD_bUSDCe20_bUSDCe20_gauge_Swapx"] = "Swapx wstkscUSD/bUSDC.e-20 bUSDC.e-20 gauge Swapx 0x85279f76f6ce5bb26f721931ba4e3188cd28ad51";
|
106
139
|
})(swapxCampaigns || (swapxCampaigns = {}));
|
107
140
|
export var celoCampaigns;
|
108
141
|
(function (celoCampaigns) {
|
@@ -227,6 +260,9 @@ export var vicunaCampaigns;
|
|
227
260
|
vicunaCampaigns["Swapx_SWAPX_USDC_USDT_Stable_market_Vicuna"] = "Swapx SWAPX USDC-USDT Stable market Vicuna 0x6895439e47C362c1fBEFCcaCB8f4CC0d36AEf231";
|
228
261
|
vicunaCampaigns["Swapx_SWAPX_USDC_scUSD_Stable_market_Vicuna"] = "Swapx SWAPX USDC-scUSD Stable market Vicuna 0xa52d70EFf22A8302e91A86f2ac9D95318063Da10";
|
229
262
|
vicunaCampaigns["Swapx_SWAPX_USDT_USDC_Stable_market_Vicuna"] = "Swapx SWAPX USDT-USDC Stable market Vicuna 0xd320C24844EADb0710B31F92E4215Dd7fE480460";
|
263
|
+
vicunaCampaigns["Vicuna_Sonic_wOS_Sonic_Market_Vicuna"] = "Vicuna Sonic wOS (Sonic Market) 0xdf19a33B4f542203d1E99329694bd57882d862A6";
|
264
|
+
vicunaCampaigns["SWAPX_OS_wS_Sonic_Market_Vicuna"] = "SWAPX OS-wS (Sonic Market) 0x52E30abd7505227d6853E882fA4C71D2826f1AC4";
|
265
|
+
vicunaCampaigns["SWAPX_wS_OS_Sonic_Market_Vicuna"] = "SWAPX wS-OS(Sonic Market) 0x9a349528E79b0e773C9dAcDAAd6f56B26Eb25a71";
|
230
266
|
})(vicunaCampaigns || (vicunaCampaigns = {}));
|
231
267
|
export var pufferCampaigns;
|
232
268
|
(function (pufferCampaigns) {
|
@@ -264,6 +300,7 @@ export var pufferCampaigns;
|
|
264
300
|
pufferCampaigns["sonex_pufETH_USDCe_1"] = "0x4A0e0E8d5DF4AEC0a08359e599720628b179F7eD";
|
265
301
|
pufferCampaigns["sonex_pufETH_USDCe_5"] = "0x2646FAD13ef9BD063790d2719De1da290865D58f";
|
266
302
|
pufferCampaigns["kyo_pufETH_ETH"] = "0x8C4f743C763aBe5CBAe4E50358b05C7D45921638";
|
303
|
+
pufferCampaigns["apufETH"] = "0x0526CF96Ad808f8E11A5a9F1012edf67F4BAf519";
|
267
304
|
})(pufferCampaigns || (pufferCampaigns = {}));
|
268
305
|
export var zkSyncCampaigns;
|
269
306
|
(function (zkSyncCampaigns) {
|
@@ -556,6 +593,26 @@ const EtherlinkInterfaceCampaigns = {
|
|
556
593
|
url: "https://markets.superlend.xyz/reserve-overview/?underlyingAsset=0xc9b53ab2679f573e480d01e0f49e2b5cfb7a3eab&marketName=etherlink",
|
557
594
|
forwarders: [],
|
558
595
|
},
|
596
|
+
[etherlinkCampaigns.Superlend_Supply_mBASIS_Etherlink]: {
|
597
|
+
campaignType: Campaign.ERC20,
|
598
|
+
computeChainId: ChainId.ETHERLINK,
|
599
|
+
hooks: [etherlinkReferralProgram],
|
600
|
+
targetToken: "0x660ADeF5993167ACdb490DF287f4Db6Cc226fFeB",
|
601
|
+
whitelist: [],
|
602
|
+
blacklist: blacklistEtherlink,
|
603
|
+
url: "https://markets.superlend.xyz/reserve-overview/?underlyingAsset=0x2247b5a46bb79421a314ab0f0b67ffd11dd37ee4&marketName=etherlink",
|
604
|
+
forwarders: [],
|
605
|
+
},
|
606
|
+
[etherlinkCampaigns.Superlend_Supply_mTBILL_Etherlink]: {
|
607
|
+
campaignType: Campaign.ERC20,
|
608
|
+
computeChainId: ChainId.ETHERLINK,
|
609
|
+
hooks: [etherlinkReferralProgram],
|
610
|
+
targetToken: "0x187B7b83e8CaB442AD0BFEAe38067f3eb38a2d72",
|
611
|
+
whitelist: [],
|
612
|
+
blacklist: blacklistEtherlink,
|
613
|
+
url: "https://markets.superlend.xyz/reserve-overview/?underlyingAsset=0xdd629e5241cbc5919847783e6c96b2de4754e438&marketName=etherlink",
|
614
|
+
forwarders: [],
|
615
|
+
},
|
559
616
|
[etherlinkCampaigns.Uranium_Hold_xU308_Etherlink]: {
|
560
617
|
campaignType: Campaign.ERC20,
|
561
618
|
computeChainId: ChainId.ETHERLINK,
|
@@ -826,7 +883,7 @@ const SwapxInterfaceCampaigns = {
|
|
826
883
|
hooks: [],
|
827
884
|
poolAddress: "0xDd35c88B1754879EF86BBF3A24F81fCCA5Eb6B5D",
|
828
885
|
whitelist: ["0x640429B0633851F487639BcDd8Ed523DDf1Bbff8"],
|
829
|
-
blacklist: [
|
886
|
+
blacklist: [],
|
830
887
|
url: "https://swapx.fi/earn?ownerType=pools&filter=conc-liquidity",
|
831
888
|
forwarders: [],
|
832
889
|
isOutOfRangeIncentivized: false,
|
@@ -840,7 +897,7 @@ const SwapxInterfaceCampaigns = {
|
|
840
897
|
hooks: [],
|
841
898
|
poolAddress: "0xDd35c88B1754879EF86BBF3A24F81fCCA5Eb6B5D",
|
842
899
|
whitelist: ["0x4604782BcD6F749B271Fc9d14BFd583be6e5a6cf"],
|
843
|
-
blacklist: [
|
900
|
+
blacklist: [],
|
844
901
|
url: "https://swapx.fi/earn?ownerType=pools&filter=conc-liquidity",
|
845
902
|
forwarders: [],
|
846
903
|
isOutOfRangeIncentivized: false,
|
@@ -868,7 +925,7 @@ const SwapxInterfaceCampaigns = {
|
|
868
925
|
hooks: [],
|
869
926
|
poolAddress: "0xD760791B29e7894FB827A94Ca433254bb5aFB653",
|
870
927
|
whitelist: ["0x2f9e2852de03c42c13d3dCdD2C57c0b3cF0382c1"],
|
871
|
-
blacklist: [
|
928
|
+
blacklist: [],
|
872
929
|
url: "https://swapx.fi/earn?ownerType=pools&filter=conc-liquidity",
|
873
930
|
forwarders: [],
|
874
931
|
isOutOfRangeIncentivized: false,
|
@@ -882,7 +939,7 @@ const SwapxInterfaceCampaigns = {
|
|
882
939
|
hooks: [],
|
883
940
|
poolAddress: "0xD760791B29e7894FB827A94Ca433254bb5aFB653",
|
884
941
|
whitelist: ["0xC693c6fc1d2b44DfB5C5aa05Ca2b02A91DB97528"],
|
885
|
-
blacklist: [
|
942
|
+
blacklist: [],
|
886
943
|
url: "https://swapx.fi/earn?ownerType=pools&filter=conc-liquidity",
|
887
944
|
forwarders: [],
|
888
945
|
isOutOfRangeIncentivized: false,
|
@@ -1036,7 +1093,7 @@ const SwapxInterfaceCampaigns = {
|
|
1036
1093
|
hooks: [],
|
1037
1094
|
poolAddress: "0x0d13400CC7c46D77a43957fE614ba58C827dfde6",
|
1038
1095
|
whitelist: ["0x29985EE262a4C9D878AA6A9B9dC43f2FC87a81c6"],
|
1039
|
-
blacklist: [
|
1096
|
+
blacklist: [],
|
1040
1097
|
url: "https://swapx.fi/earn?ownerType=pools&filter=conc-liquidity",
|
1041
1098
|
forwarders: [],
|
1042
1099
|
isOutOfRangeIncentivized: false,
|
@@ -1050,7 +1107,7 @@ const SwapxInterfaceCampaigns = {
|
|
1050
1107
|
hooks: [],
|
1051
1108
|
poolAddress: "0x0d13400CC7c46D77a43957fE614ba58C827dfde6",
|
1052
1109
|
whitelist: ["0x30Df881606c719916b99a0b5bc89e5eB338a226C"],
|
1053
|
-
blacklist: [
|
1110
|
+
blacklist: [],
|
1054
1111
|
url: "https://swapx.fi/earn?ownerType=pools&filter=conc-liquidity",
|
1055
1112
|
forwarders: [],
|
1056
1113
|
isOutOfRangeIncentivized: false,
|
@@ -1226,6 +1283,34 @@ const SwapxInterfaceCampaigns = {
|
|
1226
1283
|
weightToken0: 4000,
|
1227
1284
|
weightToken1: 4000,
|
1228
1285
|
},
|
1286
|
+
[swapxCampaigns.Swapx_wstkscUSD_bUSDCe20_wstkscUSD_gauge_Swapx]: {
|
1287
|
+
campaignType: Campaign.CLAMM,
|
1288
|
+
computeChainId: ChainId.SONIC,
|
1289
|
+
hooks: [],
|
1290
|
+
poolAddress: "0x85279f76f6ce5bb26f721931ba4e3188cd28ad51",
|
1291
|
+
whitelist: ["0x1009f1dE14Cdb1161658F346437156dF4DBf1A38"],
|
1292
|
+
blacklist: [],
|
1293
|
+
url: "https://swapx.fi/earn?ownerType=pools&filter=conc-liquidity",
|
1294
|
+
forwarders: [],
|
1295
|
+
isOutOfRangeIncentivized: false,
|
1296
|
+
weightFees: 2000,
|
1297
|
+
weightToken0: 4000,
|
1298
|
+
weightToken1: 4000,
|
1299
|
+
},
|
1300
|
+
[swapxCampaigns.Swapx_wstkscUSD_bUSDCe20_bUSDCe20_gauge_Swapx]: {
|
1301
|
+
campaignType: Campaign.CLAMM,
|
1302
|
+
computeChainId: ChainId.SONIC,
|
1303
|
+
hooks: [],
|
1304
|
+
poolAddress: "0x85279f76f6ce5bb26f721931ba4e3188cd28ad51",
|
1305
|
+
whitelist: ["0xFc463D9bE936DEe0cEcBB600433aDE1b921813C7"],
|
1306
|
+
blacklist: [],
|
1307
|
+
url: "https://swapx.fi/earn?ownerType=pools&filter=conc-liquidity",
|
1308
|
+
forwarders: [],
|
1309
|
+
isOutOfRangeIncentivized: false,
|
1310
|
+
weightFees: 2000,
|
1311
|
+
weightToken0: 4000,
|
1312
|
+
weightToken1: 4000,
|
1313
|
+
},
|
1229
1314
|
[swapxCampaigns.Swapx_V2_USDCe_scUSD_Swapx]: {
|
1230
1315
|
campaignType: Campaign.ERC20,
|
1231
1316
|
computeChainId: ChainId.SONIC,
|
@@ -2645,6 +2730,36 @@ const VicunaInterfaceCampaigns = {
|
|
2645
2730
|
url: "https://vicunafinance.com/markets",
|
2646
2731
|
forwarders: [],
|
2647
2732
|
},
|
2733
|
+
[vicunaCampaigns.Vicuna_Sonic_wOS_Sonic_Market_Vicuna]: {
|
2734
|
+
campaignType: Campaign.ERC20,
|
2735
|
+
computeChainId: ChainId.SONIC,
|
2736
|
+
hooks: [],
|
2737
|
+
targetToken: "0xdf19a33B4f542203d1E99329694bd57882d862A6",
|
2738
|
+
whitelist: [],
|
2739
|
+
blacklist: ["0xad1bB693975C16eC2cEEF65edD540BC735F8608B"],
|
2740
|
+
url: "https://vicunafinance.com/markets",
|
2741
|
+
forwarders: [],
|
2742
|
+
},
|
2743
|
+
[vicunaCampaigns.SWAPX_OS_wS_Sonic_Market_Vicuna]: {
|
2744
|
+
campaignType: Campaign.ERC20,
|
2745
|
+
computeChainId: ChainId.SONIC,
|
2746
|
+
hooks: [],
|
2747
|
+
targetToken: "0x52E30abd7505227d6853E882fA4C71D2826f1AC4",
|
2748
|
+
whitelist: [],
|
2749
|
+
blacklist: ["0xad1bB693975C16eC2cEEF65edD540BC735F8608B"],
|
2750
|
+
url: "https://vicunafinance.com/markets",
|
2751
|
+
forwarders: [],
|
2752
|
+
},
|
2753
|
+
[vicunaCampaigns.SWAPX_wS_OS_Sonic_Market_Vicuna]: {
|
2754
|
+
campaignType: Campaign.ERC20,
|
2755
|
+
computeChainId: ChainId.SONIC,
|
2756
|
+
hooks: [],
|
2757
|
+
targetToken: "0x9a349528E79b0e773C9dAcDAAd6f56B26Eb25a71",
|
2758
|
+
whitelist: [],
|
2759
|
+
blacklist: ["0xad1bB693975C16eC2cEEF65edD540BC735F8608B"],
|
2760
|
+
url: "https://vicunafinance.com/markets",
|
2761
|
+
forwarders: [],
|
2762
|
+
},
|
2648
2763
|
};
|
2649
2764
|
const ModeInterfaceCampaigns = {
|
2650
2765
|
[modeCampaigns.Steer_EES_V2_Weth_USDC_Kim_Mode]: {
|
@@ -5380,6 +5495,16 @@ const PufferInterfaceCampaigns = {
|
|
5380
5495
|
weightToken0: 5000,
|
5381
5496
|
weightToken1: 5000,
|
5382
5497
|
},
|
5498
|
+
[pufferCampaigns.apufETH]: {
|
5499
|
+
campaignType: Campaign.ERC20,
|
5500
|
+
computeChainId: ChainId.SONEIUM,
|
5501
|
+
hooks: [],
|
5502
|
+
targetToken: "0x0526CF96Ad808f8E11A5a9F1012edf67F4BAf519",
|
5503
|
+
whitelist: [],
|
5504
|
+
blacklist: [],
|
5505
|
+
url: "https://app.sakefinance.com/market/0x6c460b2c6d6719562d5da43e5152b375e79b9a8b",
|
5506
|
+
forwarders: [],
|
5507
|
+
},
|
5383
5508
|
};
|
5384
5509
|
export const MerklInterfaceCampaigns = {
|
5385
5510
|
[program.Puffer]: PufferInterfaceCampaigns,
|
@@ -1,10 +1,10 @@
|
|
1
|
+
import { getTokensListWithCache } from "@/libs/getTokensList";
|
1
2
|
import { PriceService as PriceSourceService } from "@/modules/v4/price";
|
2
3
|
import { PriceSourceMethod } from "@db/api";
|
3
4
|
import { BN2Number, ChainId, Stable, registry } from "@sdk";
|
4
5
|
import axios from "axios";
|
5
6
|
import { Contract } from "ethers";
|
6
7
|
import { constantChain } from "../../constants";
|
7
|
-
import { getTokensListWithCache } from "../../libs/getTokensList";
|
8
8
|
import { log } from "../logger";
|
9
9
|
import { providers } from "../providers";
|
10
10
|
import { getChainlinkLatestPrice } from "./chainlinkRead";
|