@gitmyabi/gogo 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 ADDED
@@ -0,0 +1,108 @@
1
+ # @gitmyabi/gogo
2
+
3
+ Auto-generated TypeScript type bindings for **GoGo**
4
+
5
+ - **Build ID**: `etherscan-gogo-f9c8631f-1787584663805`
6
+ - **Build Number**: 1
7
+ - **Commit**: `01383d7`
8
+ - **Branch**: `etherscan`
9
+ - **Target**: `ethers-v6`
10
+ - **Contracts**: 1
11
+
12
+ ## Installation
13
+
14
+ ```bash
15
+ npm install @gitmyabi/gogo@1.0.0
16
+ ```
17
+
18
+ ## Usage
19
+
20
+ ### Class-based API (TypeChain-like)
21
+
22
+ ```typescript
23
+ import { createPublicClient, createWalletClient, http } from 'viem';
24
+ import { mainnet } from 'viem/chains';
25
+ import { YourContract } from '@gitmyabi/gogo';
26
+
27
+ const publicClient = createPublicClient({ chain: mainnet, transport: http() });
28
+ const walletClient = createWalletClient({ chain: mainnet, transport: http() });
29
+
30
+ // Create contract instance
31
+ const contract = new YourContract('0x...', { publicClient, walletClient });
32
+
33
+ // Read functions - call directly like TypeChain!
34
+ const result = await contract.yourMethod(param1, param2);
35
+
36
+ // Write functions - also call directly!
37
+ const hash = await contract.transfer('0x...', 1000n);
38
+ ```
39
+
40
+ ### With viem directly
41
+
42
+ ```typescript
43
+ import { createPublicClient, http } from 'viem';
44
+ import { mainnet } from 'viem/chains';
45
+ import { YourContractAbi } from '@gitmyabi/gogo';
46
+
47
+ const client = createPublicClient({
48
+ chain: mainnet,
49
+ transport: http(),
50
+ });
51
+
52
+ // Fully typed contract read
53
+ const result = await client.readContract({
54
+ address: '0x...',
55
+ abi: YourContractAbi,
56
+ functionName: 'yourMethod',
57
+ args: [param1, param2],
58
+ });
59
+
60
+ // Fully typed contract write
61
+ const hash = await client.writeContract({
62
+ address: '0x...',
63
+ abi: YourContractAbi,
64
+ functionName: 'yourMethod',
65
+ args: [param1, param2],
66
+ });
67
+ ```
68
+
69
+ ### With wagmi
70
+
71
+ ```typescript
72
+ import { useReadContract, useWriteContract } from 'wagmi';
73
+ import { YourContractAbi } from '@gitmyabi/gogo';
74
+
75
+ function MyComponent() {
76
+ const { data } = useReadContract({
77
+ address: '0x...',
78
+ abi: YourContractAbi,
79
+ functionName: 'yourMethod',
80
+ args: [param1, param2],
81
+ });
82
+
83
+ const { writeContract } = useWriteContract();
84
+
85
+ const handleWrite = () => {
86
+ writeContract({
87
+ address: '0x...',
88
+ abi: YourContractAbi,
89
+ functionName: 'yourMethod',
90
+ args: [param1, param2],
91
+ });
92
+ };
93
+
94
+ return <button onClick={handleWrite}>Call Contract</button>;
95
+ }
96
+ ```
97
+
98
+ ## Type Safety
99
+
100
+ This package provides full TypeScript type safety for all contract methods, events, and parameters using viem's type system. All ABIs are exported as `const` assertions for maximum type inference.
101
+
102
+ ## Generated Contracts
103
+
104
+ This package includes type bindings for 1 contract(s) generated from ABI artifacts.
105
+
106
+ ## License
107
+
108
+ MIT
@@ -0,0 +1,422 @@
1
+ import type { Address, PublicClient, WalletClient } from 'viem';
2
+ /**
3
+ * MightyMorphinPowerRangers_json ABI
4
+ *
5
+ * This ABI is typed using viem's type system for full type safety.
6
+ */
7
+ export declare const MightyMorphinPowerRangers_jsonAbi: readonly [{
8
+ readonly inputs: readonly [];
9
+ readonly stateMutability: "nonpayable";
10
+ readonly type: "constructor";
11
+ }, {
12
+ readonly anonymous: false;
13
+ readonly inputs: readonly [{
14
+ readonly indexed: true;
15
+ readonly internalType: "address";
16
+ readonly name: "owner";
17
+ readonly type: "address";
18
+ }, {
19
+ readonly indexed: true;
20
+ readonly internalType: "address";
21
+ readonly name: "spender";
22
+ readonly type: "address";
23
+ }, {
24
+ readonly indexed: false;
25
+ readonly internalType: "uint256";
26
+ readonly name: "value";
27
+ readonly type: "uint256";
28
+ }];
29
+ readonly name: "Approval";
30
+ readonly type: "event";
31
+ }, {
32
+ readonly anonymous: false;
33
+ readonly inputs: readonly [{
34
+ readonly indexed: true;
35
+ readonly internalType: "address";
36
+ readonly name: "from";
37
+ readonly type: "address";
38
+ }, {
39
+ readonly indexed: true;
40
+ readonly internalType: "address";
41
+ readonly name: "to";
42
+ readonly type: "address";
43
+ }, {
44
+ readonly indexed: false;
45
+ readonly internalType: "uint256";
46
+ readonly name: "value";
47
+ readonly type: "uint256";
48
+ }];
49
+ readonly name: "Transfer";
50
+ readonly type: "event";
51
+ }, {
52
+ readonly inputs: readonly [{
53
+ readonly internalType: "address";
54
+ readonly name: "";
55
+ readonly type: "address";
56
+ }, {
57
+ readonly internalType: "address";
58
+ readonly name: "";
59
+ readonly type: "address";
60
+ }];
61
+ readonly name: "allowance";
62
+ readonly outputs: readonly [{
63
+ readonly internalType: "uint256";
64
+ readonly name: "";
65
+ readonly type: "uint256";
66
+ }];
67
+ readonly stateMutability: "view";
68
+ readonly type: "function";
69
+ }, {
70
+ readonly inputs: readonly [{
71
+ readonly internalType: "address";
72
+ readonly name: "spender";
73
+ readonly type: "address";
74
+ }, {
75
+ readonly internalType: "uint256";
76
+ readonly name: "value";
77
+ readonly type: "uint256";
78
+ }];
79
+ readonly name: "approve";
80
+ readonly outputs: readonly [{
81
+ readonly internalType: "bool";
82
+ readonly name: "";
83
+ readonly type: "bool";
84
+ }];
85
+ readonly stateMutability: "nonpayable";
86
+ readonly type: "function";
87
+ }, {
88
+ readonly inputs: readonly [{
89
+ readonly internalType: "address";
90
+ readonly name: "";
91
+ readonly type: "address";
92
+ }];
93
+ readonly name: "balanceOf";
94
+ readonly outputs: readonly [{
95
+ readonly internalType: "uint256";
96
+ readonly name: "";
97
+ readonly type: "uint256";
98
+ }];
99
+ readonly stateMutability: "view";
100
+ readonly type: "function";
101
+ }, {
102
+ readonly inputs: readonly [];
103
+ readonly name: "decimals";
104
+ readonly outputs: readonly [{
105
+ readonly internalType: "uint8";
106
+ readonly name: "";
107
+ readonly type: "uint8";
108
+ }];
109
+ readonly stateMutability: "view";
110
+ readonly type: "function";
111
+ }, {
112
+ readonly inputs: readonly [];
113
+ readonly name: "name";
114
+ readonly outputs: readonly [{
115
+ readonly internalType: "string";
116
+ readonly name: "";
117
+ readonly type: "string";
118
+ }];
119
+ readonly stateMutability: "view";
120
+ readonly type: "function";
121
+ }, {
122
+ readonly inputs: readonly [];
123
+ readonly name: "symbol";
124
+ readonly outputs: readonly [{
125
+ readonly internalType: "string";
126
+ readonly name: "";
127
+ readonly type: "string";
128
+ }];
129
+ readonly stateMutability: "view";
130
+ readonly type: "function";
131
+ }, {
132
+ readonly inputs: readonly [];
133
+ readonly name: "totalSupply";
134
+ readonly outputs: readonly [{
135
+ readonly internalType: "uint256";
136
+ readonly name: "";
137
+ readonly type: "uint256";
138
+ }];
139
+ readonly stateMutability: "view";
140
+ readonly type: "function";
141
+ }, {
142
+ readonly inputs: readonly [{
143
+ readonly internalType: "address";
144
+ readonly name: "to";
145
+ readonly type: "address";
146
+ }, {
147
+ readonly internalType: "uint256";
148
+ readonly name: "value";
149
+ readonly type: "uint256";
150
+ }];
151
+ readonly name: "transfer";
152
+ readonly outputs: readonly [{
153
+ readonly internalType: "bool";
154
+ readonly name: "";
155
+ readonly type: "bool";
156
+ }];
157
+ readonly stateMutability: "nonpayable";
158
+ readonly type: "function";
159
+ }, {
160
+ readonly inputs: readonly [{
161
+ readonly internalType: "address";
162
+ readonly name: "from";
163
+ readonly type: "address";
164
+ }, {
165
+ readonly internalType: "address";
166
+ readonly name: "to";
167
+ readonly type: "address";
168
+ }, {
169
+ readonly internalType: "uint256";
170
+ readonly name: "value";
171
+ readonly type: "uint256";
172
+ }];
173
+ readonly name: "transferFrom";
174
+ readonly outputs: readonly [{
175
+ readonly internalType: "bool";
176
+ readonly name: "";
177
+ readonly type: "bool";
178
+ }];
179
+ readonly stateMutability: "nonpayable";
180
+ readonly type: "function";
181
+ }];
182
+ /**
183
+ * Type-safe ABI for MightyMorphinPowerRangers_json
184
+ */
185
+ export type MightyMorphinPowerRangers_jsonAbi = typeof MightyMorphinPowerRangers_jsonAbi;
186
+ /**
187
+ * Contract instance type for MightyMorphinPowerRangers_json
188
+ */
189
+ export type MightyMorphinPowerRangers_jsonContract = any;
190
+ /**
191
+ * MightyMorphinPowerRangers_json Contract Class
192
+ *
193
+ * Provides a class-based API similar to TypeChain for interacting with the contract.
194
+ *
195
+ * @example
196
+ * ```typescript
197
+ * import { createPublicClient, createWalletClient, http } from 'viem';
198
+ * import { mainnet } from 'viem/chains';
199
+ * import { MightyMorphinPowerRangers_json } from 'MightyMorphinPowerRangers_json';
200
+ *
201
+ * const publicClient = createPublicClient({ chain: mainnet, transport: http() });
202
+ * const walletClient = createWalletClient({ chain: mainnet, transport: http() });
203
+ *
204
+ * const contract = new MightyMorphinPowerRangers_json('0x...', { publicClient, walletClient });
205
+ *
206
+ * // Read functions
207
+ * const result = await contract.balanceOf('0x...');
208
+ *
209
+ * // Write functions
210
+ * const hash = await contract.transfer('0x...', 1000n);
211
+ *
212
+ * // Simulate transactions (dry-run)
213
+ * const simulation = await contract.simulate.transfer('0x...', 1000n);
214
+ * console.log('Gas estimate:', simulation.request.gas);
215
+ *
216
+ * // Watch events
217
+ * const unwatch = contract.watch.Transfer((event) => {
218
+ * console.log('Transfer event:', event);
219
+ * });
220
+ * ```
221
+ */
222
+ export declare class MightyMorphinPowerRangers_json {
223
+ private contract;
224
+ private contractAddress;
225
+ private publicClient;
226
+ constructor(address: Address, clients: {
227
+ publicClient: PublicClient;
228
+ walletClient?: WalletClient;
229
+ });
230
+ /**
231
+ * Get the contract address
232
+ */
233
+ get address(): Address;
234
+ /**
235
+ * Get the underlying viem contract instance
236
+ */
237
+ getContract(): MightyMorphinPowerRangers_jsonContract;
238
+ /**
239
+ * allowance
240
+ * view
241
+ */
242
+ allowance(arg0: `0x${string}`, arg1: `0x${string}`): Promise<bigint>;
243
+ /**
244
+ * balanceOf
245
+ * view
246
+ */
247
+ balanceOf(arg0: `0x${string}`): Promise<bigint>;
248
+ /**
249
+ * decimals
250
+ * view
251
+ */
252
+ decimals(): Promise<bigint>;
253
+ /**
254
+ * name
255
+ * view
256
+ */
257
+ name(): Promise<string>;
258
+ /**
259
+ * symbol
260
+ * view
261
+ */
262
+ symbol(): Promise<string>;
263
+ /**
264
+ * totalSupply
265
+ * view
266
+ */
267
+ totalSupply(): Promise<bigint>;
268
+ /**
269
+ * approve
270
+ * nonpayable
271
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
272
+ */
273
+ approve(spender: `0x${string}`, value: bigint, options?: {
274
+ accessList?: import('viem').AccessList;
275
+ authorizationList?: import('viem').AuthorizationList;
276
+ chain?: import('viem').Chain | null;
277
+ dataSuffix?: `0x${string}`;
278
+ gas?: bigint;
279
+ gasPrice?: bigint;
280
+ maxFeePerGas?: bigint;
281
+ maxPriorityFeePerGas?: bigint;
282
+ nonce?: number;
283
+ value?: bigint;
284
+ }): Promise<`0x${string}`>;
285
+ /**
286
+ * transfer
287
+ * nonpayable
288
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
289
+ */
290
+ transfer(to: `0x${string}`, value: bigint, options?: {
291
+ accessList?: import('viem').AccessList;
292
+ authorizationList?: import('viem').AuthorizationList;
293
+ chain?: import('viem').Chain | null;
294
+ dataSuffix?: `0x${string}`;
295
+ gas?: bigint;
296
+ gasPrice?: bigint;
297
+ maxFeePerGas?: bigint;
298
+ maxPriorityFeePerGas?: bigint;
299
+ nonce?: number;
300
+ value?: bigint;
301
+ }): Promise<`0x${string}`>;
302
+ /**
303
+ * transferFrom
304
+ * nonpayable
305
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
306
+ */
307
+ transferFrom(from: `0x${string}`, to: `0x${string}`, value: bigint, options?: {
308
+ accessList?: import('viem').AccessList;
309
+ authorizationList?: import('viem').AuthorizationList;
310
+ chain?: import('viem').Chain | null;
311
+ dataSuffix?: `0x${string}`;
312
+ gas?: bigint;
313
+ gasPrice?: bigint;
314
+ maxFeePerGas?: bigint;
315
+ maxPriorityFeePerGas?: bigint;
316
+ nonce?: number;
317
+ value?: bigint;
318
+ }): Promise<`0x${string}`>;
319
+ /**
320
+ * Simulate contract write operations (dry-run without sending transaction)
321
+ *
322
+ * @example
323
+ * const result = await contract.simulate.transfer('0x...', 1000n);
324
+ * console.log('Gas estimate:', result.request.gas);
325
+ * console.log('Would succeed:', result.result);
326
+ */
327
+ get simulate(): {
328
+ /**
329
+ * Simulate approve
330
+ * Returns gas estimate and result without sending transaction
331
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
332
+ */
333
+ approve(spender: `0x${string}`, value: bigint, options?: {
334
+ accessList?: import("viem").AccessList;
335
+ authorizationList?: import("viem").AuthorizationList;
336
+ chain?: import("viem").Chain | null;
337
+ dataSuffix?: `0x${string}`;
338
+ gas?: bigint;
339
+ gasPrice?: bigint;
340
+ maxFeePerGas?: bigint;
341
+ maxPriorityFeePerGas?: bigint;
342
+ nonce?: number;
343
+ value?: bigint;
344
+ }): Promise<boolean>;
345
+ /**
346
+ * Simulate transfer
347
+ * Returns gas estimate and result without sending transaction
348
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
349
+ */
350
+ transfer(to: `0x${string}`, value: bigint, options?: {
351
+ accessList?: import("viem").AccessList;
352
+ authorizationList?: import("viem").AuthorizationList;
353
+ chain?: import("viem").Chain | null;
354
+ dataSuffix?: `0x${string}`;
355
+ gas?: bigint;
356
+ gasPrice?: bigint;
357
+ maxFeePerGas?: bigint;
358
+ maxPriorityFeePerGas?: bigint;
359
+ nonce?: number;
360
+ value?: bigint;
361
+ }): Promise<boolean>;
362
+ /**
363
+ * Simulate transferFrom
364
+ * Returns gas estimate and result without sending transaction
365
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
366
+ */
367
+ transferFrom(from: `0x${string}`, to: `0x${string}`, value: bigint, options?: {
368
+ accessList?: import("viem").AccessList;
369
+ authorizationList?: import("viem").AuthorizationList;
370
+ chain?: import("viem").Chain | null;
371
+ dataSuffix?: `0x${string}`;
372
+ gas?: bigint;
373
+ gasPrice?: bigint;
374
+ maxFeePerGas?: bigint;
375
+ maxPriorityFeePerGas?: bigint;
376
+ nonce?: number;
377
+ value?: bigint;
378
+ }): Promise<boolean>;
379
+ };
380
+ /**
381
+ * Watch contract events
382
+ *
383
+ * @example
384
+ * // Watch all Transfer events
385
+ * const unwatch = contract.watch.Transfer((event) => {
386
+ * console.log('Transfer:', event);
387
+ * });
388
+ *
389
+ * // Stop watching
390
+ * unwatch();
391
+ */
392
+ get watch(): {
393
+ /**
394
+ * Watch Approval events
395
+ * @param callback Function to call when event is emitted
396
+ * @param filter Optional filter for indexed parameters
397
+ * @returns Unwatch function to stop listening
398
+ */
399
+ Approval: (callback: (event: {
400
+ owner: `0x${string}`;
401
+ spender: `0x${string}`;
402
+ value: bigint;
403
+ }) => void, filter?: {
404
+ owner: `0x${string}`;
405
+ spender: `0x${string}`;
406
+ }) => () => void;
407
+ /**
408
+ * Watch Transfer events
409
+ * @param callback Function to call when event is emitted
410
+ * @param filter Optional filter for indexed parameters
411
+ * @returns Unwatch function to stop listening
412
+ */
413
+ Transfer: (callback: (event: {
414
+ from: `0x${string}`;
415
+ to: `0x${string}`;
416
+ value: bigint;
417
+ }) => void, filter?: {
418
+ from: `0x${string}`;
419
+ to: `0x${string}`;
420
+ }) => () => void;
421
+ };
422
+ }