@gitmyabi/transparent 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/transparent
2
+
3
+ Auto-generated TypeScript type bindings for **Transparent**
4
+
5
+ - **Build ID**: `etherscan-transparent-33b41fe1-1785019600416`
6
+ - **Build Number**: 1
7
+ - **Commit**: `b63a93c`
8
+ - **Branch**: `etherscan`
9
+ - **Target**: `ethers-v6`
10
+ - **Contracts**: 1
11
+
12
+ ## Installation
13
+
14
+ ```bash
15
+ npm install @gitmyabi/transparent@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/transparent';
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/transparent';
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/transparent';
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,185 @@
1
+ import type { Address, PublicClient, WalletClient } from 'viem';
2
+ /**
3
+ * TransparentUpgradeableProxy_json ABI
4
+ *
5
+ * This ABI is typed using viem's type system for full type safety.
6
+ */
7
+ export declare const TransparentUpgradeableProxy_jsonAbi: readonly [{
8
+ readonly inputs: readonly [{
9
+ readonly internalType: "address";
10
+ readonly name: "_logic";
11
+ readonly type: "address";
12
+ }, {
13
+ readonly internalType: "address";
14
+ readonly name: "initialOwner";
15
+ readonly type: "address";
16
+ }, {
17
+ readonly internalType: "bytes";
18
+ readonly name: "_data";
19
+ readonly type: "bytes";
20
+ }];
21
+ readonly stateMutability: "payable";
22
+ readonly type: "constructor";
23
+ }, {
24
+ readonly inputs: readonly [{
25
+ readonly internalType: "address";
26
+ readonly name: "target";
27
+ readonly type: "address";
28
+ }];
29
+ readonly name: "AddressEmptyCode";
30
+ readonly type: "error";
31
+ }, {
32
+ readonly inputs: readonly [{
33
+ readonly internalType: "address";
34
+ readonly name: "admin";
35
+ readonly type: "address";
36
+ }];
37
+ readonly name: "ERC1967InvalidAdmin";
38
+ readonly type: "error";
39
+ }, {
40
+ readonly inputs: readonly [{
41
+ readonly internalType: "address";
42
+ readonly name: "implementation";
43
+ readonly type: "address";
44
+ }];
45
+ readonly name: "ERC1967InvalidImplementation";
46
+ readonly type: "error";
47
+ }, {
48
+ readonly inputs: readonly [];
49
+ readonly name: "ERC1967NonPayable";
50
+ readonly type: "error";
51
+ }, {
52
+ readonly inputs: readonly [];
53
+ readonly name: "FailedCall";
54
+ readonly type: "error";
55
+ }, {
56
+ readonly inputs: readonly [];
57
+ readonly name: "ProxyDeniedAdminAccess";
58
+ readonly type: "error";
59
+ }, {
60
+ readonly anonymous: false;
61
+ readonly inputs: readonly [{
62
+ readonly indexed: false;
63
+ readonly internalType: "address";
64
+ readonly name: "previousAdmin";
65
+ readonly type: "address";
66
+ }, {
67
+ readonly indexed: false;
68
+ readonly internalType: "address";
69
+ readonly name: "newAdmin";
70
+ readonly type: "address";
71
+ }];
72
+ readonly name: "AdminChanged";
73
+ readonly type: "event";
74
+ }, {
75
+ readonly anonymous: false;
76
+ readonly inputs: readonly [{
77
+ readonly indexed: true;
78
+ readonly internalType: "address";
79
+ readonly name: "implementation";
80
+ readonly type: "address";
81
+ }];
82
+ readonly name: "Upgraded";
83
+ readonly type: "event";
84
+ }, {
85
+ readonly stateMutability: "payable";
86
+ readonly type: "fallback";
87
+ }];
88
+ /**
89
+ * Type-safe ABI for TransparentUpgradeableProxy_json
90
+ */
91
+ export type TransparentUpgradeableProxy_jsonAbi = typeof TransparentUpgradeableProxy_jsonAbi;
92
+ /**
93
+ * Contract instance type for TransparentUpgradeableProxy_json
94
+ */
95
+ export type TransparentUpgradeableProxy_jsonContract = any;
96
+ /**
97
+ * TransparentUpgradeableProxy_json Contract Class
98
+ *
99
+ * Provides a class-based API similar to TypeChain for interacting with the contract.
100
+ *
101
+ * @example
102
+ * ```typescript
103
+ * import { createPublicClient, createWalletClient, http } from 'viem';
104
+ * import { mainnet } from 'viem/chains';
105
+ * import { TransparentUpgradeableProxy_json } from 'TransparentUpgradeableProxy_json';
106
+ *
107
+ * const publicClient = createPublicClient({ chain: mainnet, transport: http() });
108
+ * const walletClient = createWalletClient({ chain: mainnet, transport: http() });
109
+ *
110
+ * const contract = new TransparentUpgradeableProxy_json('0x...', { publicClient, walletClient });
111
+ *
112
+ * // Read functions
113
+ * const result = await contract.balanceOf('0x...');
114
+ *
115
+ * // Write functions
116
+ * const hash = await contract.transfer('0x...', 1000n);
117
+ *
118
+ * // Simulate transactions (dry-run)
119
+ * const simulation = await contract.simulate.transfer('0x...', 1000n);
120
+ * console.log('Gas estimate:', simulation.request.gas);
121
+ *
122
+ * // Watch events
123
+ * const unwatch = contract.watch.Transfer((event) => {
124
+ * console.log('Transfer event:', event);
125
+ * });
126
+ * ```
127
+ */
128
+ export declare class TransparentUpgradeableProxy_json {
129
+ private contract;
130
+ private contractAddress;
131
+ private publicClient;
132
+ constructor(address: Address, clients: {
133
+ publicClient: PublicClient;
134
+ walletClient?: WalletClient;
135
+ });
136
+ /**
137
+ * Get the contract address
138
+ */
139
+ get address(): Address;
140
+ /**
141
+ * Get the underlying viem contract instance
142
+ */
143
+ getContract(): TransparentUpgradeableProxy_jsonContract;
144
+ /**
145
+ * Simulate contract write operations (dry-run without sending transaction)
146
+ *
147
+ * Note: This contract has no write functions, so simulate returns an empty object.
148
+ */
149
+ get simulate(): {};
150
+ /**
151
+ * Watch contract events
152
+ *
153
+ * @example
154
+ * // Watch all Transfer events
155
+ * const unwatch = contract.watch.Transfer((event) => {
156
+ * console.log('Transfer:', event);
157
+ * });
158
+ *
159
+ * // Stop watching
160
+ * unwatch();
161
+ */
162
+ get watch(): {
163
+ /**
164
+ * Watch AdminChanged events
165
+ * @param callback Function to call when event is emitted
166
+ * @param filter Optional filter for indexed parameters
167
+ * @returns Unwatch function to stop listening
168
+ */
169
+ AdminChanged: (callback: (event: {
170
+ previousAdmin: `0x${string}`;
171
+ newAdmin: `0x${string}`;
172
+ }) => void) => () => void;
173
+ /**
174
+ * Watch Upgraded events
175
+ * @param callback Function to call when event is emitted
176
+ * @param filter Optional filter for indexed parameters
177
+ * @returns Unwatch function to stop listening
178
+ */
179
+ Upgraded: (callback: (event: {
180
+ implementation: `0x${string}`;
181
+ }) => void, filter?: {
182
+ implementation: `0x${string}`;
183
+ }) => () => void;
184
+ };
185
+ }
@@ -0,0 +1,238 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TransparentUpgradeableProxy_json = exports.TransparentUpgradeableProxy_jsonAbi = void 0;
4
+ const viem_1 = require("viem");
5
+ /**
6
+ * TransparentUpgradeableProxy_json ABI
7
+ *
8
+ * This ABI is typed using viem's type system for full type safety.
9
+ */
10
+ exports.TransparentUpgradeableProxy_jsonAbi = [
11
+ {
12
+ "inputs": [
13
+ {
14
+ "internalType": "address",
15
+ "name": "_logic",
16
+ "type": "address"
17
+ },
18
+ {
19
+ "internalType": "address",
20
+ "name": "initialOwner",
21
+ "type": "address"
22
+ },
23
+ {
24
+ "internalType": "bytes",
25
+ "name": "_data",
26
+ "type": "bytes"
27
+ }
28
+ ],
29
+ "stateMutability": "payable",
30
+ "type": "constructor"
31
+ },
32
+ {
33
+ "inputs": [
34
+ {
35
+ "internalType": "address",
36
+ "name": "target",
37
+ "type": "address"
38
+ }
39
+ ],
40
+ "name": "AddressEmptyCode",
41
+ "type": "error"
42
+ },
43
+ {
44
+ "inputs": [
45
+ {
46
+ "internalType": "address",
47
+ "name": "admin",
48
+ "type": "address"
49
+ }
50
+ ],
51
+ "name": "ERC1967InvalidAdmin",
52
+ "type": "error"
53
+ },
54
+ {
55
+ "inputs": [
56
+ {
57
+ "internalType": "address",
58
+ "name": "implementation",
59
+ "type": "address"
60
+ }
61
+ ],
62
+ "name": "ERC1967InvalidImplementation",
63
+ "type": "error"
64
+ },
65
+ {
66
+ "inputs": [],
67
+ "name": "ERC1967NonPayable",
68
+ "type": "error"
69
+ },
70
+ {
71
+ "inputs": [],
72
+ "name": "FailedCall",
73
+ "type": "error"
74
+ },
75
+ {
76
+ "inputs": [],
77
+ "name": "ProxyDeniedAdminAccess",
78
+ "type": "error"
79
+ },
80
+ {
81
+ "anonymous": false,
82
+ "inputs": [
83
+ {
84
+ "indexed": false,
85
+ "internalType": "address",
86
+ "name": "previousAdmin",
87
+ "type": "address"
88
+ },
89
+ {
90
+ "indexed": false,
91
+ "internalType": "address",
92
+ "name": "newAdmin",
93
+ "type": "address"
94
+ }
95
+ ],
96
+ "name": "AdminChanged",
97
+ "type": "event"
98
+ },
99
+ {
100
+ "anonymous": false,
101
+ "inputs": [
102
+ {
103
+ "indexed": true,
104
+ "internalType": "address",
105
+ "name": "implementation",
106
+ "type": "address"
107
+ }
108
+ ],
109
+ "name": "Upgraded",
110
+ "type": "event"
111
+ },
112
+ {
113
+ "stateMutability": "payable",
114
+ "type": "fallback"
115
+ }
116
+ ];
117
+ /**
118
+ * TransparentUpgradeableProxy_json Contract Class
119
+ *
120
+ * Provides a class-based API similar to TypeChain for interacting with the contract.
121
+ *
122
+ * @example
123
+ * ```typescript
124
+ * import { createPublicClient, createWalletClient, http } from 'viem';
125
+ * import { mainnet } from 'viem/chains';
126
+ * import { TransparentUpgradeableProxy_json } from 'TransparentUpgradeableProxy_json';
127
+ *
128
+ * const publicClient = createPublicClient({ chain: mainnet, transport: http() });
129
+ * const walletClient = createWalletClient({ chain: mainnet, transport: http() });
130
+ *
131
+ * const contract = new TransparentUpgradeableProxy_json('0x...', { publicClient, walletClient });
132
+ *
133
+ * // Read functions
134
+ * const result = await contract.balanceOf('0x...');
135
+ *
136
+ * // Write functions
137
+ * const hash = await contract.transfer('0x...', 1000n);
138
+ *
139
+ * // Simulate transactions (dry-run)
140
+ * const simulation = await contract.simulate.transfer('0x...', 1000n);
141
+ * console.log('Gas estimate:', simulation.request.gas);
142
+ *
143
+ * // Watch events
144
+ * const unwatch = contract.watch.Transfer((event) => {
145
+ * console.log('Transfer event:', event);
146
+ * });
147
+ * ```
148
+ */
149
+ class TransparentUpgradeableProxy_json {
150
+ constructor(address, clients) {
151
+ this.contractAddress = address;
152
+ this.publicClient = clients.publicClient;
153
+ this.contract = (0, viem_1.getContract)({
154
+ address,
155
+ abi: exports.TransparentUpgradeableProxy_jsonAbi,
156
+ client: {
157
+ public: clients.publicClient,
158
+ wallet: clients.walletClient,
159
+ },
160
+ });
161
+ }
162
+ /**
163
+ * Get the contract address
164
+ */
165
+ get address() {
166
+ return this.contractAddress;
167
+ }
168
+ /**
169
+ * Get the underlying viem contract instance
170
+ */
171
+ getContract() {
172
+ return this.contract;
173
+ }
174
+ // No read functions
175
+ // No write functions
176
+ /**
177
+ * Simulate contract write operations (dry-run without sending transaction)
178
+ *
179
+ * Note: This contract has no write functions, so simulate returns an empty object.
180
+ */
181
+ get simulate() {
182
+ return {};
183
+ }
184
+ /**
185
+ * Watch contract events
186
+ *
187
+ * @example
188
+ * // Watch all Transfer events
189
+ * const unwatch = contract.watch.Transfer((event) => {
190
+ * console.log('Transfer:', event);
191
+ * });
192
+ *
193
+ * // Stop watching
194
+ * unwatch();
195
+ */
196
+ get watch() {
197
+ return {
198
+ /**
199
+ * Watch AdminChanged events
200
+ * @param callback Function to call when event is emitted
201
+ * @param filter Optional filter for indexed parameters
202
+ * @returns Unwatch function to stop listening
203
+ */
204
+ AdminChanged: (callback) => {
205
+ return this.publicClient.watchContractEvent({
206
+ address: this.contractAddress,
207
+ abi: exports.TransparentUpgradeableProxy_jsonAbi,
208
+ eventName: 'AdminChanged',
209
+ onLogs: (logs) => {
210
+ logs.forEach((log) => {
211
+ callback(log.args);
212
+ });
213
+ },
214
+ });
215
+ },
216
+ /**
217
+ * Watch Upgraded events
218
+ * @param callback Function to call when event is emitted
219
+ * @param filter Optional filter for indexed parameters
220
+ * @returns Unwatch function to stop listening
221
+ */
222
+ Upgraded: (callback, filter) => {
223
+ return this.publicClient.watchContractEvent({
224
+ address: this.contractAddress,
225
+ abi: exports.TransparentUpgradeableProxy_jsonAbi,
226
+ eventName: 'Upgraded',
227
+ args: filter,
228
+ onLogs: (logs) => {
229
+ logs.forEach((log) => {
230
+ callback(log.args);
231
+ });
232
+ },
233
+ });
234
+ }
235
+ };
236
+ }
237
+ }
238
+ exports.TransparentUpgradeableProxy_json = TransparentUpgradeableProxy_json;
@@ -0,0 +1,268 @@
1
+ import type { Abi, Address, PublicClient, WalletClient, GetContractReturnType } from 'viem';
2
+ import { getContract } from 'viem';
3
+
4
+ /**
5
+ * TransparentUpgradeableProxy_json ABI
6
+ *
7
+ * This ABI is typed using viem's type system for full type safety.
8
+ */
9
+ export const TransparentUpgradeableProxy_jsonAbi = [
10
+ {
11
+ "inputs": [
12
+ {
13
+ "internalType": "address",
14
+ "name": "_logic",
15
+ "type": "address"
16
+ },
17
+ {
18
+ "internalType": "address",
19
+ "name": "initialOwner",
20
+ "type": "address"
21
+ },
22
+ {
23
+ "internalType": "bytes",
24
+ "name": "_data",
25
+ "type": "bytes"
26
+ }
27
+ ],
28
+ "stateMutability": "payable",
29
+ "type": "constructor"
30
+ },
31
+ {
32
+ "inputs": [
33
+ {
34
+ "internalType": "address",
35
+ "name": "target",
36
+ "type": "address"
37
+ }
38
+ ],
39
+ "name": "AddressEmptyCode",
40
+ "type": "error"
41
+ },
42
+ {
43
+ "inputs": [
44
+ {
45
+ "internalType": "address",
46
+ "name": "admin",
47
+ "type": "address"
48
+ }
49
+ ],
50
+ "name": "ERC1967InvalidAdmin",
51
+ "type": "error"
52
+ },
53
+ {
54
+ "inputs": [
55
+ {
56
+ "internalType": "address",
57
+ "name": "implementation",
58
+ "type": "address"
59
+ }
60
+ ],
61
+ "name": "ERC1967InvalidImplementation",
62
+ "type": "error"
63
+ },
64
+ {
65
+ "inputs": [],
66
+ "name": "ERC1967NonPayable",
67
+ "type": "error"
68
+ },
69
+ {
70
+ "inputs": [],
71
+ "name": "FailedCall",
72
+ "type": "error"
73
+ },
74
+ {
75
+ "inputs": [],
76
+ "name": "ProxyDeniedAdminAccess",
77
+ "type": "error"
78
+ },
79
+ {
80
+ "anonymous": false,
81
+ "inputs": [
82
+ {
83
+ "indexed": false,
84
+ "internalType": "address",
85
+ "name": "previousAdmin",
86
+ "type": "address"
87
+ },
88
+ {
89
+ "indexed": false,
90
+ "internalType": "address",
91
+ "name": "newAdmin",
92
+ "type": "address"
93
+ }
94
+ ],
95
+ "name": "AdminChanged",
96
+ "type": "event"
97
+ },
98
+ {
99
+ "anonymous": false,
100
+ "inputs": [
101
+ {
102
+ "indexed": true,
103
+ "internalType": "address",
104
+ "name": "implementation",
105
+ "type": "address"
106
+ }
107
+ ],
108
+ "name": "Upgraded",
109
+ "type": "event"
110
+ },
111
+ {
112
+ "stateMutability": "payable",
113
+ "type": "fallback"
114
+ }
115
+ ] as const satisfies Abi;
116
+
117
+ /**
118
+ * Type-safe ABI for TransparentUpgradeableProxy_json
119
+ */
120
+ export type TransparentUpgradeableProxy_jsonAbi = typeof TransparentUpgradeableProxy_jsonAbi;
121
+
122
+ /**
123
+ * Contract instance type for TransparentUpgradeableProxy_json
124
+ */
125
+ // Use any for contract type to avoid complex viem type issues
126
+ // The runtime behavior is type-safe through viem's ABI typing
127
+ export type TransparentUpgradeableProxy_jsonContract = any;
128
+
129
+ /**
130
+ * TransparentUpgradeableProxy_json Contract Class
131
+ *
132
+ * Provides a class-based API similar to TypeChain for interacting with the contract.
133
+ *
134
+ * @example
135
+ * ```typescript
136
+ * import { createPublicClient, createWalletClient, http } from 'viem';
137
+ * import { mainnet } from 'viem/chains';
138
+ * import { TransparentUpgradeableProxy_json } from 'TransparentUpgradeableProxy_json';
139
+ *
140
+ * const publicClient = createPublicClient({ chain: mainnet, transport: http() });
141
+ * const walletClient = createWalletClient({ chain: mainnet, transport: http() });
142
+ *
143
+ * const contract = new TransparentUpgradeableProxy_json('0x...', { publicClient, walletClient });
144
+ *
145
+ * // Read functions
146
+ * const result = await contract.balanceOf('0x...');
147
+ *
148
+ * // Write functions
149
+ * const hash = await contract.transfer('0x...', 1000n);
150
+ *
151
+ * // Simulate transactions (dry-run)
152
+ * const simulation = await contract.simulate.transfer('0x...', 1000n);
153
+ * console.log('Gas estimate:', simulation.request.gas);
154
+ *
155
+ * // Watch events
156
+ * const unwatch = contract.watch.Transfer((event) => {
157
+ * console.log('Transfer event:', event);
158
+ * });
159
+ * ```
160
+ */
161
+ export class TransparentUpgradeableProxy_json {
162
+ private contract: TransparentUpgradeableProxy_jsonContract;
163
+ private contractAddress: Address;
164
+ private publicClient: PublicClient;
165
+
166
+ constructor(
167
+ address: Address,
168
+ clients: {
169
+ publicClient: PublicClient;
170
+ walletClient?: WalletClient;
171
+ }
172
+ ) {
173
+ this.contractAddress = address;
174
+ this.publicClient = clients.publicClient;
175
+ this.contract = getContract({
176
+ address,
177
+ abi: TransparentUpgradeableProxy_jsonAbi,
178
+ client: {
179
+ public: clients.publicClient,
180
+ wallet: clients.walletClient,
181
+ },
182
+ });
183
+ }
184
+
185
+ /**
186
+ * Get the contract address
187
+ */
188
+ get address(): Address {
189
+ return this.contractAddress;
190
+ }
191
+
192
+ /**
193
+ * Get the underlying viem contract instance
194
+ */
195
+ getContract(): TransparentUpgradeableProxy_jsonContract {
196
+ return this.contract;
197
+ }
198
+
199
+ // No read functions
200
+
201
+ // No write functions
202
+
203
+
204
+
205
+ /**
206
+ * Simulate contract write operations (dry-run without sending transaction)
207
+ *
208
+ * Note: This contract has no write functions, so simulate returns an empty object.
209
+ */
210
+ get simulate() {
211
+ return {};
212
+ }
213
+
214
+ /**
215
+ * Watch contract events
216
+ *
217
+ * @example
218
+ * // Watch all Transfer events
219
+ * const unwatch = contract.watch.Transfer((event) => {
220
+ * console.log('Transfer:', event);
221
+ * });
222
+ *
223
+ * // Stop watching
224
+ * unwatch();
225
+ */
226
+ get watch() {
227
+ return {
228
+ /**
229
+ * Watch AdminChanged events
230
+ * @param callback Function to call when event is emitted
231
+ * @param filter Optional filter for indexed parameters
232
+ * @returns Unwatch function to stop listening
233
+ */
234
+ AdminChanged: (callback: (event: { previousAdmin: `0x${string}`; newAdmin: `0x${string}` }) => void) => {
235
+ return this.publicClient.watchContractEvent({
236
+ address: this.contractAddress,
237
+ abi: TransparentUpgradeableProxy_jsonAbi,
238
+ eventName: 'AdminChanged',
239
+
240
+ onLogs: (logs: any[]) => {
241
+ logs.forEach((log: any) => {
242
+ callback(log.args as any);
243
+ });
244
+ },
245
+ }) as () => void;
246
+ },
247
+ /**
248
+ * Watch Upgraded events
249
+ * @param callback Function to call when event is emitted
250
+ * @param filter Optional filter for indexed parameters
251
+ * @returns Unwatch function to stop listening
252
+ */
253
+ Upgraded: (callback: (event: { implementation: `0x${string}` }) => void, filter?: { implementation: `0x${string}` }) => {
254
+ return this.publicClient.watchContractEvent({
255
+ address: this.contractAddress,
256
+ abi: TransparentUpgradeableProxy_jsonAbi,
257
+ eventName: 'Upgraded',
258
+ args: filter,
259
+ onLogs: (logs: any[]) => {
260
+ logs.forEach((log: any) => {
261
+ callback(log.args as any);
262
+ });
263
+ },
264
+ }) as () => void;
265
+ }
266
+ };
267
+ }
268
+ }
@@ -0,0 +1,2 @@
1
+ export { TransparentUpgradeableProxy_jsonAbi, TransparentUpgradeableProxy_json } from './TransparentUpgradeableProxy_json';
2
+ export type { TransparentUpgradeableProxy_jsonAbi as TransparentUpgradeableProxy_jsonAbiType, TransparentUpgradeableProxy_jsonContract } from './TransparentUpgradeableProxy_json';
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TransparentUpgradeableProxy_json = exports.TransparentUpgradeableProxy_jsonAbi = void 0;
4
+ // Auto-generated exports for all contracts
5
+ var TransparentUpgradeableProxy_json_1 = require("./TransparentUpgradeableProxy_json");
6
+ Object.defineProperty(exports, "TransparentUpgradeableProxy_jsonAbi", { enumerable: true, get: function () { return TransparentUpgradeableProxy_json_1.TransparentUpgradeableProxy_jsonAbi; } });
7
+ Object.defineProperty(exports, "TransparentUpgradeableProxy_json", { enumerable: true, get: function () { return TransparentUpgradeableProxy_json_1.TransparentUpgradeableProxy_json; } });
@@ -0,0 +1,3 @@
1
+ // Auto-generated exports for all contracts
2
+ export { TransparentUpgradeableProxy_jsonAbi, TransparentUpgradeableProxy_json } from './TransparentUpgradeableProxy_json';
3
+ export type { TransparentUpgradeableProxy_jsonAbi as TransparentUpgradeableProxy_jsonAbiType, TransparentUpgradeableProxy_jsonContract } from './TransparentUpgradeableProxy_json';
package/index.d.ts ADDED
@@ -0,0 +1 @@
1
+ export * from './contracts';
package/index.js ADDED
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ // Auto-generated TypeScript type bindings
3
+ // This file exports all generated contract types
4
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
5
+ if (k2 === undefined) k2 = k;
6
+ var desc = Object.getOwnPropertyDescriptor(m, k);
7
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
8
+ desc = { enumerable: true, get: function() { return m[k]; } };
9
+ }
10
+ Object.defineProperty(o, k2, desc);
11
+ }) : (function(o, m, k, k2) {
12
+ if (k2 === undefined) k2 = k;
13
+ o[k2] = m[k];
14
+ }));
15
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
16
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
17
+ };
18
+ Object.defineProperty(exports, "__esModule", { value: true });
19
+ __exportStar(require("./contracts"), exports);
package/package.json ADDED
@@ -0,0 +1,43 @@
1
+ {
2
+ "name": "@gitmyabi/transparent",
3
+ "version": "1.0.0",
4
+ "description": "Auto-generated TypeScript type bindings for Transparent (build etherscan-transparent-33b41fe1-1785019600416, commit b63a93c, branch etherscan)",
5
+ "main": "./index.js",
6
+ "types": "./index.d.ts",
7
+ "exports": {
8
+ ".": {
9
+ "import": "./index.js",
10
+ "require": "./index.js",
11
+ "types": "./index.d.ts"
12
+ },
13
+ "./contracts": {
14
+ "import": "./contracts/index.js",
15
+ "require": "./contracts/index.js",
16
+ "types": "./contracts/index.d.ts"
17
+ }
18
+ },
19
+ "files": [
20
+ "index.js",
21
+ "index.d.ts",
22
+ "contracts"
23
+ ],
24
+ "keywords": [
25
+ "ethereum",
26
+ "smart-contracts",
27
+ "viem",
28
+ "wagmi",
29
+ "typescript",
30
+ "abi",
31
+ "ethers-v6"
32
+ ],
33
+ "license": "MIT",
34
+ "dependencies": {
35
+ "viem": "^2.0.0"
36
+ },
37
+ "repository": {
38
+ "type": "git",
39
+ "url": "https://github.com/etherscan/transparent"
40
+ },
41
+ "branch": "etherscan",
42
+ "shortHash": "b63a93c"
43
+ }