@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
|
@@ -12,17 +12,7 @@ exports.MerkleRedeem_jsonAbi = [
|
|
|
12
12
|
"inputs": [
|
|
13
13
|
{
|
|
14
14
|
"internalType": "address",
|
|
15
|
-
"name": "
|
|
16
|
-
"type": "address"
|
|
17
|
-
},
|
|
18
|
-
{
|
|
19
|
-
"internalType": "contract IERC20",
|
|
20
|
-
"name": "_rewardsToken",
|
|
21
|
-
"type": "address"
|
|
22
|
-
},
|
|
23
|
-
{
|
|
24
|
-
"internalType": "address",
|
|
25
|
-
"name": "_emergencyRecipient",
|
|
15
|
+
"name": "_token",
|
|
26
16
|
"type": "address"
|
|
27
17
|
}
|
|
28
18
|
],
|
|
@@ -33,15 +23,15 @@ exports.MerkleRedeem_jsonAbi = [
|
|
|
33
23
|
"anonymous": false,
|
|
34
24
|
"inputs": [
|
|
35
25
|
{
|
|
36
|
-
"indexed":
|
|
26
|
+
"indexed": false,
|
|
37
27
|
"internalType": "address",
|
|
38
|
-
"name": "
|
|
28
|
+
"name": "_claimant",
|
|
39
29
|
"type": "address"
|
|
40
30
|
},
|
|
41
31
|
{
|
|
42
32
|
"indexed": false,
|
|
43
33
|
"internalType": "uint256",
|
|
44
|
-
"name": "
|
|
34
|
+
"name": "_balance",
|
|
45
35
|
"type": "uint256"
|
|
46
36
|
}
|
|
47
37
|
],
|
|
@@ -54,7 +44,7 @@ exports.MerkleRedeem_jsonAbi = [
|
|
|
54
44
|
{
|
|
55
45
|
"indexed": true,
|
|
56
46
|
"internalType": "address",
|
|
57
|
-
"name": "
|
|
47
|
+
"name": "previousOwner",
|
|
58
48
|
"type": "address"
|
|
59
49
|
},
|
|
60
50
|
{
|
|
@@ -64,53 +54,62 @@ exports.MerkleRedeem_jsonAbi = [
|
|
|
64
54
|
"type": "address"
|
|
65
55
|
}
|
|
66
56
|
],
|
|
67
|
-
"name": "
|
|
57
|
+
"name": "OwnershipTransferred",
|
|
68
58
|
"type": "event"
|
|
69
59
|
},
|
|
70
60
|
{
|
|
71
|
-
"anonymous": false,
|
|
72
61
|
"inputs": [
|
|
73
62
|
{
|
|
74
|
-
"indexed": true,
|
|
75
63
|
"internalType": "address",
|
|
76
|
-
"name": "
|
|
64
|
+
"name": "_liquidityProvider",
|
|
77
65
|
"type": "address"
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
"internalType": "uint256",
|
|
69
|
+
"name": "_begin",
|
|
70
|
+
"type": "uint256"
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
"internalType": "uint256",
|
|
74
|
+
"name": "_end",
|
|
75
|
+
"type": "uint256"
|
|
78
76
|
}
|
|
79
77
|
],
|
|
80
|
-
"name": "
|
|
81
|
-
"
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
78
|
+
"name": "claimStatus",
|
|
79
|
+
"outputs": [
|
|
80
|
+
{
|
|
81
|
+
"internalType": "bool[]",
|
|
82
|
+
"name": "",
|
|
83
|
+
"type": "bool[]"
|
|
84
|
+
}
|
|
85
|
+
],
|
|
86
|
+
"stateMutability": "view",
|
|
88
87
|
"type": "function"
|
|
89
88
|
},
|
|
90
89
|
{
|
|
91
90
|
"inputs": [
|
|
92
91
|
{
|
|
93
92
|
"internalType": "address",
|
|
94
|
-
"name": "
|
|
93
|
+
"name": "_liquidityProvider",
|
|
95
94
|
"type": "address"
|
|
96
95
|
},
|
|
97
96
|
{
|
|
98
97
|
"internalType": "uint256",
|
|
99
|
-
"name": "
|
|
98
|
+
"name": "_week",
|
|
100
99
|
"type": "uint256"
|
|
101
100
|
},
|
|
102
101
|
{
|
|
103
102
|
"internalType": "uint256",
|
|
104
|
-
"name": "
|
|
103
|
+
"name": "_claimedBalance",
|
|
105
104
|
"type": "uint256"
|
|
106
105
|
},
|
|
107
106
|
{
|
|
108
107
|
"internalType": "bytes32[]",
|
|
109
|
-
"name": "
|
|
108
|
+
"name": "_merkleProof",
|
|
110
109
|
"type": "bytes32[]"
|
|
111
110
|
}
|
|
112
111
|
],
|
|
113
|
-
"name": "
|
|
112
|
+
"name": "claimWeek",
|
|
114
113
|
"outputs": [],
|
|
115
114
|
"stateMutability": "nonpayable",
|
|
116
115
|
"type": "function"
|
|
@@ -119,14 +118,14 @@ exports.MerkleRedeem_jsonAbi = [
|
|
|
119
118
|
"inputs": [
|
|
120
119
|
{
|
|
121
120
|
"internalType": "address",
|
|
122
|
-
"name": "
|
|
121
|
+
"name": "_liquidityProvider",
|
|
123
122
|
"type": "address"
|
|
124
123
|
},
|
|
125
124
|
{
|
|
126
125
|
"components": [
|
|
127
126
|
{
|
|
128
127
|
"internalType": "uint256",
|
|
129
|
-
"name": "
|
|
128
|
+
"name": "week",
|
|
130
129
|
"type": "uint256"
|
|
131
130
|
},
|
|
132
131
|
{
|
|
@@ -136,7 +135,7 @@ exports.MerkleRedeem_jsonAbi = [
|
|
|
136
135
|
},
|
|
137
136
|
{
|
|
138
137
|
"internalType": "bytes32[]",
|
|
139
|
-
"name": "
|
|
138
|
+
"name": "merkleProof",
|
|
140
139
|
"type": "bytes32[]"
|
|
141
140
|
}
|
|
142
141
|
],
|
|
@@ -145,40 +144,11 @@ exports.MerkleRedeem_jsonAbi = [
|
|
|
145
144
|
"type": "tuple[]"
|
|
146
145
|
}
|
|
147
146
|
],
|
|
148
|
-
"name": "
|
|
147
|
+
"name": "claimWeeks",
|
|
149
148
|
"outputs": [],
|
|
150
149
|
"stateMutability": "nonpayable",
|
|
151
150
|
"type": "function"
|
|
152
151
|
},
|
|
153
|
-
{
|
|
154
|
-
"inputs": [
|
|
155
|
-
{
|
|
156
|
-
"internalType": "address",
|
|
157
|
-
"name": "recipient",
|
|
158
|
-
"type": "address"
|
|
159
|
-
},
|
|
160
|
-
{
|
|
161
|
-
"internalType": "uint256",
|
|
162
|
-
"name": "begin",
|
|
163
|
-
"type": "uint256"
|
|
164
|
-
},
|
|
165
|
-
{
|
|
166
|
-
"internalType": "uint256",
|
|
167
|
-
"name": "end",
|
|
168
|
-
"type": "uint256"
|
|
169
|
-
}
|
|
170
|
-
],
|
|
171
|
-
"name": "claimStatus",
|
|
172
|
-
"outputs": [
|
|
173
|
-
{
|
|
174
|
-
"internalType": "bool[]",
|
|
175
|
-
"name": "",
|
|
176
|
-
"type": "bool[]"
|
|
177
|
-
}
|
|
178
|
-
],
|
|
179
|
-
"stateMutability": "view",
|
|
180
|
-
"type": "function"
|
|
181
|
-
},
|
|
182
152
|
{
|
|
183
153
|
"inputs": [
|
|
184
154
|
{
|
|
@@ -203,42 +173,16 @@ exports.MerkleRedeem_jsonAbi = [
|
|
|
203
173
|
"stateMutability": "view",
|
|
204
174
|
"type": "function"
|
|
205
175
|
},
|
|
206
|
-
{
|
|
207
|
-
"inputs": [],
|
|
208
|
-
"name": "emergencyRecipient",
|
|
209
|
-
"outputs": [
|
|
210
|
-
{
|
|
211
|
-
"internalType": "address",
|
|
212
|
-
"name": "",
|
|
213
|
-
"type": "address"
|
|
214
|
-
}
|
|
215
|
-
],
|
|
216
|
-
"stateMutability": "view",
|
|
217
|
-
"type": "function"
|
|
218
|
-
},
|
|
219
|
-
{
|
|
220
|
-
"inputs": [
|
|
221
|
-
{
|
|
222
|
-
"internalType": "contract IERC20",
|
|
223
|
-
"name": "token",
|
|
224
|
-
"type": "address"
|
|
225
|
-
}
|
|
226
|
-
],
|
|
227
|
-
"name": "emergencyWithdraw",
|
|
228
|
-
"outputs": [],
|
|
229
|
-
"stateMutability": "nonpayable",
|
|
230
|
-
"type": "function"
|
|
231
|
-
},
|
|
232
176
|
{
|
|
233
177
|
"inputs": [
|
|
234
178
|
{
|
|
235
179
|
"internalType": "uint256",
|
|
236
|
-
"name": "
|
|
180
|
+
"name": "_begin",
|
|
237
181
|
"type": "uint256"
|
|
238
182
|
},
|
|
239
183
|
{
|
|
240
184
|
"internalType": "uint256",
|
|
241
|
-
"name": "
|
|
185
|
+
"name": "_end",
|
|
242
186
|
"type": "uint256"
|
|
243
187
|
}
|
|
244
188
|
],
|
|
@@ -253,22 +197,9 @@ exports.MerkleRedeem_jsonAbi = [
|
|
|
253
197
|
"stateMutability": "view",
|
|
254
198
|
"type": "function"
|
|
255
199
|
},
|
|
256
|
-
{
|
|
257
|
-
"inputs": [
|
|
258
|
-
{
|
|
259
|
-
"internalType": "address",
|
|
260
|
-
"name": "newOwner",
|
|
261
|
-
"type": "address"
|
|
262
|
-
}
|
|
263
|
-
],
|
|
264
|
-
"name": "nominateNewOwner",
|
|
265
|
-
"outputs": [],
|
|
266
|
-
"stateMutability": "nonpayable",
|
|
267
|
-
"type": "function"
|
|
268
|
-
},
|
|
269
200
|
{
|
|
270
201
|
"inputs": [],
|
|
271
|
-
"name": "
|
|
202
|
+
"name": "owner",
|
|
272
203
|
"outputs": [
|
|
273
204
|
{
|
|
274
205
|
"internalType": "address",
|
|
@@ -281,46 +212,37 @@ exports.MerkleRedeem_jsonAbi = [
|
|
|
281
212
|
},
|
|
282
213
|
{
|
|
283
214
|
"inputs": [],
|
|
284
|
-
"name": "
|
|
285
|
-
"outputs": [
|
|
286
|
-
|
|
287
|
-
"internalType": "address",
|
|
288
|
-
"name": "",
|
|
289
|
-
"type": "address"
|
|
290
|
-
}
|
|
291
|
-
],
|
|
292
|
-
"stateMutability": "view",
|
|
215
|
+
"name": "renounceOwnership",
|
|
216
|
+
"outputs": [],
|
|
217
|
+
"stateMutability": "nonpayable",
|
|
293
218
|
"type": "function"
|
|
294
219
|
},
|
|
295
220
|
{
|
|
296
221
|
"inputs": [
|
|
297
222
|
{
|
|
298
223
|
"internalType": "uint256",
|
|
299
|
-
"name": "",
|
|
224
|
+
"name": "_week",
|
|
300
225
|
"type": "uint256"
|
|
301
|
-
}
|
|
302
|
-
],
|
|
303
|
-
"name": "periodMerkleRoots",
|
|
304
|
-
"outputs": [
|
|
226
|
+
},
|
|
305
227
|
{
|
|
306
228
|
"internalType": "bytes32",
|
|
307
|
-
"name": "",
|
|
229
|
+
"name": "_merkleRoot",
|
|
308
230
|
"type": "bytes32"
|
|
231
|
+
},
|
|
232
|
+
{
|
|
233
|
+
"internalType": "uint256",
|
|
234
|
+
"name": "_totalAllocation",
|
|
235
|
+
"type": "uint256"
|
|
309
236
|
}
|
|
310
237
|
],
|
|
311
|
-
"
|
|
312
|
-
"type": "function"
|
|
313
|
-
},
|
|
314
|
-
{
|
|
315
|
-
"inputs": [],
|
|
316
|
-
"name": "renounceOwnership",
|
|
238
|
+
"name": "seedAllocations",
|
|
317
239
|
"outputs": [],
|
|
318
240
|
"stateMutability": "nonpayable",
|
|
319
241
|
"type": "function"
|
|
320
242
|
},
|
|
321
243
|
{
|
|
322
244
|
"inputs": [],
|
|
323
|
-
"name": "
|
|
245
|
+
"name": "token",
|
|
324
246
|
"outputs": [
|
|
325
247
|
{
|
|
326
248
|
"internalType": "contract IERC20",
|
|
@@ -334,22 +256,12 @@ exports.MerkleRedeem_jsonAbi = [
|
|
|
334
256
|
{
|
|
335
257
|
"inputs": [
|
|
336
258
|
{
|
|
337
|
-
"internalType": "
|
|
338
|
-
"name": "
|
|
339
|
-
"type": "
|
|
340
|
-
},
|
|
341
|
-
{
|
|
342
|
-
"internalType": "bytes32",
|
|
343
|
-
"name": "merkleRoot",
|
|
344
|
-
"type": "bytes32"
|
|
345
|
-
},
|
|
346
|
-
{
|
|
347
|
-
"internalType": "uint256",
|
|
348
|
-
"name": "totalAllocation",
|
|
349
|
-
"type": "uint256"
|
|
259
|
+
"internalType": "address",
|
|
260
|
+
"name": "newOwner",
|
|
261
|
+
"type": "address"
|
|
350
262
|
}
|
|
351
263
|
],
|
|
352
|
-
"name": "
|
|
264
|
+
"name": "transferOwnership",
|
|
353
265
|
"outputs": [],
|
|
354
266
|
"stateMutability": "nonpayable",
|
|
355
267
|
"type": "function"
|
|
@@ -358,22 +270,22 @@ exports.MerkleRedeem_jsonAbi = [
|
|
|
358
270
|
"inputs": [
|
|
359
271
|
{
|
|
360
272
|
"internalType": "address",
|
|
361
|
-
"name": "
|
|
273
|
+
"name": "_liquidityProvider",
|
|
362
274
|
"type": "address"
|
|
363
275
|
},
|
|
364
276
|
{
|
|
365
277
|
"internalType": "uint256",
|
|
366
|
-
"name": "
|
|
278
|
+
"name": "_week",
|
|
367
279
|
"type": "uint256"
|
|
368
280
|
},
|
|
369
281
|
{
|
|
370
282
|
"internalType": "uint256",
|
|
371
|
-
"name": "
|
|
283
|
+
"name": "_claimedBalance",
|
|
372
284
|
"type": "uint256"
|
|
373
285
|
},
|
|
374
286
|
{
|
|
375
287
|
"internalType": "bytes32[]",
|
|
376
|
-
"name": "
|
|
288
|
+
"name": "_merkleProof",
|
|
377
289
|
"type": "bytes32[]"
|
|
378
290
|
}
|
|
379
291
|
],
|
|
@@ -381,12 +293,31 @@ exports.MerkleRedeem_jsonAbi = [
|
|
|
381
293
|
"outputs": [
|
|
382
294
|
{
|
|
383
295
|
"internalType": "bool",
|
|
384
|
-
"name": "",
|
|
296
|
+
"name": "valid",
|
|
385
297
|
"type": "bool"
|
|
386
298
|
}
|
|
387
299
|
],
|
|
388
300
|
"stateMutability": "view",
|
|
389
301
|
"type": "function"
|
|
302
|
+
},
|
|
303
|
+
{
|
|
304
|
+
"inputs": [
|
|
305
|
+
{
|
|
306
|
+
"internalType": "uint256",
|
|
307
|
+
"name": "",
|
|
308
|
+
"type": "uint256"
|
|
309
|
+
}
|
|
310
|
+
],
|
|
311
|
+
"name": "weekMerkleRoots",
|
|
312
|
+
"outputs": [
|
|
313
|
+
{
|
|
314
|
+
"internalType": "bytes32",
|
|
315
|
+
"name": "",
|
|
316
|
+
"type": "bytes32"
|
|
317
|
+
}
|
|
318
|
+
],
|
|
319
|
+
"stateMutability": "view",
|
|
320
|
+
"type": "function"
|
|
390
321
|
}
|
|
391
322
|
];
|
|
392
323
|
/**
|
|
@@ -450,8 +381,8 @@ class MerkleRedeem_json {
|
|
|
450
381
|
* claimStatus
|
|
451
382
|
* view
|
|
452
383
|
*/
|
|
453
|
-
async claimStatus(
|
|
454
|
-
return this.contract.read.claimStatus([
|
|
384
|
+
async claimStatus(_liquidityProvider, _begin, _end) {
|
|
385
|
+
return this.contract.read.claimStatus([_liquidityProvider, _begin, _end]);
|
|
455
386
|
}
|
|
456
387
|
/**
|
|
457
388
|
* claimed
|
|
@@ -460,26 +391,12 @@ class MerkleRedeem_json {
|
|
|
460
391
|
async claimed(arg0, arg1) {
|
|
461
392
|
return this.contract.read.claimed([arg0, arg1]);
|
|
462
393
|
}
|
|
463
|
-
/**
|
|
464
|
-
* emergencyRecipient
|
|
465
|
-
* view
|
|
466
|
-
*/
|
|
467
|
-
async emergencyRecipient() {
|
|
468
|
-
return this.contract.read.emergencyRecipient();
|
|
469
|
-
}
|
|
470
394
|
/**
|
|
471
395
|
* merkleRoots
|
|
472
396
|
* view
|
|
473
397
|
*/
|
|
474
|
-
async merkleRoots(
|
|
475
|
-
return this.contract.read.merkleRoots([
|
|
476
|
-
}
|
|
477
|
-
/**
|
|
478
|
-
* nominatedOwner
|
|
479
|
-
* view
|
|
480
|
-
*/
|
|
481
|
-
async nominatedOwner() {
|
|
482
|
-
return this.contract.read.nominatedOwner();
|
|
398
|
+
async merkleRoots(_begin, _end) {
|
|
399
|
+
return this.contract.read.merkleRoots([_begin, _end]);
|
|
483
400
|
}
|
|
484
401
|
/**
|
|
485
402
|
* owner
|
|
@@ -489,102 +406,80 @@ class MerkleRedeem_json {
|
|
|
489
406
|
return this.contract.read.owner();
|
|
490
407
|
}
|
|
491
408
|
/**
|
|
492
|
-
*
|
|
493
|
-
* view
|
|
494
|
-
*/
|
|
495
|
-
async periodMerkleRoots(arg0) {
|
|
496
|
-
return this.contract.read.periodMerkleRoots([arg0]);
|
|
497
|
-
}
|
|
498
|
-
/**
|
|
499
|
-
* rewardsToken
|
|
409
|
+
* token
|
|
500
410
|
* view
|
|
501
411
|
*/
|
|
502
|
-
async
|
|
503
|
-
return this.contract.read.
|
|
412
|
+
async token() {
|
|
413
|
+
return this.contract.read.token();
|
|
504
414
|
}
|
|
505
415
|
/**
|
|
506
416
|
* verifyClaim
|
|
507
417
|
* view
|
|
508
418
|
*/
|
|
509
|
-
async verifyClaim(
|
|
510
|
-
return this.contract.read.verifyClaim([
|
|
419
|
+
async verifyClaim(_liquidityProvider, _week, _claimedBalance, _merkleProof) {
|
|
420
|
+
return this.contract.read.verifyClaim([_liquidityProvider, _week, _claimedBalance, _merkleProof]);
|
|
511
421
|
}
|
|
512
422
|
/**
|
|
513
|
-
*
|
|
514
|
-
*
|
|
515
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
516
|
-
*/
|
|
517
|
-
async acceptOwnership(options) {
|
|
518
|
-
if (!this.contract.write) {
|
|
519
|
-
throw new Error('Wallet client is required for write operations');
|
|
520
|
-
}
|
|
521
|
-
return this.contract.write.acceptOwnership(options);
|
|
522
|
-
}
|
|
523
|
-
/**
|
|
524
|
-
* claimPeriod
|
|
525
|
-
* nonpayable
|
|
526
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
423
|
+
* weekMerkleRoots
|
|
424
|
+
* view
|
|
527
425
|
*/
|
|
528
|
-
async
|
|
529
|
-
|
|
530
|
-
throw new Error('Wallet client is required for write operations');
|
|
531
|
-
}
|
|
532
|
-
return this.contract.write.claimPeriod([recipient, period, balance, proof], options);
|
|
426
|
+
async weekMerkleRoots(arg0) {
|
|
427
|
+
return this.contract.read.weekMerkleRoots([arg0]);
|
|
533
428
|
}
|
|
534
429
|
/**
|
|
535
|
-
*
|
|
430
|
+
* claimWeek
|
|
536
431
|
* nonpayable
|
|
537
432
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
538
433
|
*/
|
|
539
|
-
async
|
|
434
|
+
async claimWeek(_liquidityProvider, _week, _claimedBalance, _merkleProof, options) {
|
|
540
435
|
if (!this.contract.write) {
|
|
541
436
|
throw new Error('Wallet client is required for write operations');
|
|
542
437
|
}
|
|
543
|
-
return this.contract.write.
|
|
438
|
+
return this.contract.write.claimWeek([_liquidityProvider, _week, _claimedBalance, _merkleProof], options);
|
|
544
439
|
}
|
|
545
440
|
/**
|
|
546
|
-
*
|
|
441
|
+
* claimWeeks
|
|
547
442
|
* nonpayable
|
|
548
443
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
549
444
|
*/
|
|
550
|
-
async
|
|
445
|
+
async claimWeeks(_liquidityProvider, claims, options) {
|
|
551
446
|
if (!this.contract.write) {
|
|
552
447
|
throw new Error('Wallet client is required for write operations');
|
|
553
448
|
}
|
|
554
|
-
return this.contract.write.
|
|
449
|
+
return this.contract.write.claimWeeks([_liquidityProvider, claims], options);
|
|
555
450
|
}
|
|
556
451
|
/**
|
|
557
|
-
*
|
|
452
|
+
* renounceOwnership
|
|
558
453
|
* nonpayable
|
|
559
454
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
560
455
|
*/
|
|
561
|
-
async
|
|
456
|
+
async renounceOwnership(options) {
|
|
562
457
|
if (!this.contract.write) {
|
|
563
458
|
throw new Error('Wallet client is required for write operations');
|
|
564
459
|
}
|
|
565
|
-
return this.contract.write.
|
|
460
|
+
return this.contract.write.renounceOwnership(options);
|
|
566
461
|
}
|
|
567
462
|
/**
|
|
568
|
-
*
|
|
463
|
+
* seedAllocations
|
|
569
464
|
* nonpayable
|
|
570
465
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
571
466
|
*/
|
|
572
|
-
async
|
|
467
|
+
async seedAllocations(_week, _merkleRoot, _totalAllocation, options) {
|
|
573
468
|
if (!this.contract.write) {
|
|
574
469
|
throw new Error('Wallet client is required for write operations');
|
|
575
470
|
}
|
|
576
|
-
return this.contract.write.
|
|
471
|
+
return this.contract.write.seedAllocations([_week, _merkleRoot, _totalAllocation], options);
|
|
577
472
|
}
|
|
578
473
|
/**
|
|
579
|
-
*
|
|
474
|
+
* transferOwnership
|
|
580
475
|
* nonpayable
|
|
581
476
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
582
477
|
*/
|
|
583
|
-
async
|
|
478
|
+
async transferOwnership(newOwner, options) {
|
|
584
479
|
if (!this.contract.write) {
|
|
585
480
|
throw new Error('Wallet client is required for write operations');
|
|
586
481
|
}
|
|
587
|
-
return this.contract.write.
|
|
482
|
+
return this.contract.write.transferOwnership([newOwner], options);
|
|
588
483
|
}
|
|
589
484
|
/**
|
|
590
485
|
* Simulate contract write operations (dry-run without sending transaction)
|
|
@@ -601,60 +496,44 @@ class MerkleRedeem_json {
|
|
|
601
496
|
}
|
|
602
497
|
return {
|
|
603
498
|
/**
|
|
604
|
-
* Simulate
|
|
499
|
+
* Simulate claimWeek
|
|
605
500
|
* Returns gas estimate and result without sending transaction
|
|
606
501
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
607
502
|
*/
|
|
608
|
-
async
|
|
609
|
-
return contract.simulate.
|
|
503
|
+
async claimWeek(_liquidityProvider, _week, _claimedBalance, _merkleProof, options) {
|
|
504
|
+
return contract.simulate.claimWeek([_liquidityProvider, _week, _claimedBalance, _merkleProof], options);
|
|
610
505
|
},
|
|
611
506
|
/**
|
|
612
|
-
* Simulate
|
|
507
|
+
* Simulate claimWeeks
|
|
613
508
|
* Returns gas estimate and result without sending transaction
|
|
614
509
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
615
510
|
*/
|
|
616
|
-
async
|
|
617
|
-
return contract.simulate.
|
|
511
|
+
async claimWeeks(_liquidityProvider, claims, options) {
|
|
512
|
+
return contract.simulate.claimWeeks([_liquidityProvider, claims], options);
|
|
618
513
|
},
|
|
619
514
|
/**
|
|
620
|
-
* Simulate
|
|
621
|
-
* Returns gas estimate and result without sending transaction
|
|
622
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
623
|
-
*/
|
|
624
|
-
async claimPeriods(recipient, claims, options) {
|
|
625
|
-
return contract.simulate.claimPeriods([recipient, claims], options);
|
|
626
|
-
},
|
|
627
|
-
/**
|
|
628
|
-
* Simulate emergencyWithdraw
|
|
629
|
-
* Returns gas estimate and result without sending transaction
|
|
630
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
631
|
-
*/
|
|
632
|
-
async emergencyWithdraw(token, options) {
|
|
633
|
-
return contract.simulate.emergencyWithdraw([token], options);
|
|
634
|
-
},
|
|
635
|
-
/**
|
|
636
|
-
* Simulate nominateNewOwner
|
|
515
|
+
* Simulate renounceOwnership
|
|
637
516
|
* Returns gas estimate and result without sending transaction
|
|
638
517
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
639
518
|
*/
|
|
640
|
-
async
|
|
641
|
-
return contract.simulate.
|
|
519
|
+
async renounceOwnership(options) {
|
|
520
|
+
return contract.simulate.renounceOwnership(options);
|
|
642
521
|
},
|
|
643
522
|
/**
|
|
644
|
-
* Simulate
|
|
523
|
+
* Simulate seedAllocations
|
|
645
524
|
* Returns gas estimate and result without sending transaction
|
|
646
525
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
647
526
|
*/
|
|
648
|
-
async
|
|
649
|
-
return contract.simulate.
|
|
527
|
+
async seedAllocations(_week, _merkleRoot, _totalAllocation, options) {
|
|
528
|
+
return contract.simulate.seedAllocations([_week, _merkleRoot, _totalAllocation], options);
|
|
650
529
|
},
|
|
651
530
|
/**
|
|
652
|
-
* Simulate
|
|
531
|
+
* Simulate transferOwnership
|
|
653
532
|
* Returns gas estimate and result without sending transaction
|
|
654
533
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
655
534
|
*/
|
|
656
|
-
async
|
|
657
|
-
return contract.simulate.
|
|
535
|
+
async transferOwnership(newOwner, options) {
|
|
536
|
+
return contract.simulate.transferOwnership([newOwner], options);
|
|
658
537
|
}
|
|
659
538
|
};
|
|
660
539
|
}
|
|
@@ -678,31 +557,11 @@ class MerkleRedeem_json {
|
|
|
678
557
|
* @param filter Optional filter for indexed parameters
|
|
679
558
|
* @returns Unwatch function to stop listening
|
|
680
559
|
*/
|
|
681
|
-
Claimed: (callback
|
|
560
|
+
Claimed: (callback) => {
|
|
682
561
|
return this.publicClient.watchContractEvent({
|
|
683
562
|
address: this.contractAddress,
|
|
684
563
|
abi: exports.MerkleRedeem_jsonAbi,
|
|
685
564
|
eventName: 'Claimed',
|
|
686
|
-
args: filter,
|
|
687
|
-
onLogs: (logs) => {
|
|
688
|
-
logs.forEach((log) => {
|
|
689
|
-
callback(log.args);
|
|
690
|
-
});
|
|
691
|
-
},
|
|
692
|
-
});
|
|
693
|
-
},
|
|
694
|
-
/**
|
|
695
|
-
* Watch OwnerChanged events
|
|
696
|
-
* @param callback Function to call when event is emitted
|
|
697
|
-
* @param filter Optional filter for indexed parameters
|
|
698
|
-
* @returns Unwatch function to stop listening
|
|
699
|
-
*/
|
|
700
|
-
OwnerChanged: (callback, filter) => {
|
|
701
|
-
return this.publicClient.watchContractEvent({
|
|
702
|
-
address: this.contractAddress,
|
|
703
|
-
abi: exports.MerkleRedeem_jsonAbi,
|
|
704
|
-
eventName: 'OwnerChanged',
|
|
705
|
-
args: filter,
|
|
706
565
|
onLogs: (logs) => {
|
|
707
566
|
logs.forEach((log) => {
|
|
708
567
|
callback(log.args);
|
|
@@ -711,16 +570,16 @@ class MerkleRedeem_json {
|
|
|
711
570
|
});
|
|
712
571
|
},
|
|
713
572
|
/**
|
|
714
|
-
* Watch
|
|
573
|
+
* Watch OwnershipTransferred events
|
|
715
574
|
* @param callback Function to call when event is emitted
|
|
716
575
|
* @param filter Optional filter for indexed parameters
|
|
717
576
|
* @returns Unwatch function to stop listening
|
|
718
577
|
*/
|
|
719
|
-
|
|
578
|
+
OwnershipTransferred: (callback, filter) => {
|
|
720
579
|
return this.publicClient.watchContractEvent({
|
|
721
580
|
address: this.contractAddress,
|
|
722
581
|
abi: exports.MerkleRedeem_jsonAbi,
|
|
723
|
-
eventName: '
|
|
582
|
+
eventName: 'OwnershipTransferred',
|
|
724
583
|
args: filter,
|
|
725
584
|
onLogs: (logs) => {
|
|
726
585
|
logs.forEach((log) => {
|