@gitmyabi/weth 1.0.6 → 1.0.7
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 +3 -3
- package/contracts/{WETH9_json.d.ts → DelayedWETH_json.d.ts} +532 -133
- package/contracts/{WETH9_json.js → DelayedWETH_json.js} +574 -149
- package/contracts/{WETH9_json.ts → DelayedWETH_json.ts} +684 -154
- package/contracts/{AdminUpgradeabilityProxy_json.d.ts → Proxy_json.d.ts} +28 -32
- package/contracts/{AdminUpgradeabilityProxy_json.js → Proxy_json.js} +35 -39
- package/contracts/{AdminUpgradeabilityProxy_json.ts → Proxy_json.ts} +40 -44
- package/contracts/index.d.ts +4 -4
- package/contracts/index.js +7 -7
- package/contracts/index.ts +4 -4
- package/package.json +3 -3
|
@@ -1,24 +1,16 @@
|
|
|
1
1
|
import type { Address, PublicClient, WalletClient } from 'viem';
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
3
|
+
* Proxy_json ABI
|
|
4
4
|
*
|
|
5
5
|
* This ABI is typed using viem's type system for full type safety.
|
|
6
6
|
*/
|
|
7
|
-
export declare const
|
|
7
|
+
export declare const Proxy_jsonAbi: readonly [{
|
|
8
8
|
readonly inputs: readonly [{
|
|
9
9
|
readonly internalType: "address";
|
|
10
10
|
readonly name: "_admin";
|
|
11
11
|
readonly type: "address";
|
|
12
|
-
}, {
|
|
13
|
-
readonly internalType: "address";
|
|
14
|
-
readonly name: "_logic";
|
|
15
|
-
readonly type: "address";
|
|
16
|
-
}, {
|
|
17
|
-
readonly internalType: "bytes";
|
|
18
|
-
readonly name: "_data";
|
|
19
|
-
readonly type: "bytes";
|
|
20
12
|
}];
|
|
21
|
-
readonly stateMutability: "
|
|
13
|
+
readonly stateMutability: "nonpayable";
|
|
22
14
|
readonly type: "constructor";
|
|
23
15
|
}, {
|
|
24
16
|
readonly anonymous: false;
|
|
@@ -61,7 +53,7 @@ export declare const AdminUpgradeabilityProxy_jsonAbi: readonly [{
|
|
|
61
53
|
}, {
|
|
62
54
|
readonly inputs: readonly [{
|
|
63
55
|
readonly internalType: "address";
|
|
64
|
-
readonly name: "
|
|
56
|
+
readonly name: "_admin";
|
|
65
57
|
readonly type: "address";
|
|
66
58
|
}];
|
|
67
59
|
readonly name: "changeAdmin";
|
|
@@ -81,7 +73,7 @@ export declare const AdminUpgradeabilityProxy_jsonAbi: readonly [{
|
|
|
81
73
|
}, {
|
|
82
74
|
readonly inputs: readonly [{
|
|
83
75
|
readonly internalType: "address";
|
|
84
|
-
readonly name: "
|
|
76
|
+
readonly name: "_implementation";
|
|
85
77
|
readonly type: "address";
|
|
86
78
|
}];
|
|
87
79
|
readonly name: "upgradeTo";
|
|
@@ -91,15 +83,19 @@ export declare const AdminUpgradeabilityProxy_jsonAbi: readonly [{
|
|
|
91
83
|
}, {
|
|
92
84
|
readonly inputs: readonly [{
|
|
93
85
|
readonly internalType: "address";
|
|
94
|
-
readonly name: "
|
|
86
|
+
readonly name: "_implementation";
|
|
95
87
|
readonly type: "address";
|
|
96
88
|
}, {
|
|
97
89
|
readonly internalType: "bytes";
|
|
98
|
-
readonly name: "
|
|
90
|
+
readonly name: "_data";
|
|
99
91
|
readonly type: "bytes";
|
|
100
92
|
}];
|
|
101
93
|
readonly name: "upgradeToAndCall";
|
|
102
|
-
readonly outputs: readonly [
|
|
94
|
+
readonly outputs: readonly [{
|
|
95
|
+
readonly internalType: "bytes";
|
|
96
|
+
readonly name: "";
|
|
97
|
+
readonly type: "bytes";
|
|
98
|
+
}];
|
|
103
99
|
readonly stateMutability: "payable";
|
|
104
100
|
readonly type: "function";
|
|
105
101
|
}, {
|
|
@@ -107,15 +103,15 @@ export declare const AdminUpgradeabilityProxy_jsonAbi: readonly [{
|
|
|
107
103
|
readonly type: "receive";
|
|
108
104
|
}];
|
|
109
105
|
/**
|
|
110
|
-
* Type-safe ABI for
|
|
106
|
+
* Type-safe ABI for Proxy_json
|
|
111
107
|
*/
|
|
112
|
-
export type
|
|
108
|
+
export type Proxy_jsonAbi = typeof Proxy_jsonAbi;
|
|
113
109
|
/**
|
|
114
|
-
* Contract instance type for
|
|
110
|
+
* Contract instance type for Proxy_json
|
|
115
111
|
*/
|
|
116
|
-
export type
|
|
112
|
+
export type Proxy_jsonContract = any;
|
|
117
113
|
/**
|
|
118
|
-
*
|
|
114
|
+
* Proxy_json Contract Class
|
|
119
115
|
*
|
|
120
116
|
* Provides a class-based API similar to TypeChain for interacting with the contract.
|
|
121
117
|
*
|
|
@@ -123,12 +119,12 @@ export type AdminUpgradeabilityProxy_jsonContract = any;
|
|
|
123
119
|
* ```typescript
|
|
124
120
|
* import { createPublicClient, createWalletClient, http } from 'viem';
|
|
125
121
|
* import { mainnet } from 'viem/chains';
|
|
126
|
-
* import {
|
|
122
|
+
* import { Proxy_json } from 'Proxy_json';
|
|
127
123
|
*
|
|
128
124
|
* const publicClient = createPublicClient({ chain: mainnet, transport: http() });
|
|
129
125
|
* const walletClient = createWalletClient({ chain: mainnet, transport: http() });
|
|
130
126
|
*
|
|
131
|
-
* const contract = new
|
|
127
|
+
* const contract = new Proxy_json('0x...', { publicClient, walletClient });
|
|
132
128
|
*
|
|
133
129
|
* // Read functions
|
|
134
130
|
* const result = await contract.balanceOf('0x...');
|
|
@@ -146,7 +142,7 @@ export type AdminUpgradeabilityProxy_jsonContract = any;
|
|
|
146
142
|
* });
|
|
147
143
|
* ```
|
|
148
144
|
*/
|
|
149
|
-
export declare class
|
|
145
|
+
export declare class Proxy_json {
|
|
150
146
|
private contract;
|
|
151
147
|
private contractAddress;
|
|
152
148
|
private publicClient;
|
|
@@ -161,7 +157,7 @@ export declare class AdminUpgradeabilityProxy_json {
|
|
|
161
157
|
/**
|
|
162
158
|
* Get the underlying viem contract instance
|
|
163
159
|
*/
|
|
164
|
-
getContract():
|
|
160
|
+
getContract(): Proxy_jsonContract;
|
|
165
161
|
/**
|
|
166
162
|
* admin
|
|
167
163
|
* nonpayable
|
|
@@ -184,7 +180,7 @@ export declare class AdminUpgradeabilityProxy_json {
|
|
|
184
180
|
* nonpayable
|
|
185
181
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
186
182
|
*/
|
|
187
|
-
changeAdmin(
|
|
183
|
+
changeAdmin(_admin: `0x${string}`, options?: {
|
|
188
184
|
accessList?: import('viem').AccessList;
|
|
189
185
|
authorizationList?: import('viem').AuthorizationList;
|
|
190
186
|
chain?: import('viem').Chain | null;
|
|
@@ -218,7 +214,7 @@ export declare class AdminUpgradeabilityProxy_json {
|
|
|
218
214
|
* nonpayable
|
|
219
215
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
220
216
|
*/
|
|
221
|
-
upgradeTo(
|
|
217
|
+
upgradeTo(_implementation: `0x${string}`, options?: {
|
|
222
218
|
accessList?: import('viem').AccessList;
|
|
223
219
|
authorizationList?: import('viem').AuthorizationList;
|
|
224
220
|
chain?: import('viem').Chain | null;
|
|
@@ -235,7 +231,7 @@ export declare class AdminUpgradeabilityProxy_json {
|
|
|
235
231
|
* payable
|
|
236
232
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
237
233
|
*/
|
|
238
|
-
upgradeToAndCall(
|
|
234
|
+
upgradeToAndCall(_implementation: `0x${string}`, _data: `0x${string}`, options?: {
|
|
239
235
|
accessList?: import('viem').AccessList;
|
|
240
236
|
authorizationList?: import('viem').AuthorizationList;
|
|
241
237
|
chain?: import('viem').Chain | null;
|
|
@@ -278,7 +274,7 @@ export declare class AdminUpgradeabilityProxy_json {
|
|
|
278
274
|
* Returns gas estimate and result without sending transaction
|
|
279
275
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
280
276
|
*/
|
|
281
|
-
changeAdmin(
|
|
277
|
+
changeAdmin(_admin: `0x${string}`, options?: {
|
|
282
278
|
accessList?: import("viem").AccessList;
|
|
283
279
|
authorizationList?: import("viem").AuthorizationList;
|
|
284
280
|
chain?: import("viem").Chain | null;
|
|
@@ -312,7 +308,7 @@ export declare class AdminUpgradeabilityProxy_json {
|
|
|
312
308
|
* Returns gas estimate and result without sending transaction
|
|
313
309
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
314
310
|
*/
|
|
315
|
-
upgradeTo(
|
|
311
|
+
upgradeTo(_implementation: `0x${string}`, options?: {
|
|
316
312
|
accessList?: import("viem").AccessList;
|
|
317
313
|
authorizationList?: import("viem").AuthorizationList;
|
|
318
314
|
chain?: import("viem").Chain | null;
|
|
@@ -329,7 +325,7 @@ export declare class AdminUpgradeabilityProxy_json {
|
|
|
329
325
|
* Returns gas estimate and result without sending transaction
|
|
330
326
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
331
327
|
*/
|
|
332
|
-
upgradeToAndCall(
|
|
328
|
+
upgradeToAndCall(_implementation: `0x${string}`, _data: `0x${string}`, options?: {
|
|
333
329
|
accessList?: import("viem").AccessList;
|
|
334
330
|
authorizationList?: import("viem").AuthorizationList;
|
|
335
331
|
chain?: import("viem").Chain | null;
|
|
@@ -340,7 +336,7 @@ export declare class AdminUpgradeabilityProxy_json {
|
|
|
340
336
|
maxPriorityFeePerGas?: bigint;
|
|
341
337
|
nonce?: number;
|
|
342
338
|
value?: bigint;
|
|
343
|
-
}): Promise
|
|
339
|
+
}): Promise<`0x${string}`>;
|
|
344
340
|
};
|
|
345
341
|
/**
|
|
346
342
|
* Watch contract events
|
|
@@ -1,32 +1,22 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.Proxy_json = exports.Proxy_jsonAbi = void 0;
|
|
4
4
|
const viem_1 = require("viem");
|
|
5
5
|
/**
|
|
6
|
-
*
|
|
6
|
+
* Proxy_json ABI
|
|
7
7
|
*
|
|
8
8
|
* This ABI is typed using viem's type system for full type safety.
|
|
9
9
|
*/
|
|
10
|
-
exports.
|
|
10
|
+
exports.Proxy_jsonAbi = [
|
|
11
11
|
{
|
|
12
12
|
"inputs": [
|
|
13
13
|
{
|
|
14
14
|
"internalType": "address",
|
|
15
15
|
"name": "_admin",
|
|
16
16
|
"type": "address"
|
|
17
|
-
},
|
|
18
|
-
{
|
|
19
|
-
"internalType": "address",
|
|
20
|
-
"name": "_logic",
|
|
21
|
-
"type": "address"
|
|
22
|
-
},
|
|
23
|
-
{
|
|
24
|
-
"internalType": "bytes",
|
|
25
|
-
"name": "_data",
|
|
26
|
-
"type": "bytes"
|
|
27
17
|
}
|
|
28
18
|
],
|
|
29
|
-
"stateMutability": "
|
|
19
|
+
"stateMutability": "nonpayable",
|
|
30
20
|
"type": "constructor"
|
|
31
21
|
},
|
|
32
22
|
{
|
|
@@ -82,7 +72,7 @@ exports.AdminUpgradeabilityProxy_jsonAbi = [
|
|
|
82
72
|
"inputs": [
|
|
83
73
|
{
|
|
84
74
|
"internalType": "address",
|
|
85
|
-
"name": "
|
|
75
|
+
"name": "_admin",
|
|
86
76
|
"type": "address"
|
|
87
77
|
}
|
|
88
78
|
],
|
|
@@ -108,7 +98,7 @@ exports.AdminUpgradeabilityProxy_jsonAbi = [
|
|
|
108
98
|
"inputs": [
|
|
109
99
|
{
|
|
110
100
|
"internalType": "address",
|
|
111
|
-
"name": "
|
|
101
|
+
"name": "_implementation",
|
|
112
102
|
"type": "address"
|
|
113
103
|
}
|
|
114
104
|
],
|
|
@@ -121,17 +111,23 @@ exports.AdminUpgradeabilityProxy_jsonAbi = [
|
|
|
121
111
|
"inputs": [
|
|
122
112
|
{
|
|
123
113
|
"internalType": "address",
|
|
124
|
-
"name": "
|
|
114
|
+
"name": "_implementation",
|
|
125
115
|
"type": "address"
|
|
126
116
|
},
|
|
127
117
|
{
|
|
128
118
|
"internalType": "bytes",
|
|
129
|
-
"name": "
|
|
119
|
+
"name": "_data",
|
|
130
120
|
"type": "bytes"
|
|
131
121
|
}
|
|
132
122
|
],
|
|
133
123
|
"name": "upgradeToAndCall",
|
|
134
|
-
"outputs": [
|
|
124
|
+
"outputs": [
|
|
125
|
+
{
|
|
126
|
+
"internalType": "bytes",
|
|
127
|
+
"name": "",
|
|
128
|
+
"type": "bytes"
|
|
129
|
+
}
|
|
130
|
+
],
|
|
135
131
|
"stateMutability": "payable",
|
|
136
132
|
"type": "function"
|
|
137
133
|
},
|
|
@@ -141,7 +137,7 @@ exports.AdminUpgradeabilityProxy_jsonAbi = [
|
|
|
141
137
|
}
|
|
142
138
|
];
|
|
143
139
|
/**
|
|
144
|
-
*
|
|
140
|
+
* Proxy_json Contract Class
|
|
145
141
|
*
|
|
146
142
|
* Provides a class-based API similar to TypeChain for interacting with the contract.
|
|
147
143
|
*
|
|
@@ -149,12 +145,12 @@ exports.AdminUpgradeabilityProxy_jsonAbi = [
|
|
|
149
145
|
* ```typescript
|
|
150
146
|
* import { createPublicClient, createWalletClient, http } from 'viem';
|
|
151
147
|
* import { mainnet } from 'viem/chains';
|
|
152
|
-
* import {
|
|
148
|
+
* import { Proxy_json } from 'Proxy_json';
|
|
153
149
|
*
|
|
154
150
|
* const publicClient = createPublicClient({ chain: mainnet, transport: http() });
|
|
155
151
|
* const walletClient = createWalletClient({ chain: mainnet, transport: http() });
|
|
156
152
|
*
|
|
157
|
-
* const contract = new
|
|
153
|
+
* const contract = new Proxy_json('0x...', { publicClient, walletClient });
|
|
158
154
|
*
|
|
159
155
|
* // Read functions
|
|
160
156
|
* const result = await contract.balanceOf('0x...');
|
|
@@ -172,13 +168,13 @@ exports.AdminUpgradeabilityProxy_jsonAbi = [
|
|
|
172
168
|
* });
|
|
173
169
|
* ```
|
|
174
170
|
*/
|
|
175
|
-
class
|
|
171
|
+
class Proxy_json {
|
|
176
172
|
constructor(address, clients) {
|
|
177
173
|
this.contractAddress = address;
|
|
178
174
|
this.publicClient = clients.publicClient;
|
|
179
175
|
this.contract = (0, viem_1.getContract)({
|
|
180
176
|
address,
|
|
181
|
-
abi: exports.
|
|
177
|
+
abi: exports.Proxy_jsonAbi,
|
|
182
178
|
client: {
|
|
183
179
|
public: clients.publicClient,
|
|
184
180
|
wallet: clients.walletClient,
|
|
@@ -214,11 +210,11 @@ class AdminUpgradeabilityProxy_json {
|
|
|
214
210
|
* nonpayable
|
|
215
211
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
216
212
|
*/
|
|
217
|
-
async changeAdmin(
|
|
213
|
+
async changeAdmin(_admin, options) {
|
|
218
214
|
if (!this.contract.write) {
|
|
219
215
|
throw new Error('Wallet client is required for write operations');
|
|
220
216
|
}
|
|
221
|
-
return this.contract.write.changeAdmin([
|
|
217
|
+
return this.contract.write.changeAdmin([_admin], options);
|
|
222
218
|
}
|
|
223
219
|
/**
|
|
224
220
|
* implementation
|
|
@@ -236,22 +232,22 @@ class AdminUpgradeabilityProxy_json {
|
|
|
236
232
|
* nonpayable
|
|
237
233
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
238
234
|
*/
|
|
239
|
-
async upgradeTo(
|
|
235
|
+
async upgradeTo(_implementation, options) {
|
|
240
236
|
if (!this.contract.write) {
|
|
241
237
|
throw new Error('Wallet client is required for write operations');
|
|
242
238
|
}
|
|
243
|
-
return this.contract.write.upgradeTo([
|
|
239
|
+
return this.contract.write.upgradeTo([_implementation], options);
|
|
244
240
|
}
|
|
245
241
|
/**
|
|
246
242
|
* upgradeToAndCall
|
|
247
243
|
* payable
|
|
248
244
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
249
245
|
*/
|
|
250
|
-
async upgradeToAndCall(
|
|
246
|
+
async upgradeToAndCall(_implementation, _data, options) {
|
|
251
247
|
if (!this.contract.write) {
|
|
252
248
|
throw new Error('Wallet client is required for write operations');
|
|
253
249
|
}
|
|
254
|
-
return this.contract.write.upgradeToAndCall([
|
|
250
|
+
return this.contract.write.upgradeToAndCall([_implementation, _data], options);
|
|
255
251
|
}
|
|
256
252
|
/**
|
|
257
253
|
* Simulate contract write operations (dry-run without sending transaction)
|
|
@@ -280,8 +276,8 @@ class AdminUpgradeabilityProxy_json {
|
|
|
280
276
|
* Returns gas estimate and result without sending transaction
|
|
281
277
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
282
278
|
*/
|
|
283
|
-
async changeAdmin(
|
|
284
|
-
return contract.simulate.changeAdmin([
|
|
279
|
+
async changeAdmin(_admin, options) {
|
|
280
|
+
return contract.simulate.changeAdmin([_admin], options);
|
|
285
281
|
},
|
|
286
282
|
/**
|
|
287
283
|
* Simulate implementation
|
|
@@ -296,16 +292,16 @@ class AdminUpgradeabilityProxy_json {
|
|
|
296
292
|
* Returns gas estimate and result without sending transaction
|
|
297
293
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
298
294
|
*/
|
|
299
|
-
async upgradeTo(
|
|
300
|
-
return contract.simulate.upgradeTo([
|
|
295
|
+
async upgradeTo(_implementation, options) {
|
|
296
|
+
return contract.simulate.upgradeTo([_implementation], options);
|
|
301
297
|
},
|
|
302
298
|
/**
|
|
303
299
|
* Simulate upgradeToAndCall
|
|
304
300
|
* Returns gas estimate and result without sending transaction
|
|
305
301
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
306
302
|
*/
|
|
307
|
-
async upgradeToAndCall(
|
|
308
|
-
return contract.simulate.upgradeToAndCall([
|
|
303
|
+
async upgradeToAndCall(_implementation, _data, options) {
|
|
304
|
+
return contract.simulate.upgradeToAndCall([_implementation, _data], options);
|
|
309
305
|
}
|
|
310
306
|
};
|
|
311
307
|
}
|
|
@@ -332,7 +328,7 @@ class AdminUpgradeabilityProxy_json {
|
|
|
332
328
|
AdminChanged: (callback) => {
|
|
333
329
|
return this.publicClient.watchContractEvent({
|
|
334
330
|
address: this.contractAddress,
|
|
335
|
-
abi: exports.
|
|
331
|
+
abi: exports.Proxy_jsonAbi,
|
|
336
332
|
eventName: 'AdminChanged',
|
|
337
333
|
onLogs: (logs) => {
|
|
338
334
|
logs.forEach((log) => {
|
|
@@ -350,7 +346,7 @@ class AdminUpgradeabilityProxy_json {
|
|
|
350
346
|
Upgraded: (callback, filter) => {
|
|
351
347
|
return this.publicClient.watchContractEvent({
|
|
352
348
|
address: this.contractAddress,
|
|
353
|
-
abi: exports.
|
|
349
|
+
abi: exports.Proxy_jsonAbi,
|
|
354
350
|
eventName: 'Upgraded',
|
|
355
351
|
args: filter,
|
|
356
352
|
onLogs: (logs) => {
|
|
@@ -363,4 +359,4 @@ class AdminUpgradeabilityProxy_json {
|
|
|
363
359
|
};
|
|
364
360
|
}
|
|
365
361
|
}
|
|
366
|
-
exports.
|
|
362
|
+
exports.Proxy_json = Proxy_json;
|
|
@@ -2,30 +2,20 @@ import type { Abi, Address, PublicClient, WalletClient, GetContractReturnType }
|
|
|
2
2
|
import { getContract } from 'viem';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
5
|
+
* Proxy_json ABI
|
|
6
6
|
*
|
|
7
7
|
* This ABI is typed using viem's type system for full type safety.
|
|
8
8
|
*/
|
|
9
|
-
export const
|
|
9
|
+
export const Proxy_jsonAbi = [
|
|
10
10
|
{
|
|
11
11
|
"inputs": [
|
|
12
12
|
{
|
|
13
13
|
"internalType": "address",
|
|
14
14
|
"name": "_admin",
|
|
15
15
|
"type": "address"
|
|
16
|
-
},
|
|
17
|
-
{
|
|
18
|
-
"internalType": "address",
|
|
19
|
-
"name": "_logic",
|
|
20
|
-
"type": "address"
|
|
21
|
-
},
|
|
22
|
-
{
|
|
23
|
-
"internalType": "bytes",
|
|
24
|
-
"name": "_data",
|
|
25
|
-
"type": "bytes"
|
|
26
16
|
}
|
|
27
17
|
],
|
|
28
|
-
"stateMutability": "
|
|
18
|
+
"stateMutability": "nonpayable",
|
|
29
19
|
"type": "constructor"
|
|
30
20
|
},
|
|
31
21
|
{
|
|
@@ -81,7 +71,7 @@ export const AdminUpgradeabilityProxy_jsonAbi = [
|
|
|
81
71
|
"inputs": [
|
|
82
72
|
{
|
|
83
73
|
"internalType": "address",
|
|
84
|
-
"name": "
|
|
74
|
+
"name": "_admin",
|
|
85
75
|
"type": "address"
|
|
86
76
|
}
|
|
87
77
|
],
|
|
@@ -107,7 +97,7 @@ export const AdminUpgradeabilityProxy_jsonAbi = [
|
|
|
107
97
|
"inputs": [
|
|
108
98
|
{
|
|
109
99
|
"internalType": "address",
|
|
110
|
-
"name": "
|
|
100
|
+
"name": "_implementation",
|
|
111
101
|
"type": "address"
|
|
112
102
|
}
|
|
113
103
|
],
|
|
@@ -120,17 +110,23 @@ export const AdminUpgradeabilityProxy_jsonAbi = [
|
|
|
120
110
|
"inputs": [
|
|
121
111
|
{
|
|
122
112
|
"internalType": "address",
|
|
123
|
-
"name": "
|
|
113
|
+
"name": "_implementation",
|
|
124
114
|
"type": "address"
|
|
125
115
|
},
|
|
126
116
|
{
|
|
127
117
|
"internalType": "bytes",
|
|
128
|
-
"name": "
|
|
118
|
+
"name": "_data",
|
|
129
119
|
"type": "bytes"
|
|
130
120
|
}
|
|
131
121
|
],
|
|
132
122
|
"name": "upgradeToAndCall",
|
|
133
|
-
"outputs": [
|
|
123
|
+
"outputs": [
|
|
124
|
+
{
|
|
125
|
+
"internalType": "bytes",
|
|
126
|
+
"name": "",
|
|
127
|
+
"type": "bytes"
|
|
128
|
+
}
|
|
129
|
+
],
|
|
134
130
|
"stateMutability": "payable",
|
|
135
131
|
"type": "function"
|
|
136
132
|
},
|
|
@@ -141,19 +137,19 @@ export const AdminUpgradeabilityProxy_jsonAbi = [
|
|
|
141
137
|
] as const satisfies Abi;
|
|
142
138
|
|
|
143
139
|
/**
|
|
144
|
-
* Type-safe ABI for
|
|
140
|
+
* Type-safe ABI for Proxy_json
|
|
145
141
|
*/
|
|
146
|
-
export type
|
|
142
|
+
export type Proxy_jsonAbi = typeof Proxy_jsonAbi;
|
|
147
143
|
|
|
148
144
|
/**
|
|
149
|
-
* Contract instance type for
|
|
145
|
+
* Contract instance type for Proxy_json
|
|
150
146
|
*/
|
|
151
147
|
// Use any for contract type to avoid complex viem type issues
|
|
152
148
|
// The runtime behavior is type-safe through viem's ABI typing
|
|
153
|
-
export type
|
|
149
|
+
export type Proxy_jsonContract = any;
|
|
154
150
|
|
|
155
151
|
/**
|
|
156
|
-
*
|
|
152
|
+
* Proxy_json Contract Class
|
|
157
153
|
*
|
|
158
154
|
* Provides a class-based API similar to TypeChain for interacting with the contract.
|
|
159
155
|
*
|
|
@@ -161,12 +157,12 @@ export type AdminUpgradeabilityProxy_jsonContract = any;
|
|
|
161
157
|
* ```typescript
|
|
162
158
|
* import { createPublicClient, createWalletClient, http } from 'viem';
|
|
163
159
|
* import { mainnet } from 'viem/chains';
|
|
164
|
-
* import {
|
|
160
|
+
* import { Proxy_json } from 'Proxy_json';
|
|
165
161
|
*
|
|
166
162
|
* const publicClient = createPublicClient({ chain: mainnet, transport: http() });
|
|
167
163
|
* const walletClient = createWalletClient({ chain: mainnet, transport: http() });
|
|
168
164
|
*
|
|
169
|
-
* const contract = new
|
|
165
|
+
* const contract = new Proxy_json('0x...', { publicClient, walletClient });
|
|
170
166
|
*
|
|
171
167
|
* // Read functions
|
|
172
168
|
* const result = await contract.balanceOf('0x...');
|
|
@@ -184,8 +180,8 @@ export type AdminUpgradeabilityProxy_jsonContract = any;
|
|
|
184
180
|
* });
|
|
185
181
|
* ```
|
|
186
182
|
*/
|
|
187
|
-
export class
|
|
188
|
-
private contract:
|
|
183
|
+
export class Proxy_json {
|
|
184
|
+
private contract: Proxy_jsonContract;
|
|
189
185
|
private contractAddress: Address;
|
|
190
186
|
private publicClient: PublicClient;
|
|
191
187
|
|
|
@@ -200,7 +196,7 @@ export class AdminUpgradeabilityProxy_json {
|
|
|
200
196
|
this.publicClient = clients.publicClient;
|
|
201
197
|
this.contract = getContract({
|
|
202
198
|
address,
|
|
203
|
-
abi:
|
|
199
|
+
abi: Proxy_jsonAbi,
|
|
204
200
|
client: {
|
|
205
201
|
public: clients.publicClient,
|
|
206
202
|
wallet: clients.walletClient,
|
|
@@ -218,7 +214,7 @@ export class AdminUpgradeabilityProxy_json {
|
|
|
218
214
|
/**
|
|
219
215
|
* Get the underlying viem contract instance
|
|
220
216
|
*/
|
|
221
|
-
getContract():
|
|
217
|
+
getContract(): Proxy_jsonContract {
|
|
222
218
|
return this.contract;
|
|
223
219
|
}
|
|
224
220
|
|
|
@@ -252,7 +248,7 @@ export class AdminUpgradeabilityProxy_json {
|
|
|
252
248
|
* nonpayable
|
|
253
249
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
254
250
|
*/
|
|
255
|
-
async changeAdmin(
|
|
251
|
+
async changeAdmin(_admin: `0x${string}`, options?: {
|
|
256
252
|
accessList?: import('viem').AccessList;
|
|
257
253
|
authorizationList?: import('viem').AuthorizationList;
|
|
258
254
|
chain?: import('viem').Chain | null;
|
|
@@ -267,7 +263,7 @@ export class AdminUpgradeabilityProxy_json {
|
|
|
267
263
|
if (!this.contract.write) {
|
|
268
264
|
throw new Error('Wallet client is required for write operations');
|
|
269
265
|
}
|
|
270
|
-
return this.contract.write.changeAdmin([
|
|
266
|
+
return this.contract.write.changeAdmin([_admin] as const, options) as Promise<`0x${string}`>;
|
|
271
267
|
}
|
|
272
268
|
|
|
273
269
|
/**
|
|
@@ -298,7 +294,7 @@ export class AdminUpgradeabilityProxy_json {
|
|
|
298
294
|
* nonpayable
|
|
299
295
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
300
296
|
*/
|
|
301
|
-
async upgradeTo(
|
|
297
|
+
async upgradeTo(_implementation: `0x${string}`, options?: {
|
|
302
298
|
accessList?: import('viem').AccessList;
|
|
303
299
|
authorizationList?: import('viem').AuthorizationList;
|
|
304
300
|
chain?: import('viem').Chain | null;
|
|
@@ -313,7 +309,7 @@ export class AdminUpgradeabilityProxy_json {
|
|
|
313
309
|
if (!this.contract.write) {
|
|
314
310
|
throw new Error('Wallet client is required for write operations');
|
|
315
311
|
}
|
|
316
|
-
return this.contract.write.upgradeTo([
|
|
312
|
+
return this.contract.write.upgradeTo([_implementation] as const, options) as Promise<`0x${string}`>;
|
|
317
313
|
}
|
|
318
314
|
|
|
319
315
|
/**
|
|
@@ -321,7 +317,7 @@ export class AdminUpgradeabilityProxy_json {
|
|
|
321
317
|
* payable
|
|
322
318
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
323
319
|
*/
|
|
324
|
-
async upgradeToAndCall(
|
|
320
|
+
async upgradeToAndCall(_implementation: `0x${string}`, _data: `0x${string}`, options?: {
|
|
325
321
|
accessList?: import('viem').AccessList;
|
|
326
322
|
authorizationList?: import('viem').AuthorizationList;
|
|
327
323
|
chain?: import('viem').Chain | null;
|
|
@@ -336,7 +332,7 @@ export class AdminUpgradeabilityProxy_json {
|
|
|
336
332
|
if (!this.contract.write) {
|
|
337
333
|
throw new Error('Wallet client is required for write operations');
|
|
338
334
|
}
|
|
339
|
-
return this.contract.write.upgradeToAndCall([
|
|
335
|
+
return this.contract.write.upgradeToAndCall([_implementation, _data] as const, options) as Promise<`0x${string}`>;
|
|
340
336
|
}
|
|
341
337
|
|
|
342
338
|
|
|
@@ -379,7 +375,7 @@ export class AdminUpgradeabilityProxy_json {
|
|
|
379
375
|
* Returns gas estimate and result without sending transaction
|
|
380
376
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
381
377
|
*/
|
|
382
|
-
async changeAdmin(
|
|
378
|
+
async changeAdmin(_admin: `0x${string}`, options?: {
|
|
383
379
|
accessList?: import('viem').AccessList;
|
|
384
380
|
authorizationList?: import('viem').AuthorizationList;
|
|
385
381
|
chain?: import('viem').Chain | null;
|
|
@@ -391,7 +387,7 @@ export class AdminUpgradeabilityProxy_json {
|
|
|
391
387
|
nonce?: number;
|
|
392
388
|
value?: bigint;
|
|
393
389
|
}): Promise<void> {
|
|
394
|
-
return contract.simulate.changeAdmin([
|
|
390
|
+
return contract.simulate.changeAdmin([_admin] as const, options) as Promise<void>;
|
|
395
391
|
},
|
|
396
392
|
/**
|
|
397
393
|
* Simulate implementation
|
|
@@ -417,7 +413,7 @@ export class AdminUpgradeabilityProxy_json {
|
|
|
417
413
|
* Returns gas estimate and result without sending transaction
|
|
418
414
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
419
415
|
*/
|
|
420
|
-
async upgradeTo(
|
|
416
|
+
async upgradeTo(_implementation: `0x${string}`, options?: {
|
|
421
417
|
accessList?: import('viem').AccessList;
|
|
422
418
|
authorizationList?: import('viem').AuthorizationList;
|
|
423
419
|
chain?: import('viem').Chain | null;
|
|
@@ -429,14 +425,14 @@ export class AdminUpgradeabilityProxy_json {
|
|
|
429
425
|
nonce?: number;
|
|
430
426
|
value?: bigint;
|
|
431
427
|
}): Promise<void> {
|
|
432
|
-
return contract.simulate.upgradeTo([
|
|
428
|
+
return contract.simulate.upgradeTo([_implementation] as const, options) as Promise<void>;
|
|
433
429
|
},
|
|
434
430
|
/**
|
|
435
431
|
* Simulate upgradeToAndCall
|
|
436
432
|
* Returns gas estimate and result without sending transaction
|
|
437
433
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
438
434
|
*/
|
|
439
|
-
async upgradeToAndCall(
|
|
435
|
+
async upgradeToAndCall(_implementation: `0x${string}`, _data: `0x${string}`, options?: {
|
|
440
436
|
accessList?: import('viem').AccessList;
|
|
441
437
|
authorizationList?: import('viem').AuthorizationList;
|
|
442
438
|
chain?: import('viem').Chain | null;
|
|
@@ -447,8 +443,8 @@ export class AdminUpgradeabilityProxy_json {
|
|
|
447
443
|
maxPriorityFeePerGas?: bigint;
|
|
448
444
|
nonce?: number;
|
|
449
445
|
value?: bigint;
|
|
450
|
-
}): Promise
|
|
451
|
-
return contract.simulate.upgradeToAndCall([
|
|
446
|
+
}): Promise<`0x${string}`> {
|
|
447
|
+
return contract.simulate.upgradeToAndCall([_implementation, _data] as const, options) as Promise<`0x${string}`>;
|
|
452
448
|
}
|
|
453
449
|
};
|
|
454
450
|
}
|
|
@@ -476,7 +472,7 @@ export class AdminUpgradeabilityProxy_json {
|
|
|
476
472
|
AdminChanged: (callback: (event: { previousAdmin: `0x${string}`; newAdmin: `0x${string}` }) => void) => {
|
|
477
473
|
return this.publicClient.watchContractEvent({
|
|
478
474
|
address: this.contractAddress,
|
|
479
|
-
abi:
|
|
475
|
+
abi: Proxy_jsonAbi,
|
|
480
476
|
eventName: 'AdminChanged',
|
|
481
477
|
|
|
482
478
|
onLogs: (logs: any[]) => {
|
|
@@ -495,7 +491,7 @@ export class AdminUpgradeabilityProxy_json {
|
|
|
495
491
|
Upgraded: (callback: (event: { implementation: `0x${string}` }) => void, filter?: { implementation: `0x${string}` }) => {
|
|
496
492
|
return this.publicClient.watchContractEvent({
|
|
497
493
|
address: this.contractAddress,
|
|
498
|
-
abi:
|
|
494
|
+
abi: Proxy_jsonAbi,
|
|
499
495
|
eventName: 'Upgraded',
|
|
500
496
|
args: filter,
|
|
501
497
|
onLogs: (logs: any[]) => {
|
package/contracts/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export type {
|
|
3
|
-
export {
|
|
4
|
-
export type {
|
|
1
|
+
export { Proxy_jsonAbi, Proxy_json } from './Proxy_json';
|
|
2
|
+
export type { Proxy_jsonAbi as Proxy_jsonAbiType, Proxy_jsonContract } from './Proxy_json';
|
|
3
|
+
export { DelayedWETH_jsonAbi, DelayedWETH_json } from './DelayedWETH_json';
|
|
4
|
+
export type { DelayedWETH_jsonAbi as DelayedWETH_jsonAbiType, DelayedWETH_jsonContract } from './DelayedWETH_json';
|