@gitmyabi/feesplitterv2 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 CHANGED
@@ -1,3 +1,108 @@
1
- # Temporary Holding Version
1
+ # @gitmyabi/feesplitterv2
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ Auto-generated TypeScript type bindings for **FeeSplitterV2**
4
+
5
+ - **Build ID**: `etherscan-feesplitterv2-48e1f3f5-1793448949378`
6
+ - **Build Number**: 1
7
+ - **Commit**: `a058c0e`
8
+ - **Branch**: `etherscan`
9
+ - **Target**: `ethers-v6`
10
+ - **Contracts**: 1
11
+
12
+ ## Installation
13
+
14
+ ```bash
15
+ npm install @gitmyabi/feesplitterv2@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/feesplitterv2';
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/feesplitterv2';
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/feesplitterv2';
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,365 @@
1
+ import type { Address, PublicClient, WalletClient } from 'viem';
2
+ /**
3
+ * FeeSplitterV2_json ABI
4
+ *
5
+ * This ABI is typed using viem's type system for full type safety.
6
+ */
7
+ export declare const FeeSplitterV2_jsonAbi: readonly [{
8
+ readonly inputs: readonly [{
9
+ readonly internalType: "address payable";
10
+ readonly name: "_addr1";
11
+ readonly type: "address";
12
+ }, {
13
+ readonly internalType: "uint256";
14
+ readonly name: "_split1";
15
+ readonly type: "uint256";
16
+ }, {
17
+ readonly internalType: "address payable";
18
+ readonly name: "_addr2";
19
+ readonly type: "address";
20
+ }];
21
+ readonly stateMutability: "nonpayable";
22
+ readonly type: "constructor";
23
+ }, {
24
+ readonly stateMutability: "payable";
25
+ readonly type: "fallback";
26
+ }, {
27
+ readonly inputs: readonly [{
28
+ readonly internalType: "address payable";
29
+ readonly name: "_addr1";
30
+ readonly type: "address";
31
+ }];
32
+ readonly name: "ChangeAddress1";
33
+ readonly outputs: readonly [];
34
+ readonly stateMutability: "nonpayable";
35
+ readonly type: "function";
36
+ }, {
37
+ readonly inputs: readonly [{
38
+ readonly internalType: "address payable";
39
+ readonly name: "_addr2";
40
+ readonly type: "address";
41
+ }];
42
+ readonly name: "ChangeAddress2";
43
+ readonly outputs: readonly [];
44
+ readonly stateMutability: "nonpayable";
45
+ readonly type: "function";
46
+ }, {
47
+ readonly inputs: readonly [];
48
+ readonly name: "GetSplitPct";
49
+ readonly outputs: readonly [{
50
+ readonly internalType: "uint256";
51
+ readonly name: "";
52
+ readonly type: "uint256";
53
+ }, {
54
+ readonly internalType: "uint256";
55
+ readonly name: "";
56
+ readonly type: "uint256";
57
+ }];
58
+ readonly stateMutability: "view";
59
+ readonly type: "function";
60
+ }, {
61
+ readonly inputs: readonly [{
62
+ readonly internalType: "address";
63
+ readonly name: "_ERC20Addr";
64
+ readonly type: "address";
65
+ }];
66
+ readonly name: "GetWithdrawableERC20";
67
+ readonly outputs: readonly [{
68
+ readonly internalType: "uint256";
69
+ readonly name: "v1";
70
+ readonly type: "uint256";
71
+ }, {
72
+ readonly internalType: "uint256";
73
+ readonly name: "v2";
74
+ readonly type: "uint256";
75
+ }];
76
+ readonly stateMutability: "view";
77
+ readonly type: "function";
78
+ }, {
79
+ readonly inputs: readonly [];
80
+ readonly name: "GetWithdrawableETH";
81
+ readonly outputs: readonly [{
82
+ readonly internalType: "uint256";
83
+ readonly name: "v1";
84
+ readonly type: "uint256";
85
+ }, {
86
+ readonly internalType: "uint256";
87
+ readonly name: "v2";
88
+ readonly type: "uint256";
89
+ }];
90
+ readonly stateMutability: "view";
91
+ readonly type: "function";
92
+ }, {
93
+ readonly inputs: readonly [{
94
+ readonly internalType: "address";
95
+ readonly name: "_ERC20Addr";
96
+ readonly type: "address";
97
+ }];
98
+ readonly name: "WithdrawERC20";
99
+ readonly outputs: readonly [];
100
+ readonly stateMutability: "nonpayable";
101
+ readonly type: "function";
102
+ }, {
103
+ readonly inputs: readonly [];
104
+ readonly name: "WithdrawETH";
105
+ readonly outputs: readonly [];
106
+ readonly stateMutability: "nonpayable";
107
+ readonly type: "function";
108
+ }, {
109
+ readonly inputs: readonly [];
110
+ readonly name: "addr1";
111
+ readonly outputs: readonly [{
112
+ readonly internalType: "address payable";
113
+ readonly name: "";
114
+ readonly type: "address";
115
+ }];
116
+ readonly stateMutability: "view";
117
+ readonly type: "function";
118
+ }, {
119
+ readonly inputs: readonly [];
120
+ readonly name: "addr2";
121
+ readonly outputs: readonly [{
122
+ readonly internalType: "address payable";
123
+ readonly name: "";
124
+ readonly type: "address";
125
+ }];
126
+ readonly stateMutability: "view";
127
+ readonly type: "function";
128
+ }, {
129
+ readonly stateMutability: "payable";
130
+ readonly type: "receive";
131
+ }];
132
+ /**
133
+ * Type-safe ABI for FeeSplitterV2_json
134
+ */
135
+ export type FeeSplitterV2_jsonAbi = typeof FeeSplitterV2_jsonAbi;
136
+ /**
137
+ * Contract instance type for FeeSplitterV2_json
138
+ */
139
+ export type FeeSplitterV2_jsonContract = any;
140
+ /**
141
+ * FeeSplitterV2_json Contract Class
142
+ *
143
+ * Provides a class-based API similar to TypeChain for interacting with the contract.
144
+ *
145
+ * @example
146
+ * ```typescript
147
+ * import { createPublicClient, createWalletClient, http } from 'viem';
148
+ * import { mainnet } from 'viem/chains';
149
+ * import { FeeSplitterV2_json } from 'FeeSplitterV2_json';
150
+ *
151
+ * const publicClient = createPublicClient({ chain: mainnet, transport: http() });
152
+ * const walletClient = createWalletClient({ chain: mainnet, transport: http() });
153
+ *
154
+ * const contract = new FeeSplitterV2_json('0x...', { publicClient, walletClient });
155
+ *
156
+ * // Read functions
157
+ * const result = await contract.balanceOf('0x...');
158
+ *
159
+ * // Write functions
160
+ * const hash = await contract.transfer('0x...', 1000n);
161
+ *
162
+ * // Simulate transactions (dry-run)
163
+ * const simulation = await contract.simulate.transfer('0x...', 1000n);
164
+ * console.log('Gas estimate:', simulation.request.gas);
165
+ *
166
+ * // Watch events
167
+ * const unwatch = contract.watch.Transfer((event) => {
168
+ * console.log('Transfer event:', event);
169
+ * });
170
+ * ```
171
+ */
172
+ export declare class FeeSplitterV2_json {
173
+ private contract;
174
+ private contractAddress;
175
+ private publicClient;
176
+ constructor(address: Address, clients: {
177
+ publicClient: PublicClient;
178
+ walletClient?: WalletClient;
179
+ });
180
+ /**
181
+ * Get the contract address
182
+ */
183
+ get address(): Address;
184
+ /**
185
+ * Get the underlying viem contract instance
186
+ */
187
+ getContract(): FeeSplitterV2_jsonContract;
188
+ /**
189
+ * GetSplitPct
190
+ * view
191
+ */
192
+ GetSplitPct(): Promise<[bigint, bigint]>;
193
+ /**
194
+ * GetWithdrawableERC20
195
+ * view
196
+ */
197
+ GetWithdrawableERC20(_ERC20Addr: `0x${string}`): Promise<[bigint, bigint]>;
198
+ /**
199
+ * GetWithdrawableETH
200
+ * view
201
+ */
202
+ GetWithdrawableETH(): Promise<[bigint, bigint]>;
203
+ /**
204
+ * addr1
205
+ * view
206
+ */
207
+ addr1(): Promise<`0x${string}`>;
208
+ /**
209
+ * addr2
210
+ * view
211
+ */
212
+ addr2(): Promise<`0x${string}`>;
213
+ /**
214
+ * ChangeAddress1
215
+ * nonpayable
216
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
217
+ */
218
+ ChangeAddress1(_addr1: `0x${string}`, options?: {
219
+ accessList?: import('viem').AccessList;
220
+ authorizationList?: import('viem').AuthorizationList;
221
+ chain?: import('viem').Chain | null;
222
+ dataSuffix?: `0x${string}`;
223
+ gas?: bigint;
224
+ gasPrice?: bigint;
225
+ maxFeePerGas?: bigint;
226
+ maxPriorityFeePerGas?: bigint;
227
+ nonce?: number;
228
+ value?: bigint;
229
+ }): Promise<`0x${string}`>;
230
+ /**
231
+ * ChangeAddress2
232
+ * nonpayable
233
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
234
+ */
235
+ ChangeAddress2(_addr2: `0x${string}`, options?: {
236
+ accessList?: import('viem').AccessList;
237
+ authorizationList?: import('viem').AuthorizationList;
238
+ chain?: import('viem').Chain | null;
239
+ dataSuffix?: `0x${string}`;
240
+ gas?: bigint;
241
+ gasPrice?: bigint;
242
+ maxFeePerGas?: bigint;
243
+ maxPriorityFeePerGas?: bigint;
244
+ nonce?: number;
245
+ value?: bigint;
246
+ }): Promise<`0x${string}`>;
247
+ /**
248
+ * WithdrawERC20
249
+ * nonpayable
250
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
251
+ */
252
+ WithdrawERC20(_ERC20Addr: `0x${string}`, options?: {
253
+ accessList?: import('viem').AccessList;
254
+ authorizationList?: import('viem').AuthorizationList;
255
+ chain?: import('viem').Chain | null;
256
+ dataSuffix?: `0x${string}`;
257
+ gas?: bigint;
258
+ gasPrice?: bigint;
259
+ maxFeePerGas?: bigint;
260
+ maxPriorityFeePerGas?: bigint;
261
+ nonce?: number;
262
+ value?: bigint;
263
+ }): Promise<`0x${string}`>;
264
+ /**
265
+ * WithdrawETH
266
+ * nonpayable
267
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
268
+ */
269
+ WithdrawETH(options?: {
270
+ accessList?: import('viem').AccessList;
271
+ authorizationList?: import('viem').AuthorizationList;
272
+ chain?: import('viem').Chain | null;
273
+ dataSuffix?: `0x${string}`;
274
+ gas?: bigint;
275
+ gasPrice?: bigint;
276
+ maxFeePerGas?: bigint;
277
+ maxPriorityFeePerGas?: bigint;
278
+ nonce?: number;
279
+ value?: bigint;
280
+ }): Promise<`0x${string}`>;
281
+ /**
282
+ * Simulate contract write operations (dry-run without sending transaction)
283
+ *
284
+ * @example
285
+ * const result = await contract.simulate.transfer('0x...', 1000n);
286
+ * console.log('Gas estimate:', result.request.gas);
287
+ * console.log('Would succeed:', result.result);
288
+ */
289
+ get simulate(): {
290
+ /**
291
+ * Simulate ChangeAddress1
292
+ * Returns gas estimate and result without sending transaction
293
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
294
+ */
295
+ ChangeAddress1(_addr1: `0x${string}`, options?: {
296
+ accessList?: import("viem").AccessList;
297
+ authorizationList?: import("viem").AuthorizationList;
298
+ chain?: import("viem").Chain | null;
299
+ dataSuffix?: `0x${string}`;
300
+ gas?: bigint;
301
+ gasPrice?: bigint;
302
+ maxFeePerGas?: bigint;
303
+ maxPriorityFeePerGas?: bigint;
304
+ nonce?: number;
305
+ value?: bigint;
306
+ }): Promise<void>;
307
+ /**
308
+ * Simulate ChangeAddress2
309
+ * Returns gas estimate and result without sending transaction
310
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
311
+ */
312
+ ChangeAddress2(_addr2: `0x${string}`, options?: {
313
+ accessList?: import("viem").AccessList;
314
+ authorizationList?: import("viem").AuthorizationList;
315
+ chain?: import("viem").Chain | null;
316
+ dataSuffix?: `0x${string}`;
317
+ gas?: bigint;
318
+ gasPrice?: bigint;
319
+ maxFeePerGas?: bigint;
320
+ maxPriorityFeePerGas?: bigint;
321
+ nonce?: number;
322
+ value?: bigint;
323
+ }): Promise<void>;
324
+ /**
325
+ * Simulate WithdrawERC20
326
+ * Returns gas estimate and result without sending transaction
327
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
328
+ */
329
+ WithdrawERC20(_ERC20Addr: `0x${string}`, options?: {
330
+ accessList?: import("viem").AccessList;
331
+ authorizationList?: import("viem").AuthorizationList;
332
+ chain?: import("viem").Chain | null;
333
+ dataSuffix?: `0x${string}`;
334
+ gas?: bigint;
335
+ gasPrice?: bigint;
336
+ maxFeePerGas?: bigint;
337
+ maxPriorityFeePerGas?: bigint;
338
+ nonce?: number;
339
+ value?: bigint;
340
+ }): Promise<void>;
341
+ /**
342
+ * Simulate WithdrawETH
343
+ * Returns gas estimate and result without sending transaction
344
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
345
+ */
346
+ WithdrawETH(options?: {
347
+ accessList?: import("viem").AccessList;
348
+ authorizationList?: import("viem").AuthorizationList;
349
+ chain?: import("viem").Chain | null;
350
+ dataSuffix?: `0x${string}`;
351
+ gas?: bigint;
352
+ gasPrice?: bigint;
353
+ maxFeePerGas?: bigint;
354
+ maxPriorityFeePerGas?: bigint;
355
+ nonce?: number;
356
+ value?: bigint;
357
+ }): Promise<void>;
358
+ };
359
+ /**
360
+ * Watch contract events
361
+ *
362
+ * Note: This contract has no events, so watch returns an empty object.
363
+ */
364
+ get watch(): {};
365
+ }