levr-sdk 0.1.1 → 0.2.0
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/README.md +5 -4
- package/dist/esm/client/hook/index.js +5 -9
- package/dist/esm/client/hook/index.js.map +1 -1
- package/dist/esm/client/hook/use-airdrop.js +19 -0
- package/dist/esm/client/hook/use-airdrop.js.map +1 -0
- package/dist/esm/client/hook/use-clanker.js +1 -34
- package/dist/esm/client/hook/use-clanker.js.map +1 -1
- package/dist/esm/client/hook/use-governance.js +2 -2
- package/dist/esm/client/hook/use-governance.js.map +1 -1
- package/dist/esm/client/hook/use-project.js +30 -6
- package/dist/esm/client/hook/use-project.js.map +1 -1
- package/dist/esm/client/hook/use-swap.js +0 -2
- package/dist/esm/client/hook/use-swap.js.map +1 -1
- package/dist/esm/client/levr-provider.js +10 -7
- package/dist/esm/client/levr-provider.js.map +1 -1
- package/dist/esm/fee-receivers.js +35 -6
- package/dist/esm/fee-receivers.js.map +1 -1
- package/dist/esm/governance.js +2 -7
- package/dist/esm/governance.js.map +1 -1
- package/dist/esm/project.js +106 -63
- package/dist/esm/project.js.map +1 -1
- package/dist/esm/quote/index.js +2 -2
- package/dist/esm/quote/v4.js +142 -128
- package/dist/esm/quote/v4.js.map +1 -1
- package/dist/esm/schema/levr.schema.js +5 -2
- package/dist/esm/schema/levr.schema.js.map +1 -1
- package/dist/esm/stake.js +1 -1
- package/dist/esm/stake.js.map +1 -1
- package/dist/esm/usd-price.js +21 -4
- package/dist/esm/usd-price.js.map +1 -1
- package/dist/esm/user.js +1 -1
- package/dist/esm/user.js.map +1 -1
- package/dist/types/client/hook/index.d.ts +5 -12
- package/dist/types/client/hook/index.d.ts.map +1 -1
- package/dist/types/client/hook/use-airdrop.d.ts +11 -0
- package/dist/types/client/hook/use-airdrop.d.ts.map +1 -0
- package/dist/types/client/hook/use-clanker.d.ts +1 -18
- package/dist/types/client/hook/use-clanker.d.ts.map +1 -1
- package/dist/types/client/hook/use-deploy.d.ts +1 -1
- package/dist/types/client/hook/use-governance.d.ts +2 -1
- package/dist/types/client/hook/use-governance.d.ts.map +1 -1
- package/dist/types/client/hook/use-project.d.ts +11 -1
- package/dist/types/client/hook/use-project.d.ts.map +1 -1
- package/dist/types/client/hook/use-swap.d.ts.map +1 -1
- package/dist/types/client/levr-provider.d.ts +3 -10
- package/dist/types/client/levr-provider.d.ts.map +1 -1
- package/dist/types/fee-receivers.d.ts +514 -0
- package/dist/types/fee-receivers.d.ts.map +1 -1
- package/dist/types/governance.d.ts +3 -2
- package/dist/types/governance.d.ts.map +1 -1
- package/dist/types/project.d.ts +25 -6
- package/dist/types/project.d.ts.map +1 -1
- package/dist/types/quote/index.d.ts +2 -2
- package/dist/types/quote/v4.d.ts +5 -7
- package/dist/types/quote/v4.d.ts.map +1 -1
- package/dist/types/schema/levr.schema.d.ts +1 -1
- package/dist/types/schema/levr.schema.d.ts.map +1 -1
- package/dist/types/usd-price.d.ts +6 -1
- package/dist/types/usd-price.d.ts.map +1 -1
- package/dist/types/user.d.ts +1 -1
- package/dist/types/user.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -17,7 +17,521 @@ export type UpdateFeeReceiverParams = {
|
|
|
17
17
|
rewardIndex: bigint | number;
|
|
18
18
|
newRecipient: `0x${string}`;
|
|
19
19
|
};
|
|
20
|
+
export type TokenRewardsParams = {
|
|
21
|
+
publicClient?: PopPublicClient;
|
|
22
|
+
clankerToken: `0x${string}`;
|
|
23
|
+
chainId?: number;
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* Get tokenRewards from LP locker by reading the contract
|
|
27
|
+
* Returns pool info and fee receiver data
|
|
28
|
+
*/
|
|
29
|
+
export declare const tokenRewardsRead: (params: TokenRewardsParams) => Promise<{
|
|
30
|
+
token: `0x${string}`;
|
|
31
|
+
poolKey: {
|
|
32
|
+
currency0: `0x${string}`;
|
|
33
|
+
currency1: `0x${string}`;
|
|
34
|
+
fee: number;
|
|
35
|
+
tickSpacing: number;
|
|
36
|
+
hooks: `0x${string}`;
|
|
37
|
+
};
|
|
38
|
+
positionId: bigint;
|
|
39
|
+
numPositions: bigint;
|
|
40
|
+
rewardBps: readonly number[];
|
|
41
|
+
rewardAdmins: readonly `0x${string}`[];
|
|
42
|
+
rewardRecipients: readonly `0x${string}`[];
|
|
43
|
+
}>;
|
|
44
|
+
/**
|
|
45
|
+
* Get fee receiver contract calls for multicall
|
|
46
|
+
* Returns contract call to fetch tokenRewards from LP locker
|
|
47
|
+
*/
|
|
48
|
+
export declare function getFeeReceiverContracts(clankerToken: `0x${string}`, chainId: number): {
|
|
49
|
+
address: `0x${string}`;
|
|
50
|
+
abi: readonly [{
|
|
51
|
+
readonly type: "function";
|
|
52
|
+
readonly name: "collectRewards";
|
|
53
|
+
readonly inputs: readonly [{
|
|
54
|
+
readonly name: "token";
|
|
55
|
+
readonly type: "address";
|
|
56
|
+
readonly internalType: "address";
|
|
57
|
+
}];
|
|
58
|
+
readonly outputs: readonly [];
|
|
59
|
+
readonly stateMutability: "nonpayable";
|
|
60
|
+
}, {
|
|
61
|
+
readonly type: "function";
|
|
62
|
+
readonly name: "collectRewardsWithoutUnlock";
|
|
63
|
+
readonly inputs: readonly [{
|
|
64
|
+
readonly name: "token";
|
|
65
|
+
readonly type: "address";
|
|
66
|
+
readonly internalType: "address";
|
|
67
|
+
}];
|
|
68
|
+
readonly outputs: readonly [];
|
|
69
|
+
readonly stateMutability: "nonpayable";
|
|
70
|
+
}, {
|
|
71
|
+
readonly type: "function";
|
|
72
|
+
readonly name: "placeLiquidity";
|
|
73
|
+
readonly inputs: readonly [{
|
|
74
|
+
readonly name: "lockerConfig";
|
|
75
|
+
readonly type: "tuple";
|
|
76
|
+
readonly internalType: "struct IClanker.LockerConfig";
|
|
77
|
+
readonly components: readonly [{
|
|
78
|
+
readonly name: "locker";
|
|
79
|
+
readonly type: "address";
|
|
80
|
+
readonly internalType: "address";
|
|
81
|
+
}, {
|
|
82
|
+
readonly name: "rewardAdmins";
|
|
83
|
+
readonly type: "address[]";
|
|
84
|
+
readonly internalType: "address[]";
|
|
85
|
+
}, {
|
|
86
|
+
readonly name: "rewardRecipients";
|
|
87
|
+
readonly type: "address[]";
|
|
88
|
+
readonly internalType: "address[]";
|
|
89
|
+
}, {
|
|
90
|
+
readonly name: "rewardBps";
|
|
91
|
+
readonly type: "uint16[]";
|
|
92
|
+
readonly internalType: "uint16[]";
|
|
93
|
+
}, {
|
|
94
|
+
readonly name: "tickLower";
|
|
95
|
+
readonly type: "int24[]";
|
|
96
|
+
readonly internalType: "int24[]";
|
|
97
|
+
}, {
|
|
98
|
+
readonly name: "tickUpper";
|
|
99
|
+
readonly type: "int24[]";
|
|
100
|
+
readonly internalType: "int24[]";
|
|
101
|
+
}, {
|
|
102
|
+
readonly name: "positionBps";
|
|
103
|
+
readonly type: "uint16[]";
|
|
104
|
+
readonly internalType: "uint16[]";
|
|
105
|
+
}, {
|
|
106
|
+
readonly name: "lockerData";
|
|
107
|
+
readonly type: "bytes";
|
|
108
|
+
readonly internalType: "bytes";
|
|
109
|
+
}];
|
|
110
|
+
}, {
|
|
111
|
+
readonly name: "poolConfig";
|
|
112
|
+
readonly type: "tuple";
|
|
113
|
+
readonly internalType: "struct IClanker.PoolConfig";
|
|
114
|
+
readonly components: readonly [{
|
|
115
|
+
readonly name: "hook";
|
|
116
|
+
readonly type: "address";
|
|
117
|
+
readonly internalType: "address";
|
|
118
|
+
}, {
|
|
119
|
+
readonly name: "pairedToken";
|
|
120
|
+
readonly type: "address";
|
|
121
|
+
readonly internalType: "address";
|
|
122
|
+
}, {
|
|
123
|
+
readonly name: "tickIfToken0IsClanker";
|
|
124
|
+
readonly type: "int24";
|
|
125
|
+
readonly internalType: "int24";
|
|
126
|
+
}, {
|
|
127
|
+
readonly name: "tickSpacing";
|
|
128
|
+
readonly type: "int24";
|
|
129
|
+
readonly internalType: "int24";
|
|
130
|
+
}, {
|
|
131
|
+
readonly name: "poolData";
|
|
132
|
+
readonly type: "bytes";
|
|
133
|
+
readonly internalType: "bytes";
|
|
134
|
+
}];
|
|
135
|
+
}, {
|
|
136
|
+
readonly name: "poolKey";
|
|
137
|
+
readonly type: "tuple";
|
|
138
|
+
readonly internalType: "struct PoolKey";
|
|
139
|
+
readonly components: readonly [{
|
|
140
|
+
readonly name: "currency0";
|
|
141
|
+
readonly type: "address";
|
|
142
|
+
readonly internalType: "Currency";
|
|
143
|
+
}, {
|
|
144
|
+
readonly name: "currency1";
|
|
145
|
+
readonly type: "address";
|
|
146
|
+
readonly internalType: "Currency";
|
|
147
|
+
}, {
|
|
148
|
+
readonly name: "fee";
|
|
149
|
+
readonly type: "uint24";
|
|
150
|
+
readonly internalType: "uint24";
|
|
151
|
+
}, {
|
|
152
|
+
readonly name: "tickSpacing";
|
|
153
|
+
readonly type: "int24";
|
|
154
|
+
readonly internalType: "int24";
|
|
155
|
+
}, {
|
|
156
|
+
readonly name: "hooks";
|
|
157
|
+
readonly type: "address";
|
|
158
|
+
readonly internalType: "contract IHooks";
|
|
159
|
+
}];
|
|
160
|
+
}, {
|
|
161
|
+
readonly name: "poolSupply";
|
|
162
|
+
readonly type: "uint256";
|
|
163
|
+
readonly internalType: "uint256";
|
|
164
|
+
}, {
|
|
165
|
+
readonly name: "token";
|
|
166
|
+
readonly type: "address";
|
|
167
|
+
readonly internalType: "address";
|
|
168
|
+
}];
|
|
169
|
+
readonly outputs: readonly [{
|
|
170
|
+
readonly name: "tokenId";
|
|
171
|
+
readonly type: "uint256";
|
|
172
|
+
readonly internalType: "uint256";
|
|
173
|
+
}];
|
|
174
|
+
readonly stateMutability: "nonpayable";
|
|
175
|
+
}, {
|
|
176
|
+
readonly type: "function";
|
|
177
|
+
readonly name: "supportsInterface";
|
|
178
|
+
readonly inputs: readonly [{
|
|
179
|
+
readonly name: "interfaceId";
|
|
180
|
+
readonly type: "bytes4";
|
|
181
|
+
readonly internalType: "bytes4";
|
|
182
|
+
}];
|
|
183
|
+
readonly outputs: readonly [{
|
|
184
|
+
readonly name: "";
|
|
185
|
+
readonly type: "bool";
|
|
186
|
+
readonly internalType: "bool";
|
|
187
|
+
}];
|
|
188
|
+
readonly stateMutability: "view";
|
|
189
|
+
}, {
|
|
190
|
+
readonly type: "function";
|
|
191
|
+
readonly name: "tokenRewards";
|
|
192
|
+
readonly inputs: readonly [{
|
|
193
|
+
readonly name: "token";
|
|
194
|
+
readonly type: "address";
|
|
195
|
+
readonly internalType: "address";
|
|
196
|
+
}];
|
|
197
|
+
readonly outputs: readonly [{
|
|
198
|
+
readonly name: "";
|
|
199
|
+
readonly type: "tuple";
|
|
200
|
+
readonly internalType: "struct IClankerLpLocker.TokenRewardInfo";
|
|
201
|
+
readonly components: readonly [{
|
|
202
|
+
readonly name: "token";
|
|
203
|
+
readonly type: "address";
|
|
204
|
+
readonly internalType: "address";
|
|
205
|
+
}, {
|
|
206
|
+
readonly name: "poolKey";
|
|
207
|
+
readonly type: "tuple";
|
|
208
|
+
readonly internalType: "struct PoolKey";
|
|
209
|
+
readonly components: readonly [{
|
|
210
|
+
readonly name: "currency0";
|
|
211
|
+
readonly type: "address";
|
|
212
|
+
readonly internalType: "Currency";
|
|
213
|
+
}, {
|
|
214
|
+
readonly name: "currency1";
|
|
215
|
+
readonly type: "address";
|
|
216
|
+
readonly internalType: "Currency";
|
|
217
|
+
}, {
|
|
218
|
+
readonly name: "fee";
|
|
219
|
+
readonly type: "uint24";
|
|
220
|
+
readonly internalType: "uint24";
|
|
221
|
+
}, {
|
|
222
|
+
readonly name: "tickSpacing";
|
|
223
|
+
readonly type: "int24";
|
|
224
|
+
readonly internalType: "int24";
|
|
225
|
+
}, {
|
|
226
|
+
readonly name: "hooks";
|
|
227
|
+
readonly type: "address";
|
|
228
|
+
readonly internalType: "contract IHooks";
|
|
229
|
+
}];
|
|
230
|
+
}, {
|
|
231
|
+
readonly name: "positionId";
|
|
232
|
+
readonly type: "uint256";
|
|
233
|
+
readonly internalType: "uint256";
|
|
234
|
+
}, {
|
|
235
|
+
readonly name: "numPositions";
|
|
236
|
+
readonly type: "uint256";
|
|
237
|
+
readonly internalType: "uint256";
|
|
238
|
+
}, {
|
|
239
|
+
readonly name: "rewardBps";
|
|
240
|
+
readonly type: "uint16[]";
|
|
241
|
+
readonly internalType: "uint16[]";
|
|
242
|
+
}, {
|
|
243
|
+
readonly name: "rewardAdmins";
|
|
244
|
+
readonly type: "address[]";
|
|
245
|
+
readonly internalType: "address[]";
|
|
246
|
+
}, {
|
|
247
|
+
readonly name: "rewardRecipients";
|
|
248
|
+
readonly type: "address[]";
|
|
249
|
+
readonly internalType: "address[]";
|
|
250
|
+
}];
|
|
251
|
+
}];
|
|
252
|
+
readonly stateMutability: "view";
|
|
253
|
+
}, {
|
|
254
|
+
readonly type: "function";
|
|
255
|
+
readonly name: "updateRewardAdmin";
|
|
256
|
+
readonly inputs: readonly [{
|
|
257
|
+
readonly name: "token";
|
|
258
|
+
readonly type: "address";
|
|
259
|
+
readonly internalType: "address";
|
|
260
|
+
}, {
|
|
261
|
+
readonly name: "rewardIndex";
|
|
262
|
+
readonly type: "uint256";
|
|
263
|
+
readonly internalType: "uint256";
|
|
264
|
+
}, {
|
|
265
|
+
readonly name: "newAdmin";
|
|
266
|
+
readonly type: "address";
|
|
267
|
+
readonly internalType: "address";
|
|
268
|
+
}];
|
|
269
|
+
readonly outputs: readonly [];
|
|
270
|
+
readonly stateMutability: "nonpayable";
|
|
271
|
+
}, {
|
|
272
|
+
readonly type: "function";
|
|
273
|
+
readonly name: "updateRewardRecipient";
|
|
274
|
+
readonly inputs: readonly [{
|
|
275
|
+
readonly name: "token";
|
|
276
|
+
readonly type: "address";
|
|
277
|
+
readonly internalType: "address";
|
|
278
|
+
}, {
|
|
279
|
+
readonly name: "rewardIndex";
|
|
280
|
+
readonly type: "uint256";
|
|
281
|
+
readonly internalType: "uint256";
|
|
282
|
+
}, {
|
|
283
|
+
readonly name: "newRecipient";
|
|
284
|
+
readonly type: "address";
|
|
285
|
+
readonly internalType: "address";
|
|
286
|
+
}];
|
|
287
|
+
readonly outputs: readonly [];
|
|
288
|
+
readonly stateMutability: "nonpayable";
|
|
289
|
+
}, {
|
|
290
|
+
readonly type: "event";
|
|
291
|
+
readonly name: "ClaimedRewards";
|
|
292
|
+
readonly inputs: readonly [{
|
|
293
|
+
readonly name: "token";
|
|
294
|
+
readonly type: "address";
|
|
295
|
+
readonly indexed: true;
|
|
296
|
+
readonly internalType: "address";
|
|
297
|
+
}, {
|
|
298
|
+
readonly name: "amount0";
|
|
299
|
+
readonly type: "uint256";
|
|
300
|
+
readonly indexed: false;
|
|
301
|
+
readonly internalType: "uint256";
|
|
302
|
+
}, {
|
|
303
|
+
readonly name: "amount1";
|
|
304
|
+
readonly type: "uint256";
|
|
305
|
+
readonly indexed: false;
|
|
306
|
+
readonly internalType: "uint256";
|
|
307
|
+
}, {
|
|
308
|
+
readonly name: "rewards0";
|
|
309
|
+
readonly type: "uint256[]";
|
|
310
|
+
readonly indexed: false;
|
|
311
|
+
readonly internalType: "uint256[]";
|
|
312
|
+
}, {
|
|
313
|
+
readonly name: "rewards1";
|
|
314
|
+
readonly type: "uint256[]";
|
|
315
|
+
readonly indexed: false;
|
|
316
|
+
readonly internalType: "uint256[]";
|
|
317
|
+
}];
|
|
318
|
+
readonly anonymous: false;
|
|
319
|
+
}, {
|
|
320
|
+
readonly type: "event";
|
|
321
|
+
readonly name: "Received";
|
|
322
|
+
readonly inputs: readonly [{
|
|
323
|
+
readonly name: "from";
|
|
324
|
+
readonly type: "address";
|
|
325
|
+
readonly indexed: true;
|
|
326
|
+
readonly internalType: "address";
|
|
327
|
+
}, {
|
|
328
|
+
readonly name: "positionId";
|
|
329
|
+
readonly type: "uint256";
|
|
330
|
+
readonly indexed: false;
|
|
331
|
+
readonly internalType: "uint256";
|
|
332
|
+
}];
|
|
333
|
+
readonly anonymous: false;
|
|
334
|
+
}, {
|
|
335
|
+
readonly type: "event";
|
|
336
|
+
readonly name: "RewardAdminUpdated";
|
|
337
|
+
readonly inputs: readonly [{
|
|
338
|
+
readonly name: "token";
|
|
339
|
+
readonly type: "address";
|
|
340
|
+
readonly indexed: true;
|
|
341
|
+
readonly internalType: "address";
|
|
342
|
+
}, {
|
|
343
|
+
readonly name: "rewardIndex";
|
|
344
|
+
readonly type: "uint256";
|
|
345
|
+
readonly indexed: true;
|
|
346
|
+
readonly internalType: "uint256";
|
|
347
|
+
}, {
|
|
348
|
+
readonly name: "oldAdmin";
|
|
349
|
+
readonly type: "address";
|
|
350
|
+
readonly indexed: false;
|
|
351
|
+
readonly internalType: "address";
|
|
352
|
+
}, {
|
|
353
|
+
readonly name: "newAdmin";
|
|
354
|
+
readonly type: "address";
|
|
355
|
+
readonly indexed: false;
|
|
356
|
+
readonly internalType: "address";
|
|
357
|
+
}];
|
|
358
|
+
readonly anonymous: false;
|
|
359
|
+
}, {
|
|
360
|
+
readonly type: "event";
|
|
361
|
+
readonly name: "RewardRecipientUpdated";
|
|
362
|
+
readonly inputs: readonly [{
|
|
363
|
+
readonly name: "token";
|
|
364
|
+
readonly type: "address";
|
|
365
|
+
readonly indexed: true;
|
|
366
|
+
readonly internalType: "address";
|
|
367
|
+
}, {
|
|
368
|
+
readonly name: "rewardIndex";
|
|
369
|
+
readonly type: "uint256";
|
|
370
|
+
readonly indexed: true;
|
|
371
|
+
readonly internalType: "uint256";
|
|
372
|
+
}, {
|
|
373
|
+
readonly name: "oldRecipient";
|
|
374
|
+
readonly type: "address";
|
|
375
|
+
readonly indexed: false;
|
|
376
|
+
readonly internalType: "address";
|
|
377
|
+
}, {
|
|
378
|
+
readonly name: "newRecipient";
|
|
379
|
+
readonly type: "address";
|
|
380
|
+
readonly indexed: false;
|
|
381
|
+
readonly internalType: "address";
|
|
382
|
+
}];
|
|
383
|
+
readonly anonymous: false;
|
|
384
|
+
}, {
|
|
385
|
+
readonly type: "event";
|
|
386
|
+
readonly name: "TokenRewardAdded";
|
|
387
|
+
readonly inputs: readonly [{
|
|
388
|
+
readonly name: "token";
|
|
389
|
+
readonly type: "address";
|
|
390
|
+
readonly indexed: false;
|
|
391
|
+
readonly internalType: "address";
|
|
392
|
+
}, {
|
|
393
|
+
readonly name: "poolKey";
|
|
394
|
+
readonly type: "tuple";
|
|
395
|
+
readonly indexed: false;
|
|
396
|
+
readonly internalType: "struct PoolKey";
|
|
397
|
+
readonly components: readonly [{
|
|
398
|
+
readonly name: "currency0";
|
|
399
|
+
readonly type: "address";
|
|
400
|
+
readonly internalType: "Currency";
|
|
401
|
+
}, {
|
|
402
|
+
readonly name: "currency1";
|
|
403
|
+
readonly type: "address";
|
|
404
|
+
readonly internalType: "Currency";
|
|
405
|
+
}, {
|
|
406
|
+
readonly name: "fee";
|
|
407
|
+
readonly type: "uint24";
|
|
408
|
+
readonly internalType: "uint24";
|
|
409
|
+
}, {
|
|
410
|
+
readonly name: "tickSpacing";
|
|
411
|
+
readonly type: "int24";
|
|
412
|
+
readonly internalType: "int24";
|
|
413
|
+
}, {
|
|
414
|
+
readonly name: "hooks";
|
|
415
|
+
readonly type: "address";
|
|
416
|
+
readonly internalType: "contract IHooks";
|
|
417
|
+
}];
|
|
418
|
+
}, {
|
|
419
|
+
readonly name: "poolSupply";
|
|
420
|
+
readonly type: "uint256";
|
|
421
|
+
readonly indexed: false;
|
|
422
|
+
readonly internalType: "uint256";
|
|
423
|
+
}, {
|
|
424
|
+
readonly name: "positionId";
|
|
425
|
+
readonly type: "uint256";
|
|
426
|
+
readonly indexed: false;
|
|
427
|
+
readonly internalType: "uint256";
|
|
428
|
+
}, {
|
|
429
|
+
readonly name: "numPositions";
|
|
430
|
+
readonly type: "uint256";
|
|
431
|
+
readonly indexed: false;
|
|
432
|
+
readonly internalType: "uint256";
|
|
433
|
+
}, {
|
|
434
|
+
readonly name: "rewardBps";
|
|
435
|
+
readonly type: "uint16[]";
|
|
436
|
+
readonly indexed: false;
|
|
437
|
+
readonly internalType: "uint16[]";
|
|
438
|
+
}, {
|
|
439
|
+
readonly name: "rewardAdmins";
|
|
440
|
+
readonly type: "address[]";
|
|
441
|
+
readonly indexed: false;
|
|
442
|
+
readonly internalType: "address[]";
|
|
443
|
+
}, {
|
|
444
|
+
readonly name: "rewardRecipients";
|
|
445
|
+
readonly type: "address[]";
|
|
446
|
+
readonly indexed: false;
|
|
447
|
+
readonly internalType: "address[]";
|
|
448
|
+
}, {
|
|
449
|
+
readonly name: "tickLower";
|
|
450
|
+
readonly type: "int24[]";
|
|
451
|
+
readonly indexed: false;
|
|
452
|
+
readonly internalType: "int24[]";
|
|
453
|
+
}, {
|
|
454
|
+
readonly name: "tickUpper";
|
|
455
|
+
readonly type: "int24[]";
|
|
456
|
+
readonly indexed: false;
|
|
457
|
+
readonly internalType: "int24[]";
|
|
458
|
+
}, {
|
|
459
|
+
readonly name: "positionBps";
|
|
460
|
+
readonly type: "uint16[]";
|
|
461
|
+
readonly indexed: false;
|
|
462
|
+
readonly internalType: "uint16[]";
|
|
463
|
+
}];
|
|
464
|
+
readonly anonymous: false;
|
|
465
|
+
}, {
|
|
466
|
+
readonly type: "error";
|
|
467
|
+
readonly name: "InvalidPositionBps";
|
|
468
|
+
readonly inputs: readonly [];
|
|
469
|
+
}, {
|
|
470
|
+
readonly type: "error";
|
|
471
|
+
readonly name: "InvalidRewardBps";
|
|
472
|
+
readonly inputs: readonly [];
|
|
473
|
+
}, {
|
|
474
|
+
readonly type: "error";
|
|
475
|
+
readonly name: "MismatchedPositionInfos";
|
|
476
|
+
readonly inputs: readonly [];
|
|
477
|
+
}, {
|
|
478
|
+
readonly type: "error";
|
|
479
|
+
readonly name: "MismatchedRewardArrays";
|
|
480
|
+
readonly inputs: readonly [];
|
|
481
|
+
}, {
|
|
482
|
+
readonly type: "error";
|
|
483
|
+
readonly name: "NoPositions";
|
|
484
|
+
readonly inputs: readonly [];
|
|
485
|
+
}, {
|
|
486
|
+
readonly type: "error";
|
|
487
|
+
readonly name: "NoRewardRecipients";
|
|
488
|
+
readonly inputs: readonly [];
|
|
489
|
+
}, {
|
|
490
|
+
readonly type: "error";
|
|
491
|
+
readonly name: "TickRangeLowerThanStartingTick";
|
|
492
|
+
readonly inputs: readonly [];
|
|
493
|
+
}, {
|
|
494
|
+
readonly type: "error";
|
|
495
|
+
readonly name: "TicksBackwards";
|
|
496
|
+
readonly inputs: readonly [];
|
|
497
|
+
}, {
|
|
498
|
+
readonly type: "error";
|
|
499
|
+
readonly name: "TicksNotMultipleOfTickSpacing";
|
|
500
|
+
readonly inputs: readonly [];
|
|
501
|
+
}, {
|
|
502
|
+
readonly type: "error";
|
|
503
|
+
readonly name: "TicksOutOfTickBounds";
|
|
504
|
+
readonly inputs: readonly [];
|
|
505
|
+
}, {
|
|
506
|
+
readonly type: "error";
|
|
507
|
+
readonly name: "TokenAlreadyHasRewards";
|
|
508
|
+
readonly inputs: readonly [];
|
|
509
|
+
}, {
|
|
510
|
+
readonly type: "error";
|
|
511
|
+
readonly name: "TooManyPositions";
|
|
512
|
+
readonly inputs: readonly [];
|
|
513
|
+
}, {
|
|
514
|
+
readonly type: "error";
|
|
515
|
+
readonly name: "TooManyRewardParticipants";
|
|
516
|
+
readonly inputs: readonly [];
|
|
517
|
+
}, {
|
|
518
|
+
readonly type: "error";
|
|
519
|
+
readonly name: "Unauthorized";
|
|
520
|
+
readonly inputs: readonly [];
|
|
521
|
+
}, {
|
|
522
|
+
readonly type: "error";
|
|
523
|
+
readonly name: "ZeroRewardAddress";
|
|
524
|
+
readonly inputs: readonly [];
|
|
525
|
+
}, {
|
|
526
|
+
readonly type: "error";
|
|
527
|
+
readonly name: "ZeroRewardAmount";
|
|
528
|
+
readonly inputs: readonly [];
|
|
529
|
+
}];
|
|
530
|
+
functionName: "tokenRewards";
|
|
531
|
+
args: `0x${string}`[];
|
|
532
|
+
}[];
|
|
20
533
|
/**
|
|
534
|
+
* @deprecated Use tokenRewardsRead() instead
|
|
21
535
|
* Get tokenRewards from LP locker (shared utility)
|
|
22
536
|
* Returns pool info and fee receiver data
|
|
23
537
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fee-receivers.d.ts","sourceRoot":"","sources":["../../src/fee-receivers.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAE/D,MAAM,MAAM,kBAAkB,GAAG;IAC/B,YAAY,EAAE,eAAe,CAAA;IAC7B,YAAY,EAAE,KAAK,MAAM,EAAE,CAAA;IAC3B,WAAW,CAAC,EAAE,KAAK,MAAM,EAAE,CAAA;CAC5B,CAAA;AAED,MAAM,MAAM,gBAAgB,GAAG;IAC7B,aAAa,EAAE,OAAO,CAAA;IACtB,KAAK,EAAE,KAAK,MAAM,EAAE,CAAA;IACpB,SAAS,EAAE,KAAK,MAAM,EAAE,CAAA;IACxB,UAAU,EAAE,MAAM,CAAA;CACnB,CAAA;AAED,MAAM,MAAM,uBAAuB,GAAG;IACpC,YAAY,EAAE,eAAe,CAAA;IAC7B,YAAY,EAAE,KAAK,MAAM,EAAE,CAAA;IAC3B,OAAO,EAAE,MAAM,CAAA;IACf,WAAW,EAAE,MAAM,GAAG,MAAM,CAAA;IAC5B,YAAY,EAAE,KAAK,MAAM,EAAE,CAAA;CAC5B,CAAA;AAED;;;GAGG;AACH,wBAAsB,eAAe,CAAC,YAAY,EAAE,eAAe,EAAE,YAAY,EAAE,KAAK,MAAM,EAAE;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"fee-receivers.d.ts","sourceRoot":"","sources":["../../src/fee-receivers.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAE/D,MAAM,MAAM,kBAAkB,GAAG;IAC/B,YAAY,EAAE,eAAe,CAAA;IAC7B,YAAY,EAAE,KAAK,MAAM,EAAE,CAAA;IAC3B,WAAW,CAAC,EAAE,KAAK,MAAM,EAAE,CAAA;CAC5B,CAAA;AAED,MAAM,MAAM,gBAAgB,GAAG;IAC7B,aAAa,EAA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAcnF;AAED;;;;GAIG;AACH,wBAAsB,eAAe,CAAC,YAAY,EAAE,eAAe,EAAE,YAAY,EAAE,KAAK,MAAM,EAAE;;;;;;;;;;;;;;GAE/F;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAC/B,kBAAkB,EAAE;IAClB,YAAY,CAAC,EAAE,SAAS,KAAK,MAAM,EAAE,EAAE,CAAA;IACvC,gBAAgB,CAAC,EAAE,SAAS,KAAK,MAAM,EAAE,EAAE,CAAA;IAC3C,SAAS,CAAC,EAAE,SAAS,MAAM,EAAE,CAAA;CAC9B,EACD,WAAW,CAAC,EAAE,KAAK,MAAM,EAAE,GAC1B,gBAAgB,EAAE,CAWpB;AAED;;GAEG;AACH,wBAAsB,YAAY,CAAC,EACjC,YAAY,EACZ,YAAY,EACZ,WAAW,GACZ,EAAE,kBAAkB,GAAG,OAAO,CAAC,gBAAgB,EAAE,GAAG,SAAS,CAAC,CAO9D;AAED;;GAEG;AACH,wBAAsB,iBAAiB,CAAC,EACtC,YAAY,EACZ,YAAY,EACZ,OAAO,EACP,WAAW,EACX,YAAY,GACb,EAAE,uBAAuB,GAAG,OAAO,CAAC,KAAK,MAAM,EAAE,CAAC,CAqBlD"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { TransactionReceipt } from 'viem';
|
|
2
2
|
import type { Project } from '.';
|
|
3
|
+
import type { AirdropStatus } from './treasury';
|
|
3
4
|
import type { BalanceResult, PopPublicClient, PopWalletClient } from './types';
|
|
4
5
|
export type GovernanceConfig = {
|
|
5
6
|
wallet: PopWalletClient;
|
|
@@ -98,8 +99,8 @@ export declare class Governance {
|
|
|
98
99
|
}>;
|
|
99
100
|
/**
|
|
100
101
|
* Claim airdrop for treasury
|
|
101
|
-
*
|
|
102
|
+
* Requires airdrop status to be fetched beforehand
|
|
102
103
|
*/
|
|
103
|
-
claimAirdrop(): Promise<TransactionReceipt>;
|
|
104
|
+
claimAirdrop(airdropStatus: AirdropStatus): Promise<TransactionReceipt>;
|
|
104
105
|
}
|
|
105
106
|
//# sourceMappingURL=governance.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"governance.d.ts","sourceRoot":"","sources":["../../src/governance.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,MAAM,CAAA;AAG9C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,GAAG,CAAA;AAGhC,OAAO,KAAK,EAAE,aAAa,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAE9E,MAAM,MAAM,gBAAgB,GAAG;IAC7B,MAAM,EAAE,eAAe,CAAA;IACvB,YAAY,EAAE,eAAe,CAAA;IAC7B,OAAO,EAAE,OAAO,CAAA;CACjB,CAAA;AAED,MAAM,MAAM,eAAe,GAAG;IAC5B,EAAE,EAAE,MAAM,CAAA;IACV,YAAY,EAAE,MAAM,CAAA;IACpB,QAAQ,EAAE,KAAK,MAAM,EAAE,CAAA;IACvB,MAAM,EAAE,MAAM,CAAA;IACd,SAAS,EAAE,KAAK,MAAM,EAAE,CAAA;IACxB,WAAW,EAAE,MAAM,CAAA;IACnB,SAAS,EAAE,MAAM,CAAA;IACjB,cAAc,EAAE,MAAM,CAAA;IACtB,YAAY,EAAE,MAAM,CAAA;IACpB,QAAQ,EAAE,MAAM,CAAA;IAChB,OAAO,EAAE,MAAM,CAAA;IACf,iBAAiB,EAAE,MAAM,CAAA;IACzB,QAAQ,EAAE,OAAO,CAAA;IACjB,OAAO,EAAE,MAAM,CAAA;CAChB,CAAA;AAED,MAAM,MAAM,wBAAwB,GAAG;IACrC,EAAE,EAAE,MAAM,CAAA;IACV,YAAY,EAAE,MAAM,CAAA;IACpB,QAAQ,EAAE,KAAK,MAAM,EAAE,CAAA;IACvB,MAAM,EAAE,aAAa,CAAA;IACrB,SAAS,EAAE,KAAK,M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/types/project.d.ts
CHANGED
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
import type { FeeReceiverAdmin } from './fee-receivers';
|
|
2
|
-
import type { AirdropStatus } from './treasury';
|
|
3
2
|
import type { BalanceResult, PoolKey, PopPublicClient, PricingResult } from './types';
|
|
4
|
-
export type
|
|
3
|
+
export type StaticProjectParams = {
|
|
5
4
|
publicClient: PopPublicClient;
|
|
6
5
|
clankerToken: `0x${string}`;
|
|
7
|
-
oraclePublicClient?: PopPublicClient;
|
|
8
6
|
userAddress?: `0x${string}`;
|
|
9
7
|
};
|
|
8
|
+
export type ProjectParams = {
|
|
9
|
+
publicClient: PopPublicClient;
|
|
10
|
+
staticProject: StaticProject;
|
|
11
|
+
oraclePublicClient?: PopPublicClient;
|
|
12
|
+
};
|
|
10
13
|
export type ProjectMetadata = {
|
|
11
14
|
description: string;
|
|
12
15
|
socialMediaUrls: [];
|
|
@@ -48,6 +51,12 @@ export type StakingStats = {
|
|
|
48
51
|
token: BalanceResult;
|
|
49
52
|
weth: BalanceResult | null;
|
|
50
53
|
};
|
|
54
|
+
streamParams: {
|
|
55
|
+
windowSeconds: number;
|
|
56
|
+
streamStart: bigint;
|
|
57
|
+
streamEnd: bigint;
|
|
58
|
+
isActive: boolean;
|
|
59
|
+
};
|
|
51
60
|
};
|
|
52
61
|
export type GovernanceStats = {
|
|
53
62
|
currentCycleId: bigint;
|
|
@@ -72,6 +81,9 @@ export type Project = {
|
|
|
72
81
|
totalSupply: bigint;
|
|
73
82
|
metadata: ProjectMetadata | null;
|
|
74
83
|
imageUrl?: string;
|
|
84
|
+
originalAdmin: `0x${string}`;
|
|
85
|
+
admin: `0x${string}`;
|
|
86
|
+
context: string;
|
|
75
87
|
};
|
|
76
88
|
pool?: PoolInfo;
|
|
77
89
|
treasuryStats?: TreasuryStats;
|
|
@@ -79,23 +91,30 @@ export type Project = {
|
|
|
79
91
|
governanceStats?: GovernanceStats;
|
|
80
92
|
feeReceivers?: FeeReceiverAdmin[];
|
|
81
93
|
pricing?: PricingResult;
|
|
82
|
-
airdrop?: AirdropStatus | null;
|
|
83
94
|
};
|
|
95
|
+
export type StaticProject = Pick<Project, 'treasury' | 'governor' | 'staking' | 'stakedToken' | 'forwarder' | 'factory' | 'token' | 'pool' | 'feeReceivers'>;
|
|
84
96
|
export type ProjectsParams = {
|
|
85
97
|
publicClient: PopPublicClient;
|
|
86
98
|
offset?: number;
|
|
87
99
|
limit?: number;
|
|
88
100
|
};
|
|
89
101
|
export type ProjectsResult = {
|
|
90
|
-
projects: Omit<Project, 'forwarder' | 'pool' | 'pricing' | 'stakingStats' | 'governanceStats' | 'feeReceivers'
|
|
102
|
+
projects: Omit<Project, 'forwarder' | 'pool' | 'pricing' | 'stakingStats' | 'governanceStats' | 'feeReceivers'>[];
|
|
91
103
|
total: number;
|
|
92
104
|
};
|
|
93
105
|
/**
|
|
94
106
|
* Get multiple projects data using factory's paginated getProjects()
|
|
95
107
|
*/
|
|
96
108
|
export declare function getProjects({ publicClient, offset, limit, }: ProjectsParams): Promise<ProjectsResult>;
|
|
109
|
+
/**
|
|
110
|
+
* Get static project data that doesn't change frequently
|
|
111
|
+
* This includes contract addresses, token metadata, pool info, and fee receivers
|
|
112
|
+
*/
|
|
113
|
+
export declare function getStaticProject({ publicClient, clankerToken, userAddress, }: StaticProjectParams): Promise<StaticProject | null>;
|
|
97
114
|
/**
|
|
98
115
|
* Get project data for a clanker token
|
|
116
|
+
* Requires staticProject data to avoid refetching static information
|
|
117
|
+
* Fetches dynamic data including treasury, governance, staking stats, and pricing
|
|
99
118
|
*/
|
|
100
|
-
export declare function getProject({ publicClient,
|
|
119
|
+
export declare function getProject({ publicClient, staticProject, oraclePublicClient, }: ProjectParams): Promise<Project | null>;
|
|
101
120
|
//# sourceMappingURL=project.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"project.d.ts","sourceRoot":"","sources":["../../src/project.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,gB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,YAAY,EACZ,aAAa,EACb,kBAAkB,GACnB,EAAE,aAAa,GAAG,OAAO,CAAC,OAAO,GAAG,IAAI,CAAC,CA4FzC"}
|
|
@@ -36,8 +36,8 @@
|
|
|
36
36
|
* poolKey,
|
|
37
37
|
* zeroForOne: true,
|
|
38
38
|
* amountIn: parseEther('1'),
|
|
39
|
-
*
|
|
40
|
-
*
|
|
39
|
+
* currency0Decimals: 18,
|
|
40
|
+
* currency1Decimals: 18,
|
|
41
41
|
* })
|
|
42
42
|
* console.log(`Output: ${formatEther(v4Quote.amountOut)}`)
|
|
43
43
|
* console.log(`Price Impact: ${v4Quote.priceImpactBps}%`)
|