@merkl/api 0.10.210 → 0.10.212

Sign up to get free protection for your applications and to get access to all the features.
Files changed (36) hide show
  1. package/dist/database/api/seeder/resources/protocol.d.ts +15 -0
  2. package/dist/database/api/seeder/resources/protocol.js +15 -1
  3. package/dist/src/eden/index.d.ts +192 -0
  4. package/dist/src/entities/opportunity.js +2 -1
  5. package/dist/src/index.d.ts +74 -0
  6. package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/helpers/tokenType.d.ts +2 -1
  7. package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/helpers/tokenType.js +4 -0
  8. package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/processor/curveNPoolProcessor.d.ts +39 -0
  9. package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/processor/curveNPoolProcessor.js +81 -0
  10. package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/processor/processorMapping.js +2 -0
  11. package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/subtypesRound1.js +4 -1
  12. package/dist/src/modules/v4/campaign/campaign.model.d.ts +2 -0
  13. package/dist/src/modules/v4/campaign/campaign.model.js +2 -0
  14. package/dist/src/modules/v4/dynamicData/dynamicData.controller.d.ts +1 -0
  15. package/dist/src/modules/v4/dynamicData/dynamicData.service.d.ts +1 -0
  16. package/dist/src/modules/v4/dynamicData/dynamicData.service.js +1 -0
  17. package/dist/src/modules/v4/opportunity/opportunity.service.js +3 -0
  18. package/dist/src/modules/v4/opportunity/subservices/getEigenLayerMetadata.service.d.ts +3 -0
  19. package/dist/src/modules/v4/opportunity/subservices/getEigenLayerMetadata.service.js +9 -0
  20. package/dist/src/modules/v4/programPayload/index.d.ts +3 -0
  21. package/dist/src/modules/v4/programPayload/index.js +3 -0
  22. package/dist/src/modules/v4/programPayload/programPayload.controller.d.ts +93 -0
  23. package/dist/src/modules/v4/programPayload/programPayload.controller.js +38 -0
  24. package/dist/src/modules/v4/programPayload/programPayload.model.d.ts +122 -0
  25. package/dist/src/modules/v4/programPayload/programPayload.model.js +130 -0
  26. package/dist/src/modules/v4/programPayload/programPayload.repository.d.ts +39 -0
  27. package/dist/src/modules/v4/programPayload/programPayload.repository.js +359 -0
  28. package/dist/src/modules/v4/programPayload/programPayload.service.d.ts +8 -0
  29. package/dist/src/modules/v4/programPayload/programPayload.service.js +92 -0
  30. package/dist/src/modules/v4/router.d.ts +74 -0
  31. package/dist/src/modules/v4/router.js +3 -1
  32. package/dist/src/utils/decodeCalls.js +5 -3
  33. package/dist/src/utils/encodeCalls.js +11 -13
  34. package/dist/src/utils/generateCardName.js +2 -0
  35. package/dist/tsconfig.package.tsbuildinfo +1 -1
  36. package/package.json +1 -1
@@ -0,0 +1,359 @@
1
+ import { Campaign, ChainId, Forwarder, MorphoSubCampaignType, StandardType } from "@sdk";
2
+ export var program;
3
+ (function (program) {
4
+ program["Puffer"] = "Puffer";
5
+ })(program || (program = {}));
6
+ export var campaigns;
7
+ (function (campaigns) {
8
+ campaigns["Puffer_Zircuit_Restaking_Pool"] = "PufferProgram Zircuit Restaking Pool 0xF047ab4c75cebf0eB9ed34Ae2c186f3611aEAfa6";
9
+ campaigns["Puffer_Pendle_26_JUN_2025"] = "PufferProgram Pendle 26 JUN 2025 0x784A0bb8208C70290cac6bcBC3650cEb9227813E";
10
+ campaigns["Puffer_Pendle_26_JUN_2025_YT"] = "PufferProgram YT Pendle 26 JUN 2025 0x784A0bb8208C70290cac6bcBC3650cEb9227813E";
11
+ campaigns["Puffer_Karak"] = "PufferProgram Karak 0x68754d29f2e97B837Cb622ccfF325adAC27E9977";
12
+ campaigns["Puffer_Curve_pufEth"] = "PufferProgram Curve pufEth 0xEEda34A377dD0ca676b9511EE1324974fA8d980D";
13
+ campaigns["Puffer_Morpho_pufETH_WETH"] = "PufferProgram Morpho Weth 0x0eed5a89c7d397d02fd0b9b8e42811ca67e50ed5aeaa4f22e506516c716cfbbf";
14
+ campaigns["Puffer_Pencils_ppufEth"] = "PufferProgram Pencils PufferVault 0x0C530882C0900b13FC6E8312B52c26e7a5b8e505";
15
+ campaigns["Puffer_Morpho_pufETH_USDC"] = "PufferProgram Morpho USDC 0x7e9c708876fa3816c46aeb08937b51aa0461c2af3865ecb306433db8a80b1d1b";
16
+ campaigns["Puffer_balancer_wstETH_pufETH"] = "PufferProgram Balancer Vault wstETH_pufETH 0x63E0d47A6964aD1565345Da9bfA66659F4983F02";
17
+ campaigns["Puffer_curve_llamalend"] = "PufferProgram Curve Llama wstETH 0xcd28cF8f7755f03967D27E128B38022B63919836";
18
+ campaigns["Puffer_cyber_staking_pool"] = "PufferProgram Cyber Staking Pool 0x18eeD20f71BEf84B605253C89A7576E3634134C0";
19
+ campaigns["Puffer_aura_balancer_wstETH_pufETH"] = "PufferProgram Aura Balancer Vault wstETH_pufETH 0x6Ea41486A8f21EED7B20AfDB681b90a5B6C6D029";
20
+ campaigns["Puffer_kinza_pufETH"] = "PufferProgram Kinza Puf Eth 0x5651bb75dE3c78815D420602B4Ce67D04a233873";
21
+ campaigns["Puffer_zerolend_pufETH"] = "PufferProgram Zerolend Puf Eth 0xdD7Afc0f014A1E1716307Ff040704fA12E8D33A3";
22
+ campaigns["Puffer_desyn_pufETH"] = "PufferProgram Desyn 0x3a8099D8FE5C072bB035381003993393072D3ec7";
23
+ campaigns["Puffer_gamma_swap_pufETH"] = "PufferProgram GammaSwap V1 0x1a33B9be3Fe58C1Bde4325A68c09C1F7fA8aA1e5";
24
+ campaigns["Puffer_Morpho_pufETH_USDA"] = "PufferProgram Morpho USDA 0xa42ba90e4d3013dee8eb0d7bb7ae0817297337eeecd525dbdd48c7b5c5e6988d";
25
+ campaigns["Puffer_pufETH_hold"] = "PufferProgram pufETH Hold 0xD9A442856C234a39a81a089C06451EBAa4306a72";
26
+ campaigns["Puffer_unifiETH_hold"] = "PufferProgram unifiETH Hold 0x196ead472583Bc1e9aF7A05F860D9857e1Bd3dCc";
27
+ campaigns["Puffer_vePuffer"] = "PufferProgram vePuffer 0x4d1C297d39C5c1277964D0E3f8Aa901493664530";
28
+ campaigns["Puffer_mindNetwork_pufETH"] = "PufferProgram Mind Network 0x0124183e894aED6558c445Ff125801753e834216";
29
+ campaigns["Puffer_pancakeSwap_xpufEth"] = "PufferProgram PancakeSwap xPufEth 0x2b8d093f22f7b6f53d02aca106de3eabc0937d45";
30
+ campaigns["Puffer_aerodrome_cl50_xpufETH"] = "PufferProgram Aerodrome CL50-xpufETH / WETH 0xCDf927C0F7b81b146C0C9e9323eb5A28D1BFA183";
31
+ campaigns["Puffer_uniswapv3_eth_pufETH"] = "PufferProgram Uniswap V3 eth_pufETH 0xBDB04e915B94FbFD6e8552ff7860E59Db7d4499a";
32
+ campaigns["Puffer_uniswapv3_weth_PUFFER"] = "PufferProgram Uniswap V3 weth_PUFFER 0xc5c9a9AB6403CDBa9722463000146C18b504F0bA";
33
+ campaigns["Puffer_uniswapv3_vt_weth"] = "PufferProgram Uniswap V3 vt_eth 0xa56600e670724b42F38d3A6e4B25e8D786B4F5f9";
34
+ })(campaigns || (campaigns = {}));
35
+ const PufferInterfaceCampaigns = {
36
+ [campaigns.Puffer_Zircuit_Restaking_Pool]: {
37
+ campaignType: Campaign.ERC20,
38
+ computeChainId: ChainId.MAINNET,
39
+ hooks: [],
40
+ targetToken: "0xD9A442856C234a39a81a089C06451EBAa4306a72",
41
+ whitelist: ["0xF047ab4c75cebf0eB9ed34Ae2c186f3611aEAfa6"],
42
+ blacklist: [],
43
+ url: "https://app.zircuit.com/stake",
44
+ forwarders: [
45
+ {
46
+ forwarderType: Forwarder.INCOMING_TRANSFERS,
47
+ priority: 0,
48
+ sender: "0xF047ab4c75cebf0eB9ed34Ae2c186f3611aEAfa6",
49
+ token: "0xD9A442856C234a39a81a089C06451EBAa4306a72", // Token to use transfer of. If priority is 0, it is the target token
50
+ senderType: StandardType.ERC20,
51
+ },
52
+ ],
53
+ },
54
+ [campaigns.Puffer_Pendle_26_JUN_2025]: {
55
+ campaignType: Campaign.ERC20,
56
+ computeChainId: ChainId.MAINNET,
57
+ hooks: [],
58
+ targetToken: "0x58612beB0e8a126735b19BB222cbC7fC2C162D2a",
59
+ whitelist: [],
60
+ blacklist: [],
61
+ url: "https://app.pendle.finance/trade/pools/0x58612beb0e8a126735b19bb222cbc7fc2c162d2a/zap/in?chain=ethereum",
62
+ forwarders: [],
63
+ },
64
+ [campaigns.Puffer_Pendle_26_JUN_2025_YT]: {
65
+ campaignType: Campaign.ERC20,
66
+ computeChainId: ChainId.MAINNET,
67
+ hooks: [],
68
+ targetToken: "0x784A0bb8208C70290cac6bcBC3650cEb9227813E",
69
+ whitelist: [],
70
+ blacklist: [],
71
+ url: "https://app.pendle.finance/trade/pools/0x58612beb0e8a126735b19bb222cbc7fc2c162d2a/zap/in?chain=ethereum",
72
+ forwarders: [],
73
+ },
74
+ [campaigns.Puffer_Karak]: {
75
+ campaignType: Campaign.ERC20,
76
+ computeChainId: ChainId.MAINNET,
77
+ hooks: [],
78
+ targetToken: "0x1f2aa9680910aC5a4527FA72001dC249943f60b4",
79
+ whitelist: [],
80
+ blacklist: [],
81
+ url: "https://app.karak.network/pool/ethereum/pufETH",
82
+ forwarders: [],
83
+ },
84
+ [campaigns.Puffer_Curve_pufEth]: {
85
+ campaignType: Campaign.ERC20,
86
+ computeChainId: ChainId.MAINNET,
87
+ hooks: [],
88
+ targetToken: "0xEEda34A377dD0ca676b9511EE1324974fA8d980D",
89
+ whitelist: [],
90
+ blacklist: [],
91
+ url: "https://app.karak.network/pool/ethereum/pufETH",
92
+ forwarders: [],
93
+ },
94
+ [campaigns.Puffer_Morpho_pufETH_USDC]: {
95
+ campaignType: Campaign.MORPHO,
96
+ computeChainId: ChainId.MAINNET,
97
+ hooks: [],
98
+ whitelist: ["0x8eB67A509616cd6A7c1B3c8C21D48FF57df3d458", "0x60d715515d4411f7F43e4206dc5d4a3677f0eC78"],
99
+ blacklist: [],
100
+ forwarders: [],
101
+ subCampaignType: MorphoSubCampaignType.SUPPLY_BLUE,
102
+ marketId: "0x7e9c708876fa3816c46aeb08937b51aa0461c2af3865ecb306433db8a80b1d1b",
103
+ },
104
+ [campaigns.Puffer_Pencils_ppufEth]: {
105
+ campaignType: Campaign.ERC20,
106
+ computeChainId: ChainId.SCROLL,
107
+ hooks: [],
108
+ targetToken: "0x0C530882C0900b13FC6E8312B52c26e7a5b8e505",
109
+ whitelist: [],
110
+ blacklist: [],
111
+ url: "https://app.pencilsprotocol.io/farming/pufETH",
112
+ forwarders: [],
113
+ },
114
+ [campaigns.Puffer_Morpho_pufETH_WETH]: {
115
+ campaignType: Campaign.MORPHO,
116
+ computeChainId: ChainId.MAINNET,
117
+ hooks: [],
118
+ whitelist: ["0x4881Ef0BF6d2365D3dd6499ccd7532bcdBCE0658", "0x78Fc2c2eD1A4cDb5402365934aE5648aDAd094d0"],
119
+ blacklist: [],
120
+ forwarders: [],
121
+ subCampaignType: MorphoSubCampaignType.SUPPLY_BLUE,
122
+ marketId: "0x0eed5a89c7d397d02fd0b9b8e42811ca67e50ed5aeaa4f22e506516c716cfbbf",
123
+ },
124
+ [campaigns.Puffer_balancer_wstETH_pufETH]: {
125
+ campaignType: Campaign.ERC20,
126
+ computeChainId: ChainId.MAINNET,
127
+ hooks: [],
128
+ targetToken: "0x63E0d47A6964aD1565345Da9bfA66659F4983F02",
129
+ whitelist: [],
130
+ blacklist: ["0xaF52695E1bB01A16D33D7194C28C42b10e0Dbec2"],
131
+ url: "https://app.balancer.fi/#/ethereum/pool/0x63e0d47a6964ad1565345da9bfa66659f4983f02000000000000000000000681",
132
+ forwarders: [
133
+ {
134
+ forwarderType: Forwarder.ERC20,
135
+ priority: 0,
136
+ sender: "0x0B9Ea598757c7D03FB1937cc16bdD2C9D416ff80",
137
+ token: "0x0B9Ea598757c7D03FB1937cc16bdD2C9D416ff80",
138
+ },
139
+ ],
140
+ },
141
+ [campaigns.Puffer_curve_llamalend]: {
142
+ campaignType: Campaign.ERC20,
143
+ computeChainId: ChainId.MAINNET,
144
+ hooks: [],
145
+ targetToken: "0xD9A442856C234a39a81a089C06451EBAa4306a72",
146
+ whitelist: ["0xcd28cF8f7755f03967D27E128B38022B63919836"],
147
+ blacklist: [],
148
+ url: "https://lend.curve.fi/#/ethereum/markets/one-way-market-10/create",
149
+ forwarders: [
150
+ {
151
+ forwarderType: Forwarder.LLAMALEND,
152
+ priority: 0,
153
+ sender: "0xcd28cF8f7755f03967D27E128B38022B63919836",
154
+ token: "0xD9A442856C234a39a81a089C06451EBAa4306a72", // Token to use transfer of. If priority is 0, it is the target token
155
+ senderType: StandardType.ERC20,
156
+ },
157
+ ],
158
+ },
159
+ [campaigns.Puffer_cyber_staking_pool]: {
160
+ campaignType: Campaign.ERC20,
161
+ computeChainId: ChainId.MAINNET,
162
+ hooks: [],
163
+ targetToken: "0xD9A442856C234a39a81a089C06451EBAa4306a72",
164
+ whitelist: ["0x18eeD20f71BEf84B605253C89A7576E3634134C0"],
165
+ blacklist: [],
166
+ url: "https://lend.curve.fi/#/ethereum/markets/one-way-market-10/create",
167
+ forwarders: [
168
+ {
169
+ forwarderType: Forwarder.INCOMING_TRANSFERS,
170
+ priority: 0,
171
+ sender: "0x18eeD20f71BEf84B605253C89A7576E3634134C0",
172
+ token: "0xD9A442856C234a39a81a089C06451EBAa4306a72", // Token to use transfer of. If priority is 0, it is the target token
173
+ senderType: StandardType.ERC20,
174
+ },
175
+ ],
176
+ },
177
+ [campaigns.Puffer_aura_balancer_wstETH_pufETH]: {
178
+ campaignType: Campaign.ERC20,
179
+ computeChainId: ChainId.MAINNET,
180
+ hooks: [],
181
+ targetToken: "0x6Ea41486A8f21EED7B20AfDB681b90a5B6C6D029",
182
+ whitelist: [],
183
+ blacklist: [],
184
+ url: "https://app.aura.finance/#/1/pool/205",
185
+ forwarders: [],
186
+ },
187
+ [campaigns.Puffer_kinza_pufETH]: {
188
+ campaignType: Campaign.ERC20,
189
+ computeChainId: ChainId.BSC,
190
+ hooks: [],
191
+ targetToken: "0x9c6faE23FdffFBE1199bABB11bc9A6859493A5a1",
192
+ whitelist: [],
193
+ blacklist: [],
194
+ url: "https://app.kinza.finance/#/details/pufETH",
195
+ forwarders: [],
196
+ },
197
+ [campaigns.Puffer_zerolend_pufETH]: {
198
+ campaignType: Campaign.ERC20,
199
+ computeChainId: ChainId.MAINNET,
200
+ hooks: [],
201
+ targetToken: "0xdD7Afc0f014A1E1716307Ff040704fA12E8D33A3",
202
+ whitelist: [],
203
+ blacklist: [],
204
+ url: "https://app.zerolend.xyz/reserve-overview/?underlyingAsset=0xd9a442856c234a39a81a089c06451ebaa4306a72&marketName=proto_mainnet_lrt_v3",
205
+ forwarders: [],
206
+ },
207
+ [campaigns.Puffer_desyn_pufETH]: {
208
+ campaignType: Campaign.ERC20,
209
+ computeChainId: ChainId.MAINNET,
210
+ hooks: [],
211
+ targetToken: "0x3a8099D8FE5C072bB035381003993393072D3ec7",
212
+ whitelist: [],
213
+ blacklist: [],
214
+ url: "https://www.desyn.io/#/pool/0xb4Ea811B97858e147875315D982663AE2f54dc87/pointsBenefits?network=ethereum",
215
+ forwarders: [],
216
+ },
217
+ [campaigns.Puffer_gamma_swap_pufETH]: {
218
+ campaignType: Campaign.ERC20,
219
+ computeChainId: ChainId.MAINNET,
220
+ hooks: [],
221
+ targetToken: "0x1a33B9be3Fe58C1Bde4325A68c09C1F7fA8aA1e5",
222
+ whitelist: [],
223
+ blacklist: [],
224
+ url: "https://app.gammaswap.com/earn/mainnet/0x1a33b9be3fe58c1bde4325a68c09c1f7fa8aa1e5",
225
+ forwarders: [],
226
+ },
227
+ [campaigns.Puffer_Morpho_pufETH_USDA]: {
228
+ campaignType: Campaign.MORPHO,
229
+ computeChainId: ChainId.MAINNET,
230
+ hooks: [],
231
+ whitelist: ["0x125D41A6e5dbf455cD9Df8F80BCC6fd172D52Cc6"],
232
+ blacklist: [],
233
+ forwarders: [],
234
+ subCampaignType: MorphoSubCampaignType.SUPPLY_BLUE,
235
+ marketId: "0xa42ba90e4d3013dee8eb0d7bb7ae0817297337eeecd525dbdd48c7b5c5e6988d",
236
+ },
237
+ [campaigns.Puffer_pufETH_hold]: {
238
+ campaignType: Campaign.ERC20,
239
+ computeChainId: ChainId.MAINNET,
240
+ hooks: [],
241
+ targetToken: "0xD9A442856C234a39a81a089C06451EBAa4306a72",
242
+ whitelist: [],
243
+ blacklist: [
244
+ "0xF047ab4c75cebf0eB9ed34Ae2c186f3611aEAfa6",
245
+ "0x68754d29f2e97B837Cb622ccfF325adAC27E9977",
246
+ "0xBBBBBbbBBb9cC5e90e3b3Af64bdAF62C37EEFFCb",
247
+ "0x18eeD20f71BEf84B605253C89A7576E3634134C0",
248
+ "0x196ead472583Bc1e9aF7A05F860D9857e1Bd3dCc",
249
+ "0x253008ba4aE2f3E6488DC998a5321D4EB1a0c905",
250
+ ],
251
+ url: "https://etherscan.io/token/0xd9a442856c234a39a81a089c06451ebaa4306a72",
252
+ forwarders: [],
253
+ },
254
+ [campaigns.Puffer_unifiETH_hold]: {
255
+ campaignType: Campaign.ERC20,
256
+ computeChainId: ChainId.MAINNET,
257
+ hooks: [],
258
+ targetToken: "0x196ead472583Bc1e9aF7A05F860D9857e1Bd3dCc",
259
+ whitelist: [],
260
+ blacklist: [],
261
+ url: "https://quest.puffer.fi/unifi",
262
+ forwarders: [],
263
+ },
264
+ [campaigns.Puffer_vePuffer]: {
265
+ campaignType: Campaign.ERC20,
266
+ computeChainId: ChainId.MAINNET,
267
+ hooks: [],
268
+ targetToken: "0x4d1C297d39C5c1277964D0E3f8Aa901493664530",
269
+ whitelist: ["0xA55eD5808aeCDF23AE3782C1443185f5D2363ce7"],
270
+ blacklist: [],
271
+ url: "https://vote.puffer.fi/plugins/stake/#/",
272
+ forwarders: [
273
+ {
274
+ forwarderType: Forwarder.LOCKER_PUFFER,
275
+ priority: 0,
276
+ sender: "0xA55eD5808aeCDF23AE3782C1443185f5D2363ce7",
277
+ nftAddress: "0x1b6ec227ceBeC25118270efbb4b67642fc29965E",
278
+ },
279
+ ],
280
+ },
281
+ [campaigns.Puffer_mindNetwork_pufETH]: {
282
+ campaignType: Campaign.ERC20,
283
+ computeChainId: ChainId.MAINNET,
284
+ hooks: [],
285
+ targetToken: "0x0124183e894aED6558c445Ff125801753e834216",
286
+ whitelist: [],
287
+ blacklist: [],
288
+ url: "https://dapp.mindnetwork.xyz/",
289
+ forwarders: [],
290
+ },
291
+ [campaigns.Puffer_pancakeSwap_xpufEth]: {
292
+ campaignType: Campaign.CLAMM,
293
+ computeChainId: ChainId.BSC,
294
+ poolAddress: "0x2b8d093f22f7b6f53d02aca106de3eabc0937d45",
295
+ hooks: [],
296
+ whitelist: [],
297
+ blacklist: [],
298
+ url: "https://pancakeswap.finance/info/v3/pairs/0x2b8d093f22f7b6f53d02aca106de3eabc0937d45",
299
+ isOutOfRangeIncentivized: false,
300
+ weightFees: 0,
301
+ weightToken0: 5000,
302
+ weightToken1: 5000,
303
+ },
304
+ [campaigns.Puffer_aerodrome_cl50_xpufETH]: {
305
+ campaignType: Campaign.CLAMM,
306
+ computeChainId: ChainId.BASE,
307
+ poolAddress: "0xCDf927C0F7b81b146C0C9e9323eb5A28D1BFA183",
308
+ hooks: [],
309
+ whitelist: [],
310
+ blacklist: [],
311
+ url: "https://aerodrome.finance/pools?token0=0x23da5f2d509cb43a59d43c108a43edf34510eff1&token1=eth",
312
+ isOutOfRangeIncentivized: false,
313
+ weightFees: 0,
314
+ weightToken0: 5000,
315
+ weightToken1: 5000,
316
+ },
317
+ [campaigns.Puffer_uniswapv3_eth_pufETH]: {
318
+ campaignType: Campaign.CLAMM,
319
+ computeChainId: ChainId.MAINNET,
320
+ poolAddress: "0xBDB04e915B94FbFD6e8552ff7860E59Db7d4499a",
321
+ hooks: [],
322
+ whitelist: [],
323
+ blacklist: [],
324
+ url: "https://app.uniswap.org/explore/pools/ethereum/0xBDB04e915B94FbFD6e8552ff7860E59Db7d4499a",
325
+ isOutOfRangeIncentivized: false,
326
+ weightFees: 0,
327
+ weightToken0: 5000,
328
+ weightToken1: 5000,
329
+ },
330
+ [campaigns.Puffer_uniswapv3_weth_PUFFER]: {
331
+ campaignType: Campaign.CLAMM,
332
+ computeChainId: ChainId.MAINNET,
333
+ poolAddress: "0xc5c9a9AB6403CDBa9722463000146C18b504F0bA",
334
+ hooks: [],
335
+ whitelist: [],
336
+ blacklist: [],
337
+ url: "https://app.uniswap.org/explore/pools/ethereum/0xc5c9a9AB6403CDBa9722463000146C18b504F0bA",
338
+ isOutOfRangeIncentivized: false,
339
+ weightFees: 0,
340
+ weightToken0: 5000,
341
+ weightToken1: 5000,
342
+ },
343
+ [campaigns.Puffer_uniswapv3_vt_weth]: {
344
+ campaignType: Campaign.CLAMM,
345
+ computeChainId: ChainId.MAINNET,
346
+ poolAddress: "0xa56600e670724b42F38d3A6e4B25e8D786B4F5f9",
347
+ hooks: [],
348
+ whitelist: [],
349
+ blacklist: [],
350
+ url: "https://app.uniswap.org/explore/pools/ethereum/0xa56600e670724b42F38d3A6e4B25e8D786B4F5f9",
351
+ isOutOfRangeIncentivized: false,
352
+ weightFees: 0,
353
+ weightToken0: 5000,
354
+ weightToken1: 5000,
355
+ },
356
+ };
357
+ export const MerklInterfaceCampaigns = {
358
+ [program.Puffer]: PufferInterfaceCampaigns,
359
+ };
@@ -0,0 +1,8 @@
1
+ import { type Campaign, type campaignConfig } from "@sdk";
2
+ import { type CampaignPayloadInputModel, type ProgramPayloadInputModel } from "./programPayload.model";
3
+ export declare class ProgramPayloadService {
4
+ static buildConfig(query: CampaignPayloadInputModel): campaignConfig<Campaign>;
5
+ /** building payload for a single campaign */
6
+ static buildPayload(query: CampaignPayloadInputModel, initialCampaignPayload?: null): any;
7
+ static buildProgramPayload(query: ProgramPayloadInputModel): any;
8
+ }
@@ -0,0 +1,92 @@
1
+ import { ChainId, NULL_ADDRESS, NULL_ROOT, buildCampaignPayload, encodeForwarderData, registry, } from "@sdk";
2
+ import _ from "lodash";
3
+ import { safeTemplate, } from "./programPayload.model";
4
+ import { MerklInterfaceCampaigns } from "./programPayload.repository";
5
+ export class ProgramPayloadService {
6
+ // ─── ProgramPayload ──────────────────────────────────────────────────────────
7
+ static buildConfig(query) {
8
+ const campaign = query.campaign;
9
+ const startTimestamp = query.startTimestamp;
10
+ const endTimestamp = query.endTimestamp;
11
+ const rewardToken = query.rewardToken;
12
+ const creator = query.creator;
13
+ const amount = query.amount;
14
+ const program = query.program;
15
+ if (!(program in MerklInterfaceCampaigns)) {
16
+ throw new Error(`Program ${program} not found`);
17
+ }
18
+ const programInterface = MerklInterfaceCampaigns[program];
19
+ if (!(campaign in programInterface)) {
20
+ throw new Error(`Campaign ${campaign} not found`);
21
+ }
22
+ const config = programInterface[campaign];
23
+ return {
24
+ ...config,
25
+ amount: amount,
26
+ startTimestamp,
27
+ endTimestamp,
28
+ rewardToken,
29
+ creator,
30
+ forwarders: "forwarders" in config ? config.forwarders.map(forwarder => encodeForwarderData(forwarder)) : [],
31
+ };
32
+ }
33
+ /** building payload for a single campaign */
34
+ static buildPayload(query, initialCampaignPayload = null) {
35
+ const rewardToken = query.rewardToken;
36
+ const distributionChainId = query.distributionChainId ? query.distributionChainId : ChainId.MAINNET;
37
+ const registryInitialized = registry(distributionChainId);
38
+ const distributionCreator = registryInitialized?.Merkl?.DistributionCreator;
39
+ function aggregateConfig(query) {
40
+ return ProgramPayloadService.buildConfig(query);
41
+ }
42
+ function createSafePayloadForCampaign(args) {
43
+ const safePayload = _.cloneDeep(safeTemplate);
44
+ safePayload.chainId = distributionChainId.toString();
45
+ safePayload.createdAt = Math.floor(Date.now() / 1000);
46
+ safePayload.transactions[0].to = rewardToken;
47
+ safePayload.transactions[0].contractInputsValues = {
48
+ amount: args?.amount.toString(),
49
+ spender: distributionCreator ? distributionCreator : NULL_ADDRESS,
50
+ };
51
+ safePayload.transactions[2].to = distributionCreator ? distributionCreator : NULL_ADDRESS;
52
+ safePayload.transactions[2].contractInputsValues = {
53
+ newCampaign: JSON.stringify([
54
+ NULL_ROOT,
55
+ NULL_ADDRESS,
56
+ args?.rewardToken,
57
+ args?.amount,
58
+ args?.campaignType,
59
+ args?.startTimestamp,
60
+ args?.duration,
61
+ args?.campaignData,
62
+ ]),
63
+ };
64
+ return [safePayload.transactions[0], safePayload.transactions[2]];
65
+ }
66
+ function initiateSafePayload() {
67
+ const safePayload = JSON.parse(JSON.stringify(safeTemplate));
68
+ safePayload.chainId = distributionChainId.toString();
69
+ safePayload.createdAt = Math.floor(Date.now() / 1000);
70
+ safePayload.transactions[1].to = distributionCreator;
71
+ safePayload.transactions = [safePayload.transactions[1]];
72
+ return safePayload;
73
+ }
74
+ function generatePayloadFile(query) {
75
+ const args = buildCampaignPayload(aggregateConfig(query), distributionChainId).args;
76
+ const safePayload = createSafePayloadForCampaign(args);
77
+ return safePayload;
78
+ }
79
+ const campaignPayloads = initialCampaignPayload === null ? initiateSafePayload() : initialCampaignPayload;
80
+ const transactions = generatePayloadFile(query);
81
+ campaignPayloads.transactions.push(...transactions);
82
+ return campaignPayloads;
83
+ }
84
+ static buildProgramPayload(query) {
85
+ let campaignPayloads = null;
86
+ for (const campaign of Object.keys(MerklInterfaceCampaigns[query.program])) {
87
+ const queryCampaign = { ...query, campaign };
88
+ campaignPayloads = ProgramPayloadService.buildPayload(queryCampaign, campaignPayloads);
89
+ }
90
+ return campaignPayloads;
91
+ }
92
+ }
@@ -2331,6 +2331,7 @@ export declare const v4: Elysia<"/v4", false, {
2331
2331
  cardName: string;
2332
2332
  blacklistedSupply: number;
2333
2333
  priceTargetToken: number;
2334
+ type: string;
2334
2335
  };
2335
2336
  };
2336
2337
  };
@@ -2486,6 +2487,79 @@ export declare const v4: Elysia<"/v4", false, {
2486
2487
  };
2487
2488
  };
2488
2489
  };
2490
+ } & {
2491
+ v4: {
2492
+ "program-payload": {
2493
+ index: {
2494
+ get: {
2495
+ body: unknown;
2496
+ params: {};
2497
+ query: {
2498
+ creator: string;
2499
+ startTimestamp: number;
2500
+ endTimestamp: number;
2501
+ campaign: string;
2502
+ distributionChainId: number;
2503
+ amount: string;
2504
+ rewardToken: string;
2505
+ program: string;
2506
+ };
2507
+ headers: unknown;
2508
+ response: {
2509
+ [x: string]: any;
2510
+ 200: any;
2511
+ };
2512
+ };
2513
+ };
2514
+ };
2515
+ } & {
2516
+ "program-payload": {
2517
+ config: {
2518
+ get: {
2519
+ body: unknown;
2520
+ params: {};
2521
+ query: {
2522
+ creator: string;
2523
+ startTimestamp: number;
2524
+ endTimestamp: number;
2525
+ campaign: string;
2526
+ distributionChainId: number;
2527
+ amount: string;
2528
+ rewardToken: string;
2529
+ program: string;
2530
+ };
2531
+ headers: unknown;
2532
+ response: {
2533
+ [x: string]: any;
2534
+ 200: any;
2535
+ };
2536
+ };
2537
+ };
2538
+ };
2539
+ } & {
2540
+ "program-payload": {
2541
+ program: {
2542
+ get: {
2543
+ body: unknown;
2544
+ params: {};
2545
+ query: {
2546
+ creator: string;
2547
+ startTimestamp: number;
2548
+ endTimestamp: number;
2549
+ distributionChainId: number;
2550
+ amount: string;
2551
+ rewardToken: string;
2552
+ program: string;
2553
+ };
2554
+ headers: unknown;
2555
+ response: {
2556
+ [x: string]: any;
2557
+ 200: any;
2558
+ };
2559
+ };
2560
+ };
2561
+ };
2562
+ };
2489
2563
  }, {
2490
2564
  derive: {};
2491
2565
  resolve: {};
@@ -20,6 +20,7 @@ import { DynamicDataController } from "./dynamicData";
20
20
  import { InteractionController } from "./interaction/interaction.controller";
21
21
  import { LiquidityController } from "./liquidity/liquidity.controller";
22
22
  import { MerklRootController } from "./merklRoot";
23
+ import { ProgramPayloadController } from "./programPayload";
23
24
  import { StatusController } from "./status";
24
25
  import { UserController } from "./user";
25
26
  // ─── V4 Router ───────────────────────────────────────────────────────────────
@@ -61,4 +62,5 @@ export const v4 = new Elysia({ tags: ["v4"], prefix: "/v4" })
61
62
  .use(DynamicDataController)
62
63
  .use(StatusController)
63
64
  .use(LiquidityController)
64
- .use(ClaimController);
65
+ .use(ClaimController)
66
+ .use(ProgramPayloadController);
@@ -1,4 +1,4 @@
1
- import { AaveInterface, AccountantWithRateProvidersInterface, AuraInterface, AuraOperatorInterface, BalancerGaugeInterface, BalancerPoolInterface, BalancerVaultInterface, BeefyInterface, CPMMGammaPoolMainInterface, CompoundInterface, CurveInterface, DefutureVaultInterface, ERC20Interface, EnzymeInterface, EulerInterface, FactoryInterface, FluidInterface, FraxlendInterface, GearboxVaultInterface, IonicInterface, LayerBankInterface, MaverickBPLensInterface, MetamorphoInterface, MoonwellInterface, OneInchStakingInterface, PendleInterface, PendleYTInterface, RadiantInterface, RfxInterface, RswEthStrategyInterface, SturdyInterface, SymetricAmbientStrategyInterface, TorosInterface, UniswapV2PoolInterface, VePufferInterface, ZFStableLPINterface, ZFStableSwapThreePoolInterface, } from "@sdk";
1
+ import { AaveInterface, AccountantWithRateProvidersInterface, AuraInterface, AuraOperatorInterface, BalancerGaugeInterface, BalancerPoolInterface, BalancerVaultInterface, BeefyInterface, CPMMGammaPoolMainInterface, CompoundInterface, CurveInterface, CurveStableSwapNGInterface, DefutureVaultInterface, ERC20Interface, EnzymeInterface, EulerInterface, FactoryInterface, FluidInterface, FraxlendInterface, GearboxVaultInterface, IonicInterface, LayerBankInterface, MaverickBPLensInterface, MetamorphoInterface, MoonwellInterface, OneInchStakingInterface, PendleInterface, PendleYTInterface, RadiantInterface, RfxInterface, RswEthStrategyInterface, SturdyInterface, SymetricAmbientStrategyInterface, TorosInterface, UniswapV2PoolInterface, VePufferInterface, ZFStableLPINterface, ZFStableSwapThreePoolInterface, } from "@sdk";
2
2
  import { tokenType } from "../libs/campaigns/campaignTypes/ERC20SubTypes/helpers/tokenType";
3
3
  export function decodeCall(calls, index, key, type) {
4
4
  const returnData = calls[index];
@@ -128,6 +128,10 @@ export function decodeCall(calls, index, key, type) {
128
128
  return CurveInterface.decodeFunctionResult("coins", returnData)[0];
129
129
  case "coin2":
130
130
  return CurveInterface.decodeFunctionResult("coins", returnData)[0];
131
+ case "N_COINS":
132
+ return CurveStableSwapNGInterface.decodeFunctionResult("N_COINS", returnData)[0];
133
+ case "balances":
134
+ return CurveStableSwapNGInterface.decodeFunctionResult("balances", returnData)[0];
131
135
  case "calcNetShareValue":
132
136
  return [
133
137
  EnzymeInterface.decodeFunctionResult("calcNetShareValue", returnData)[0],
@@ -175,8 +179,6 @@ export function decodeCall(calls, index, key, type) {
175
179
  return MaverickBPLensInterface.decodeFunctionResult("boostedPositionInformation", returnData)[0];
176
180
  case "coins":
177
181
  return ZFStableSwapThreePoolInterface.decodeFunctionResult("coins", returnData)[0];
178
- case "balances":
179
- return ZFStableSwapThreePoolInterface.decodeFunctionResult("coins", returnData)[0];
180
182
  case "minter":
181
183
  return ZFStableLPINterface.decodeFunctionResult("minter", returnData)[0];
182
184
  case "getTokenAddresses":
@@ -1,5 +1,5 @@
1
1
  import { tokenType } from "../libs/campaigns/campaignTypes/ERC20SubTypes/helpers/tokenType";
2
- import { AaveInterface, AccountantWithRateProvidersInterface, AuraInterface, AuraOperatorInterface, BalancerGaugeInterface, BalancerPoolInterface, BalancerVaultInterface, BeefyInterface, CPMMGammaPoolMainInterface, CompoundInterface, CurveInterface, DefutureVaultInterface, ERC20Interface, EnzymeInterface, EulerInterface, FactoryInterface, FluidInterface, FraxlendInterface, GearboxVaultInterface, IonicInterface, LayerBankInterface, MaverickBPLensInterface, MetamorphoInterface, MoonwellInterface, OneInchStakingInterface, PendleInterface, PendleYTInterface, RadiantInterface, RfxDatastoreInterface, RswEthStrategyInterface, SturdyInterface, SymetricAmbientStrategyInterface, TorosInterface, UniswapV2PoolInterface, VePufferInterface, ZFStableLPINterface, ZFStableSwapThreePoolInterface, } from "@sdk";
2
+ import { AaveInterface, AccountantWithRateProvidersInterface, AuraInterface, AuraOperatorInterface, BalancerGaugeInterface, BalancerPoolInterface, BalancerVaultInterface, BeefyInterface, CPMMGammaPoolMainInterface, CompoundInterface, CurveInterface, CurveStableSwapNGInterface, DefutureVaultInterface, ERC20Interface, EnzymeInterface, EulerInterface, FactoryInterface, FluidInterface, FraxlendInterface, GearboxVaultInterface, IonicInterface, LayerBankInterface, MaverickBPLensInterface, MetamorphoInterface, MoonwellInterface, OneInchStakingInterface, PendleInterface, PendleYTInterface, RadiantInterface, RfxDatastoreInterface, RswEthStrategyInterface, SturdyInterface, SymetricAmbientStrategyInterface, TorosInterface, UniswapV2PoolInterface, VePufferInterface, ZFStableLPINterface, } from "@sdk";
3
3
  export function createCall(target, key, type, metaData) {
4
4
  switch (key) {
5
5
  case "SY":
@@ -24,6 +24,16 @@ export function createCall(target, key, type, metaData) {
24
24
  return { allowFailure: true, callData: CurveInterface.encodeFunctionData("coins", [1]), target };
25
25
  case "coin2":
26
26
  return { allowFailure: true, callData: CurveInterface.encodeFunctionData("coins", [2]), target };
27
+ case "coins":
28
+ return { allowFailure: true, callData: CurveInterface.encodeFunctionData("coins", [metaData]), target };
29
+ case "N_COINS":
30
+ return { allowFailure: true, callData: CurveStableSwapNGInterface.encodeFunctionData("N_COINS"), target };
31
+ case "balances":
32
+ return {
33
+ allowFailure: true,
34
+ callData: CurveStableSwapNGInterface.encodeFunctionData("balances", [metaData]),
35
+ target,
36
+ };
27
37
  case "operator":
28
38
  return { allowFailure: true, callData: AuraInterface.encodeFunctionData("operator"), target };
29
39
  case "pid":
@@ -250,18 +260,6 @@ export function createCall(target, key, type, metaData) {
250
260
  callData: MaverickBPLensInterface.encodeFunctionData("boostedPositionInformation", [metaData]),
251
261
  target: target,
252
262
  };
253
- case "coins":
254
- return {
255
- allowFailure: true,
256
- callData: ZFStableSwapThreePoolInterface.encodeFunctionData("coins", [metaData]),
257
- target: target,
258
- };
259
- case "balances":
260
- return {
261
- allowFailure: true,
262
- callData: ZFStableSwapThreePoolInterface.encodeFunctionData("balances", [metaData]),
263
- target: target,
264
- };
265
263
  case "minter":
266
264
  return {
267
265
  allowFailure: true,
@@ -101,6 +101,8 @@ export function generateCardName(type, typeInfo, campaign, symbols = [""]) {
101
101
  return `${typeInfo.lockNFT !== undefined ? "Lock" : "Stake"} ${campaign.campaignParameters.symbolTargetToken} on ${typeInfo.stakingSymbol}`;
102
102
  case tokenType.cpmmGamma:
103
103
  return `Provide ${typeInfo.symbolToken0}/${typeInfo.symbolToken1} on ${typeInfo.protocol}`;
104
+ case tokenType.crosscurve:
105
+ return `${typeInfo.name}`;
104
106
  default:
105
107
  return `Hold ${typeInfo.name} (${campaign.campaignParameters.symbolTargetToken})`;
106
108
  }