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