@gitmyabi/usdt 1.0.14 → 1.0.16
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 +5 -5
- package/contracts/UERC20_json.d.ts +647 -0
- package/contracts/UERC20_json.js +735 -0
- package/contracts/UERC20_json.ts +867 -0
- package/contracts/index.d.ts +2 -4
- package/contracts/index.js +4 -7
- package/contracts/index.ts +2 -4
- package/package.json +3 -3
- package/contracts/ERC1967Proxy_json.d.ts +0 -169
- package/contracts/ERC1967Proxy_json.js +0 -221
- package/contracts/ERC1967Proxy_json.ts +0 -251
- package/contracts/USDTProxy_json.d.ts +0 -1298
- package/contracts/USDTProxy_json.js +0 -1343
- package/contracts/USDTProxy_json.ts +0 -1728
package/README.md
CHANGED
|
@@ -2,17 +2,17 @@
|
|
|
2
2
|
|
|
3
3
|
Auto-generated TypeScript type bindings for **USDT**
|
|
4
4
|
|
|
5
|
-
- **Build ID**: `etherscan-usdt-
|
|
5
|
+
- **Build ID**: `etherscan-usdt-8d2021ec-1786097010496`
|
|
6
6
|
- **Build Number**: 1
|
|
7
|
-
- **Commit**: `
|
|
7
|
+
- **Commit**: `723b7ad`
|
|
8
8
|
- **Branch**: `etherscan`
|
|
9
9
|
- **Target**: `ethers-v6`
|
|
10
|
-
- **Contracts**:
|
|
10
|
+
- **Contracts**: 1
|
|
11
11
|
|
|
12
12
|
## Installation
|
|
13
13
|
|
|
14
14
|
```bash
|
|
15
|
-
npm install @gitmyabi/usdt@1.0.
|
|
15
|
+
npm install @gitmyabi/usdt@1.0.16
|
|
16
16
|
```
|
|
17
17
|
|
|
18
18
|
## Usage
|
|
@@ -101,7 +101,7 @@ This package provides full TypeScript type safety for all contract methods, even
|
|
|
101
101
|
|
|
102
102
|
## Generated Contracts
|
|
103
103
|
|
|
104
|
-
This package includes type bindings for
|
|
104
|
+
This package includes type bindings for 1 contract(s) generated from ABI artifacts.
|
|
105
105
|
|
|
106
106
|
## License
|
|
107
107
|
|
|
@@ -0,0 +1,647 @@
|
|
|
1
|
+
import type { Address, PublicClient, WalletClient } from 'viem';
|
|
2
|
+
/**
|
|
3
|
+
* UERC20_json ABI
|
|
4
|
+
*
|
|
5
|
+
* This ABI is typed using viem's type system for full type safety.
|
|
6
|
+
*/
|
|
7
|
+
export declare const UERC20_jsonAbi: readonly [{
|
|
8
|
+
readonly inputs: readonly [];
|
|
9
|
+
readonly stateMutability: "nonpayable";
|
|
10
|
+
readonly type: "constructor";
|
|
11
|
+
}, {
|
|
12
|
+
readonly inputs: readonly [];
|
|
13
|
+
readonly name: "AllowanceOverflow";
|
|
14
|
+
readonly type: "error";
|
|
15
|
+
}, {
|
|
16
|
+
readonly inputs: readonly [];
|
|
17
|
+
readonly name: "AllowanceUnderflow";
|
|
18
|
+
readonly type: "error";
|
|
19
|
+
}, {
|
|
20
|
+
readonly inputs: readonly [];
|
|
21
|
+
readonly name: "InsufficientAllowance";
|
|
22
|
+
readonly type: "error";
|
|
23
|
+
}, {
|
|
24
|
+
readonly inputs: readonly [];
|
|
25
|
+
readonly name: "InsufficientBalance";
|
|
26
|
+
readonly type: "error";
|
|
27
|
+
}, {
|
|
28
|
+
readonly inputs: readonly [];
|
|
29
|
+
readonly name: "InvalidPermit";
|
|
30
|
+
readonly type: "error";
|
|
31
|
+
}, {
|
|
32
|
+
readonly inputs: readonly [];
|
|
33
|
+
readonly name: "Permit2AllowanceIsFixedAtInfinity";
|
|
34
|
+
readonly type: "error";
|
|
35
|
+
}, {
|
|
36
|
+
readonly inputs: readonly [];
|
|
37
|
+
readonly name: "PermitExpired";
|
|
38
|
+
readonly type: "error";
|
|
39
|
+
}, {
|
|
40
|
+
readonly inputs: readonly [];
|
|
41
|
+
readonly name: "TotalSupplyOverflow";
|
|
42
|
+
readonly type: "error";
|
|
43
|
+
}, {
|
|
44
|
+
readonly anonymous: false;
|
|
45
|
+
readonly inputs: readonly [{
|
|
46
|
+
readonly indexed: true;
|
|
47
|
+
readonly internalType: "address";
|
|
48
|
+
readonly name: "owner";
|
|
49
|
+
readonly type: "address";
|
|
50
|
+
}, {
|
|
51
|
+
readonly indexed: true;
|
|
52
|
+
readonly internalType: "address";
|
|
53
|
+
readonly name: "spender";
|
|
54
|
+
readonly type: "address";
|
|
55
|
+
}, {
|
|
56
|
+
readonly indexed: false;
|
|
57
|
+
readonly internalType: "uint256";
|
|
58
|
+
readonly name: "amount";
|
|
59
|
+
readonly type: "uint256";
|
|
60
|
+
}];
|
|
61
|
+
readonly name: "Approval";
|
|
62
|
+
readonly type: "event";
|
|
63
|
+
}, {
|
|
64
|
+
readonly anonymous: false;
|
|
65
|
+
readonly inputs: readonly [{
|
|
66
|
+
readonly indexed: true;
|
|
67
|
+
readonly internalType: "address";
|
|
68
|
+
readonly name: "from";
|
|
69
|
+
readonly type: "address";
|
|
70
|
+
}, {
|
|
71
|
+
readonly indexed: true;
|
|
72
|
+
readonly internalType: "address";
|
|
73
|
+
readonly name: "to";
|
|
74
|
+
readonly type: "address";
|
|
75
|
+
}, {
|
|
76
|
+
readonly indexed: false;
|
|
77
|
+
readonly internalType: "uint256";
|
|
78
|
+
readonly name: "amount";
|
|
79
|
+
readonly type: "uint256";
|
|
80
|
+
}];
|
|
81
|
+
readonly name: "Transfer";
|
|
82
|
+
readonly type: "event";
|
|
83
|
+
}, {
|
|
84
|
+
readonly inputs: readonly [];
|
|
85
|
+
readonly name: "DOMAIN_SEPARATOR";
|
|
86
|
+
readonly outputs: readonly [{
|
|
87
|
+
readonly internalType: "bytes32";
|
|
88
|
+
readonly name: "result";
|
|
89
|
+
readonly type: "bytes32";
|
|
90
|
+
}];
|
|
91
|
+
readonly stateMutability: "view";
|
|
92
|
+
readonly type: "function";
|
|
93
|
+
}, {
|
|
94
|
+
readonly inputs: readonly [{
|
|
95
|
+
readonly internalType: "address";
|
|
96
|
+
readonly name: "owner";
|
|
97
|
+
readonly type: "address";
|
|
98
|
+
}, {
|
|
99
|
+
readonly internalType: "address";
|
|
100
|
+
readonly name: "spender";
|
|
101
|
+
readonly type: "address";
|
|
102
|
+
}];
|
|
103
|
+
readonly name: "allowance";
|
|
104
|
+
readonly outputs: readonly [{
|
|
105
|
+
readonly internalType: "uint256";
|
|
106
|
+
readonly name: "result";
|
|
107
|
+
readonly type: "uint256";
|
|
108
|
+
}];
|
|
109
|
+
readonly stateMutability: "view";
|
|
110
|
+
readonly type: "function";
|
|
111
|
+
}, {
|
|
112
|
+
readonly inputs: readonly [{
|
|
113
|
+
readonly internalType: "address";
|
|
114
|
+
readonly name: "spender";
|
|
115
|
+
readonly type: "address";
|
|
116
|
+
}, {
|
|
117
|
+
readonly internalType: "uint256";
|
|
118
|
+
readonly name: "amount";
|
|
119
|
+
readonly type: "uint256";
|
|
120
|
+
}];
|
|
121
|
+
readonly name: "approve";
|
|
122
|
+
readonly outputs: readonly [{
|
|
123
|
+
readonly internalType: "bool";
|
|
124
|
+
readonly name: "";
|
|
125
|
+
readonly type: "bool";
|
|
126
|
+
}];
|
|
127
|
+
readonly stateMutability: "nonpayable";
|
|
128
|
+
readonly type: "function";
|
|
129
|
+
}, {
|
|
130
|
+
readonly inputs: readonly [{
|
|
131
|
+
readonly internalType: "address";
|
|
132
|
+
readonly name: "owner";
|
|
133
|
+
readonly type: "address";
|
|
134
|
+
}];
|
|
135
|
+
readonly name: "balanceOf";
|
|
136
|
+
readonly outputs: readonly [{
|
|
137
|
+
readonly internalType: "uint256";
|
|
138
|
+
readonly name: "result";
|
|
139
|
+
readonly type: "uint256";
|
|
140
|
+
}];
|
|
141
|
+
readonly stateMutability: "view";
|
|
142
|
+
readonly type: "function";
|
|
143
|
+
}, {
|
|
144
|
+
readonly inputs: readonly [];
|
|
145
|
+
readonly name: "creator";
|
|
146
|
+
readonly outputs: readonly [{
|
|
147
|
+
readonly internalType: "address";
|
|
148
|
+
readonly name: "";
|
|
149
|
+
readonly type: "address";
|
|
150
|
+
}];
|
|
151
|
+
readonly stateMutability: "view";
|
|
152
|
+
readonly type: "function";
|
|
153
|
+
}, {
|
|
154
|
+
readonly inputs: readonly [];
|
|
155
|
+
readonly name: "decimals";
|
|
156
|
+
readonly outputs: readonly [{
|
|
157
|
+
readonly internalType: "uint8";
|
|
158
|
+
readonly name: "";
|
|
159
|
+
readonly type: "uint8";
|
|
160
|
+
}];
|
|
161
|
+
readonly stateMutability: "view";
|
|
162
|
+
readonly type: "function";
|
|
163
|
+
}, {
|
|
164
|
+
readonly inputs: readonly [];
|
|
165
|
+
readonly name: "graffiti";
|
|
166
|
+
readonly outputs: readonly [{
|
|
167
|
+
readonly internalType: "bytes32";
|
|
168
|
+
readonly name: "";
|
|
169
|
+
readonly type: "bytes32";
|
|
170
|
+
}];
|
|
171
|
+
readonly stateMutability: "view";
|
|
172
|
+
readonly type: "function";
|
|
173
|
+
}, {
|
|
174
|
+
readonly inputs: readonly [];
|
|
175
|
+
readonly name: "metadata";
|
|
176
|
+
readonly outputs: readonly [{
|
|
177
|
+
readonly internalType: "string";
|
|
178
|
+
readonly name: "description";
|
|
179
|
+
readonly type: "string";
|
|
180
|
+
}, {
|
|
181
|
+
readonly internalType: "string";
|
|
182
|
+
readonly name: "website";
|
|
183
|
+
readonly type: "string";
|
|
184
|
+
}, {
|
|
185
|
+
readonly internalType: "string";
|
|
186
|
+
readonly name: "image";
|
|
187
|
+
readonly type: "string";
|
|
188
|
+
}, {
|
|
189
|
+
readonly internalType: "bytes";
|
|
190
|
+
readonly name: "extraData";
|
|
191
|
+
readonly type: "bytes";
|
|
192
|
+
}];
|
|
193
|
+
readonly stateMutability: "view";
|
|
194
|
+
readonly type: "function";
|
|
195
|
+
}, {
|
|
196
|
+
readonly inputs: readonly [];
|
|
197
|
+
readonly name: "name";
|
|
198
|
+
readonly outputs: readonly [{
|
|
199
|
+
readonly internalType: "string";
|
|
200
|
+
readonly name: "";
|
|
201
|
+
readonly type: "string";
|
|
202
|
+
}];
|
|
203
|
+
readonly stateMutability: "view";
|
|
204
|
+
readonly type: "function";
|
|
205
|
+
}, {
|
|
206
|
+
readonly inputs: readonly [{
|
|
207
|
+
readonly internalType: "address";
|
|
208
|
+
readonly name: "owner";
|
|
209
|
+
readonly type: "address";
|
|
210
|
+
}];
|
|
211
|
+
readonly name: "nonces";
|
|
212
|
+
readonly outputs: readonly [{
|
|
213
|
+
readonly internalType: "uint256";
|
|
214
|
+
readonly name: "result";
|
|
215
|
+
readonly type: "uint256";
|
|
216
|
+
}];
|
|
217
|
+
readonly stateMutability: "view";
|
|
218
|
+
readonly type: "function";
|
|
219
|
+
}, {
|
|
220
|
+
readonly inputs: readonly [{
|
|
221
|
+
readonly internalType: "address";
|
|
222
|
+
readonly name: "owner";
|
|
223
|
+
readonly type: "address";
|
|
224
|
+
}, {
|
|
225
|
+
readonly internalType: "address";
|
|
226
|
+
readonly name: "spender";
|
|
227
|
+
readonly type: "address";
|
|
228
|
+
}, {
|
|
229
|
+
readonly internalType: "uint256";
|
|
230
|
+
readonly name: "value";
|
|
231
|
+
readonly type: "uint256";
|
|
232
|
+
}, {
|
|
233
|
+
readonly internalType: "uint256";
|
|
234
|
+
readonly name: "deadline";
|
|
235
|
+
readonly type: "uint256";
|
|
236
|
+
}, {
|
|
237
|
+
readonly internalType: "uint8";
|
|
238
|
+
readonly name: "v";
|
|
239
|
+
readonly type: "uint8";
|
|
240
|
+
}, {
|
|
241
|
+
readonly internalType: "bytes32";
|
|
242
|
+
readonly name: "r";
|
|
243
|
+
readonly type: "bytes32";
|
|
244
|
+
}, {
|
|
245
|
+
readonly internalType: "bytes32";
|
|
246
|
+
readonly name: "s";
|
|
247
|
+
readonly type: "bytes32";
|
|
248
|
+
}];
|
|
249
|
+
readonly name: "permit";
|
|
250
|
+
readonly outputs: readonly [];
|
|
251
|
+
readonly stateMutability: "nonpayable";
|
|
252
|
+
readonly type: "function";
|
|
253
|
+
}, {
|
|
254
|
+
readonly inputs: readonly [{
|
|
255
|
+
readonly internalType: "bytes4";
|
|
256
|
+
readonly name: "_interfaceId";
|
|
257
|
+
readonly type: "bytes4";
|
|
258
|
+
}];
|
|
259
|
+
readonly name: "supportsInterface";
|
|
260
|
+
readonly outputs: readonly [{
|
|
261
|
+
readonly internalType: "bool";
|
|
262
|
+
readonly name: "";
|
|
263
|
+
readonly type: "bool";
|
|
264
|
+
}];
|
|
265
|
+
readonly stateMutability: "view";
|
|
266
|
+
readonly type: "function";
|
|
267
|
+
}, {
|
|
268
|
+
readonly inputs: readonly [];
|
|
269
|
+
readonly name: "symbol";
|
|
270
|
+
readonly outputs: readonly [{
|
|
271
|
+
readonly internalType: "string";
|
|
272
|
+
readonly name: "";
|
|
273
|
+
readonly type: "string";
|
|
274
|
+
}];
|
|
275
|
+
readonly stateMutability: "view";
|
|
276
|
+
readonly type: "function";
|
|
277
|
+
}, {
|
|
278
|
+
readonly inputs: readonly [];
|
|
279
|
+
readonly name: "tokenURI";
|
|
280
|
+
readonly outputs: readonly [{
|
|
281
|
+
readonly internalType: "string";
|
|
282
|
+
readonly name: "";
|
|
283
|
+
readonly type: "string";
|
|
284
|
+
}];
|
|
285
|
+
readonly stateMutability: "view";
|
|
286
|
+
readonly type: "function";
|
|
287
|
+
}, {
|
|
288
|
+
readonly inputs: readonly [];
|
|
289
|
+
readonly name: "totalSupply";
|
|
290
|
+
readonly outputs: readonly [{
|
|
291
|
+
readonly internalType: "uint256";
|
|
292
|
+
readonly name: "result";
|
|
293
|
+
readonly type: "uint256";
|
|
294
|
+
}];
|
|
295
|
+
readonly stateMutability: "view";
|
|
296
|
+
readonly type: "function";
|
|
297
|
+
}, {
|
|
298
|
+
readonly inputs: readonly [{
|
|
299
|
+
readonly internalType: "address";
|
|
300
|
+
readonly name: "to";
|
|
301
|
+
readonly type: "address";
|
|
302
|
+
}, {
|
|
303
|
+
readonly internalType: "uint256";
|
|
304
|
+
readonly name: "amount";
|
|
305
|
+
readonly type: "uint256";
|
|
306
|
+
}];
|
|
307
|
+
readonly name: "transfer";
|
|
308
|
+
readonly outputs: readonly [{
|
|
309
|
+
readonly internalType: "bool";
|
|
310
|
+
readonly name: "";
|
|
311
|
+
readonly type: "bool";
|
|
312
|
+
}];
|
|
313
|
+
readonly stateMutability: "nonpayable";
|
|
314
|
+
readonly type: "function";
|
|
315
|
+
}, {
|
|
316
|
+
readonly inputs: readonly [{
|
|
317
|
+
readonly internalType: "address";
|
|
318
|
+
readonly name: "from";
|
|
319
|
+
readonly type: "address";
|
|
320
|
+
}, {
|
|
321
|
+
readonly internalType: "address";
|
|
322
|
+
readonly name: "to";
|
|
323
|
+
readonly type: "address";
|
|
324
|
+
}, {
|
|
325
|
+
readonly internalType: "uint256";
|
|
326
|
+
readonly name: "amount";
|
|
327
|
+
readonly type: "uint256";
|
|
328
|
+
}];
|
|
329
|
+
readonly name: "transferFrom";
|
|
330
|
+
readonly outputs: readonly [{
|
|
331
|
+
readonly internalType: "bool";
|
|
332
|
+
readonly name: "";
|
|
333
|
+
readonly type: "bool";
|
|
334
|
+
}];
|
|
335
|
+
readonly stateMutability: "nonpayable";
|
|
336
|
+
readonly type: "function";
|
|
337
|
+
}];
|
|
338
|
+
/**
|
|
339
|
+
* Type-safe ABI for UERC20_json
|
|
340
|
+
*/
|
|
341
|
+
export type UERC20_jsonAbi = typeof UERC20_jsonAbi;
|
|
342
|
+
/**
|
|
343
|
+
* Contract instance type for UERC20_json
|
|
344
|
+
*/
|
|
345
|
+
export type UERC20_jsonContract = any;
|
|
346
|
+
/**
|
|
347
|
+
* UERC20_json Contract Class
|
|
348
|
+
*
|
|
349
|
+
* Provides a class-based API similar to TypeChain for interacting with the contract.
|
|
350
|
+
*
|
|
351
|
+
* @example
|
|
352
|
+
* ```typescript
|
|
353
|
+
* import { createPublicClient, createWalletClient, http } from 'viem';
|
|
354
|
+
* import { mainnet } from 'viem/chains';
|
|
355
|
+
* import { UERC20_json } from 'UERC20_json';
|
|
356
|
+
*
|
|
357
|
+
* const publicClient = createPublicClient({ chain: mainnet, transport: http() });
|
|
358
|
+
* const walletClient = createWalletClient({ chain: mainnet, transport: http() });
|
|
359
|
+
*
|
|
360
|
+
* const contract = new UERC20_json('0x...', { publicClient, walletClient });
|
|
361
|
+
*
|
|
362
|
+
* // Read functions
|
|
363
|
+
* const result = await contract.balanceOf('0x...');
|
|
364
|
+
*
|
|
365
|
+
* // Write functions
|
|
366
|
+
* const hash = await contract.transfer('0x...', 1000n);
|
|
367
|
+
*
|
|
368
|
+
* // Simulate transactions (dry-run)
|
|
369
|
+
* const simulation = await contract.simulate.transfer('0x...', 1000n);
|
|
370
|
+
* console.log('Gas estimate:', simulation.request.gas);
|
|
371
|
+
*
|
|
372
|
+
* // Watch events
|
|
373
|
+
* const unwatch = contract.watch.Transfer((event) => {
|
|
374
|
+
* console.log('Transfer event:', event);
|
|
375
|
+
* });
|
|
376
|
+
* ```
|
|
377
|
+
*/
|
|
378
|
+
export declare class UERC20_json {
|
|
379
|
+
private contract;
|
|
380
|
+
private contractAddress;
|
|
381
|
+
private publicClient;
|
|
382
|
+
constructor(address: Address, clients: {
|
|
383
|
+
publicClient: PublicClient;
|
|
384
|
+
walletClient?: WalletClient;
|
|
385
|
+
});
|
|
386
|
+
/**
|
|
387
|
+
* Get the contract address
|
|
388
|
+
*/
|
|
389
|
+
get address(): Address;
|
|
390
|
+
/**
|
|
391
|
+
* Get the underlying viem contract instance
|
|
392
|
+
*/
|
|
393
|
+
getContract(): UERC20_jsonContract;
|
|
394
|
+
/**
|
|
395
|
+
* DOMAIN_SEPARATOR
|
|
396
|
+
* view
|
|
397
|
+
*/
|
|
398
|
+
DOMAIN_SEPARATOR(): Promise<`0x${string}`>;
|
|
399
|
+
/**
|
|
400
|
+
* allowance
|
|
401
|
+
* view
|
|
402
|
+
*/
|
|
403
|
+
allowance(owner: `0x${string}`, spender: `0x${string}`): Promise<bigint>;
|
|
404
|
+
/**
|
|
405
|
+
* balanceOf
|
|
406
|
+
* view
|
|
407
|
+
*/
|
|
408
|
+
balanceOf(owner: `0x${string}`): Promise<bigint>;
|
|
409
|
+
/**
|
|
410
|
+
* creator
|
|
411
|
+
* view
|
|
412
|
+
*/
|
|
413
|
+
creator(): Promise<`0x${string}`>;
|
|
414
|
+
/**
|
|
415
|
+
* decimals
|
|
416
|
+
* view
|
|
417
|
+
*/
|
|
418
|
+
decimals(): Promise<bigint>;
|
|
419
|
+
/**
|
|
420
|
+
* graffiti
|
|
421
|
+
* view
|
|
422
|
+
*/
|
|
423
|
+
graffiti(): Promise<`0x${string}`>;
|
|
424
|
+
/**
|
|
425
|
+
* metadata
|
|
426
|
+
* view
|
|
427
|
+
*/
|
|
428
|
+
metadata(): Promise<[string, string, string, `0x${string}`]>;
|
|
429
|
+
/**
|
|
430
|
+
* name
|
|
431
|
+
* view
|
|
432
|
+
*/
|
|
433
|
+
name(): Promise<string>;
|
|
434
|
+
/**
|
|
435
|
+
* nonces
|
|
436
|
+
* view
|
|
437
|
+
*/
|
|
438
|
+
nonces(owner: `0x${string}`): Promise<bigint>;
|
|
439
|
+
/**
|
|
440
|
+
* supportsInterface
|
|
441
|
+
* view
|
|
442
|
+
*/
|
|
443
|
+
supportsInterface(_interfaceId: `0x${string}`): Promise<boolean>;
|
|
444
|
+
/**
|
|
445
|
+
* symbol
|
|
446
|
+
* view
|
|
447
|
+
*/
|
|
448
|
+
symbol(): Promise<string>;
|
|
449
|
+
/**
|
|
450
|
+
* tokenURI
|
|
451
|
+
* view
|
|
452
|
+
*/
|
|
453
|
+
tokenURI(): Promise<string>;
|
|
454
|
+
/**
|
|
455
|
+
* totalSupply
|
|
456
|
+
* view
|
|
457
|
+
*/
|
|
458
|
+
totalSupply(): Promise<bigint>;
|
|
459
|
+
/**
|
|
460
|
+
* approve
|
|
461
|
+
* nonpayable
|
|
462
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
463
|
+
*/
|
|
464
|
+
approve(spender: `0x${string}`, amount: bigint, options?: {
|
|
465
|
+
accessList?: import('viem').AccessList;
|
|
466
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
467
|
+
chain?: import('viem').Chain | null;
|
|
468
|
+
dataSuffix?: `0x${string}`;
|
|
469
|
+
gas?: bigint;
|
|
470
|
+
gasPrice?: bigint;
|
|
471
|
+
maxFeePerGas?: bigint;
|
|
472
|
+
maxPriorityFeePerGas?: bigint;
|
|
473
|
+
nonce?: number;
|
|
474
|
+
value?: bigint;
|
|
475
|
+
}): Promise<`0x${string}`>;
|
|
476
|
+
/**
|
|
477
|
+
* permit
|
|
478
|
+
* nonpayable
|
|
479
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
480
|
+
*/
|
|
481
|
+
permit(owner: `0x${string}`, spender: `0x${string}`, value: bigint, deadline: bigint, v: bigint, r: `0x${string}`, s: `0x${string}`, options?: {
|
|
482
|
+
accessList?: import('viem').AccessList;
|
|
483
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
484
|
+
chain?: import('viem').Chain | null;
|
|
485
|
+
dataSuffix?: `0x${string}`;
|
|
486
|
+
gas?: bigint;
|
|
487
|
+
gasPrice?: bigint;
|
|
488
|
+
maxFeePerGas?: bigint;
|
|
489
|
+
maxPriorityFeePerGas?: bigint;
|
|
490
|
+
nonce?: number;
|
|
491
|
+
value?: bigint;
|
|
492
|
+
}): Promise<`0x${string}`>;
|
|
493
|
+
/**
|
|
494
|
+
* transfer
|
|
495
|
+
* nonpayable
|
|
496
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
497
|
+
*/
|
|
498
|
+
transfer(to: `0x${string}`, amount: bigint, options?: {
|
|
499
|
+
accessList?: import('viem').AccessList;
|
|
500
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
501
|
+
chain?: import('viem').Chain | null;
|
|
502
|
+
dataSuffix?: `0x${string}`;
|
|
503
|
+
gas?: bigint;
|
|
504
|
+
gasPrice?: bigint;
|
|
505
|
+
maxFeePerGas?: bigint;
|
|
506
|
+
maxPriorityFeePerGas?: bigint;
|
|
507
|
+
nonce?: number;
|
|
508
|
+
value?: bigint;
|
|
509
|
+
}): Promise<`0x${string}`>;
|
|
510
|
+
/**
|
|
511
|
+
* transferFrom
|
|
512
|
+
* nonpayable
|
|
513
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
514
|
+
*/
|
|
515
|
+
transferFrom(from: `0x${string}`, to: `0x${string}`, amount: bigint, options?: {
|
|
516
|
+
accessList?: import('viem').AccessList;
|
|
517
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
518
|
+
chain?: import('viem').Chain | null;
|
|
519
|
+
dataSuffix?: `0x${string}`;
|
|
520
|
+
gas?: bigint;
|
|
521
|
+
gasPrice?: bigint;
|
|
522
|
+
maxFeePerGas?: bigint;
|
|
523
|
+
maxPriorityFeePerGas?: bigint;
|
|
524
|
+
nonce?: number;
|
|
525
|
+
value?: bigint;
|
|
526
|
+
}): Promise<`0x${string}`>;
|
|
527
|
+
/**
|
|
528
|
+
* Simulate contract write operations (dry-run without sending transaction)
|
|
529
|
+
*
|
|
530
|
+
* @example
|
|
531
|
+
* const result = await contract.simulate.transfer('0x...', 1000n);
|
|
532
|
+
* console.log('Gas estimate:', result.request.gas);
|
|
533
|
+
* console.log('Would succeed:', result.result);
|
|
534
|
+
*/
|
|
535
|
+
get simulate(): {
|
|
536
|
+
/**
|
|
537
|
+
* Simulate approve
|
|
538
|
+
* Returns gas estimate and result without sending transaction
|
|
539
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
540
|
+
*/
|
|
541
|
+
approve(spender: `0x${string}`, amount: bigint, options?: {
|
|
542
|
+
accessList?: import("viem").AccessList;
|
|
543
|
+
authorizationList?: import("viem").AuthorizationList;
|
|
544
|
+
chain?: import("viem").Chain | null;
|
|
545
|
+
dataSuffix?: `0x${string}`;
|
|
546
|
+
gas?: bigint;
|
|
547
|
+
gasPrice?: bigint;
|
|
548
|
+
maxFeePerGas?: bigint;
|
|
549
|
+
maxPriorityFeePerGas?: bigint;
|
|
550
|
+
nonce?: number;
|
|
551
|
+
value?: bigint;
|
|
552
|
+
}): Promise<boolean>;
|
|
553
|
+
/**
|
|
554
|
+
* Simulate permit
|
|
555
|
+
* Returns gas estimate and result without sending transaction
|
|
556
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
557
|
+
*/
|
|
558
|
+
permit(owner: `0x${string}`, spender: `0x${string}`, value: bigint, deadline: bigint, v: bigint, r: `0x${string}`, s: `0x${string}`, options?: {
|
|
559
|
+
accessList?: import("viem").AccessList;
|
|
560
|
+
authorizationList?: import("viem").AuthorizationList;
|
|
561
|
+
chain?: import("viem").Chain | null;
|
|
562
|
+
dataSuffix?: `0x${string}`;
|
|
563
|
+
gas?: bigint;
|
|
564
|
+
gasPrice?: bigint;
|
|
565
|
+
maxFeePerGas?: bigint;
|
|
566
|
+
maxPriorityFeePerGas?: bigint;
|
|
567
|
+
nonce?: number;
|
|
568
|
+
value?: bigint;
|
|
569
|
+
}): Promise<void>;
|
|
570
|
+
/**
|
|
571
|
+
* Simulate transfer
|
|
572
|
+
* Returns gas estimate and result without sending transaction
|
|
573
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
574
|
+
*/
|
|
575
|
+
transfer(to: `0x${string}`, amount: bigint, options?: {
|
|
576
|
+
accessList?: import("viem").AccessList;
|
|
577
|
+
authorizationList?: import("viem").AuthorizationList;
|
|
578
|
+
chain?: import("viem").Chain | null;
|
|
579
|
+
dataSuffix?: `0x${string}`;
|
|
580
|
+
gas?: bigint;
|
|
581
|
+
gasPrice?: bigint;
|
|
582
|
+
maxFeePerGas?: bigint;
|
|
583
|
+
maxPriorityFeePerGas?: bigint;
|
|
584
|
+
nonce?: number;
|
|
585
|
+
value?: bigint;
|
|
586
|
+
}): Promise<boolean>;
|
|
587
|
+
/**
|
|
588
|
+
* Simulate transferFrom
|
|
589
|
+
* Returns gas estimate and result without sending transaction
|
|
590
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
591
|
+
*/
|
|
592
|
+
transferFrom(from: `0x${string}`, to: `0x${string}`, amount: bigint, options?: {
|
|
593
|
+
accessList?: import("viem").AccessList;
|
|
594
|
+
authorizationList?: import("viem").AuthorizationList;
|
|
595
|
+
chain?: import("viem").Chain | null;
|
|
596
|
+
dataSuffix?: `0x${string}`;
|
|
597
|
+
gas?: bigint;
|
|
598
|
+
gasPrice?: bigint;
|
|
599
|
+
maxFeePerGas?: bigint;
|
|
600
|
+
maxPriorityFeePerGas?: bigint;
|
|
601
|
+
nonce?: number;
|
|
602
|
+
value?: bigint;
|
|
603
|
+
}): Promise<boolean>;
|
|
604
|
+
};
|
|
605
|
+
/**
|
|
606
|
+
* Watch contract events
|
|
607
|
+
*
|
|
608
|
+
* @example
|
|
609
|
+
* // Watch all Transfer events
|
|
610
|
+
* const unwatch = contract.watch.Transfer((event) => {
|
|
611
|
+
* console.log('Transfer:', event);
|
|
612
|
+
* });
|
|
613
|
+
*
|
|
614
|
+
* // Stop watching
|
|
615
|
+
* unwatch();
|
|
616
|
+
*/
|
|
617
|
+
get watch(): {
|
|
618
|
+
/**
|
|
619
|
+
* Watch Approval events
|
|
620
|
+
* @param callback Function to call when event is emitted
|
|
621
|
+
* @param filter Optional filter for indexed parameters
|
|
622
|
+
* @returns Unwatch function to stop listening
|
|
623
|
+
*/
|
|
624
|
+
Approval: (callback: (event: {
|
|
625
|
+
owner: `0x${string}`;
|
|
626
|
+
spender: `0x${string}`;
|
|
627
|
+
amount: bigint;
|
|
628
|
+
}) => void, filter?: {
|
|
629
|
+
owner: `0x${string}`;
|
|
630
|
+
spender: `0x${string}`;
|
|
631
|
+
}) => () => void;
|
|
632
|
+
/**
|
|
633
|
+
* Watch Transfer events
|
|
634
|
+
* @param callback Function to call when event is emitted
|
|
635
|
+
* @param filter Optional filter for indexed parameters
|
|
636
|
+
* @returns Unwatch function to stop listening
|
|
637
|
+
*/
|
|
638
|
+
Transfer: (callback: (event: {
|
|
639
|
+
from: `0x${string}`;
|
|
640
|
+
to: `0x${string}`;
|
|
641
|
+
amount: bigint;
|
|
642
|
+
}) => void, filter?: {
|
|
643
|
+
from: `0x${string}`;
|
|
644
|
+
to: `0x${string}`;
|
|
645
|
+
}) => () => void;
|
|
646
|
+
};
|
|
647
|
+
}
|