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