@gitmyabi/yee 1.0.1 → 1.0.2

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