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