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