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