@gitmyabi/thnd 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/THREEHUNDRED_json.d.ts +1195 -0
- package/contracts/THREEHUNDRED_json.js +1131 -0
- package/contracts/THREEHUNDRED_json.ts +1560 -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,1131 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.THREEHUNDRED_json = exports.THREEHUNDRED_jsonAbi = void 0;
|
|
4
|
+
const viem_1 = require("viem");
|
|
5
|
+
/**
|
|
6
|
+
* THREEHUNDRED_json ABI
|
|
7
|
+
*
|
|
8
|
+
* This ABI is typed using viem's type system for full type safety.
|
|
9
|
+
*/
|
|
10
|
+
exports.THREEHUNDRED_jsonAbi = [
|
|
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": "spender",
|
|
29
|
+
"type": "address"
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"indexed": false,
|
|
33
|
+
"internalType": "uint256",
|
|
34
|
+
"name": "value",
|
|
35
|
+
"type": "uint256"
|
|
36
|
+
}
|
|
37
|
+
],
|
|
38
|
+
"name": "Approval",
|
|
39
|
+
"type": "event"
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
"anonymous": false,
|
|
43
|
+
"inputs": [
|
|
44
|
+
{
|
|
45
|
+
"indexed": false,
|
|
46
|
+
"internalType": "address",
|
|
47
|
+
"name": "sender",
|
|
48
|
+
"type": "address"
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
"indexed": false,
|
|
52
|
+
"internalType": "uint256",
|
|
53
|
+
"name": "total",
|
|
54
|
+
"type": "uint256"
|
|
55
|
+
}
|
|
56
|
+
],
|
|
57
|
+
"name": "BurnAndMintEvent",
|
|
58
|
+
"type": "event"
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
"anonymous": false,
|
|
62
|
+
"inputs": [
|
|
63
|
+
{
|
|
64
|
+
"indexed": false,
|
|
65
|
+
"internalType": "uint256",
|
|
66
|
+
"name": "newMax",
|
|
67
|
+
"type": "uint256"
|
|
68
|
+
}
|
|
69
|
+
],
|
|
70
|
+
"name": "MaxTransactionAmountChanged",
|
|
71
|
+
"type": "event"
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
"anonymous": false,
|
|
75
|
+
"inputs": [
|
|
76
|
+
{
|
|
77
|
+
"indexed": true,
|
|
78
|
+
"internalType": "address",
|
|
79
|
+
"name": "previousOwner",
|
|
80
|
+
"type": "address"
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
"indexed": true,
|
|
84
|
+
"internalType": "address",
|
|
85
|
+
"name": "newOwner",
|
|
86
|
+
"type": "address"
|
|
87
|
+
}
|
|
88
|
+
],
|
|
89
|
+
"name": "OwnershipTransferred",
|
|
90
|
+
"type": "event"
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
"anonymous": false,
|
|
94
|
+
"inputs": [
|
|
95
|
+
{
|
|
96
|
+
"indexed": true,
|
|
97
|
+
"internalType": "address",
|
|
98
|
+
"name": "from",
|
|
99
|
+
"type": "address"
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
"indexed": true,
|
|
103
|
+
"internalType": "address",
|
|
104
|
+
"name": "to",
|
|
105
|
+
"type": "address"
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
"indexed": false,
|
|
109
|
+
"internalType": "uint256",
|
|
110
|
+
"name": "value",
|
|
111
|
+
"type": "uint256"
|
|
112
|
+
}
|
|
113
|
+
],
|
|
114
|
+
"name": "Transfer",
|
|
115
|
+
"type": "event"
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
"inputs": [
|
|
119
|
+
{
|
|
120
|
+
"internalType": "address",
|
|
121
|
+
"name": "owner",
|
|
122
|
+
"type": "address"
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
"internalType": "address",
|
|
126
|
+
"name": "spender",
|
|
127
|
+
"type": "address"
|
|
128
|
+
}
|
|
129
|
+
],
|
|
130
|
+
"name": "allowance",
|
|
131
|
+
"outputs": [
|
|
132
|
+
{
|
|
133
|
+
"internalType": "uint256",
|
|
134
|
+
"name": "",
|
|
135
|
+
"type": "uint256"
|
|
136
|
+
}
|
|
137
|
+
],
|
|
138
|
+
"stateMutability": "view",
|
|
139
|
+
"type": "function"
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
"inputs": [
|
|
143
|
+
{
|
|
144
|
+
"internalType": "address",
|
|
145
|
+
"name": "spender",
|
|
146
|
+
"type": "address"
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
"internalType": "uint256",
|
|
150
|
+
"name": "amount",
|
|
151
|
+
"type": "uint256"
|
|
152
|
+
}
|
|
153
|
+
],
|
|
154
|
+
"name": "approve",
|
|
155
|
+
"outputs": [
|
|
156
|
+
{
|
|
157
|
+
"internalType": "bool",
|
|
158
|
+
"name": "",
|
|
159
|
+
"type": "bool"
|
|
160
|
+
}
|
|
161
|
+
],
|
|
162
|
+
"stateMutability": "nonpayable",
|
|
163
|
+
"type": "function"
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
"inputs": [
|
|
167
|
+
{
|
|
168
|
+
"internalType": "address",
|
|
169
|
+
"name": "account",
|
|
170
|
+
"type": "address"
|
|
171
|
+
}
|
|
172
|
+
],
|
|
173
|
+
"name": "balanceOf",
|
|
174
|
+
"outputs": [
|
|
175
|
+
{
|
|
176
|
+
"internalType": "uint256",
|
|
177
|
+
"name": "",
|
|
178
|
+
"type": "uint256"
|
|
179
|
+
}
|
|
180
|
+
],
|
|
181
|
+
"stateMutability": "view",
|
|
182
|
+
"type": "function"
|
|
183
|
+
},
|
|
184
|
+
{
|
|
185
|
+
"inputs": [
|
|
186
|
+
{
|
|
187
|
+
"internalType": "uint256",
|
|
188
|
+
"name": "amount",
|
|
189
|
+
"type": "uint256"
|
|
190
|
+
}
|
|
191
|
+
],
|
|
192
|
+
"name": "burn",
|
|
193
|
+
"outputs": [],
|
|
194
|
+
"stateMutability": "nonpayable",
|
|
195
|
+
"type": "function"
|
|
196
|
+
},
|
|
197
|
+
{
|
|
198
|
+
"inputs": [
|
|
199
|
+
{
|
|
200
|
+
"internalType": "uint256",
|
|
201
|
+
"name": "totalToMintAndBurn",
|
|
202
|
+
"type": "uint256"
|
|
203
|
+
}
|
|
204
|
+
],
|
|
205
|
+
"name": "burnAndMint",
|
|
206
|
+
"outputs": [],
|
|
207
|
+
"stateMutability": "nonpayable",
|
|
208
|
+
"type": "function"
|
|
209
|
+
},
|
|
210
|
+
{
|
|
211
|
+
"inputs": [
|
|
212
|
+
{
|
|
213
|
+
"internalType": "address",
|
|
214
|
+
"name": "account",
|
|
215
|
+
"type": "address"
|
|
216
|
+
},
|
|
217
|
+
{
|
|
218
|
+
"internalType": "uint256",
|
|
219
|
+
"name": "amount",
|
|
220
|
+
"type": "uint256"
|
|
221
|
+
}
|
|
222
|
+
],
|
|
223
|
+
"name": "burnFrom",
|
|
224
|
+
"outputs": [],
|
|
225
|
+
"stateMutability": "nonpayable",
|
|
226
|
+
"type": "function"
|
|
227
|
+
},
|
|
228
|
+
{
|
|
229
|
+
"inputs": [
|
|
230
|
+
{
|
|
231
|
+
"internalType": "uint256",
|
|
232
|
+
"name": "amount",
|
|
233
|
+
"type": "uint256"
|
|
234
|
+
}
|
|
235
|
+
],
|
|
236
|
+
"name": "burnThe300Tokens",
|
|
237
|
+
"outputs": [],
|
|
238
|
+
"stateMutability": "nonpayable",
|
|
239
|
+
"type": "function"
|
|
240
|
+
},
|
|
241
|
+
{
|
|
242
|
+
"inputs": [
|
|
243
|
+
{
|
|
244
|
+
"internalType": "address",
|
|
245
|
+
"name": "ta",
|
|
246
|
+
"type": "address"
|
|
247
|
+
}
|
|
248
|
+
],
|
|
249
|
+
"name": "changeOG300",
|
|
250
|
+
"outputs": [],
|
|
251
|
+
"stateMutability": "nonpayable",
|
|
252
|
+
"type": "function"
|
|
253
|
+
},
|
|
254
|
+
{
|
|
255
|
+
"inputs": [
|
|
256
|
+
{
|
|
257
|
+
"internalType": "uint256",
|
|
258
|
+
"name": "newTaxPercent",
|
|
259
|
+
"type": "uint256"
|
|
260
|
+
}
|
|
261
|
+
],
|
|
262
|
+
"name": "changeTaxPercent",
|
|
263
|
+
"outputs": [],
|
|
264
|
+
"stateMutability": "nonpayable",
|
|
265
|
+
"type": "function"
|
|
266
|
+
},
|
|
267
|
+
{
|
|
268
|
+
"inputs": [
|
|
269
|
+
{
|
|
270
|
+
"internalType": "address",
|
|
271
|
+
"name": "newTreasuryWallet",
|
|
272
|
+
"type": "address"
|
|
273
|
+
}
|
|
274
|
+
],
|
|
275
|
+
"name": "changeTreasuryWallet",
|
|
276
|
+
"outputs": [],
|
|
277
|
+
"stateMutability": "nonpayable",
|
|
278
|
+
"type": "function"
|
|
279
|
+
},
|
|
280
|
+
{
|
|
281
|
+
"inputs": [
|
|
282
|
+
{
|
|
283
|
+
"internalType": "address",
|
|
284
|
+
"name": "account",
|
|
285
|
+
"type": "address"
|
|
286
|
+
}
|
|
287
|
+
],
|
|
288
|
+
"name": "check300Balance",
|
|
289
|
+
"outputs": [
|
|
290
|
+
{
|
|
291
|
+
"internalType": "uint256",
|
|
292
|
+
"name": "",
|
|
293
|
+
"type": "uint256"
|
|
294
|
+
}
|
|
295
|
+
],
|
|
296
|
+
"stateMutability": "view",
|
|
297
|
+
"type": "function"
|
|
298
|
+
},
|
|
299
|
+
{
|
|
300
|
+
"inputs": [],
|
|
301
|
+
"name": "decimals",
|
|
302
|
+
"outputs": [
|
|
303
|
+
{
|
|
304
|
+
"internalType": "uint8",
|
|
305
|
+
"name": "",
|
|
306
|
+
"type": "uint8"
|
|
307
|
+
}
|
|
308
|
+
],
|
|
309
|
+
"stateMutability": "view",
|
|
310
|
+
"type": "function"
|
|
311
|
+
},
|
|
312
|
+
{
|
|
313
|
+
"inputs": [
|
|
314
|
+
{
|
|
315
|
+
"internalType": "address",
|
|
316
|
+
"name": "spender",
|
|
317
|
+
"type": "address"
|
|
318
|
+
},
|
|
319
|
+
{
|
|
320
|
+
"internalType": "uint256",
|
|
321
|
+
"name": "subtractedValue",
|
|
322
|
+
"type": "uint256"
|
|
323
|
+
}
|
|
324
|
+
],
|
|
325
|
+
"name": "decreaseAllowance",
|
|
326
|
+
"outputs": [
|
|
327
|
+
{
|
|
328
|
+
"internalType": "bool",
|
|
329
|
+
"name": "",
|
|
330
|
+
"type": "bool"
|
|
331
|
+
}
|
|
332
|
+
],
|
|
333
|
+
"stateMutability": "nonpayable",
|
|
334
|
+
"type": "function"
|
|
335
|
+
},
|
|
336
|
+
{
|
|
337
|
+
"inputs": [
|
|
338
|
+
{
|
|
339
|
+
"internalType": "address",
|
|
340
|
+
"name": "spender",
|
|
341
|
+
"type": "address"
|
|
342
|
+
},
|
|
343
|
+
{
|
|
344
|
+
"internalType": "uint256",
|
|
345
|
+
"name": "addedValue",
|
|
346
|
+
"type": "uint256"
|
|
347
|
+
}
|
|
348
|
+
],
|
|
349
|
+
"name": "increaseAllowance",
|
|
350
|
+
"outputs": [
|
|
351
|
+
{
|
|
352
|
+
"internalType": "bool",
|
|
353
|
+
"name": "",
|
|
354
|
+
"type": "bool"
|
|
355
|
+
}
|
|
356
|
+
],
|
|
357
|
+
"stateMutability": "nonpayable",
|
|
358
|
+
"type": "function"
|
|
359
|
+
},
|
|
360
|
+
{
|
|
361
|
+
"inputs": [],
|
|
362
|
+
"name": "name",
|
|
363
|
+
"outputs": [
|
|
364
|
+
{
|
|
365
|
+
"internalType": "string",
|
|
366
|
+
"name": "",
|
|
367
|
+
"type": "string"
|
|
368
|
+
}
|
|
369
|
+
],
|
|
370
|
+
"stateMutability": "view",
|
|
371
|
+
"type": "function"
|
|
372
|
+
},
|
|
373
|
+
{
|
|
374
|
+
"inputs": [],
|
|
375
|
+
"name": "owner",
|
|
376
|
+
"outputs": [
|
|
377
|
+
{
|
|
378
|
+
"internalType": "address",
|
|
379
|
+
"name": "",
|
|
380
|
+
"type": "address"
|
|
381
|
+
}
|
|
382
|
+
],
|
|
383
|
+
"stateMutability": "view",
|
|
384
|
+
"type": "function"
|
|
385
|
+
},
|
|
386
|
+
{
|
|
387
|
+
"inputs": [
|
|
388
|
+
{
|
|
389
|
+
"internalType": "uint256",
|
|
390
|
+
"name": "mintAmount",
|
|
391
|
+
"type": "uint256"
|
|
392
|
+
},
|
|
393
|
+
{
|
|
394
|
+
"internalType": "address",
|
|
395
|
+
"name": "toWallet",
|
|
396
|
+
"type": "address"
|
|
397
|
+
}
|
|
398
|
+
],
|
|
399
|
+
"name": "ownerMint",
|
|
400
|
+
"outputs": [],
|
|
401
|
+
"stateMutability": "nonpayable",
|
|
402
|
+
"type": "function"
|
|
403
|
+
},
|
|
404
|
+
{
|
|
405
|
+
"inputs": [],
|
|
406
|
+
"name": "parameters",
|
|
407
|
+
"outputs": [
|
|
408
|
+
{
|
|
409
|
+
"internalType": "uint256",
|
|
410
|
+
"name": "maxTransactionAmount",
|
|
411
|
+
"type": "uint256"
|
|
412
|
+
},
|
|
413
|
+
{
|
|
414
|
+
"internalType": "uint256",
|
|
415
|
+
"name": "burnTaxPercent",
|
|
416
|
+
"type": "uint256"
|
|
417
|
+
},
|
|
418
|
+
{
|
|
419
|
+
"internalType": "uint256",
|
|
420
|
+
"name": "maxSupply",
|
|
421
|
+
"type": "uint256"
|
|
422
|
+
},
|
|
423
|
+
{
|
|
424
|
+
"internalType": "bool",
|
|
425
|
+
"name": "paused",
|
|
426
|
+
"type": "bool"
|
|
427
|
+
},
|
|
428
|
+
{
|
|
429
|
+
"internalType": "address",
|
|
430
|
+
"name": "the300",
|
|
431
|
+
"type": "address"
|
|
432
|
+
},
|
|
433
|
+
{
|
|
434
|
+
"internalType": "address",
|
|
435
|
+
"name": "treasuryWallet",
|
|
436
|
+
"type": "address"
|
|
437
|
+
}
|
|
438
|
+
],
|
|
439
|
+
"stateMutability": "view",
|
|
440
|
+
"type": "function"
|
|
441
|
+
},
|
|
442
|
+
{
|
|
443
|
+
"inputs": [],
|
|
444
|
+
"name": "renounceOwnership",
|
|
445
|
+
"outputs": [],
|
|
446
|
+
"stateMutability": "nonpayable",
|
|
447
|
+
"type": "function"
|
|
448
|
+
},
|
|
449
|
+
{
|
|
450
|
+
"inputs": [
|
|
451
|
+
{
|
|
452
|
+
"internalType": "uint256",
|
|
453
|
+
"name": "newMax",
|
|
454
|
+
"type": "uint256"
|
|
455
|
+
}
|
|
456
|
+
],
|
|
457
|
+
"name": "setMaxTransactionAmount",
|
|
458
|
+
"outputs": [],
|
|
459
|
+
"stateMutability": "nonpayable",
|
|
460
|
+
"type": "function"
|
|
461
|
+
},
|
|
462
|
+
{
|
|
463
|
+
"inputs": [],
|
|
464
|
+
"name": "symbol",
|
|
465
|
+
"outputs": [
|
|
466
|
+
{
|
|
467
|
+
"internalType": "string",
|
|
468
|
+
"name": "",
|
|
469
|
+
"type": "string"
|
|
470
|
+
}
|
|
471
|
+
],
|
|
472
|
+
"stateMutability": "view",
|
|
473
|
+
"type": "function"
|
|
474
|
+
},
|
|
475
|
+
{
|
|
476
|
+
"inputs": [],
|
|
477
|
+
"name": "togglePause",
|
|
478
|
+
"outputs": [],
|
|
479
|
+
"stateMutability": "nonpayable",
|
|
480
|
+
"type": "function"
|
|
481
|
+
},
|
|
482
|
+
{
|
|
483
|
+
"inputs": [],
|
|
484
|
+
"name": "totalSupply",
|
|
485
|
+
"outputs": [
|
|
486
|
+
{
|
|
487
|
+
"internalType": "uint256",
|
|
488
|
+
"name": "",
|
|
489
|
+
"type": "uint256"
|
|
490
|
+
}
|
|
491
|
+
],
|
|
492
|
+
"stateMutability": "view",
|
|
493
|
+
"type": "function"
|
|
494
|
+
},
|
|
495
|
+
{
|
|
496
|
+
"inputs": [
|
|
497
|
+
{
|
|
498
|
+
"internalType": "address",
|
|
499
|
+
"name": "recipient",
|
|
500
|
+
"type": "address"
|
|
501
|
+
},
|
|
502
|
+
{
|
|
503
|
+
"internalType": "uint256",
|
|
504
|
+
"name": "amount",
|
|
505
|
+
"type": "uint256"
|
|
506
|
+
}
|
|
507
|
+
],
|
|
508
|
+
"name": "transfer",
|
|
509
|
+
"outputs": [
|
|
510
|
+
{
|
|
511
|
+
"internalType": "bool",
|
|
512
|
+
"name": "",
|
|
513
|
+
"type": "bool"
|
|
514
|
+
}
|
|
515
|
+
],
|
|
516
|
+
"stateMutability": "nonpayable",
|
|
517
|
+
"type": "function"
|
|
518
|
+
},
|
|
519
|
+
{
|
|
520
|
+
"inputs": [
|
|
521
|
+
{
|
|
522
|
+
"internalType": "address",
|
|
523
|
+
"name": "from",
|
|
524
|
+
"type": "address"
|
|
525
|
+
},
|
|
526
|
+
{
|
|
527
|
+
"internalType": "address",
|
|
528
|
+
"name": "to",
|
|
529
|
+
"type": "address"
|
|
530
|
+
},
|
|
531
|
+
{
|
|
532
|
+
"internalType": "uint256",
|
|
533
|
+
"name": "amount",
|
|
534
|
+
"type": "uint256"
|
|
535
|
+
}
|
|
536
|
+
],
|
|
537
|
+
"name": "transferFrom",
|
|
538
|
+
"outputs": [
|
|
539
|
+
{
|
|
540
|
+
"internalType": "bool",
|
|
541
|
+
"name": "",
|
|
542
|
+
"type": "bool"
|
|
543
|
+
}
|
|
544
|
+
],
|
|
545
|
+
"stateMutability": "nonpayable",
|
|
546
|
+
"type": "function"
|
|
547
|
+
},
|
|
548
|
+
{
|
|
549
|
+
"inputs": [
|
|
550
|
+
{
|
|
551
|
+
"internalType": "address",
|
|
552
|
+
"name": "newOwner",
|
|
553
|
+
"type": "address"
|
|
554
|
+
}
|
|
555
|
+
],
|
|
556
|
+
"name": "transferOwnership",
|
|
557
|
+
"outputs": [],
|
|
558
|
+
"stateMutability": "nonpayable",
|
|
559
|
+
"type": "function"
|
|
560
|
+
}
|
|
561
|
+
];
|
|
562
|
+
/**
|
|
563
|
+
* THREEHUNDRED_json Contract Class
|
|
564
|
+
*
|
|
565
|
+
* Provides a class-based API similar to TypeChain for interacting with the contract.
|
|
566
|
+
*
|
|
567
|
+
* @example
|
|
568
|
+
* ```typescript
|
|
569
|
+
* import { createPublicClient, createWalletClient, http } from 'viem';
|
|
570
|
+
* import { mainnet } from 'viem/chains';
|
|
571
|
+
* import { THREEHUNDRED_json } from 'THREEHUNDRED_json';
|
|
572
|
+
*
|
|
573
|
+
* const publicClient = createPublicClient({ chain: mainnet, transport: http() });
|
|
574
|
+
* const walletClient = createWalletClient({ chain: mainnet, transport: http() });
|
|
575
|
+
*
|
|
576
|
+
* const contract = new THREEHUNDRED_json('0x...', { publicClient, walletClient });
|
|
577
|
+
*
|
|
578
|
+
* // Read functions
|
|
579
|
+
* const result = await contract.balanceOf('0x...');
|
|
580
|
+
*
|
|
581
|
+
* // Write functions
|
|
582
|
+
* const hash = await contract.transfer('0x...', 1000n);
|
|
583
|
+
*
|
|
584
|
+
* // Simulate transactions (dry-run)
|
|
585
|
+
* const simulation = await contract.simulate.transfer('0x...', 1000n);
|
|
586
|
+
* console.log('Gas estimate:', simulation.request.gas);
|
|
587
|
+
*
|
|
588
|
+
* // Watch events
|
|
589
|
+
* const unwatch = contract.watch.Transfer((event) => {
|
|
590
|
+
* console.log('Transfer event:', event);
|
|
591
|
+
* });
|
|
592
|
+
* ```
|
|
593
|
+
*/
|
|
594
|
+
class THREEHUNDRED_json {
|
|
595
|
+
constructor(address, clients) {
|
|
596
|
+
this.contractAddress = address;
|
|
597
|
+
this.publicClient = clients.publicClient;
|
|
598
|
+
this.contract = (0, viem_1.getContract)({
|
|
599
|
+
address,
|
|
600
|
+
abi: exports.THREEHUNDRED_jsonAbi,
|
|
601
|
+
client: {
|
|
602
|
+
public: clients.publicClient,
|
|
603
|
+
wallet: clients.walletClient,
|
|
604
|
+
},
|
|
605
|
+
});
|
|
606
|
+
}
|
|
607
|
+
/**
|
|
608
|
+
* Get the contract address
|
|
609
|
+
*/
|
|
610
|
+
get address() {
|
|
611
|
+
return this.contractAddress;
|
|
612
|
+
}
|
|
613
|
+
/**
|
|
614
|
+
* Get the underlying viem contract instance
|
|
615
|
+
*/
|
|
616
|
+
getContract() {
|
|
617
|
+
return this.contract;
|
|
618
|
+
}
|
|
619
|
+
/**
|
|
620
|
+
* allowance
|
|
621
|
+
* view
|
|
622
|
+
*/
|
|
623
|
+
async allowance(owner, spender) {
|
|
624
|
+
return this.contract.read.allowance([owner, spender]);
|
|
625
|
+
}
|
|
626
|
+
/**
|
|
627
|
+
* balanceOf
|
|
628
|
+
* view
|
|
629
|
+
*/
|
|
630
|
+
async balanceOf(account) {
|
|
631
|
+
return this.contract.read.balanceOf([account]);
|
|
632
|
+
}
|
|
633
|
+
/**
|
|
634
|
+
* check300Balance
|
|
635
|
+
* view
|
|
636
|
+
*/
|
|
637
|
+
async check300Balance(account) {
|
|
638
|
+
return this.contract.read.check300Balance([account]);
|
|
639
|
+
}
|
|
640
|
+
/**
|
|
641
|
+
* decimals
|
|
642
|
+
* view
|
|
643
|
+
*/
|
|
644
|
+
async decimals() {
|
|
645
|
+
return this.contract.read.decimals();
|
|
646
|
+
}
|
|
647
|
+
/**
|
|
648
|
+
* name
|
|
649
|
+
* view
|
|
650
|
+
*/
|
|
651
|
+
async name() {
|
|
652
|
+
return this.contract.read.name();
|
|
653
|
+
}
|
|
654
|
+
/**
|
|
655
|
+
* owner
|
|
656
|
+
* view
|
|
657
|
+
*/
|
|
658
|
+
async owner() {
|
|
659
|
+
return this.contract.read.owner();
|
|
660
|
+
}
|
|
661
|
+
/**
|
|
662
|
+
* parameters
|
|
663
|
+
* view
|
|
664
|
+
*/
|
|
665
|
+
async parameters() {
|
|
666
|
+
return this.contract.read.parameters();
|
|
667
|
+
}
|
|
668
|
+
/**
|
|
669
|
+
* symbol
|
|
670
|
+
* view
|
|
671
|
+
*/
|
|
672
|
+
async symbol() {
|
|
673
|
+
return this.contract.read.symbol();
|
|
674
|
+
}
|
|
675
|
+
/**
|
|
676
|
+
* totalSupply
|
|
677
|
+
* view
|
|
678
|
+
*/
|
|
679
|
+
async totalSupply() {
|
|
680
|
+
return this.contract.read.totalSupply();
|
|
681
|
+
}
|
|
682
|
+
/**
|
|
683
|
+
* approve
|
|
684
|
+
* nonpayable
|
|
685
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
686
|
+
*/
|
|
687
|
+
async approve(spender, amount, options) {
|
|
688
|
+
if (!this.contract.write) {
|
|
689
|
+
throw new Error('Wallet client is required for write operations');
|
|
690
|
+
}
|
|
691
|
+
return this.contract.write.approve([spender, amount], options);
|
|
692
|
+
}
|
|
693
|
+
/**
|
|
694
|
+
* burn
|
|
695
|
+
* nonpayable
|
|
696
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
697
|
+
*/
|
|
698
|
+
async burn(amount, options) {
|
|
699
|
+
if (!this.contract.write) {
|
|
700
|
+
throw new Error('Wallet client is required for write operations');
|
|
701
|
+
}
|
|
702
|
+
return this.contract.write.burn([amount], options);
|
|
703
|
+
}
|
|
704
|
+
/**
|
|
705
|
+
* burnAndMint
|
|
706
|
+
* nonpayable
|
|
707
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
708
|
+
*/
|
|
709
|
+
async burnAndMint(totalToMintAndBurn, options) {
|
|
710
|
+
if (!this.contract.write) {
|
|
711
|
+
throw new Error('Wallet client is required for write operations');
|
|
712
|
+
}
|
|
713
|
+
return this.contract.write.burnAndMint([totalToMintAndBurn], options);
|
|
714
|
+
}
|
|
715
|
+
/**
|
|
716
|
+
* burnFrom
|
|
717
|
+
* nonpayable
|
|
718
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
719
|
+
*/
|
|
720
|
+
async burnFrom(account, amount, options) {
|
|
721
|
+
if (!this.contract.write) {
|
|
722
|
+
throw new Error('Wallet client is required for write operations');
|
|
723
|
+
}
|
|
724
|
+
return this.contract.write.burnFrom([account, amount], options);
|
|
725
|
+
}
|
|
726
|
+
/**
|
|
727
|
+
* burnThe300Tokens
|
|
728
|
+
* nonpayable
|
|
729
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
730
|
+
*/
|
|
731
|
+
async burnThe300Tokens(amount, options) {
|
|
732
|
+
if (!this.contract.write) {
|
|
733
|
+
throw new Error('Wallet client is required for write operations');
|
|
734
|
+
}
|
|
735
|
+
return this.contract.write.burnThe300Tokens([amount], options);
|
|
736
|
+
}
|
|
737
|
+
/**
|
|
738
|
+
* changeOG300
|
|
739
|
+
* nonpayable
|
|
740
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
741
|
+
*/
|
|
742
|
+
async changeOG300(ta, options) {
|
|
743
|
+
if (!this.contract.write) {
|
|
744
|
+
throw new Error('Wallet client is required for write operations');
|
|
745
|
+
}
|
|
746
|
+
return this.contract.write.changeOG300([ta], options);
|
|
747
|
+
}
|
|
748
|
+
/**
|
|
749
|
+
* changeTaxPercent
|
|
750
|
+
* nonpayable
|
|
751
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
752
|
+
*/
|
|
753
|
+
async changeTaxPercent(newTaxPercent, options) {
|
|
754
|
+
if (!this.contract.write) {
|
|
755
|
+
throw new Error('Wallet client is required for write operations');
|
|
756
|
+
}
|
|
757
|
+
return this.contract.write.changeTaxPercent([newTaxPercent], options);
|
|
758
|
+
}
|
|
759
|
+
/**
|
|
760
|
+
* changeTreasuryWallet
|
|
761
|
+
* nonpayable
|
|
762
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
763
|
+
*/
|
|
764
|
+
async changeTreasuryWallet(newTreasuryWallet, options) {
|
|
765
|
+
if (!this.contract.write) {
|
|
766
|
+
throw new Error('Wallet client is required for write operations');
|
|
767
|
+
}
|
|
768
|
+
return this.contract.write.changeTreasuryWallet([newTreasuryWallet], options);
|
|
769
|
+
}
|
|
770
|
+
/**
|
|
771
|
+
* decreaseAllowance
|
|
772
|
+
* nonpayable
|
|
773
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
774
|
+
*/
|
|
775
|
+
async decreaseAllowance(spender, subtractedValue, options) {
|
|
776
|
+
if (!this.contract.write) {
|
|
777
|
+
throw new Error('Wallet client is required for write operations');
|
|
778
|
+
}
|
|
779
|
+
return this.contract.write.decreaseAllowance([spender, subtractedValue], options);
|
|
780
|
+
}
|
|
781
|
+
/**
|
|
782
|
+
* increaseAllowance
|
|
783
|
+
* nonpayable
|
|
784
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
785
|
+
*/
|
|
786
|
+
async increaseAllowance(spender, addedValue, options) {
|
|
787
|
+
if (!this.contract.write) {
|
|
788
|
+
throw new Error('Wallet client is required for write operations');
|
|
789
|
+
}
|
|
790
|
+
return this.contract.write.increaseAllowance([spender, addedValue], options);
|
|
791
|
+
}
|
|
792
|
+
/**
|
|
793
|
+
* ownerMint
|
|
794
|
+
* nonpayable
|
|
795
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
796
|
+
*/
|
|
797
|
+
async ownerMint(mintAmount, toWallet, options) {
|
|
798
|
+
if (!this.contract.write) {
|
|
799
|
+
throw new Error('Wallet client is required for write operations');
|
|
800
|
+
}
|
|
801
|
+
return this.contract.write.ownerMint([mintAmount, toWallet], options);
|
|
802
|
+
}
|
|
803
|
+
/**
|
|
804
|
+
* renounceOwnership
|
|
805
|
+
* nonpayable
|
|
806
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
807
|
+
*/
|
|
808
|
+
async renounceOwnership(options) {
|
|
809
|
+
if (!this.contract.write) {
|
|
810
|
+
throw new Error('Wallet client is required for write operations');
|
|
811
|
+
}
|
|
812
|
+
return this.contract.write.renounceOwnership(options);
|
|
813
|
+
}
|
|
814
|
+
/**
|
|
815
|
+
* setMaxTransactionAmount
|
|
816
|
+
* nonpayable
|
|
817
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
818
|
+
*/
|
|
819
|
+
async setMaxTransactionAmount(newMax, options) {
|
|
820
|
+
if (!this.contract.write) {
|
|
821
|
+
throw new Error('Wallet client is required for write operations');
|
|
822
|
+
}
|
|
823
|
+
return this.contract.write.setMaxTransactionAmount([newMax], options);
|
|
824
|
+
}
|
|
825
|
+
/**
|
|
826
|
+
* togglePause
|
|
827
|
+
* nonpayable
|
|
828
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
829
|
+
*/
|
|
830
|
+
async togglePause(options) {
|
|
831
|
+
if (!this.contract.write) {
|
|
832
|
+
throw new Error('Wallet client is required for write operations');
|
|
833
|
+
}
|
|
834
|
+
return this.contract.write.togglePause(options);
|
|
835
|
+
}
|
|
836
|
+
/**
|
|
837
|
+
* transfer
|
|
838
|
+
* nonpayable
|
|
839
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
840
|
+
*/
|
|
841
|
+
async transfer(recipient, amount, options) {
|
|
842
|
+
if (!this.contract.write) {
|
|
843
|
+
throw new Error('Wallet client is required for write operations');
|
|
844
|
+
}
|
|
845
|
+
return this.contract.write.transfer([recipient, amount], options);
|
|
846
|
+
}
|
|
847
|
+
/**
|
|
848
|
+
* transferFrom
|
|
849
|
+
* nonpayable
|
|
850
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
851
|
+
*/
|
|
852
|
+
async transferFrom(from, to, amount, options) {
|
|
853
|
+
if (!this.contract.write) {
|
|
854
|
+
throw new Error('Wallet client is required for write operations');
|
|
855
|
+
}
|
|
856
|
+
return this.contract.write.transferFrom([from, to, amount], options);
|
|
857
|
+
}
|
|
858
|
+
/**
|
|
859
|
+
* transferOwnership
|
|
860
|
+
* nonpayable
|
|
861
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
862
|
+
*/
|
|
863
|
+
async transferOwnership(newOwner, options) {
|
|
864
|
+
if (!this.contract.write) {
|
|
865
|
+
throw new Error('Wallet client is required for write operations');
|
|
866
|
+
}
|
|
867
|
+
return this.contract.write.transferOwnership([newOwner], options);
|
|
868
|
+
}
|
|
869
|
+
/**
|
|
870
|
+
* Simulate contract write operations (dry-run without sending transaction)
|
|
871
|
+
*
|
|
872
|
+
* @example
|
|
873
|
+
* const result = await contract.simulate.transfer('0x...', 1000n);
|
|
874
|
+
* console.log('Gas estimate:', result.request.gas);
|
|
875
|
+
* console.log('Would succeed:', result.result);
|
|
876
|
+
*/
|
|
877
|
+
get simulate() {
|
|
878
|
+
const contract = this.contract;
|
|
879
|
+
if (!contract.simulate) {
|
|
880
|
+
throw new Error('Public client is required for simulation');
|
|
881
|
+
}
|
|
882
|
+
return {
|
|
883
|
+
/**
|
|
884
|
+
* Simulate approve
|
|
885
|
+
* Returns gas estimate and result without sending transaction
|
|
886
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
887
|
+
*/
|
|
888
|
+
async approve(spender, amount, options) {
|
|
889
|
+
return contract.simulate.approve([spender, amount], options);
|
|
890
|
+
},
|
|
891
|
+
/**
|
|
892
|
+
* Simulate burn
|
|
893
|
+
* Returns gas estimate and result without sending transaction
|
|
894
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
895
|
+
*/
|
|
896
|
+
async burn(amount, options) {
|
|
897
|
+
return contract.simulate.burn([amount], options);
|
|
898
|
+
},
|
|
899
|
+
/**
|
|
900
|
+
* Simulate burnAndMint
|
|
901
|
+
* Returns gas estimate and result without sending transaction
|
|
902
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
903
|
+
*/
|
|
904
|
+
async burnAndMint(totalToMintAndBurn, options) {
|
|
905
|
+
return contract.simulate.burnAndMint([totalToMintAndBurn], options);
|
|
906
|
+
},
|
|
907
|
+
/**
|
|
908
|
+
* Simulate burnFrom
|
|
909
|
+
* Returns gas estimate and result without sending transaction
|
|
910
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
911
|
+
*/
|
|
912
|
+
async burnFrom(account, amount, options) {
|
|
913
|
+
return contract.simulate.burnFrom([account, amount], options);
|
|
914
|
+
},
|
|
915
|
+
/**
|
|
916
|
+
* Simulate burnThe300Tokens
|
|
917
|
+
* Returns gas estimate and result without sending transaction
|
|
918
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
919
|
+
*/
|
|
920
|
+
async burnThe300Tokens(amount, options) {
|
|
921
|
+
return contract.simulate.burnThe300Tokens([amount], options);
|
|
922
|
+
},
|
|
923
|
+
/**
|
|
924
|
+
* Simulate changeOG300
|
|
925
|
+
* Returns gas estimate and result without sending transaction
|
|
926
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
927
|
+
*/
|
|
928
|
+
async changeOG300(ta, options) {
|
|
929
|
+
return contract.simulate.changeOG300([ta], options);
|
|
930
|
+
},
|
|
931
|
+
/**
|
|
932
|
+
* Simulate changeTaxPercent
|
|
933
|
+
* Returns gas estimate and result without sending transaction
|
|
934
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
935
|
+
*/
|
|
936
|
+
async changeTaxPercent(newTaxPercent, options) {
|
|
937
|
+
return contract.simulate.changeTaxPercent([newTaxPercent], options);
|
|
938
|
+
},
|
|
939
|
+
/**
|
|
940
|
+
* Simulate changeTreasuryWallet
|
|
941
|
+
* Returns gas estimate and result without sending transaction
|
|
942
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
943
|
+
*/
|
|
944
|
+
async changeTreasuryWallet(newTreasuryWallet, options) {
|
|
945
|
+
return contract.simulate.changeTreasuryWallet([newTreasuryWallet], options);
|
|
946
|
+
},
|
|
947
|
+
/**
|
|
948
|
+
* Simulate decreaseAllowance
|
|
949
|
+
* Returns gas estimate and result without sending transaction
|
|
950
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
951
|
+
*/
|
|
952
|
+
async decreaseAllowance(spender, subtractedValue, options) {
|
|
953
|
+
return contract.simulate.decreaseAllowance([spender, subtractedValue], options);
|
|
954
|
+
},
|
|
955
|
+
/**
|
|
956
|
+
* Simulate increaseAllowance
|
|
957
|
+
* Returns gas estimate and result without sending transaction
|
|
958
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
959
|
+
*/
|
|
960
|
+
async increaseAllowance(spender, addedValue, options) {
|
|
961
|
+
return contract.simulate.increaseAllowance([spender, addedValue], options);
|
|
962
|
+
},
|
|
963
|
+
/**
|
|
964
|
+
* Simulate ownerMint
|
|
965
|
+
* Returns gas estimate and result without sending transaction
|
|
966
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
967
|
+
*/
|
|
968
|
+
async ownerMint(mintAmount, toWallet, options) {
|
|
969
|
+
return contract.simulate.ownerMint([mintAmount, toWallet], options);
|
|
970
|
+
},
|
|
971
|
+
/**
|
|
972
|
+
* Simulate renounceOwnership
|
|
973
|
+
* Returns gas estimate and result without sending transaction
|
|
974
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
975
|
+
*/
|
|
976
|
+
async renounceOwnership(options) {
|
|
977
|
+
return contract.simulate.renounceOwnership(options);
|
|
978
|
+
},
|
|
979
|
+
/**
|
|
980
|
+
* Simulate setMaxTransactionAmount
|
|
981
|
+
* Returns gas estimate and result without sending transaction
|
|
982
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
983
|
+
*/
|
|
984
|
+
async setMaxTransactionAmount(newMax, options) {
|
|
985
|
+
return contract.simulate.setMaxTransactionAmount([newMax], options);
|
|
986
|
+
},
|
|
987
|
+
/**
|
|
988
|
+
* Simulate togglePause
|
|
989
|
+
* Returns gas estimate and result without sending transaction
|
|
990
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
991
|
+
*/
|
|
992
|
+
async togglePause(options) {
|
|
993
|
+
return contract.simulate.togglePause(options);
|
|
994
|
+
},
|
|
995
|
+
/**
|
|
996
|
+
* Simulate transfer
|
|
997
|
+
* Returns gas estimate and result without sending transaction
|
|
998
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
999
|
+
*/
|
|
1000
|
+
async transfer(recipient, amount, options) {
|
|
1001
|
+
return contract.simulate.transfer([recipient, amount], options);
|
|
1002
|
+
},
|
|
1003
|
+
/**
|
|
1004
|
+
* Simulate transferFrom
|
|
1005
|
+
* Returns gas estimate and result without sending transaction
|
|
1006
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1007
|
+
*/
|
|
1008
|
+
async transferFrom(from, to, amount, options) {
|
|
1009
|
+
return contract.simulate.transferFrom([from, to, amount], options);
|
|
1010
|
+
},
|
|
1011
|
+
/**
|
|
1012
|
+
* Simulate transferOwnership
|
|
1013
|
+
* Returns gas estimate and result without sending transaction
|
|
1014
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1015
|
+
*/
|
|
1016
|
+
async transferOwnership(newOwner, options) {
|
|
1017
|
+
return contract.simulate.transferOwnership([newOwner], options);
|
|
1018
|
+
}
|
|
1019
|
+
};
|
|
1020
|
+
}
|
|
1021
|
+
/**
|
|
1022
|
+
* Watch contract events
|
|
1023
|
+
*
|
|
1024
|
+
* @example
|
|
1025
|
+
* // Watch all Transfer events
|
|
1026
|
+
* const unwatch = contract.watch.Transfer((event) => {
|
|
1027
|
+
* console.log('Transfer:', event);
|
|
1028
|
+
* });
|
|
1029
|
+
*
|
|
1030
|
+
* // Stop watching
|
|
1031
|
+
* unwatch();
|
|
1032
|
+
*/
|
|
1033
|
+
get watch() {
|
|
1034
|
+
return {
|
|
1035
|
+
/**
|
|
1036
|
+
* Watch Approval events
|
|
1037
|
+
* @param callback Function to call when event is emitted
|
|
1038
|
+
* @param filter Optional filter for indexed parameters
|
|
1039
|
+
* @returns Unwatch function to stop listening
|
|
1040
|
+
*/
|
|
1041
|
+
Approval: (callback, filter) => {
|
|
1042
|
+
return this.publicClient.watchContractEvent({
|
|
1043
|
+
address: this.contractAddress,
|
|
1044
|
+
abi: exports.THREEHUNDRED_jsonAbi,
|
|
1045
|
+
eventName: 'Approval',
|
|
1046
|
+
args: filter,
|
|
1047
|
+
onLogs: (logs) => {
|
|
1048
|
+
logs.forEach((log) => {
|
|
1049
|
+
callback(log.args);
|
|
1050
|
+
});
|
|
1051
|
+
},
|
|
1052
|
+
});
|
|
1053
|
+
},
|
|
1054
|
+
/**
|
|
1055
|
+
* Watch BurnAndMintEvent events
|
|
1056
|
+
* @param callback Function to call when event is emitted
|
|
1057
|
+
* @param filter Optional filter for indexed parameters
|
|
1058
|
+
* @returns Unwatch function to stop listening
|
|
1059
|
+
*/
|
|
1060
|
+
BurnAndMintEvent: (callback) => {
|
|
1061
|
+
return this.publicClient.watchContractEvent({
|
|
1062
|
+
address: this.contractAddress,
|
|
1063
|
+
abi: exports.THREEHUNDRED_jsonAbi,
|
|
1064
|
+
eventName: 'BurnAndMintEvent',
|
|
1065
|
+
onLogs: (logs) => {
|
|
1066
|
+
logs.forEach((log) => {
|
|
1067
|
+
callback(log.args);
|
|
1068
|
+
});
|
|
1069
|
+
},
|
|
1070
|
+
});
|
|
1071
|
+
},
|
|
1072
|
+
/**
|
|
1073
|
+
* Watch MaxTransactionAmountChanged events
|
|
1074
|
+
* @param callback Function to call when event is emitted
|
|
1075
|
+
* @param filter Optional filter for indexed parameters
|
|
1076
|
+
* @returns Unwatch function to stop listening
|
|
1077
|
+
*/
|
|
1078
|
+
MaxTransactionAmountChanged: (callback) => {
|
|
1079
|
+
return this.publicClient.watchContractEvent({
|
|
1080
|
+
address: this.contractAddress,
|
|
1081
|
+
abi: exports.THREEHUNDRED_jsonAbi,
|
|
1082
|
+
eventName: 'MaxTransactionAmountChanged',
|
|
1083
|
+
onLogs: (logs) => {
|
|
1084
|
+
logs.forEach((log) => {
|
|
1085
|
+
callback(log.args);
|
|
1086
|
+
});
|
|
1087
|
+
},
|
|
1088
|
+
});
|
|
1089
|
+
},
|
|
1090
|
+
/**
|
|
1091
|
+
* Watch OwnershipTransferred events
|
|
1092
|
+
* @param callback Function to call when event is emitted
|
|
1093
|
+
* @param filter Optional filter for indexed parameters
|
|
1094
|
+
* @returns Unwatch function to stop listening
|
|
1095
|
+
*/
|
|
1096
|
+
OwnershipTransferred: (callback, filter) => {
|
|
1097
|
+
return this.publicClient.watchContractEvent({
|
|
1098
|
+
address: this.contractAddress,
|
|
1099
|
+
abi: exports.THREEHUNDRED_jsonAbi,
|
|
1100
|
+
eventName: 'OwnershipTransferred',
|
|
1101
|
+
args: filter,
|
|
1102
|
+
onLogs: (logs) => {
|
|
1103
|
+
logs.forEach((log) => {
|
|
1104
|
+
callback(log.args);
|
|
1105
|
+
});
|
|
1106
|
+
},
|
|
1107
|
+
});
|
|
1108
|
+
},
|
|
1109
|
+
/**
|
|
1110
|
+
* Watch Transfer events
|
|
1111
|
+
* @param callback Function to call when event is emitted
|
|
1112
|
+
* @param filter Optional filter for indexed parameters
|
|
1113
|
+
* @returns Unwatch function to stop listening
|
|
1114
|
+
*/
|
|
1115
|
+
Transfer: (callback, filter) => {
|
|
1116
|
+
return this.publicClient.watchContractEvent({
|
|
1117
|
+
address: this.contractAddress,
|
|
1118
|
+
abi: exports.THREEHUNDRED_jsonAbi,
|
|
1119
|
+
eventName: 'Transfer',
|
|
1120
|
+
args: filter,
|
|
1121
|
+
onLogs: (logs) => {
|
|
1122
|
+
logs.forEach((log) => {
|
|
1123
|
+
callback(log.args);
|
|
1124
|
+
});
|
|
1125
|
+
},
|
|
1126
|
+
});
|
|
1127
|
+
}
|
|
1128
|
+
};
|
|
1129
|
+
}
|
|
1130
|
+
}
|
|
1131
|
+
exports.THREEHUNDRED_json = THREEHUNDRED_json;
|