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