@gitmyabi/metabella 0.0.0-stage → 1.0.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 +107 -2
- package/contracts/MetabellaByPokmi.d.ts +1441 -0
- package/contracts/MetabellaByPokmi.js +1447 -0
- package/contracts/MetabellaByPokmi.ts +1893 -0
- package/contracts/index.d.ts +2 -0
- package/contracts/index.js +7 -0
- package/contracts/index.ts +3 -0
- package/index.d.ts +1 -0
- package/index.js +19 -0
- package/package.json +40 -3
|
@@ -0,0 +1,1447 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MetabellaByPokmi = exports.MetabellaByPokmiAbi = void 0;
|
|
4
|
+
const viem_1 = require("viem");
|
|
5
|
+
/**
|
|
6
|
+
* MetabellaByPokmi ABI
|
|
7
|
+
*
|
|
8
|
+
* This ABI is typed using viem's type system for full type safety.
|
|
9
|
+
*/
|
|
10
|
+
exports.MetabellaByPokmiAbi = [
|
|
11
|
+
{
|
|
12
|
+
"inputs": [],
|
|
13
|
+
"stateMutability": "nonpayable",
|
|
14
|
+
"type": "constructor"
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"anonymous": false,
|
|
18
|
+
"inputs": [
|
|
19
|
+
{
|
|
20
|
+
"indexed": true,
|
|
21
|
+
"internalType": "address",
|
|
22
|
+
"name": "owner",
|
|
23
|
+
"type": "address"
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"indexed": true,
|
|
27
|
+
"internalType": "address",
|
|
28
|
+
"name": "approved",
|
|
29
|
+
"type": "address"
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"indexed": true,
|
|
33
|
+
"internalType": "uint256",
|
|
34
|
+
"name": "tokenId",
|
|
35
|
+
"type": "uint256"
|
|
36
|
+
}
|
|
37
|
+
],
|
|
38
|
+
"name": "Approval",
|
|
39
|
+
"type": "event"
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
"anonymous": false,
|
|
43
|
+
"inputs": [
|
|
44
|
+
{
|
|
45
|
+
"indexed": true,
|
|
46
|
+
"internalType": "address",
|
|
47
|
+
"name": "owner",
|
|
48
|
+
"type": "address"
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
"indexed": true,
|
|
52
|
+
"internalType": "address",
|
|
53
|
+
"name": "operator",
|
|
54
|
+
"type": "address"
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"indexed": false,
|
|
58
|
+
"internalType": "bool",
|
|
59
|
+
"name": "approved",
|
|
60
|
+
"type": "bool"
|
|
61
|
+
}
|
|
62
|
+
],
|
|
63
|
+
"name": "ApprovalForAll",
|
|
64
|
+
"type": "event"
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
"anonymous": false,
|
|
68
|
+
"inputs": [
|
|
69
|
+
{
|
|
70
|
+
"indexed": true,
|
|
71
|
+
"internalType": "address",
|
|
72
|
+
"name": "previousOwner",
|
|
73
|
+
"type": "address"
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
"indexed": true,
|
|
77
|
+
"internalType": "address",
|
|
78
|
+
"name": "newOwner",
|
|
79
|
+
"type": "address"
|
|
80
|
+
}
|
|
81
|
+
],
|
|
82
|
+
"name": "OwnershipTransferred",
|
|
83
|
+
"type": "event"
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
"anonymous": false,
|
|
87
|
+
"inputs": [
|
|
88
|
+
{
|
|
89
|
+
"indexed": true,
|
|
90
|
+
"internalType": "address",
|
|
91
|
+
"name": "from",
|
|
92
|
+
"type": "address"
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
"indexed": true,
|
|
96
|
+
"internalType": "address",
|
|
97
|
+
"name": "to",
|
|
98
|
+
"type": "address"
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
"indexed": true,
|
|
102
|
+
"internalType": "uint256",
|
|
103
|
+
"name": "tokenId",
|
|
104
|
+
"type": "uint256"
|
|
105
|
+
}
|
|
106
|
+
],
|
|
107
|
+
"name": "Transfer",
|
|
108
|
+
"type": "event"
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
"inputs": [],
|
|
112
|
+
"name": "MAX_PRESALE_MINT",
|
|
113
|
+
"outputs": [
|
|
114
|
+
{
|
|
115
|
+
"internalType": "uint256",
|
|
116
|
+
"name": "",
|
|
117
|
+
"type": "uint256"
|
|
118
|
+
}
|
|
119
|
+
],
|
|
120
|
+
"stateMutability": "view",
|
|
121
|
+
"type": "function"
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
"inputs": [],
|
|
125
|
+
"name": "MAX_SUPPLY",
|
|
126
|
+
"outputs": [
|
|
127
|
+
{
|
|
128
|
+
"internalType": "uint256",
|
|
129
|
+
"name": "",
|
|
130
|
+
"type": "uint256"
|
|
131
|
+
}
|
|
132
|
+
],
|
|
133
|
+
"stateMutability": "view",
|
|
134
|
+
"type": "function"
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
"inputs": [],
|
|
138
|
+
"name": "PRESALE_PRICE",
|
|
139
|
+
"outputs": [
|
|
140
|
+
{
|
|
141
|
+
"internalType": "uint256",
|
|
142
|
+
"name": "",
|
|
143
|
+
"type": "uint256"
|
|
144
|
+
}
|
|
145
|
+
],
|
|
146
|
+
"stateMutability": "view",
|
|
147
|
+
"type": "function"
|
|
148
|
+
},
|
|
149
|
+
{
|
|
150
|
+
"inputs": [],
|
|
151
|
+
"name": "PUBLICSALE_PRICE",
|
|
152
|
+
"outputs": [
|
|
153
|
+
{
|
|
154
|
+
"internalType": "uint256",
|
|
155
|
+
"name": "",
|
|
156
|
+
"type": "uint256"
|
|
157
|
+
}
|
|
158
|
+
],
|
|
159
|
+
"stateMutability": "view",
|
|
160
|
+
"type": "function"
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
"inputs": [],
|
|
164
|
+
"name": "RESERVE_AMOUNT",
|
|
165
|
+
"outputs": [
|
|
166
|
+
{
|
|
167
|
+
"internalType": "uint256",
|
|
168
|
+
"name": "",
|
|
169
|
+
"type": "uint256"
|
|
170
|
+
}
|
|
171
|
+
],
|
|
172
|
+
"stateMutability": "view",
|
|
173
|
+
"type": "function"
|
|
174
|
+
},
|
|
175
|
+
{
|
|
176
|
+
"inputs": [
|
|
177
|
+
{
|
|
178
|
+
"internalType": "address[]",
|
|
179
|
+
"name": "wallets",
|
|
180
|
+
"type": "address[]"
|
|
181
|
+
}
|
|
182
|
+
],
|
|
183
|
+
"name": "addWhitelist",
|
|
184
|
+
"outputs": [],
|
|
185
|
+
"stateMutability": "nonpayable",
|
|
186
|
+
"type": "function"
|
|
187
|
+
},
|
|
188
|
+
{
|
|
189
|
+
"inputs": [
|
|
190
|
+
{
|
|
191
|
+
"internalType": "address",
|
|
192
|
+
"name": "to",
|
|
193
|
+
"type": "address"
|
|
194
|
+
},
|
|
195
|
+
{
|
|
196
|
+
"internalType": "uint256",
|
|
197
|
+
"name": "tokenId",
|
|
198
|
+
"type": "uint256"
|
|
199
|
+
}
|
|
200
|
+
],
|
|
201
|
+
"name": "approve",
|
|
202
|
+
"outputs": [],
|
|
203
|
+
"stateMutability": "nonpayable",
|
|
204
|
+
"type": "function"
|
|
205
|
+
},
|
|
206
|
+
{
|
|
207
|
+
"inputs": [
|
|
208
|
+
{
|
|
209
|
+
"internalType": "address",
|
|
210
|
+
"name": "owner",
|
|
211
|
+
"type": "address"
|
|
212
|
+
}
|
|
213
|
+
],
|
|
214
|
+
"name": "balanceOf",
|
|
215
|
+
"outputs": [
|
|
216
|
+
{
|
|
217
|
+
"internalType": "uint256",
|
|
218
|
+
"name": "",
|
|
219
|
+
"type": "uint256"
|
|
220
|
+
}
|
|
221
|
+
],
|
|
222
|
+
"stateMutability": "view",
|
|
223
|
+
"type": "function"
|
|
224
|
+
},
|
|
225
|
+
{
|
|
226
|
+
"inputs": [],
|
|
227
|
+
"name": "baseURI",
|
|
228
|
+
"outputs": [
|
|
229
|
+
{
|
|
230
|
+
"internalType": "string",
|
|
231
|
+
"name": "",
|
|
232
|
+
"type": "string"
|
|
233
|
+
}
|
|
234
|
+
],
|
|
235
|
+
"stateMutability": "view",
|
|
236
|
+
"type": "function"
|
|
237
|
+
},
|
|
238
|
+
{
|
|
239
|
+
"inputs": [],
|
|
240
|
+
"name": "disableSale",
|
|
241
|
+
"outputs": [],
|
|
242
|
+
"stateMutability": "nonpayable",
|
|
243
|
+
"type": "function"
|
|
244
|
+
},
|
|
245
|
+
{
|
|
246
|
+
"inputs": [
|
|
247
|
+
{
|
|
248
|
+
"internalType": "uint256",
|
|
249
|
+
"name": "tokenId",
|
|
250
|
+
"type": "uint256"
|
|
251
|
+
}
|
|
252
|
+
],
|
|
253
|
+
"name": "getApproved",
|
|
254
|
+
"outputs": [
|
|
255
|
+
{
|
|
256
|
+
"internalType": "address",
|
|
257
|
+
"name": "",
|
|
258
|
+
"type": "address"
|
|
259
|
+
}
|
|
260
|
+
],
|
|
261
|
+
"stateMutability": "view",
|
|
262
|
+
"type": "function"
|
|
263
|
+
},
|
|
264
|
+
{
|
|
265
|
+
"inputs": [
|
|
266
|
+
{
|
|
267
|
+
"internalType": "address",
|
|
268
|
+
"name": "owner",
|
|
269
|
+
"type": "address"
|
|
270
|
+
},
|
|
271
|
+
{
|
|
272
|
+
"internalType": "address",
|
|
273
|
+
"name": "operator",
|
|
274
|
+
"type": "address"
|
|
275
|
+
}
|
|
276
|
+
],
|
|
277
|
+
"name": "isApprovedForAll",
|
|
278
|
+
"outputs": [
|
|
279
|
+
{
|
|
280
|
+
"internalType": "bool",
|
|
281
|
+
"name": "",
|
|
282
|
+
"type": "bool"
|
|
283
|
+
}
|
|
284
|
+
],
|
|
285
|
+
"stateMutability": "view",
|
|
286
|
+
"type": "function"
|
|
287
|
+
},
|
|
288
|
+
{
|
|
289
|
+
"inputs": [],
|
|
290
|
+
"name": "isPresaleLive",
|
|
291
|
+
"outputs": [
|
|
292
|
+
{
|
|
293
|
+
"internalType": "bool",
|
|
294
|
+
"name": "",
|
|
295
|
+
"type": "bool"
|
|
296
|
+
}
|
|
297
|
+
],
|
|
298
|
+
"stateMutability": "view",
|
|
299
|
+
"type": "function"
|
|
300
|
+
},
|
|
301
|
+
{
|
|
302
|
+
"inputs": [],
|
|
303
|
+
"name": "isPublicsaleLive",
|
|
304
|
+
"outputs": [
|
|
305
|
+
{
|
|
306
|
+
"internalType": "bool",
|
|
307
|
+
"name": "",
|
|
308
|
+
"type": "bool"
|
|
309
|
+
}
|
|
310
|
+
],
|
|
311
|
+
"stateMutability": "view",
|
|
312
|
+
"type": "function"
|
|
313
|
+
},
|
|
314
|
+
{
|
|
315
|
+
"inputs": [
|
|
316
|
+
{
|
|
317
|
+
"internalType": "address",
|
|
318
|
+
"name": "user",
|
|
319
|
+
"type": "address"
|
|
320
|
+
}
|
|
321
|
+
],
|
|
322
|
+
"name": "isWhitelisted",
|
|
323
|
+
"outputs": [
|
|
324
|
+
{
|
|
325
|
+
"internalType": "bool",
|
|
326
|
+
"name": "",
|
|
327
|
+
"type": "bool"
|
|
328
|
+
}
|
|
329
|
+
],
|
|
330
|
+
"stateMutability": "view",
|
|
331
|
+
"type": "function"
|
|
332
|
+
},
|
|
333
|
+
{
|
|
334
|
+
"inputs": [
|
|
335
|
+
{
|
|
336
|
+
"internalType": "uint256",
|
|
337
|
+
"name": "amount",
|
|
338
|
+
"type": "uint256"
|
|
339
|
+
}
|
|
340
|
+
],
|
|
341
|
+
"name": "mint",
|
|
342
|
+
"outputs": [],
|
|
343
|
+
"stateMutability": "payable",
|
|
344
|
+
"type": "function"
|
|
345
|
+
},
|
|
346
|
+
{
|
|
347
|
+
"inputs": [],
|
|
348
|
+
"name": "name",
|
|
349
|
+
"outputs": [
|
|
350
|
+
{
|
|
351
|
+
"internalType": "string",
|
|
352
|
+
"name": "",
|
|
353
|
+
"type": "string"
|
|
354
|
+
}
|
|
355
|
+
],
|
|
356
|
+
"stateMutability": "view",
|
|
357
|
+
"type": "function"
|
|
358
|
+
},
|
|
359
|
+
{
|
|
360
|
+
"inputs": [],
|
|
361
|
+
"name": "nextOwnerToExplicitlySet",
|
|
362
|
+
"outputs": [
|
|
363
|
+
{
|
|
364
|
+
"internalType": "uint256",
|
|
365
|
+
"name": "",
|
|
366
|
+
"type": "uint256"
|
|
367
|
+
}
|
|
368
|
+
],
|
|
369
|
+
"stateMutability": "view",
|
|
370
|
+
"type": "function"
|
|
371
|
+
},
|
|
372
|
+
{
|
|
373
|
+
"inputs": [
|
|
374
|
+
{
|
|
375
|
+
"internalType": "address",
|
|
376
|
+
"name": "user",
|
|
377
|
+
"type": "address"
|
|
378
|
+
}
|
|
379
|
+
],
|
|
380
|
+
"name": "numberMinted",
|
|
381
|
+
"outputs": [
|
|
382
|
+
{
|
|
383
|
+
"internalType": "uint256",
|
|
384
|
+
"name": "",
|
|
385
|
+
"type": "uint256"
|
|
386
|
+
}
|
|
387
|
+
],
|
|
388
|
+
"stateMutability": "view",
|
|
389
|
+
"type": "function"
|
|
390
|
+
},
|
|
391
|
+
{
|
|
392
|
+
"inputs": [],
|
|
393
|
+
"name": "owner",
|
|
394
|
+
"outputs": [
|
|
395
|
+
{
|
|
396
|
+
"internalType": "address",
|
|
397
|
+
"name": "",
|
|
398
|
+
"type": "address"
|
|
399
|
+
}
|
|
400
|
+
],
|
|
401
|
+
"stateMutability": "view",
|
|
402
|
+
"type": "function"
|
|
403
|
+
},
|
|
404
|
+
{
|
|
405
|
+
"inputs": [
|
|
406
|
+
{
|
|
407
|
+
"internalType": "uint256",
|
|
408
|
+
"name": "tokenId",
|
|
409
|
+
"type": "uint256"
|
|
410
|
+
}
|
|
411
|
+
],
|
|
412
|
+
"name": "ownerOf",
|
|
413
|
+
"outputs": [
|
|
414
|
+
{
|
|
415
|
+
"internalType": "address",
|
|
416
|
+
"name": "",
|
|
417
|
+
"type": "address"
|
|
418
|
+
}
|
|
419
|
+
],
|
|
420
|
+
"stateMutability": "view",
|
|
421
|
+
"type": "function"
|
|
422
|
+
},
|
|
423
|
+
{
|
|
424
|
+
"inputs": [
|
|
425
|
+
{
|
|
426
|
+
"internalType": "uint256",
|
|
427
|
+
"name": "amount",
|
|
428
|
+
"type": "uint256"
|
|
429
|
+
}
|
|
430
|
+
],
|
|
431
|
+
"name": "presaleMint",
|
|
432
|
+
"outputs": [],
|
|
433
|
+
"stateMutability": "payable",
|
|
434
|
+
"type": "function"
|
|
435
|
+
},
|
|
436
|
+
{
|
|
437
|
+
"inputs": [],
|
|
438
|
+
"name": "presaleStartTime",
|
|
439
|
+
"outputs": [
|
|
440
|
+
{
|
|
441
|
+
"internalType": "uint256",
|
|
442
|
+
"name": "",
|
|
443
|
+
"type": "uint256"
|
|
444
|
+
}
|
|
445
|
+
],
|
|
446
|
+
"stateMutability": "view",
|
|
447
|
+
"type": "function"
|
|
448
|
+
},
|
|
449
|
+
{
|
|
450
|
+
"inputs": [],
|
|
451
|
+
"name": "publicsaleStartTime",
|
|
452
|
+
"outputs": [
|
|
453
|
+
{
|
|
454
|
+
"internalType": "uint256",
|
|
455
|
+
"name": "",
|
|
456
|
+
"type": "uint256"
|
|
457
|
+
}
|
|
458
|
+
],
|
|
459
|
+
"stateMutability": "view",
|
|
460
|
+
"type": "function"
|
|
461
|
+
},
|
|
462
|
+
{
|
|
463
|
+
"inputs": [
|
|
464
|
+
{
|
|
465
|
+
"internalType": "address[]",
|
|
466
|
+
"name": "wallets",
|
|
467
|
+
"type": "address[]"
|
|
468
|
+
}
|
|
469
|
+
],
|
|
470
|
+
"name": "removeWhitelist",
|
|
471
|
+
"outputs": [],
|
|
472
|
+
"stateMutability": "nonpayable",
|
|
473
|
+
"type": "function"
|
|
474
|
+
},
|
|
475
|
+
{
|
|
476
|
+
"inputs": [],
|
|
477
|
+
"name": "renounceOwnership",
|
|
478
|
+
"outputs": [],
|
|
479
|
+
"stateMutability": "nonpayable",
|
|
480
|
+
"type": "function"
|
|
481
|
+
},
|
|
482
|
+
{
|
|
483
|
+
"inputs": [
|
|
484
|
+
{
|
|
485
|
+
"internalType": "address[]",
|
|
486
|
+
"name": "recipients",
|
|
487
|
+
"type": "address[]"
|
|
488
|
+
}
|
|
489
|
+
],
|
|
490
|
+
"name": "reserve",
|
|
491
|
+
"outputs": [],
|
|
492
|
+
"stateMutability": "nonpayable",
|
|
493
|
+
"type": "function"
|
|
494
|
+
},
|
|
495
|
+
{
|
|
496
|
+
"inputs": [
|
|
497
|
+
{
|
|
498
|
+
"internalType": "address",
|
|
499
|
+
"name": "from",
|
|
500
|
+
"type": "address"
|
|
501
|
+
},
|
|
502
|
+
{
|
|
503
|
+
"internalType": "address",
|
|
504
|
+
"name": "to",
|
|
505
|
+
"type": "address"
|
|
506
|
+
},
|
|
507
|
+
{
|
|
508
|
+
"internalType": "uint256",
|
|
509
|
+
"name": "tokenId",
|
|
510
|
+
"type": "uint256"
|
|
511
|
+
}
|
|
512
|
+
],
|
|
513
|
+
"name": "safeTransferFrom",
|
|
514
|
+
"outputs": [],
|
|
515
|
+
"stateMutability": "nonpayable",
|
|
516
|
+
"type": "function"
|
|
517
|
+
},
|
|
518
|
+
{
|
|
519
|
+
"inputs": [
|
|
520
|
+
{
|
|
521
|
+
"internalType": "address",
|
|
522
|
+
"name": "from",
|
|
523
|
+
"type": "address"
|
|
524
|
+
},
|
|
525
|
+
{
|
|
526
|
+
"internalType": "address",
|
|
527
|
+
"name": "to",
|
|
528
|
+
"type": "address"
|
|
529
|
+
},
|
|
530
|
+
{
|
|
531
|
+
"internalType": "uint256",
|
|
532
|
+
"name": "tokenId",
|
|
533
|
+
"type": "uint256"
|
|
534
|
+
},
|
|
535
|
+
{
|
|
536
|
+
"internalType": "bytes",
|
|
537
|
+
"name": "_data",
|
|
538
|
+
"type": "bytes"
|
|
539
|
+
}
|
|
540
|
+
],
|
|
541
|
+
"name": "safeTransferFrom",
|
|
542
|
+
"outputs": [],
|
|
543
|
+
"stateMutability": "nonpayable",
|
|
544
|
+
"type": "function"
|
|
545
|
+
},
|
|
546
|
+
{
|
|
547
|
+
"inputs": [
|
|
548
|
+
{
|
|
549
|
+
"internalType": "address",
|
|
550
|
+
"name": "operator",
|
|
551
|
+
"type": "address"
|
|
552
|
+
},
|
|
553
|
+
{
|
|
554
|
+
"internalType": "bool",
|
|
555
|
+
"name": "approved",
|
|
556
|
+
"type": "bool"
|
|
557
|
+
}
|
|
558
|
+
],
|
|
559
|
+
"name": "setApprovalForAll",
|
|
560
|
+
"outputs": [],
|
|
561
|
+
"stateMutability": "nonpayable",
|
|
562
|
+
"type": "function"
|
|
563
|
+
},
|
|
564
|
+
{
|
|
565
|
+
"inputs": [
|
|
566
|
+
{
|
|
567
|
+
"internalType": "string",
|
|
568
|
+
"name": "newBaseURI",
|
|
569
|
+
"type": "string"
|
|
570
|
+
}
|
|
571
|
+
],
|
|
572
|
+
"name": "setBaseURI",
|
|
573
|
+
"outputs": [],
|
|
574
|
+
"stateMutability": "nonpayable",
|
|
575
|
+
"type": "function"
|
|
576
|
+
},
|
|
577
|
+
{
|
|
578
|
+
"inputs": [
|
|
579
|
+
{
|
|
580
|
+
"internalType": "uint256",
|
|
581
|
+
"name": "quantity",
|
|
582
|
+
"type": "uint256"
|
|
583
|
+
}
|
|
584
|
+
],
|
|
585
|
+
"name": "setOwnersExplicit",
|
|
586
|
+
"outputs": [],
|
|
587
|
+
"stateMutability": "nonpayable",
|
|
588
|
+
"type": "function"
|
|
589
|
+
},
|
|
590
|
+
{
|
|
591
|
+
"inputs": [
|
|
592
|
+
{
|
|
593
|
+
"internalType": "uint256",
|
|
594
|
+
"name": "timestamp",
|
|
595
|
+
"type": "uint256"
|
|
596
|
+
}
|
|
597
|
+
],
|
|
598
|
+
"name": "setPresaleTime",
|
|
599
|
+
"outputs": [],
|
|
600
|
+
"stateMutability": "nonpayable",
|
|
601
|
+
"type": "function"
|
|
602
|
+
},
|
|
603
|
+
{
|
|
604
|
+
"inputs": [
|
|
605
|
+
{
|
|
606
|
+
"internalType": "uint256",
|
|
607
|
+
"name": "timestamp",
|
|
608
|
+
"type": "uint256"
|
|
609
|
+
}
|
|
610
|
+
],
|
|
611
|
+
"name": "setPublicsaleTime",
|
|
612
|
+
"outputs": [],
|
|
613
|
+
"stateMutability": "nonpayable",
|
|
614
|
+
"type": "function"
|
|
615
|
+
},
|
|
616
|
+
{
|
|
617
|
+
"inputs": [
|
|
618
|
+
{
|
|
619
|
+
"internalType": "bytes4",
|
|
620
|
+
"name": "interfaceId",
|
|
621
|
+
"type": "bytes4"
|
|
622
|
+
}
|
|
623
|
+
],
|
|
624
|
+
"name": "supportsInterface",
|
|
625
|
+
"outputs": [
|
|
626
|
+
{
|
|
627
|
+
"internalType": "bool",
|
|
628
|
+
"name": "",
|
|
629
|
+
"type": "bool"
|
|
630
|
+
}
|
|
631
|
+
],
|
|
632
|
+
"stateMutability": "view",
|
|
633
|
+
"type": "function"
|
|
634
|
+
},
|
|
635
|
+
{
|
|
636
|
+
"inputs": [],
|
|
637
|
+
"name": "symbol",
|
|
638
|
+
"outputs": [
|
|
639
|
+
{
|
|
640
|
+
"internalType": "string",
|
|
641
|
+
"name": "",
|
|
642
|
+
"type": "string"
|
|
643
|
+
}
|
|
644
|
+
],
|
|
645
|
+
"stateMutability": "view",
|
|
646
|
+
"type": "function"
|
|
647
|
+
},
|
|
648
|
+
{
|
|
649
|
+
"inputs": [
|
|
650
|
+
{
|
|
651
|
+
"internalType": "uint256",
|
|
652
|
+
"name": "index",
|
|
653
|
+
"type": "uint256"
|
|
654
|
+
}
|
|
655
|
+
],
|
|
656
|
+
"name": "tokenByIndex",
|
|
657
|
+
"outputs": [
|
|
658
|
+
{
|
|
659
|
+
"internalType": "uint256",
|
|
660
|
+
"name": "",
|
|
661
|
+
"type": "uint256"
|
|
662
|
+
}
|
|
663
|
+
],
|
|
664
|
+
"stateMutability": "view",
|
|
665
|
+
"type": "function"
|
|
666
|
+
},
|
|
667
|
+
{
|
|
668
|
+
"inputs": [
|
|
669
|
+
{
|
|
670
|
+
"internalType": "address",
|
|
671
|
+
"name": "owner",
|
|
672
|
+
"type": "address"
|
|
673
|
+
},
|
|
674
|
+
{
|
|
675
|
+
"internalType": "uint256",
|
|
676
|
+
"name": "index",
|
|
677
|
+
"type": "uint256"
|
|
678
|
+
}
|
|
679
|
+
],
|
|
680
|
+
"name": "tokenOfOwnerByIndex",
|
|
681
|
+
"outputs": [
|
|
682
|
+
{
|
|
683
|
+
"internalType": "uint256",
|
|
684
|
+
"name": "",
|
|
685
|
+
"type": "uint256"
|
|
686
|
+
}
|
|
687
|
+
],
|
|
688
|
+
"stateMutability": "view",
|
|
689
|
+
"type": "function"
|
|
690
|
+
},
|
|
691
|
+
{
|
|
692
|
+
"inputs": [
|
|
693
|
+
{
|
|
694
|
+
"internalType": "uint256",
|
|
695
|
+
"name": "tokenId",
|
|
696
|
+
"type": "uint256"
|
|
697
|
+
}
|
|
698
|
+
],
|
|
699
|
+
"name": "tokenURI",
|
|
700
|
+
"outputs": [
|
|
701
|
+
{
|
|
702
|
+
"internalType": "string",
|
|
703
|
+
"name": "",
|
|
704
|
+
"type": "string"
|
|
705
|
+
}
|
|
706
|
+
],
|
|
707
|
+
"stateMutability": "view",
|
|
708
|
+
"type": "function"
|
|
709
|
+
},
|
|
710
|
+
{
|
|
711
|
+
"inputs": [],
|
|
712
|
+
"name": "tokensReserved",
|
|
713
|
+
"outputs": [
|
|
714
|
+
{
|
|
715
|
+
"internalType": "uint256",
|
|
716
|
+
"name": "",
|
|
717
|
+
"type": "uint256"
|
|
718
|
+
}
|
|
719
|
+
],
|
|
720
|
+
"stateMutability": "view",
|
|
721
|
+
"type": "function"
|
|
722
|
+
},
|
|
723
|
+
{
|
|
724
|
+
"inputs": [],
|
|
725
|
+
"name": "totalSupply",
|
|
726
|
+
"outputs": [
|
|
727
|
+
{
|
|
728
|
+
"internalType": "uint256",
|
|
729
|
+
"name": "",
|
|
730
|
+
"type": "uint256"
|
|
731
|
+
}
|
|
732
|
+
],
|
|
733
|
+
"stateMutability": "view",
|
|
734
|
+
"type": "function"
|
|
735
|
+
},
|
|
736
|
+
{
|
|
737
|
+
"inputs": [
|
|
738
|
+
{
|
|
739
|
+
"internalType": "address",
|
|
740
|
+
"name": "from",
|
|
741
|
+
"type": "address"
|
|
742
|
+
},
|
|
743
|
+
{
|
|
744
|
+
"internalType": "address",
|
|
745
|
+
"name": "to",
|
|
746
|
+
"type": "address"
|
|
747
|
+
},
|
|
748
|
+
{
|
|
749
|
+
"internalType": "uint256",
|
|
750
|
+
"name": "tokenId",
|
|
751
|
+
"type": "uint256"
|
|
752
|
+
}
|
|
753
|
+
],
|
|
754
|
+
"name": "transferFrom",
|
|
755
|
+
"outputs": [],
|
|
756
|
+
"stateMutability": "nonpayable",
|
|
757
|
+
"type": "function"
|
|
758
|
+
},
|
|
759
|
+
{
|
|
760
|
+
"inputs": [
|
|
761
|
+
{
|
|
762
|
+
"internalType": "address",
|
|
763
|
+
"name": "newOwner",
|
|
764
|
+
"type": "address"
|
|
765
|
+
}
|
|
766
|
+
],
|
|
767
|
+
"name": "transferOwnership",
|
|
768
|
+
"outputs": [],
|
|
769
|
+
"stateMutability": "nonpayable",
|
|
770
|
+
"type": "function"
|
|
771
|
+
},
|
|
772
|
+
{
|
|
773
|
+
"inputs": [],
|
|
774
|
+
"name": "withdraw",
|
|
775
|
+
"outputs": [],
|
|
776
|
+
"stateMutability": "nonpayable",
|
|
777
|
+
"type": "function"
|
|
778
|
+
}
|
|
779
|
+
];
|
|
780
|
+
/**
|
|
781
|
+
* MetabellaByPokmi Contract Class
|
|
782
|
+
*
|
|
783
|
+
* Provides a class-based API similar to TypeChain for interacting with the contract.
|
|
784
|
+
*
|
|
785
|
+
* @example
|
|
786
|
+
* ```typescript
|
|
787
|
+
* import { createPublicClient, createWalletClient, http } from 'viem';
|
|
788
|
+
* import { mainnet } from 'viem/chains';
|
|
789
|
+
* import { MetabellaByPokmi } from 'MetabellaByPokmi';
|
|
790
|
+
*
|
|
791
|
+
* const publicClient = createPublicClient({ chain: mainnet, transport: http() });
|
|
792
|
+
* const walletClient = createWalletClient({ chain: mainnet, transport: http() });
|
|
793
|
+
*
|
|
794
|
+
* const contract = new MetabellaByPokmi('0x...', { publicClient, walletClient });
|
|
795
|
+
*
|
|
796
|
+
* // Read functions
|
|
797
|
+
* const result = await contract.balanceOf('0x...');
|
|
798
|
+
*
|
|
799
|
+
* // Write functions
|
|
800
|
+
* const hash = await contract.transfer('0x...', 1000n);
|
|
801
|
+
*
|
|
802
|
+
* // Simulate transactions (dry-run)
|
|
803
|
+
* const simulation = await contract.simulate.transfer('0x...', 1000n);
|
|
804
|
+
* console.log('Gas estimate:', simulation.request.gas);
|
|
805
|
+
*
|
|
806
|
+
* // Watch events
|
|
807
|
+
* const unwatch = contract.watch.Transfer((event) => {
|
|
808
|
+
* console.log('Transfer event:', event);
|
|
809
|
+
* });
|
|
810
|
+
* ```
|
|
811
|
+
*/
|
|
812
|
+
class MetabellaByPokmi {
|
|
813
|
+
constructor(address, clients) {
|
|
814
|
+
this.contractAddress = address;
|
|
815
|
+
this.publicClient = clients.publicClient;
|
|
816
|
+
this.contract = (0, viem_1.getContract)({
|
|
817
|
+
address,
|
|
818
|
+
abi: exports.MetabellaByPokmiAbi,
|
|
819
|
+
client: {
|
|
820
|
+
public: clients.publicClient,
|
|
821
|
+
wallet: clients.walletClient,
|
|
822
|
+
},
|
|
823
|
+
});
|
|
824
|
+
}
|
|
825
|
+
/**
|
|
826
|
+
* Get the contract address
|
|
827
|
+
*/
|
|
828
|
+
get address() {
|
|
829
|
+
return this.contractAddress;
|
|
830
|
+
}
|
|
831
|
+
/**
|
|
832
|
+
* Get the underlying viem contract instance.
|
|
833
|
+
*/
|
|
834
|
+
getContract() {
|
|
835
|
+
return this.contract;
|
|
836
|
+
}
|
|
837
|
+
/**
|
|
838
|
+
* MAX_PRESALE_MINT
|
|
839
|
+
* view
|
|
840
|
+
*/
|
|
841
|
+
async MAX_PRESALE_MINT() {
|
|
842
|
+
return this.contract.read.MAX_PRESALE_MINT();
|
|
843
|
+
}
|
|
844
|
+
/**
|
|
845
|
+
* MAX_SUPPLY
|
|
846
|
+
* view
|
|
847
|
+
*/
|
|
848
|
+
async MAX_SUPPLY() {
|
|
849
|
+
return this.contract.read.MAX_SUPPLY();
|
|
850
|
+
}
|
|
851
|
+
/**
|
|
852
|
+
* PRESALE_PRICE
|
|
853
|
+
* view
|
|
854
|
+
*/
|
|
855
|
+
async PRESALE_PRICE() {
|
|
856
|
+
return this.contract.read.PRESALE_PRICE();
|
|
857
|
+
}
|
|
858
|
+
/**
|
|
859
|
+
* PUBLICSALE_PRICE
|
|
860
|
+
* view
|
|
861
|
+
*/
|
|
862
|
+
async PUBLICSALE_PRICE() {
|
|
863
|
+
return this.contract.read.PUBLICSALE_PRICE();
|
|
864
|
+
}
|
|
865
|
+
/**
|
|
866
|
+
* RESERVE_AMOUNT
|
|
867
|
+
* view
|
|
868
|
+
*/
|
|
869
|
+
async RESERVE_AMOUNT() {
|
|
870
|
+
return this.contract.read.RESERVE_AMOUNT();
|
|
871
|
+
}
|
|
872
|
+
/**
|
|
873
|
+
* balanceOf
|
|
874
|
+
* view
|
|
875
|
+
*/
|
|
876
|
+
async balanceOf(owner) {
|
|
877
|
+
return this.contract.read.balanceOf([owner]);
|
|
878
|
+
}
|
|
879
|
+
/**
|
|
880
|
+
* baseURI
|
|
881
|
+
* view
|
|
882
|
+
*/
|
|
883
|
+
async baseURI() {
|
|
884
|
+
return this.contract.read.baseURI();
|
|
885
|
+
}
|
|
886
|
+
/**
|
|
887
|
+
* getApproved
|
|
888
|
+
* view
|
|
889
|
+
*/
|
|
890
|
+
async getApproved(tokenId) {
|
|
891
|
+
return this.contract.read.getApproved([tokenId]);
|
|
892
|
+
}
|
|
893
|
+
/**
|
|
894
|
+
* isApprovedForAll
|
|
895
|
+
* view
|
|
896
|
+
*/
|
|
897
|
+
async isApprovedForAll(owner, operator) {
|
|
898
|
+
return this.contract.read.isApprovedForAll([owner, operator]);
|
|
899
|
+
}
|
|
900
|
+
/**
|
|
901
|
+
* isPresaleLive
|
|
902
|
+
* view
|
|
903
|
+
*/
|
|
904
|
+
async isPresaleLive() {
|
|
905
|
+
return this.contract.read.isPresaleLive();
|
|
906
|
+
}
|
|
907
|
+
/**
|
|
908
|
+
* isPublicsaleLive
|
|
909
|
+
* view
|
|
910
|
+
*/
|
|
911
|
+
async isPublicsaleLive() {
|
|
912
|
+
return this.contract.read.isPublicsaleLive();
|
|
913
|
+
}
|
|
914
|
+
/**
|
|
915
|
+
* isWhitelisted
|
|
916
|
+
* view
|
|
917
|
+
*/
|
|
918
|
+
async isWhitelisted(user) {
|
|
919
|
+
return this.contract.read.isWhitelisted([user]);
|
|
920
|
+
}
|
|
921
|
+
/**
|
|
922
|
+
* name
|
|
923
|
+
* view
|
|
924
|
+
*/
|
|
925
|
+
async name() {
|
|
926
|
+
return this.contract.read.name();
|
|
927
|
+
}
|
|
928
|
+
/**
|
|
929
|
+
* nextOwnerToExplicitlySet
|
|
930
|
+
* view
|
|
931
|
+
*/
|
|
932
|
+
async nextOwnerToExplicitlySet() {
|
|
933
|
+
return this.contract.read.nextOwnerToExplicitlySet();
|
|
934
|
+
}
|
|
935
|
+
/**
|
|
936
|
+
* numberMinted
|
|
937
|
+
* view
|
|
938
|
+
*/
|
|
939
|
+
async numberMinted(user) {
|
|
940
|
+
return this.contract.read.numberMinted([user]);
|
|
941
|
+
}
|
|
942
|
+
/**
|
|
943
|
+
* owner
|
|
944
|
+
* view
|
|
945
|
+
*/
|
|
946
|
+
async owner() {
|
|
947
|
+
return this.contract.read.owner();
|
|
948
|
+
}
|
|
949
|
+
/**
|
|
950
|
+
* ownerOf
|
|
951
|
+
* view
|
|
952
|
+
*/
|
|
953
|
+
async ownerOf(tokenId) {
|
|
954
|
+
return this.contract.read.ownerOf([tokenId]);
|
|
955
|
+
}
|
|
956
|
+
/**
|
|
957
|
+
* presaleStartTime
|
|
958
|
+
* view
|
|
959
|
+
*/
|
|
960
|
+
async presaleStartTime() {
|
|
961
|
+
return this.contract.read.presaleStartTime();
|
|
962
|
+
}
|
|
963
|
+
/**
|
|
964
|
+
* publicsaleStartTime
|
|
965
|
+
* view
|
|
966
|
+
*/
|
|
967
|
+
async publicsaleStartTime() {
|
|
968
|
+
return this.contract.read.publicsaleStartTime();
|
|
969
|
+
}
|
|
970
|
+
/**
|
|
971
|
+
* supportsInterface
|
|
972
|
+
* view
|
|
973
|
+
*/
|
|
974
|
+
async supportsInterface(interfaceId) {
|
|
975
|
+
return this.contract.read.supportsInterface([interfaceId]);
|
|
976
|
+
}
|
|
977
|
+
/**
|
|
978
|
+
* symbol
|
|
979
|
+
* view
|
|
980
|
+
*/
|
|
981
|
+
async symbol() {
|
|
982
|
+
return this.contract.read.symbol();
|
|
983
|
+
}
|
|
984
|
+
/**
|
|
985
|
+
* tokenByIndex
|
|
986
|
+
* view
|
|
987
|
+
*/
|
|
988
|
+
async tokenByIndex(index) {
|
|
989
|
+
return this.contract.read.tokenByIndex([index]);
|
|
990
|
+
}
|
|
991
|
+
/**
|
|
992
|
+
* tokenOfOwnerByIndex
|
|
993
|
+
* view
|
|
994
|
+
*/
|
|
995
|
+
async tokenOfOwnerByIndex(owner, index) {
|
|
996
|
+
return this.contract.read.tokenOfOwnerByIndex([owner, index]);
|
|
997
|
+
}
|
|
998
|
+
/**
|
|
999
|
+
* tokenURI
|
|
1000
|
+
* view
|
|
1001
|
+
*/
|
|
1002
|
+
async tokenURI(tokenId) {
|
|
1003
|
+
return this.contract.read.tokenURI([tokenId]);
|
|
1004
|
+
}
|
|
1005
|
+
/**
|
|
1006
|
+
* tokensReserved
|
|
1007
|
+
* view
|
|
1008
|
+
*/
|
|
1009
|
+
async tokensReserved() {
|
|
1010
|
+
return this.contract.read.tokensReserved();
|
|
1011
|
+
}
|
|
1012
|
+
/**
|
|
1013
|
+
* totalSupply
|
|
1014
|
+
* view
|
|
1015
|
+
*/
|
|
1016
|
+
async totalSupply() {
|
|
1017
|
+
return this.contract.read.totalSupply();
|
|
1018
|
+
}
|
|
1019
|
+
/**
|
|
1020
|
+
* addWhitelist
|
|
1021
|
+
* nonpayable
|
|
1022
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1023
|
+
*/
|
|
1024
|
+
async addWhitelist(wallets, options) {
|
|
1025
|
+
if (!this.contract.write) {
|
|
1026
|
+
throw new Error('Wallet client is required for write operations');
|
|
1027
|
+
}
|
|
1028
|
+
return this.contract.write.addWhitelist([wallets], options);
|
|
1029
|
+
}
|
|
1030
|
+
/**
|
|
1031
|
+
* approve
|
|
1032
|
+
* nonpayable
|
|
1033
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1034
|
+
*/
|
|
1035
|
+
async approve(to, tokenId, options) {
|
|
1036
|
+
if (!this.contract.write) {
|
|
1037
|
+
throw new Error('Wallet client is required for write operations');
|
|
1038
|
+
}
|
|
1039
|
+
return this.contract.write.approve([to, tokenId], options);
|
|
1040
|
+
}
|
|
1041
|
+
/**
|
|
1042
|
+
* disableSale
|
|
1043
|
+
* nonpayable
|
|
1044
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1045
|
+
*/
|
|
1046
|
+
async disableSale(options) {
|
|
1047
|
+
if (!this.contract.write) {
|
|
1048
|
+
throw new Error('Wallet client is required for write operations');
|
|
1049
|
+
}
|
|
1050
|
+
return this.contract.write.disableSale(options);
|
|
1051
|
+
}
|
|
1052
|
+
/**
|
|
1053
|
+
* mint
|
|
1054
|
+
* payable
|
|
1055
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1056
|
+
*/
|
|
1057
|
+
async mint(amount, options) {
|
|
1058
|
+
if (!this.contract.write) {
|
|
1059
|
+
throw new Error('Wallet client is required for write operations');
|
|
1060
|
+
}
|
|
1061
|
+
return this.contract.write.mint([amount], options);
|
|
1062
|
+
}
|
|
1063
|
+
/**
|
|
1064
|
+
* presaleMint
|
|
1065
|
+
* payable
|
|
1066
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1067
|
+
*/
|
|
1068
|
+
async presaleMint(amount, options) {
|
|
1069
|
+
if (!this.contract.write) {
|
|
1070
|
+
throw new Error('Wallet client is required for write operations');
|
|
1071
|
+
}
|
|
1072
|
+
return this.contract.write.presaleMint([amount], options);
|
|
1073
|
+
}
|
|
1074
|
+
/**
|
|
1075
|
+
* removeWhitelist
|
|
1076
|
+
* nonpayable
|
|
1077
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1078
|
+
*/
|
|
1079
|
+
async removeWhitelist(wallets, options) {
|
|
1080
|
+
if (!this.contract.write) {
|
|
1081
|
+
throw new Error('Wallet client is required for write operations');
|
|
1082
|
+
}
|
|
1083
|
+
return this.contract.write.removeWhitelist([wallets], options);
|
|
1084
|
+
}
|
|
1085
|
+
/**
|
|
1086
|
+
* renounceOwnership
|
|
1087
|
+
* nonpayable
|
|
1088
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1089
|
+
*/
|
|
1090
|
+
async renounceOwnership(options) {
|
|
1091
|
+
if (!this.contract.write) {
|
|
1092
|
+
throw new Error('Wallet client is required for write operations');
|
|
1093
|
+
}
|
|
1094
|
+
return this.contract.write.renounceOwnership(options);
|
|
1095
|
+
}
|
|
1096
|
+
/**
|
|
1097
|
+
* reserve
|
|
1098
|
+
* nonpayable
|
|
1099
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1100
|
+
*/
|
|
1101
|
+
async reserve(recipients, options) {
|
|
1102
|
+
if (!this.contract.write) {
|
|
1103
|
+
throw new Error('Wallet client is required for write operations');
|
|
1104
|
+
}
|
|
1105
|
+
return this.contract.write.reserve([recipients], options);
|
|
1106
|
+
}
|
|
1107
|
+
async safeTransferFrom(...args) {
|
|
1108
|
+
if (!this.contract.write) {
|
|
1109
|
+
throw new Error('Wallet client is required for write operations');
|
|
1110
|
+
}
|
|
1111
|
+
return this.contract.write.safeTransferFrom(args);
|
|
1112
|
+
}
|
|
1113
|
+
/**
|
|
1114
|
+
* setApprovalForAll
|
|
1115
|
+
* nonpayable
|
|
1116
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1117
|
+
*/
|
|
1118
|
+
async setApprovalForAll(operator, approved, options) {
|
|
1119
|
+
if (!this.contract.write) {
|
|
1120
|
+
throw new Error('Wallet client is required for write operations');
|
|
1121
|
+
}
|
|
1122
|
+
return this.contract.write.setApprovalForAll([operator, approved], options);
|
|
1123
|
+
}
|
|
1124
|
+
/**
|
|
1125
|
+
* setBaseURI
|
|
1126
|
+
* nonpayable
|
|
1127
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1128
|
+
*/
|
|
1129
|
+
async setBaseURI(newBaseURI, options) {
|
|
1130
|
+
if (!this.contract.write) {
|
|
1131
|
+
throw new Error('Wallet client is required for write operations');
|
|
1132
|
+
}
|
|
1133
|
+
return this.contract.write.setBaseURI([newBaseURI], options);
|
|
1134
|
+
}
|
|
1135
|
+
/**
|
|
1136
|
+
* setOwnersExplicit
|
|
1137
|
+
* nonpayable
|
|
1138
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1139
|
+
*/
|
|
1140
|
+
async setOwnersExplicit(quantity, options) {
|
|
1141
|
+
if (!this.contract.write) {
|
|
1142
|
+
throw new Error('Wallet client is required for write operations');
|
|
1143
|
+
}
|
|
1144
|
+
return this.contract.write.setOwnersExplicit([quantity], options);
|
|
1145
|
+
}
|
|
1146
|
+
/**
|
|
1147
|
+
* setPresaleTime
|
|
1148
|
+
* nonpayable
|
|
1149
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1150
|
+
*/
|
|
1151
|
+
async setPresaleTime(timestamp, options) {
|
|
1152
|
+
if (!this.contract.write) {
|
|
1153
|
+
throw new Error('Wallet client is required for write operations');
|
|
1154
|
+
}
|
|
1155
|
+
return this.contract.write.setPresaleTime([timestamp], options);
|
|
1156
|
+
}
|
|
1157
|
+
/**
|
|
1158
|
+
* setPublicsaleTime
|
|
1159
|
+
* nonpayable
|
|
1160
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1161
|
+
*/
|
|
1162
|
+
async setPublicsaleTime(timestamp, options) {
|
|
1163
|
+
if (!this.contract.write) {
|
|
1164
|
+
throw new Error('Wallet client is required for write operations');
|
|
1165
|
+
}
|
|
1166
|
+
return this.contract.write.setPublicsaleTime([timestamp], options);
|
|
1167
|
+
}
|
|
1168
|
+
/**
|
|
1169
|
+
* transferFrom
|
|
1170
|
+
* nonpayable
|
|
1171
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1172
|
+
*/
|
|
1173
|
+
async transferFrom(from, to, tokenId, options) {
|
|
1174
|
+
if (!this.contract.write) {
|
|
1175
|
+
throw new Error('Wallet client is required for write operations');
|
|
1176
|
+
}
|
|
1177
|
+
return this.contract.write.transferFrom([from, to, tokenId], options);
|
|
1178
|
+
}
|
|
1179
|
+
/**
|
|
1180
|
+
* transferOwnership
|
|
1181
|
+
* nonpayable
|
|
1182
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1183
|
+
*/
|
|
1184
|
+
async transferOwnership(newOwner, options) {
|
|
1185
|
+
if (!this.contract.write) {
|
|
1186
|
+
throw new Error('Wallet client is required for write operations');
|
|
1187
|
+
}
|
|
1188
|
+
return this.contract.write.transferOwnership([newOwner], options);
|
|
1189
|
+
}
|
|
1190
|
+
/**
|
|
1191
|
+
* withdraw
|
|
1192
|
+
* nonpayable
|
|
1193
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1194
|
+
*/
|
|
1195
|
+
async withdraw(options) {
|
|
1196
|
+
if (!this.contract.write) {
|
|
1197
|
+
throw new Error('Wallet client is required for write operations');
|
|
1198
|
+
}
|
|
1199
|
+
return this.contract.write.withdraw(options);
|
|
1200
|
+
}
|
|
1201
|
+
/**
|
|
1202
|
+
* Simulate contract write operations (dry-run without sending transaction)
|
|
1203
|
+
*
|
|
1204
|
+
* @example
|
|
1205
|
+
* const result = await contract.simulate.transfer('0x...', 1000n);
|
|
1206
|
+
* console.log('Gas estimate:', result.request.gas);
|
|
1207
|
+
* console.log('Would succeed:', result.result);
|
|
1208
|
+
*/
|
|
1209
|
+
get simulate() {
|
|
1210
|
+
const contract = this.contract;
|
|
1211
|
+
if (!contract.simulate) {
|
|
1212
|
+
throw new Error('Public client is required for simulation');
|
|
1213
|
+
}
|
|
1214
|
+
return {
|
|
1215
|
+
/**
|
|
1216
|
+
* Simulate addWhitelist
|
|
1217
|
+
* Returns gas estimate and result without sending transaction
|
|
1218
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1219
|
+
*/
|
|
1220
|
+
async addWhitelist(wallets, options) {
|
|
1221
|
+
return contract.simulate.addWhitelist([wallets], options);
|
|
1222
|
+
},
|
|
1223
|
+
/**
|
|
1224
|
+
* Simulate approve
|
|
1225
|
+
* Returns gas estimate and result without sending transaction
|
|
1226
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1227
|
+
*/
|
|
1228
|
+
async approve(to, tokenId, options) {
|
|
1229
|
+
return contract.simulate.approve([to, tokenId], options);
|
|
1230
|
+
},
|
|
1231
|
+
/**
|
|
1232
|
+
* Simulate disableSale
|
|
1233
|
+
* Returns gas estimate and result without sending transaction
|
|
1234
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1235
|
+
*/
|
|
1236
|
+
async disableSale(options) {
|
|
1237
|
+
return contract.simulate.disableSale(options);
|
|
1238
|
+
},
|
|
1239
|
+
/**
|
|
1240
|
+
* Simulate mint
|
|
1241
|
+
* Returns gas estimate and result without sending transaction
|
|
1242
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1243
|
+
*/
|
|
1244
|
+
async mint(amount, options) {
|
|
1245
|
+
return contract.simulate.mint([amount], options);
|
|
1246
|
+
},
|
|
1247
|
+
/**
|
|
1248
|
+
* Simulate presaleMint
|
|
1249
|
+
* Returns gas estimate and result without sending transaction
|
|
1250
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1251
|
+
*/
|
|
1252
|
+
async presaleMint(amount, options) {
|
|
1253
|
+
return contract.simulate.presaleMint([amount], options);
|
|
1254
|
+
},
|
|
1255
|
+
/**
|
|
1256
|
+
* Simulate removeWhitelist
|
|
1257
|
+
* Returns gas estimate and result without sending transaction
|
|
1258
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1259
|
+
*/
|
|
1260
|
+
async removeWhitelist(wallets, options) {
|
|
1261
|
+
return contract.simulate.removeWhitelist([wallets], options);
|
|
1262
|
+
},
|
|
1263
|
+
/**
|
|
1264
|
+
* Simulate renounceOwnership
|
|
1265
|
+
* Returns gas estimate and result without sending transaction
|
|
1266
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1267
|
+
*/
|
|
1268
|
+
async renounceOwnership(options) {
|
|
1269
|
+
return contract.simulate.renounceOwnership(options);
|
|
1270
|
+
},
|
|
1271
|
+
/**
|
|
1272
|
+
* Simulate reserve
|
|
1273
|
+
* Returns gas estimate and result without sending transaction
|
|
1274
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1275
|
+
*/
|
|
1276
|
+
async reserve(recipients, options) {
|
|
1277
|
+
return contract.simulate.reserve([recipients], options);
|
|
1278
|
+
},
|
|
1279
|
+
/**
|
|
1280
|
+
* Simulate safeTransferFrom
|
|
1281
|
+
* Returns gas estimate and result without sending transaction
|
|
1282
|
+
* Supports multiple overloads: (address, address, uint256), (address, address, uint256, bytes)
|
|
1283
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1284
|
+
*/
|
|
1285
|
+
async safeTransferFrom(...args) {
|
|
1286
|
+
return contract.simulate.safeTransferFrom(args);
|
|
1287
|
+
},
|
|
1288
|
+
/**
|
|
1289
|
+
* Simulate setApprovalForAll
|
|
1290
|
+
* Returns gas estimate and result without sending transaction
|
|
1291
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1292
|
+
*/
|
|
1293
|
+
async setApprovalForAll(operator, approved, options) {
|
|
1294
|
+
return contract.simulate.setApprovalForAll([operator, approved], options);
|
|
1295
|
+
},
|
|
1296
|
+
/**
|
|
1297
|
+
* Simulate setBaseURI
|
|
1298
|
+
* Returns gas estimate and result without sending transaction
|
|
1299
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1300
|
+
*/
|
|
1301
|
+
async setBaseURI(newBaseURI, options) {
|
|
1302
|
+
return contract.simulate.setBaseURI([newBaseURI], options);
|
|
1303
|
+
},
|
|
1304
|
+
/**
|
|
1305
|
+
* Simulate setOwnersExplicit
|
|
1306
|
+
* Returns gas estimate and result without sending transaction
|
|
1307
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1308
|
+
*/
|
|
1309
|
+
async setOwnersExplicit(quantity, options) {
|
|
1310
|
+
return contract.simulate.setOwnersExplicit([quantity], options);
|
|
1311
|
+
},
|
|
1312
|
+
/**
|
|
1313
|
+
* Simulate setPresaleTime
|
|
1314
|
+
* Returns gas estimate and result without sending transaction
|
|
1315
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1316
|
+
*/
|
|
1317
|
+
async setPresaleTime(timestamp, options) {
|
|
1318
|
+
return contract.simulate.setPresaleTime([timestamp], options);
|
|
1319
|
+
},
|
|
1320
|
+
/**
|
|
1321
|
+
* Simulate setPublicsaleTime
|
|
1322
|
+
* Returns gas estimate and result without sending transaction
|
|
1323
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1324
|
+
*/
|
|
1325
|
+
async setPublicsaleTime(timestamp, options) {
|
|
1326
|
+
return contract.simulate.setPublicsaleTime([timestamp], options);
|
|
1327
|
+
},
|
|
1328
|
+
/**
|
|
1329
|
+
* Simulate transferFrom
|
|
1330
|
+
* Returns gas estimate and result without sending transaction
|
|
1331
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1332
|
+
*/
|
|
1333
|
+
async transferFrom(from, to, tokenId, options) {
|
|
1334
|
+
return contract.simulate.transferFrom([from, to, tokenId], options);
|
|
1335
|
+
},
|
|
1336
|
+
/**
|
|
1337
|
+
* Simulate transferOwnership
|
|
1338
|
+
* Returns gas estimate and result without sending transaction
|
|
1339
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1340
|
+
*/
|
|
1341
|
+
async transferOwnership(newOwner, options) {
|
|
1342
|
+
return contract.simulate.transferOwnership([newOwner], options);
|
|
1343
|
+
},
|
|
1344
|
+
/**
|
|
1345
|
+
* Simulate withdraw
|
|
1346
|
+
* Returns gas estimate and result without sending transaction
|
|
1347
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1348
|
+
*/
|
|
1349
|
+
async withdraw(options) {
|
|
1350
|
+
return contract.simulate.withdraw(options);
|
|
1351
|
+
}
|
|
1352
|
+
};
|
|
1353
|
+
}
|
|
1354
|
+
/**
|
|
1355
|
+
* Watch contract events
|
|
1356
|
+
*
|
|
1357
|
+
* @example
|
|
1358
|
+
* // Watch all Transfer events
|
|
1359
|
+
* const unwatch = contract.watch.Transfer((event) => {
|
|
1360
|
+
* console.log('Transfer:', event);
|
|
1361
|
+
* });
|
|
1362
|
+
*
|
|
1363
|
+
* // Stop watching
|
|
1364
|
+
* unwatch();
|
|
1365
|
+
*/
|
|
1366
|
+
get watch() {
|
|
1367
|
+
return {
|
|
1368
|
+
/**
|
|
1369
|
+
* Watch Approval events
|
|
1370
|
+
* @param callback Function to call when event is emitted
|
|
1371
|
+
* @param filter Optional filter for indexed parameters
|
|
1372
|
+
* @returns Unwatch function to stop listening
|
|
1373
|
+
*/
|
|
1374
|
+
Approval: (callback, filter) => {
|
|
1375
|
+
return this.publicClient.watchContractEvent({
|
|
1376
|
+
address: this.contractAddress,
|
|
1377
|
+
abi: exports.MetabellaByPokmiAbi,
|
|
1378
|
+
eventName: 'Approval',
|
|
1379
|
+
args: filter,
|
|
1380
|
+
onLogs: (logs) => {
|
|
1381
|
+
logs.forEach((log) => {
|
|
1382
|
+
callback(log.args);
|
|
1383
|
+
});
|
|
1384
|
+
},
|
|
1385
|
+
});
|
|
1386
|
+
},
|
|
1387
|
+
/**
|
|
1388
|
+
* Watch ApprovalForAll events
|
|
1389
|
+
* @param callback Function to call when event is emitted
|
|
1390
|
+
* @param filter Optional filter for indexed parameters
|
|
1391
|
+
* @returns Unwatch function to stop listening
|
|
1392
|
+
*/
|
|
1393
|
+
ApprovalForAll: (callback, filter) => {
|
|
1394
|
+
return this.publicClient.watchContractEvent({
|
|
1395
|
+
address: this.contractAddress,
|
|
1396
|
+
abi: exports.MetabellaByPokmiAbi,
|
|
1397
|
+
eventName: 'ApprovalForAll',
|
|
1398
|
+
args: filter,
|
|
1399
|
+
onLogs: (logs) => {
|
|
1400
|
+
logs.forEach((log) => {
|
|
1401
|
+
callback(log.args);
|
|
1402
|
+
});
|
|
1403
|
+
},
|
|
1404
|
+
});
|
|
1405
|
+
},
|
|
1406
|
+
/**
|
|
1407
|
+
* Watch OwnershipTransferred events
|
|
1408
|
+
* @param callback Function to call when event is emitted
|
|
1409
|
+
* @param filter Optional filter for indexed parameters
|
|
1410
|
+
* @returns Unwatch function to stop listening
|
|
1411
|
+
*/
|
|
1412
|
+
OwnershipTransferred: (callback, filter) => {
|
|
1413
|
+
return this.publicClient.watchContractEvent({
|
|
1414
|
+
address: this.contractAddress,
|
|
1415
|
+
abi: exports.MetabellaByPokmiAbi,
|
|
1416
|
+
eventName: 'OwnershipTransferred',
|
|
1417
|
+
args: filter,
|
|
1418
|
+
onLogs: (logs) => {
|
|
1419
|
+
logs.forEach((log) => {
|
|
1420
|
+
callback(log.args);
|
|
1421
|
+
});
|
|
1422
|
+
},
|
|
1423
|
+
});
|
|
1424
|
+
},
|
|
1425
|
+
/**
|
|
1426
|
+
* Watch Transfer events
|
|
1427
|
+
* @param callback Function to call when event is emitted
|
|
1428
|
+
* @param filter Optional filter for indexed parameters
|
|
1429
|
+
* @returns Unwatch function to stop listening
|
|
1430
|
+
*/
|
|
1431
|
+
Transfer: (callback, filter) => {
|
|
1432
|
+
return this.publicClient.watchContractEvent({
|
|
1433
|
+
address: this.contractAddress,
|
|
1434
|
+
abi: exports.MetabellaByPokmiAbi,
|
|
1435
|
+
eventName: 'Transfer',
|
|
1436
|
+
args: filter,
|
|
1437
|
+
onLogs: (logs) => {
|
|
1438
|
+
logs.forEach((log) => {
|
|
1439
|
+
callback(log.args);
|
|
1440
|
+
});
|
|
1441
|
+
},
|
|
1442
|
+
});
|
|
1443
|
+
}
|
|
1444
|
+
};
|
|
1445
|
+
}
|
|
1446
|
+
}
|
|
1447
|
+
exports.MetabellaByPokmi = MetabellaByPokmi;
|