@gitmyabi/vault 1.0.3 → 1.0.5

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.
@@ -1,4 +1,2 @@
1
- export { MigratableEntityProxy_jsonAbi, MigratableEntityProxy_json } from './MigratableEntityProxy_json';
2
- export type { MigratableEntityProxy_jsonAbi as MigratableEntityProxy_jsonAbiType, MigratableEntityProxy_jsonContract } from './MigratableEntityProxy_json';
3
1
  export { Vault_jsonAbi, Vault_json } from './Vault_json';
4
2
  export type { Vault_jsonAbi as Vault_jsonAbiType, Vault_jsonContract } from './Vault_json';
@@ -1,10 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Vault_json = exports.Vault_jsonAbi = exports.MigratableEntityProxy_json = exports.MigratableEntityProxy_jsonAbi = void 0;
3
+ exports.Vault_json = exports.Vault_jsonAbi = void 0;
4
4
  // Auto-generated exports for all contracts
5
- var MigratableEntityProxy_json_1 = require("./MigratableEntityProxy_json");
6
- Object.defineProperty(exports, "MigratableEntityProxy_jsonAbi", { enumerable: true, get: function () { return MigratableEntityProxy_json_1.MigratableEntityProxy_jsonAbi; } });
7
- Object.defineProperty(exports, "MigratableEntityProxy_json", { enumerable: true, get: function () { return MigratableEntityProxy_json_1.MigratableEntityProxy_json; } });
8
5
  var Vault_json_1 = require("./Vault_json");
9
6
  Object.defineProperty(exports, "Vault_jsonAbi", { enumerable: true, get: function () { return Vault_json_1.Vault_jsonAbi; } });
10
7
  Object.defineProperty(exports, "Vault_json", { enumerable: true, get: function () { return Vault_json_1.Vault_json; } });
@@ -1,5 +1,3 @@
1
1
  // Auto-generated exports for all contracts
2
- export { MigratableEntityProxy_jsonAbi, MigratableEntityProxy_json } from './MigratableEntityProxy_json';
3
- export type { MigratableEntityProxy_jsonAbi as MigratableEntityProxy_jsonAbiType, MigratableEntityProxy_jsonContract } from './MigratableEntityProxy_json';
4
2
  export { Vault_jsonAbi, Vault_json } from './Vault_json';
5
3
  export type { Vault_jsonAbi as Vault_jsonAbiType, Vault_jsonContract } from './Vault_json';
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@gitmyabi/vault",
3
- "version": "1.0.3",
4
- "description": "Auto-generated TypeScript type bindings for Vault (build etherscan-vault-4b7a4bae-1787358868559, commit dd46a01, branch etherscan)",
3
+ "version": "1.0.5",
4
+ "description": "Auto-generated TypeScript type bindings for Vault (build etherscan-vault-0596702a-1788192132261, commit 1b65ef6, branch etherscan)",
5
5
  "main": "./index.js",
6
6
  "types": "./index.d.ts",
7
7
  "exports": {
@@ -39,5 +39,5 @@
39
39
  "url": "https://github.com/etherscan/vault"
40
40
  },
41
41
  "branch": "etherscan",
42
- "shortHash": "dd46a01"
42
+ "shortHash": "1b65ef6"
43
43
  }
@@ -1,233 +0,0 @@
1
- import type { Address, PublicClient, WalletClient } from 'viem';
2
- /**
3
- * MigratableEntityProxy_json ABI
4
- *
5
- * This ABI is typed using viem's type system for full type safety.
6
- */
7
- export declare const MigratableEntityProxy_jsonAbi: readonly [{
8
- readonly inputs: readonly [{
9
- readonly internalType: "address";
10
- readonly name: "logic";
11
- readonly type: "address";
12
- }, {
13
- readonly internalType: "bytes";
14
- readonly name: "data";
15
- readonly type: "bytes";
16
- }];
17
- readonly stateMutability: "nonpayable";
18
- readonly type: "constructor";
19
- }, {
20
- readonly inputs: readonly [{
21
- readonly internalType: "address";
22
- readonly name: "target";
23
- readonly type: "address";
24
- }];
25
- readonly name: "AddressEmptyCode";
26
- readonly type: "error";
27
- }, {
28
- readonly inputs: readonly [{
29
- readonly internalType: "address";
30
- readonly name: "admin";
31
- readonly type: "address";
32
- }];
33
- readonly name: "ERC1967InvalidAdmin";
34
- readonly type: "error";
35
- }, {
36
- readonly inputs: readonly [{
37
- readonly internalType: "address";
38
- readonly name: "implementation";
39
- readonly type: "address";
40
- }];
41
- readonly name: "ERC1967InvalidImplementation";
42
- readonly type: "error";
43
- }, {
44
- readonly inputs: readonly [];
45
- readonly name: "ERC1967NonPayable";
46
- readonly type: "error";
47
- }, {
48
- readonly inputs: readonly [];
49
- readonly name: "FailedInnerCall";
50
- readonly type: "error";
51
- }, {
52
- readonly inputs: readonly [];
53
- readonly name: "ProxyDeniedAdminAccess";
54
- readonly type: "error";
55
- }, {
56
- readonly anonymous: false;
57
- readonly inputs: readonly [{
58
- readonly indexed: false;
59
- readonly internalType: "address";
60
- readonly name: "previousAdmin";
61
- readonly type: "address";
62
- }, {
63
- readonly indexed: false;
64
- readonly internalType: "address";
65
- readonly name: "newAdmin";
66
- readonly type: "address";
67
- }];
68
- readonly name: "AdminChanged";
69
- readonly type: "event";
70
- }, {
71
- readonly anonymous: false;
72
- readonly inputs: readonly [{
73
- readonly indexed: true;
74
- readonly internalType: "address";
75
- readonly name: "implementation";
76
- readonly type: "address";
77
- }];
78
- readonly name: "Upgraded";
79
- readonly type: "event";
80
- }, {
81
- readonly stateMutability: "payable";
82
- readonly type: "fallback";
83
- }, {
84
- readonly inputs: readonly [{
85
- readonly internalType: "address";
86
- readonly name: "newImplementation";
87
- readonly type: "address";
88
- }, {
89
- readonly internalType: "bytes";
90
- readonly name: "data";
91
- readonly type: "bytes";
92
- }];
93
- readonly name: "upgradeToAndCall";
94
- readonly outputs: readonly [];
95
- readonly stateMutability: "nonpayable";
96
- readonly type: "function";
97
- }];
98
- /**
99
- * Type-safe ABI for MigratableEntityProxy_json
100
- */
101
- export type MigratableEntityProxy_jsonAbi = typeof MigratableEntityProxy_jsonAbi;
102
- /**
103
- * Contract instance type for MigratableEntityProxy_json
104
- */
105
- export type MigratableEntityProxy_jsonContract = any;
106
- /**
107
- * MigratableEntityProxy_json Contract Class
108
- *
109
- * Provides a class-based API similar to TypeChain for interacting with the contract.
110
- *
111
- * @example
112
- * ```typescript
113
- * import { createPublicClient, createWalletClient, http } from 'viem';
114
- * import { mainnet } from 'viem/chains';
115
- * import { MigratableEntityProxy_json } from 'MigratableEntityProxy_json';
116
- *
117
- * const publicClient = createPublicClient({ chain: mainnet, transport: http() });
118
- * const walletClient = createWalletClient({ chain: mainnet, transport: http() });
119
- *
120
- * const contract = new MigratableEntityProxy_json('0x...', { publicClient, walletClient });
121
- *
122
- * // Read functions
123
- * const result = await contract.balanceOf('0x...');
124
- *
125
- * // Write functions
126
- * const hash = await contract.transfer('0x...', 1000n);
127
- *
128
- * // Simulate transactions (dry-run)
129
- * const simulation = await contract.simulate.transfer('0x...', 1000n);
130
- * console.log('Gas estimate:', simulation.request.gas);
131
- *
132
- * // Watch events
133
- * const unwatch = contract.watch.Transfer((event) => {
134
- * console.log('Transfer event:', event);
135
- * });
136
- * ```
137
- */
138
- export declare class MigratableEntityProxy_json {
139
- private contract;
140
- private contractAddress;
141
- private publicClient;
142
- constructor(address: Address, clients: {
143
- publicClient: PublicClient;
144
- walletClient?: WalletClient;
145
- });
146
- /**
147
- * Get the contract address
148
- */
149
- get address(): Address;
150
- /**
151
- * Get the underlying viem contract instance
152
- */
153
- getContract(): MigratableEntityProxy_jsonContract;
154
- /**
155
- * upgradeToAndCall
156
- * nonpayable
157
- * @param options Optional transaction parameters (value, gas, nonce, etc.)
158
- */
159
- upgradeToAndCall(newImplementation: `0x${string}`, data: `0x${string}`, options?: {
160
- accessList?: import('viem').AccessList;
161
- authorizationList?: import('viem').AuthorizationList;
162
- chain?: import('viem').Chain | null;
163
- dataSuffix?: `0x${string}`;
164
- gas?: bigint;
165
- gasPrice?: bigint;
166
- maxFeePerGas?: bigint;
167
- maxPriorityFeePerGas?: bigint;
168
- nonce?: number;
169
- value?: bigint;
170
- }): Promise<`0x${string}`>;
171
- /**
172
- * Simulate contract write operations (dry-run without sending transaction)
173
- *
174
- * @example
175
- * const result = await contract.simulate.transfer('0x...', 1000n);
176
- * console.log('Gas estimate:', result.request.gas);
177
- * console.log('Would succeed:', result.result);
178
- */
179
- get simulate(): {
180
- /**
181
- * Simulate upgradeToAndCall
182
- * Returns gas estimate and result without sending transaction
183
- * @param options Optional transaction parameters (value, gas, nonce, etc.)
184
- */
185
- upgradeToAndCall(newImplementation: `0x${string}`, data: `0x${string}`, options?: {
186
- accessList?: import("viem").AccessList;
187
- authorizationList?: import("viem").AuthorizationList;
188
- chain?: import("viem").Chain | null;
189
- dataSuffix?: `0x${string}`;
190
- gas?: bigint;
191
- gasPrice?: bigint;
192
- maxFeePerGas?: bigint;
193
- maxPriorityFeePerGas?: bigint;
194
- nonce?: number;
195
- value?: bigint;
196
- }): Promise<void>;
197
- };
198
- /**
199
- * Watch contract events
200
- *
201
- * @example
202
- * // Watch all Transfer events
203
- * const unwatch = contract.watch.Transfer((event) => {
204
- * console.log('Transfer:', event);
205
- * });
206
- *
207
- * // Stop watching
208
- * unwatch();
209
- */
210
- get watch(): {
211
- /**
212
- * Watch AdminChanged events
213
- * @param callback Function to call when event is emitted
214
- * @param filter Optional filter for indexed parameters
215
- * @returns Unwatch function to stop listening
216
- */
217
- AdminChanged: (callback: (event: {
218
- previousAdmin: `0x${string}`;
219
- newAdmin: `0x${string}`;
220
- }) => void) => () => void;
221
- /**
222
- * Watch Upgraded events
223
- * @param callback Function to call when event is emitted
224
- * @param filter Optional filter for indexed parameters
225
- * @returns Unwatch function to stop listening
226
- */
227
- Upgraded: (callback: (event: {
228
- implementation: `0x${string}`;
229
- }) => void, filter?: {
230
- implementation: `0x${string}`;
231
- }) => () => void;
232
- };
233
- }
@@ -1,277 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.MigratableEntityProxy_json = exports.MigratableEntityProxy_jsonAbi = void 0;
4
- const viem_1 = require("viem");
5
- /**
6
- * MigratableEntityProxy_json ABI
7
- *
8
- * This ABI is typed using viem's type system for full type safety.
9
- */
10
- exports.MigratableEntityProxy_jsonAbi = [
11
- {
12
- "inputs": [
13
- {
14
- "internalType": "address",
15
- "name": "logic",
16
- "type": "address"
17
- },
18
- {
19
- "internalType": "bytes",
20
- "name": "data",
21
- "type": "bytes"
22
- }
23
- ],
24
- "stateMutability": "nonpayable",
25
- "type": "constructor"
26
- },
27
- {
28
- "inputs": [
29
- {
30
- "internalType": "address",
31
- "name": "target",
32
- "type": "address"
33
- }
34
- ],
35
- "name": "AddressEmptyCode",
36
- "type": "error"
37
- },
38
- {
39
- "inputs": [
40
- {
41
- "internalType": "address",
42
- "name": "admin",
43
- "type": "address"
44
- }
45
- ],
46
- "name": "ERC1967InvalidAdmin",
47
- "type": "error"
48
- },
49
- {
50
- "inputs": [
51
- {
52
- "internalType": "address",
53
- "name": "implementation",
54
- "type": "address"
55
- }
56
- ],
57
- "name": "ERC1967InvalidImplementation",
58
- "type": "error"
59
- },
60
- {
61
- "inputs": [],
62
- "name": "ERC1967NonPayable",
63
- "type": "error"
64
- },
65
- {
66
- "inputs": [],
67
- "name": "FailedInnerCall",
68
- "type": "error"
69
- },
70
- {
71
- "inputs": [],
72
- "name": "ProxyDeniedAdminAccess",
73
- "type": "error"
74
- },
75
- {
76
- "anonymous": false,
77
- "inputs": [
78
- {
79
- "indexed": false,
80
- "internalType": "address",
81
- "name": "previousAdmin",
82
- "type": "address"
83
- },
84
- {
85
- "indexed": false,
86
- "internalType": "address",
87
- "name": "newAdmin",
88
- "type": "address"
89
- }
90
- ],
91
- "name": "AdminChanged",
92
- "type": "event"
93
- },
94
- {
95
- "anonymous": false,
96
- "inputs": [
97
- {
98
- "indexed": true,
99
- "internalType": "address",
100
- "name": "implementation",
101
- "type": "address"
102
- }
103
- ],
104
- "name": "Upgraded",
105
- "type": "event"
106
- },
107
- {
108
- "stateMutability": "payable",
109
- "type": "fallback"
110
- },
111
- {
112
- "inputs": [
113
- {
114
- "internalType": "address",
115
- "name": "newImplementation",
116
- "type": "address"
117
- },
118
- {
119
- "internalType": "bytes",
120
- "name": "data",
121
- "type": "bytes"
122
- }
123
- ],
124
- "name": "upgradeToAndCall",
125
- "outputs": [],
126
- "stateMutability": "nonpayable",
127
- "type": "function"
128
- }
129
- ];
130
- /**
131
- * MigratableEntityProxy_json Contract Class
132
- *
133
- * Provides a class-based API similar to TypeChain for interacting with the contract.
134
- *
135
- * @example
136
- * ```typescript
137
- * import { createPublicClient, createWalletClient, http } from 'viem';
138
- * import { mainnet } from 'viem/chains';
139
- * import { MigratableEntityProxy_json } from 'MigratableEntityProxy_json';
140
- *
141
- * const publicClient = createPublicClient({ chain: mainnet, transport: http() });
142
- * const walletClient = createWalletClient({ chain: mainnet, transport: http() });
143
- *
144
- * const contract = new MigratableEntityProxy_json('0x...', { publicClient, walletClient });
145
- *
146
- * // Read functions
147
- * const result = await contract.balanceOf('0x...');
148
- *
149
- * // Write functions
150
- * const hash = await contract.transfer('0x...', 1000n);
151
- *
152
- * // Simulate transactions (dry-run)
153
- * const simulation = await contract.simulate.transfer('0x...', 1000n);
154
- * console.log('Gas estimate:', simulation.request.gas);
155
- *
156
- * // Watch events
157
- * const unwatch = contract.watch.Transfer((event) => {
158
- * console.log('Transfer event:', event);
159
- * });
160
- * ```
161
- */
162
- class MigratableEntityProxy_json {
163
- constructor(address, clients) {
164
- this.contractAddress = address;
165
- this.publicClient = clients.publicClient;
166
- this.contract = (0, viem_1.getContract)({
167
- address,
168
- abi: exports.MigratableEntityProxy_jsonAbi,
169
- client: {
170
- public: clients.publicClient,
171
- wallet: clients.walletClient,
172
- },
173
- });
174
- }
175
- /**
176
- * Get the contract address
177
- */
178
- get address() {
179
- return this.contractAddress;
180
- }
181
- /**
182
- * Get the underlying viem contract instance
183
- */
184
- getContract() {
185
- return this.contract;
186
- }
187
- // No read functions
188
- /**
189
- * upgradeToAndCall
190
- * nonpayable
191
- * @param options Optional transaction parameters (value, gas, nonce, etc.)
192
- */
193
- async upgradeToAndCall(newImplementation, data, options) {
194
- if (!this.contract.write) {
195
- throw new Error('Wallet client is required for write operations');
196
- }
197
- return this.contract.write.upgradeToAndCall([newImplementation, data], options);
198
- }
199
- /**
200
- * Simulate contract write operations (dry-run without sending transaction)
201
- *
202
- * @example
203
- * const result = await contract.simulate.transfer('0x...', 1000n);
204
- * console.log('Gas estimate:', result.request.gas);
205
- * console.log('Would succeed:', result.result);
206
- */
207
- get simulate() {
208
- const contract = this.contract;
209
- if (!contract.simulate) {
210
- throw new Error('Public client is required for simulation');
211
- }
212
- return {
213
- /**
214
- * Simulate upgradeToAndCall
215
- * Returns gas estimate and result without sending transaction
216
- * @param options Optional transaction parameters (value, gas, nonce, etc.)
217
- */
218
- async upgradeToAndCall(newImplementation, data, options) {
219
- return contract.simulate.upgradeToAndCall([newImplementation, data], options);
220
- }
221
- };
222
- }
223
- /**
224
- * Watch contract events
225
- *
226
- * @example
227
- * // Watch all Transfer events
228
- * const unwatch = contract.watch.Transfer((event) => {
229
- * console.log('Transfer:', event);
230
- * });
231
- *
232
- * // Stop watching
233
- * unwatch();
234
- */
235
- get watch() {
236
- return {
237
- /**
238
- * Watch AdminChanged events
239
- * @param callback Function to call when event is emitted
240
- * @param filter Optional filter for indexed parameters
241
- * @returns Unwatch function to stop listening
242
- */
243
- AdminChanged: (callback) => {
244
- return this.publicClient.watchContractEvent({
245
- address: this.contractAddress,
246
- abi: exports.MigratableEntityProxy_jsonAbi,
247
- eventName: 'AdminChanged',
248
- onLogs: (logs) => {
249
- logs.forEach((log) => {
250
- callback(log.args);
251
- });
252
- },
253
- });
254
- },
255
- /**
256
- * Watch Upgraded events
257
- * @param callback Function to call when event is emitted
258
- * @param filter Optional filter for indexed parameters
259
- * @returns Unwatch function to stop listening
260
- */
261
- Upgraded: (callback, filter) => {
262
- return this.publicClient.watchContractEvent({
263
- address: this.contractAddress,
264
- abi: exports.MigratableEntityProxy_jsonAbi,
265
- eventName: 'Upgraded',
266
- args: filter,
267
- onLogs: (logs) => {
268
- logs.forEach((log) => {
269
- callback(log.args);
270
- });
271
- },
272
- });
273
- }
274
- };
275
- }
276
- }
277
- exports.MigratableEntityProxy_json = MigratableEntityProxy_json;