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