@gitmyabi/merkleredeem 1.0.0 → 1.0.1
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 +3 -3
- package/contracts/MerkleRedeem_json.d.ts +106 -251
- package/contracts/MerkleRedeem_json.js +126 -267
- package/contracts/MerkleRedeem_json.ts +129 -317
- package/package.json +3 -3
|
@@ -6,9 +6,9 @@ import { getContract } from 'viem';
|
|
|
6
6
|
* MerkleRedeem.Claim struct type
|
|
7
7
|
*/
|
|
8
8
|
export type MerkleRedeem_Claim = {
|
|
9
|
-
|
|
9
|
+
week: bigint;
|
|
10
10
|
balance: bigint;
|
|
11
|
-
|
|
11
|
+
merkleProof: `0x${string}`[];
|
|
12
12
|
};
|
|
13
13
|
/**
|
|
14
14
|
* MerkleRedeem_json ABI
|
|
@@ -20,17 +20,7 @@ export const MerkleRedeem_jsonAbi = [
|
|
|
20
20
|
"inputs": [
|
|
21
21
|
{
|
|
22
22
|
"internalType": "address",
|
|
23
|
-
"name": "
|
|
24
|
-
"type": "address"
|
|
25
|
-
},
|
|
26
|
-
{
|
|
27
|
-
"internalType": "contract IERC20",
|
|
28
|
-
"name": "_rewardsToken",
|
|
29
|
-
"type": "address"
|
|
30
|
-
},
|
|
31
|
-
{
|
|
32
|
-
"internalType": "address",
|
|
33
|
-
"name": "_emergencyRecipient",
|
|
23
|
+
"name": "_token",
|
|
34
24
|
"type": "address"
|
|
35
25
|
}
|
|
36
26
|
],
|
|
@@ -41,15 +31,15 @@ export const MerkleRedeem_jsonAbi = [
|
|
|
41
31
|
"anonymous": false,
|
|
42
32
|
"inputs": [
|
|
43
33
|
{
|
|
44
|
-
"indexed":
|
|
34
|
+
"indexed": false,
|
|
45
35
|
"internalType": "address",
|
|
46
|
-
"name": "
|
|
36
|
+
"name": "_claimant",
|
|
47
37
|
"type": "address"
|
|
48
38
|
},
|
|
49
39
|
{
|
|
50
40
|
"indexed": false,
|
|
51
41
|
"internalType": "uint256",
|
|
52
|
-
"name": "
|
|
42
|
+
"name": "_balance",
|
|
53
43
|
"type": "uint256"
|
|
54
44
|
}
|
|
55
45
|
],
|
|
@@ -62,7 +52,7 @@ export const MerkleRedeem_jsonAbi = [
|
|
|
62
52
|
{
|
|
63
53
|
"indexed": true,
|
|
64
54
|
"internalType": "address",
|
|
65
|
-
"name": "
|
|
55
|
+
"name": "previousOwner",
|
|
66
56
|
"type": "address"
|
|
67
57
|
},
|
|
68
58
|
{
|
|
@@ -72,53 +62,62 @@ export const MerkleRedeem_jsonAbi = [
|
|
|
72
62
|
"type": "address"
|
|
73
63
|
}
|
|
74
64
|
],
|
|
75
|
-
"name": "
|
|
65
|
+
"name": "OwnershipTransferred",
|
|
76
66
|
"type": "event"
|
|
77
67
|
},
|
|
78
68
|
{
|
|
79
|
-
"anonymous": false,
|
|
80
69
|
"inputs": [
|
|
81
70
|
{
|
|
82
|
-
"indexed": true,
|
|
83
71
|
"internalType": "address",
|
|
84
|
-
"name": "
|
|
72
|
+
"name": "_liquidityProvider",
|
|
85
73
|
"type": "address"
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
"internalType": "uint256",
|
|
77
|
+
"name": "_begin",
|
|
78
|
+
"type": "uint256"
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
"internalType": "uint256",
|
|
82
|
+
"name": "_end",
|
|
83
|
+
"type": "uint256"
|
|
86
84
|
}
|
|
87
85
|
],
|
|
88
|
-
"name": "
|
|
89
|
-
"
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
86
|
+
"name": "claimStatus",
|
|
87
|
+
"outputs": [
|
|
88
|
+
{
|
|
89
|
+
"internalType": "bool[]",
|
|
90
|
+
"name": "",
|
|
91
|
+
"type": "bool[]"
|
|
92
|
+
}
|
|
93
|
+
],
|
|
94
|
+
"stateMutability": "view",
|
|
96
95
|
"type": "function"
|
|
97
96
|
},
|
|
98
97
|
{
|
|
99
98
|
"inputs": [
|
|
100
99
|
{
|
|
101
100
|
"internalType": "address",
|
|
102
|
-
"name": "
|
|
101
|
+
"name": "_liquidityProvider",
|
|
103
102
|
"type": "address"
|
|
104
103
|
},
|
|
105
104
|
{
|
|
106
105
|
"internalType": "uint256",
|
|
107
|
-
"name": "
|
|
106
|
+
"name": "_week",
|
|
108
107
|
"type": "uint256"
|
|
109
108
|
},
|
|
110
109
|
{
|
|
111
110
|
"internalType": "uint256",
|
|
112
|
-
"name": "
|
|
111
|
+
"name": "_claimedBalance",
|
|
113
112
|
"type": "uint256"
|
|
114
113
|
},
|
|
115
114
|
{
|
|
116
115
|
"internalType": "bytes32[]",
|
|
117
|
-
"name": "
|
|
116
|
+
"name": "_merkleProof",
|
|
118
117
|
"type": "bytes32[]"
|
|
119
118
|
}
|
|
120
119
|
],
|
|
121
|
-
"name": "
|
|
120
|
+
"name": "claimWeek",
|
|
122
121
|
"outputs": [],
|
|
123
122
|
"stateMutability": "nonpayable",
|
|
124
123
|
"type": "function"
|
|
@@ -127,14 +126,14 @@ export const MerkleRedeem_jsonAbi = [
|
|
|
127
126
|
"inputs": [
|
|
128
127
|
{
|
|
129
128
|
"internalType": "address",
|
|
130
|
-
"name": "
|
|
129
|
+
"name": "_liquidityProvider",
|
|
131
130
|
"type": "address"
|
|
132
131
|
},
|
|
133
132
|
{
|
|
134
133
|
"components": [
|
|
135
134
|
{
|
|
136
135
|
"internalType": "uint256",
|
|
137
|
-
"name": "
|
|
136
|
+
"name": "week",
|
|
138
137
|
"type": "uint256"
|
|
139
138
|
},
|
|
140
139
|
{
|
|
@@ -144,7 +143,7 @@ export const MerkleRedeem_jsonAbi = [
|
|
|
144
143
|
},
|
|
145
144
|
{
|
|
146
145
|
"internalType": "bytes32[]",
|
|
147
|
-
"name": "
|
|
146
|
+
"name": "merkleProof",
|
|
148
147
|
"type": "bytes32[]"
|
|
149
148
|
}
|
|
150
149
|
],
|
|
@@ -153,40 +152,11 @@ export const MerkleRedeem_jsonAbi = [
|
|
|
153
152
|
"type": "tuple[]"
|
|
154
153
|
}
|
|
155
154
|
],
|
|
156
|
-
"name": "
|
|
155
|
+
"name": "claimWeeks",
|
|
157
156
|
"outputs": [],
|
|
158
157
|
"stateMutability": "nonpayable",
|
|
159
158
|
"type": "function"
|
|
160
159
|
},
|
|
161
|
-
{
|
|
162
|
-
"inputs": [
|
|
163
|
-
{
|
|
164
|
-
"internalType": "address",
|
|
165
|
-
"name": "recipient",
|
|
166
|
-
"type": "address"
|
|
167
|
-
},
|
|
168
|
-
{
|
|
169
|
-
"internalType": "uint256",
|
|
170
|
-
"name": "begin",
|
|
171
|
-
"type": "uint256"
|
|
172
|
-
},
|
|
173
|
-
{
|
|
174
|
-
"internalType": "uint256",
|
|
175
|
-
"name": "end",
|
|
176
|
-
"type": "uint256"
|
|
177
|
-
}
|
|
178
|
-
],
|
|
179
|
-
"name": "claimStatus",
|
|
180
|
-
"outputs": [
|
|
181
|
-
{
|
|
182
|
-
"internalType": "bool[]",
|
|
183
|
-
"name": "",
|
|
184
|
-
"type": "bool[]"
|
|
185
|
-
}
|
|
186
|
-
],
|
|
187
|
-
"stateMutability": "view",
|
|
188
|
-
"type": "function"
|
|
189
|
-
},
|
|
190
160
|
{
|
|
191
161
|
"inputs": [
|
|
192
162
|
{
|
|
@@ -211,42 +181,16 @@ export const MerkleRedeem_jsonAbi = [
|
|
|
211
181
|
"stateMutability": "view",
|
|
212
182
|
"type": "function"
|
|
213
183
|
},
|
|
214
|
-
{
|
|
215
|
-
"inputs": [],
|
|
216
|
-
"name": "emergencyRecipient",
|
|
217
|
-
"outputs": [
|
|
218
|
-
{
|
|
219
|
-
"internalType": "address",
|
|
220
|
-
"name": "",
|
|
221
|
-
"type": "address"
|
|
222
|
-
}
|
|
223
|
-
],
|
|
224
|
-
"stateMutability": "view",
|
|
225
|
-
"type": "function"
|
|
226
|
-
},
|
|
227
|
-
{
|
|
228
|
-
"inputs": [
|
|
229
|
-
{
|
|
230
|
-
"internalType": "contract IERC20",
|
|
231
|
-
"name": "token",
|
|
232
|
-
"type": "address"
|
|
233
|
-
}
|
|
234
|
-
],
|
|
235
|
-
"name": "emergencyWithdraw",
|
|
236
|
-
"outputs": [],
|
|
237
|
-
"stateMutability": "nonpayable",
|
|
238
|
-
"type": "function"
|
|
239
|
-
},
|
|
240
184
|
{
|
|
241
185
|
"inputs": [
|
|
242
186
|
{
|
|
243
187
|
"internalType": "uint256",
|
|
244
|
-
"name": "
|
|
188
|
+
"name": "_begin",
|
|
245
189
|
"type": "uint256"
|
|
246
190
|
},
|
|
247
191
|
{
|
|
248
192
|
"internalType": "uint256",
|
|
249
|
-
"name": "
|
|
193
|
+
"name": "_end",
|
|
250
194
|
"type": "uint256"
|
|
251
195
|
}
|
|
252
196
|
],
|
|
@@ -261,22 +205,9 @@ export const MerkleRedeem_jsonAbi = [
|
|
|
261
205
|
"stateMutability": "view",
|
|
262
206
|
"type": "function"
|
|
263
207
|
},
|
|
264
|
-
{
|
|
265
|
-
"inputs": [
|
|
266
|
-
{
|
|
267
|
-
"internalType": "address",
|
|
268
|
-
"name": "newOwner",
|
|
269
|
-
"type": "address"
|
|
270
|
-
}
|
|
271
|
-
],
|
|
272
|
-
"name": "nominateNewOwner",
|
|
273
|
-
"outputs": [],
|
|
274
|
-
"stateMutability": "nonpayable",
|
|
275
|
-
"type": "function"
|
|
276
|
-
},
|
|
277
208
|
{
|
|
278
209
|
"inputs": [],
|
|
279
|
-
"name": "
|
|
210
|
+
"name": "owner",
|
|
280
211
|
"outputs": [
|
|
281
212
|
{
|
|
282
213
|
"internalType": "address",
|
|
@@ -289,46 +220,37 @@ export const MerkleRedeem_jsonAbi = [
|
|
|
289
220
|
},
|
|
290
221
|
{
|
|
291
222
|
"inputs": [],
|
|
292
|
-
"name": "
|
|
293
|
-
"outputs": [
|
|
294
|
-
|
|
295
|
-
"internalType": "address",
|
|
296
|
-
"name": "",
|
|
297
|
-
"type": "address"
|
|
298
|
-
}
|
|
299
|
-
],
|
|
300
|
-
"stateMutability": "view",
|
|
223
|
+
"name": "renounceOwnership",
|
|
224
|
+
"outputs": [],
|
|
225
|
+
"stateMutability": "nonpayable",
|
|
301
226
|
"type": "function"
|
|
302
227
|
},
|
|
303
228
|
{
|
|
304
229
|
"inputs": [
|
|
305
230
|
{
|
|
306
231
|
"internalType": "uint256",
|
|
307
|
-
"name": "",
|
|
232
|
+
"name": "_week",
|
|
308
233
|
"type": "uint256"
|
|
309
|
-
}
|
|
310
|
-
],
|
|
311
|
-
"name": "periodMerkleRoots",
|
|
312
|
-
"outputs": [
|
|
234
|
+
},
|
|
313
235
|
{
|
|
314
236
|
"internalType": "bytes32",
|
|
315
|
-
"name": "",
|
|
237
|
+
"name": "_merkleRoot",
|
|
316
238
|
"type": "bytes32"
|
|
239
|
+
},
|
|
240
|
+
{
|
|
241
|
+
"internalType": "uint256",
|
|
242
|
+
"name": "_totalAllocation",
|
|
243
|
+
"type": "uint256"
|
|
317
244
|
}
|
|
318
245
|
],
|
|
319
|
-
"
|
|
320
|
-
"type": "function"
|
|
321
|
-
},
|
|
322
|
-
{
|
|
323
|
-
"inputs": [],
|
|
324
|
-
"name": "renounceOwnership",
|
|
246
|
+
"name": "seedAllocations",
|
|
325
247
|
"outputs": [],
|
|
326
248
|
"stateMutability": "nonpayable",
|
|
327
249
|
"type": "function"
|
|
328
250
|
},
|
|
329
251
|
{
|
|
330
252
|
"inputs": [],
|
|
331
|
-
"name": "
|
|
253
|
+
"name": "token",
|
|
332
254
|
"outputs": [
|
|
333
255
|
{
|
|
334
256
|
"internalType": "contract IERC20",
|
|
@@ -342,22 +264,12 @@ export const MerkleRedeem_jsonAbi = [
|
|
|
342
264
|
{
|
|
343
265
|
"inputs": [
|
|
344
266
|
{
|
|
345
|
-
"internalType": "
|
|
346
|
-
"name": "
|
|
347
|
-
"type": "
|
|
348
|
-
},
|
|
349
|
-
{
|
|
350
|
-
"internalType": "bytes32",
|
|
351
|
-
"name": "merkleRoot",
|
|
352
|
-
"type": "bytes32"
|
|
353
|
-
},
|
|
354
|
-
{
|
|
355
|
-
"internalType": "uint256",
|
|
356
|
-
"name": "totalAllocation",
|
|
357
|
-
"type": "uint256"
|
|
267
|
+
"internalType": "address",
|
|
268
|
+
"name": "newOwner",
|
|
269
|
+
"type": "address"
|
|
358
270
|
}
|
|
359
271
|
],
|
|
360
|
-
"name": "
|
|
272
|
+
"name": "transferOwnership",
|
|
361
273
|
"outputs": [],
|
|
362
274
|
"stateMutability": "nonpayable",
|
|
363
275
|
"type": "function"
|
|
@@ -366,22 +278,22 @@ export const MerkleRedeem_jsonAbi = [
|
|
|
366
278
|
"inputs": [
|
|
367
279
|
{
|
|
368
280
|
"internalType": "address",
|
|
369
|
-
"name": "
|
|
281
|
+
"name": "_liquidityProvider",
|
|
370
282
|
"type": "address"
|
|
371
283
|
},
|
|
372
284
|
{
|
|
373
285
|
"internalType": "uint256",
|
|
374
|
-
"name": "
|
|
286
|
+
"name": "_week",
|
|
375
287
|
"type": "uint256"
|
|
376
288
|
},
|
|
377
289
|
{
|
|
378
290
|
"internalType": "uint256",
|
|
379
|
-
"name": "
|
|
291
|
+
"name": "_claimedBalance",
|
|
380
292
|
"type": "uint256"
|
|
381
293
|
},
|
|
382
294
|
{
|
|
383
295
|
"internalType": "bytes32[]",
|
|
384
|
-
"name": "
|
|
296
|
+
"name": "_merkleProof",
|
|
385
297
|
"type": "bytes32[]"
|
|
386
298
|
}
|
|
387
299
|
],
|
|
@@ -389,12 +301,31 @@ export const MerkleRedeem_jsonAbi = [
|
|
|
389
301
|
"outputs": [
|
|
390
302
|
{
|
|
391
303
|
"internalType": "bool",
|
|
392
|
-
"name": "",
|
|
304
|
+
"name": "valid",
|
|
393
305
|
"type": "bool"
|
|
394
306
|
}
|
|
395
307
|
],
|
|
396
308
|
"stateMutability": "view",
|
|
397
309
|
"type": "function"
|
|
310
|
+
},
|
|
311
|
+
{
|
|
312
|
+
"inputs": [
|
|
313
|
+
{
|
|
314
|
+
"internalType": "uint256",
|
|
315
|
+
"name": "",
|
|
316
|
+
"type": "uint256"
|
|
317
|
+
}
|
|
318
|
+
],
|
|
319
|
+
"name": "weekMerkleRoots",
|
|
320
|
+
"outputs": [
|
|
321
|
+
{
|
|
322
|
+
"internalType": "bytes32",
|
|
323
|
+
"name": "",
|
|
324
|
+
"type": "bytes32"
|
|
325
|
+
}
|
|
326
|
+
],
|
|
327
|
+
"stateMutability": "view",
|
|
328
|
+
"type": "function"
|
|
398
329
|
}
|
|
399
330
|
] as const satisfies Abi;
|
|
400
331
|
|
|
@@ -484,8 +415,8 @@ export class MerkleRedeem_json {
|
|
|
484
415
|
* claimStatus
|
|
485
416
|
* view
|
|
486
417
|
*/
|
|
487
|
-
async claimStatus(
|
|
488
|
-
return this.contract.read.claimStatus([
|
|
418
|
+
async claimStatus(_liquidityProvider: `0x${string}`, _begin: bigint, _end: bigint): Promise<boolean[]> {
|
|
419
|
+
return this.contract.read.claimStatus([_liquidityProvider, _begin, _end] as const) as Promise<boolean[]>;
|
|
489
420
|
}
|
|
490
421
|
|
|
491
422
|
/**
|
|
@@ -496,28 +427,12 @@ export class MerkleRedeem_json {
|
|
|
496
427
|
return this.contract.read.claimed([arg0, arg1] as const) as Promise<boolean>;
|
|
497
428
|
}
|
|
498
429
|
|
|
499
|
-
/**
|
|
500
|
-
* emergencyRecipient
|
|
501
|
-
* view
|
|
502
|
-
*/
|
|
503
|
-
async emergencyRecipient(): Promise<`0x${string}`> {
|
|
504
|
-
return this.contract.read.emergencyRecipient() as Promise<`0x${string}`>;
|
|
505
|
-
}
|
|
506
|
-
|
|
507
430
|
/**
|
|
508
431
|
* merkleRoots
|
|
509
432
|
* view
|
|
510
433
|
*/
|
|
511
|
-
async merkleRoots(
|
|
512
|
-
return this.contract.read.merkleRoots([
|
|
513
|
-
}
|
|
514
|
-
|
|
515
|
-
/**
|
|
516
|
-
* nominatedOwner
|
|
517
|
-
* view
|
|
518
|
-
*/
|
|
519
|
-
async nominatedOwner(): Promise<`0x${string}`> {
|
|
520
|
-
return this.contract.read.nominatedOwner() as Promise<`0x${string}`>;
|
|
434
|
+
async merkleRoots(_begin: bigint, _end: bigint): Promise<`0x${string}`[]> {
|
|
435
|
+
return this.contract.read.merkleRoots([_begin, _end] as const) as Promise<`0x${string}`[]>;
|
|
521
436
|
}
|
|
522
437
|
|
|
523
438
|
/**
|
|
@@ -529,81 +444,35 @@ export class MerkleRedeem_json {
|
|
|
529
444
|
}
|
|
530
445
|
|
|
531
446
|
/**
|
|
532
|
-
*
|
|
447
|
+
* token
|
|
533
448
|
* view
|
|
534
449
|
*/
|
|
535
|
-
async
|
|
536
|
-
return this.contract.read.
|
|
537
|
-
}
|
|
538
|
-
|
|
539
|
-
/**
|
|
540
|
-
* rewardsToken
|
|
541
|
-
* view
|
|
542
|
-
*/
|
|
543
|
-
async rewardsToken(): Promise<`0x${string}`> {
|
|
544
|
-
return this.contract.read.rewardsToken() as Promise<`0x${string}`>;
|
|
450
|
+
async token(): Promise<`0x${string}`> {
|
|
451
|
+
return this.contract.read.token() as Promise<`0x${string}`>;
|
|
545
452
|
}
|
|
546
453
|
|
|
547
454
|
/**
|
|
548
455
|
* verifyClaim
|
|
549
456
|
* view
|
|
550
457
|
*/
|
|
551
|
-
async verifyClaim(
|
|
552
|
-
return this.contract.read.verifyClaim([
|
|
553
|
-
}
|
|
554
|
-
|
|
555
|
-
/**
|
|
556
|
-
* acceptOwnership
|
|
557
|
-
* nonpayable
|
|
558
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
559
|
-
*/
|
|
560
|
-
async acceptOwnership(options?: {
|
|
561
|
-
accessList?: import('viem').AccessList;
|
|
562
|
-
authorizationList?: import('viem').AuthorizationList;
|
|
563
|
-
chain?: import('viem').Chain | null;
|
|
564
|
-
dataSuffix?: `0x${string}`;
|
|
565
|
-
gas?: bigint;
|
|
566
|
-
gasPrice?: bigint;
|
|
567
|
-
maxFeePerGas?: bigint;
|
|
568
|
-
maxPriorityFeePerGas?: bigint;
|
|
569
|
-
nonce?: number;
|
|
570
|
-
value?: bigint;
|
|
571
|
-
}): Promise<`0x${string}`> {
|
|
572
|
-
if (!this.contract.write) {
|
|
573
|
-
throw new Error('Wallet client is required for write operations');
|
|
574
|
-
}
|
|
575
|
-
return this.contract.write.acceptOwnership(options) as Promise<`0x${string}`>;
|
|
458
|
+
async verifyClaim(_liquidityProvider: `0x${string}`, _week: bigint, _claimedBalance: bigint, _merkleProof: `0x${string}`[]): Promise<boolean> {
|
|
459
|
+
return this.contract.read.verifyClaim([_liquidityProvider, _week, _claimedBalance, _merkleProof] as const) as Promise<boolean>;
|
|
576
460
|
}
|
|
577
461
|
|
|
578
462
|
/**
|
|
579
|
-
*
|
|
580
|
-
*
|
|
581
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
463
|
+
* weekMerkleRoots
|
|
464
|
+
* view
|
|
582
465
|
*/
|
|
583
|
-
async
|
|
584
|
-
|
|
585
|
-
authorizationList?: import('viem').AuthorizationList;
|
|
586
|
-
chain?: import('viem').Chain | null;
|
|
587
|
-
dataSuffix?: `0x${string}`;
|
|
588
|
-
gas?: bigint;
|
|
589
|
-
gasPrice?: bigint;
|
|
590
|
-
maxFeePerGas?: bigint;
|
|
591
|
-
maxPriorityFeePerGas?: bigint;
|
|
592
|
-
nonce?: number;
|
|
593
|
-
value?: bigint;
|
|
594
|
-
}): Promise<`0x${string}`> {
|
|
595
|
-
if (!this.contract.write) {
|
|
596
|
-
throw new Error('Wallet client is required for write operations');
|
|
597
|
-
}
|
|
598
|
-
return this.contract.write.claimPeriod([recipient, period, balance, proof] as const, options) as Promise<`0x${string}`>;
|
|
466
|
+
async weekMerkleRoots(arg0: bigint): Promise<`0x${string}`> {
|
|
467
|
+
return this.contract.read.weekMerkleRoots([arg0] as const) as Promise<`0x${string}`>;
|
|
599
468
|
}
|
|
600
469
|
|
|
601
470
|
/**
|
|
602
|
-
*
|
|
471
|
+
* claimWeek
|
|
603
472
|
* nonpayable
|
|
604
473
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
605
474
|
*/
|
|
606
|
-
async
|
|
475
|
+
async claimWeek(_liquidityProvider: `0x${string}`, _week: bigint, _claimedBalance: bigint, _merkleProof: `0x${string}`[], options?: {
|
|
607
476
|
accessList?: import('viem').AccessList;
|
|
608
477
|
authorizationList?: import('viem').AuthorizationList;
|
|
609
478
|
chain?: import('viem').Chain | null;
|
|
@@ -618,15 +487,15 @@ export class MerkleRedeem_json {
|
|
|
618
487
|
if (!this.contract.write) {
|
|
619
488
|
throw new Error('Wallet client is required for write operations');
|
|
620
489
|
}
|
|
621
|
-
return this.contract.write.
|
|
490
|
+
return this.contract.write.claimWeek([_liquidityProvider, _week, _claimedBalance, _merkleProof] as const, options) as Promise<`0x${string}`>;
|
|
622
491
|
}
|
|
623
492
|
|
|
624
493
|
/**
|
|
625
|
-
*
|
|
494
|
+
* claimWeeks
|
|
626
495
|
* nonpayable
|
|
627
496
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
628
497
|
*/
|
|
629
|
-
async
|
|
498
|
+
async claimWeeks(_liquidityProvider: `0x${string}`, claims: MerkleRedeem_Claim[], options?: {
|
|
630
499
|
accessList?: import('viem').AccessList;
|
|
631
500
|
authorizationList?: import('viem').AuthorizationList;
|
|
632
501
|
chain?: import('viem').Chain | null;
|
|
@@ -641,15 +510,15 @@ export class MerkleRedeem_json {
|
|
|
641
510
|
if (!this.contract.write) {
|
|
642
511
|
throw new Error('Wallet client is required for write operations');
|
|
643
512
|
}
|
|
644
|
-
return this.contract.write.
|
|
513
|
+
return this.contract.write.claimWeeks([_liquidityProvider, claims] as const, options) as Promise<`0x${string}`>;
|
|
645
514
|
}
|
|
646
515
|
|
|
647
516
|
/**
|
|
648
|
-
*
|
|
517
|
+
* renounceOwnership
|
|
649
518
|
* nonpayable
|
|
650
519
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
651
520
|
*/
|
|
652
|
-
async
|
|
521
|
+
async renounceOwnership(options?: {
|
|
653
522
|
accessList?: import('viem').AccessList;
|
|
654
523
|
authorizationList?: import('viem').AuthorizationList;
|
|
655
524
|
chain?: import('viem').Chain | null;
|
|
@@ -664,15 +533,15 @@ export class MerkleRedeem_json {
|
|
|
664
533
|
if (!this.contract.write) {
|
|
665
534
|
throw new Error('Wallet client is required for write operations');
|
|
666
535
|
}
|
|
667
|
-
return this.contract.write.
|
|
536
|
+
return this.contract.write.renounceOwnership(options) as Promise<`0x${string}`>;
|
|
668
537
|
}
|
|
669
538
|
|
|
670
539
|
/**
|
|
671
|
-
*
|
|
540
|
+
* seedAllocations
|
|
672
541
|
* nonpayable
|
|
673
542
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
674
543
|
*/
|
|
675
|
-
async
|
|
544
|
+
async seedAllocations(_week: bigint, _merkleRoot: `0x${string}`, _totalAllocation: bigint, options?: {
|
|
676
545
|
accessList?: import('viem').AccessList;
|
|
677
546
|
authorizationList?: import('viem').AuthorizationList;
|
|
678
547
|
chain?: import('viem').Chain | null;
|
|
@@ -687,15 +556,15 @@ export class MerkleRedeem_json {
|
|
|
687
556
|
if (!this.contract.write) {
|
|
688
557
|
throw new Error('Wallet client is required for write operations');
|
|
689
558
|
}
|
|
690
|
-
return this.contract.write.
|
|
559
|
+
return this.contract.write.seedAllocations([_week, _merkleRoot, _totalAllocation] as const, options) as Promise<`0x${string}`>;
|
|
691
560
|
}
|
|
692
561
|
|
|
693
562
|
/**
|
|
694
|
-
*
|
|
563
|
+
* transferOwnership
|
|
695
564
|
* nonpayable
|
|
696
565
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
697
566
|
*/
|
|
698
|
-
async
|
|
567
|
+
async transferOwnership(newOwner: `0x${string}`, options?: {
|
|
699
568
|
accessList?: import('viem').AccessList;
|
|
700
569
|
authorizationList?: import('viem').AuthorizationList;
|
|
701
570
|
chain?: import('viem').Chain | null;
|
|
@@ -710,7 +579,7 @@ export class MerkleRedeem_json {
|
|
|
710
579
|
if (!this.contract.write) {
|
|
711
580
|
throw new Error('Wallet client is required for write operations');
|
|
712
581
|
}
|
|
713
|
-
return this.contract.write.
|
|
582
|
+
return this.contract.write.transferOwnership([newOwner] as const, options) as Promise<`0x${string}`>;
|
|
714
583
|
}
|
|
715
584
|
|
|
716
585
|
|
|
@@ -730,11 +599,11 @@ export class MerkleRedeem_json {
|
|
|
730
599
|
}
|
|
731
600
|
return {
|
|
732
601
|
/**
|
|
733
|
-
* Simulate
|
|
602
|
+
* Simulate claimWeek
|
|
734
603
|
* Returns gas estimate and result without sending transaction
|
|
735
604
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
736
605
|
*/
|
|
737
|
-
async
|
|
606
|
+
async claimWeek(_liquidityProvider: `0x${string}`, _week: bigint, _claimedBalance: bigint, _merkleProof: `0x${string}`[], options?: {
|
|
738
607
|
accessList?: import('viem').AccessList;
|
|
739
608
|
authorizationList?: import('viem').AuthorizationList;
|
|
740
609
|
chain?: import('viem').Chain | null;
|
|
@@ -746,14 +615,14 @@ export class MerkleRedeem_json {
|
|
|
746
615
|
nonce?: number;
|
|
747
616
|
value?: bigint;
|
|
748
617
|
}): Promise<void> {
|
|
749
|
-
return contract.simulate.
|
|
618
|
+
return contract.simulate.claimWeek([_liquidityProvider, _week, _claimedBalance, _merkleProof] as const, options) as Promise<void>;
|
|
750
619
|
},
|
|
751
620
|
/**
|
|
752
|
-
* Simulate
|
|
621
|
+
* Simulate claimWeeks
|
|
753
622
|
* Returns gas estimate and result without sending transaction
|
|
754
623
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
755
624
|
*/
|
|
756
|
-
async
|
|
625
|
+
async claimWeeks(_liquidityProvider: `0x${string}`, claims: MerkleRedeem_Claim[], options?: {
|
|
757
626
|
accessList?: import('viem').AccessList;
|
|
758
627
|
authorizationList?: import('viem').AuthorizationList;
|
|
759
628
|
chain?: import('viem').Chain | null;
|
|
@@ -765,52 +634,14 @@ export class MerkleRedeem_json {
|
|
|
765
634
|
nonce?: number;
|
|
766
635
|
value?: bigint;
|
|
767
636
|
}): Promise<void> {
|
|
768
|
-
return contract.simulate.
|
|
637
|
+
return contract.simulate.claimWeeks([_liquidityProvider, claims] as const, options) as Promise<void>;
|
|
769
638
|
},
|
|
770
639
|
/**
|
|
771
|
-
* Simulate
|
|
772
|
-
* Returns gas estimate and result without sending transaction
|
|
773
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
774
|
-
*/
|
|
775
|
-
async claimPeriods(recipient: `0x${string}`, claims: MerkleRedeem_Claim[], options?: {
|
|
776
|
-
accessList?: import('viem').AccessList;
|
|
777
|
-
authorizationList?: import('viem').AuthorizationList;
|
|
778
|
-
chain?: import('viem').Chain | null;
|
|
779
|
-
dataSuffix?: `0x${string}`;
|
|
780
|
-
gas?: bigint;
|
|
781
|
-
gasPrice?: bigint;
|
|
782
|
-
maxFeePerGas?: bigint;
|
|
783
|
-
maxPriorityFeePerGas?: bigint;
|
|
784
|
-
nonce?: number;
|
|
785
|
-
value?: bigint;
|
|
786
|
-
}): Promise<void> {
|
|
787
|
-
return contract.simulate.claimPeriods([recipient, claims] as const, options) as Promise<void>;
|
|
788
|
-
},
|
|
789
|
-
/**
|
|
790
|
-
* Simulate emergencyWithdraw
|
|
791
|
-
* Returns gas estimate and result without sending transaction
|
|
792
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
793
|
-
*/
|
|
794
|
-
async emergencyWithdraw(token: `0x${string}`, options?: {
|
|
795
|
-
accessList?: import('viem').AccessList;
|
|
796
|
-
authorizationList?: import('viem').AuthorizationList;
|
|
797
|
-
chain?: import('viem').Chain | null;
|
|
798
|
-
dataSuffix?: `0x${string}`;
|
|
799
|
-
gas?: bigint;
|
|
800
|
-
gasPrice?: bigint;
|
|
801
|
-
maxFeePerGas?: bigint;
|
|
802
|
-
maxPriorityFeePerGas?: bigint;
|
|
803
|
-
nonce?: number;
|
|
804
|
-
value?: bigint;
|
|
805
|
-
}): Promise<void> {
|
|
806
|
-
return contract.simulate.emergencyWithdraw([token] as const, options) as Promise<void>;
|
|
807
|
-
},
|
|
808
|
-
/**
|
|
809
|
-
* Simulate nominateNewOwner
|
|
640
|
+
* Simulate renounceOwnership
|
|
810
641
|
* Returns gas estimate and result without sending transaction
|
|
811
642
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
812
643
|
*/
|
|
813
|
-
async
|
|
644
|
+
async renounceOwnership(options?: {
|
|
814
645
|
accessList?: import('viem').AccessList;
|
|
815
646
|
authorizationList?: import('viem').AuthorizationList;
|
|
816
647
|
chain?: import('viem').Chain | null;
|
|
@@ -822,14 +653,14 @@ export class MerkleRedeem_json {
|
|
|
822
653
|
nonce?: number;
|
|
823
654
|
value?: bigint;
|
|
824
655
|
}): Promise<void> {
|
|
825
|
-
return contract.simulate.
|
|
656
|
+
return contract.simulate.renounceOwnership(options) as Promise<void>;
|
|
826
657
|
},
|
|
827
658
|
/**
|
|
828
|
-
* Simulate
|
|
659
|
+
* Simulate seedAllocations
|
|
829
660
|
* Returns gas estimate and result without sending transaction
|
|
830
661
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
831
662
|
*/
|
|
832
|
-
async
|
|
663
|
+
async seedAllocations(_week: bigint, _merkleRoot: `0x${string}`, _totalAllocation: bigint, options?: {
|
|
833
664
|
accessList?: import('viem').AccessList;
|
|
834
665
|
authorizationList?: import('viem').AuthorizationList;
|
|
835
666
|
chain?: import('viem').Chain | null;
|
|
@@ -841,14 +672,14 @@ export class MerkleRedeem_json {
|
|
|
841
672
|
nonce?: number;
|
|
842
673
|
value?: bigint;
|
|
843
674
|
}): Promise<void> {
|
|
844
|
-
return contract.simulate.
|
|
675
|
+
return contract.simulate.seedAllocations([_week, _merkleRoot, _totalAllocation] as const, options) as Promise<void>;
|
|
845
676
|
},
|
|
846
677
|
/**
|
|
847
|
-
* Simulate
|
|
678
|
+
* Simulate transferOwnership
|
|
848
679
|
* Returns gas estimate and result without sending transaction
|
|
849
680
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
850
681
|
*/
|
|
851
|
-
async
|
|
682
|
+
async transferOwnership(newOwner: `0x${string}`, options?: {
|
|
852
683
|
accessList?: import('viem').AccessList;
|
|
853
684
|
authorizationList?: import('viem').AuthorizationList;
|
|
854
685
|
chain?: import('viem').Chain | null;
|
|
@@ -860,7 +691,7 @@ export class MerkleRedeem_json {
|
|
|
860
691
|
nonce?: number;
|
|
861
692
|
value?: bigint;
|
|
862
693
|
}): Promise<void> {
|
|
863
|
-
return contract.simulate.
|
|
694
|
+
return contract.simulate.transferOwnership([newOwner] as const, options) as Promise<void>;
|
|
864
695
|
}
|
|
865
696
|
};
|
|
866
697
|
}
|
|
@@ -885,31 +716,12 @@ export class MerkleRedeem_json {
|
|
|
885
716
|
* @param filter Optional filter for indexed parameters
|
|
886
717
|
* @returns Unwatch function to stop listening
|
|
887
718
|
*/
|
|
888
|
-
Claimed: (callback: (event: {
|
|
719
|
+
Claimed: (callback: (event: { _claimant: `0x${string}`; _balance: bigint }) => void) => {
|
|
889
720
|
return this.publicClient.watchContractEvent({
|
|
890
721
|
address: this.contractAddress,
|
|
891
722
|
abi: MerkleRedeem_jsonAbi,
|
|
892
723
|
eventName: 'Claimed',
|
|
893
|
-
|
|
894
|
-
onLogs: (logs: any[]) => {
|
|
895
|
-
logs.forEach((log: any) => {
|
|
896
|
-
callback(log.args as any);
|
|
897
|
-
});
|
|
898
|
-
},
|
|
899
|
-
}) as () => void;
|
|
900
|
-
},
|
|
901
|
-
/**
|
|
902
|
-
* Watch OwnerChanged events
|
|
903
|
-
* @param callback Function to call when event is emitted
|
|
904
|
-
* @param filter Optional filter for indexed parameters
|
|
905
|
-
* @returns Unwatch function to stop listening
|
|
906
|
-
*/
|
|
907
|
-
OwnerChanged: (callback: (event: { oldOwner: `0x${string}`; newOwner: `0x${string}` }) => void, filter?: { oldOwner: `0x${string}`; newOwner: `0x${string}` }) => {
|
|
908
|
-
return this.publicClient.watchContractEvent({
|
|
909
|
-
address: this.contractAddress,
|
|
910
|
-
abi: MerkleRedeem_jsonAbi,
|
|
911
|
-
eventName: 'OwnerChanged',
|
|
912
|
-
args: filter,
|
|
724
|
+
|
|
913
725
|
onLogs: (logs: any[]) => {
|
|
914
726
|
logs.forEach((log: any) => {
|
|
915
727
|
callback(log.args as any);
|
|
@@ -918,16 +730,16 @@ export class MerkleRedeem_json {
|
|
|
918
730
|
}) as () => void;
|
|
919
731
|
},
|
|
920
732
|
/**
|
|
921
|
-
* Watch
|
|
733
|
+
* Watch OwnershipTransferred events
|
|
922
734
|
* @param callback Function to call when event is emitted
|
|
923
735
|
* @param filter Optional filter for indexed parameters
|
|
924
736
|
* @returns Unwatch function to stop listening
|
|
925
737
|
*/
|
|
926
|
-
|
|
738
|
+
OwnershipTransferred: (callback: (event: { previousOwner: `0x${string}`; newOwner: `0x${string}` }) => void, filter?: { previousOwner: `0x${string}`; newOwner: `0x${string}` }) => {
|
|
927
739
|
return this.publicClient.watchContractEvent({
|
|
928
740
|
address: this.contractAddress,
|
|
929
741
|
abi: MerkleRedeem_jsonAbi,
|
|
930
|
-
eventName: '
|
|
742
|
+
eventName: 'OwnershipTransferred',
|
|
931
743
|
args: filter,
|
|
932
744
|
onLogs: (logs: any[]) => {
|
|
933
745
|
logs.forEach((log: any) => {
|