@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
|
@@ -2,33 +2,195 @@ import type { Abi, Address, PublicClient, WalletClient, GetContractReturnType }
|
|
|
2
2
|
import { getContract } from 'viem';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
5
|
+
* DelayedWETH_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 DelayedWETH_jsonAbi = [
|
|
10
|
+
{
|
|
11
|
+
"inputs": [
|
|
12
|
+
{
|
|
13
|
+
"internalType": "uint256",
|
|
14
|
+
"name": "_delay",
|
|
15
|
+
"type": "uint256"
|
|
16
|
+
}
|
|
17
|
+
],
|
|
18
|
+
"stateMutability": "nonpayable",
|
|
19
|
+
"type": "constructor"
|
|
20
|
+
},
|
|
10
21
|
{
|
|
11
|
-
"constant": true,
|
|
12
22
|
"inputs": [],
|
|
13
|
-
"name": "
|
|
23
|
+
"name": "ProxyAdminOwnedBase_NotProxyAdmin",
|
|
24
|
+
"type": "error"
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"inputs": [],
|
|
28
|
+
"name": "ProxyAdminOwnedBase_NotProxyAdminOrProxyAdminOwner",
|
|
29
|
+
"type": "error"
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"inputs": [],
|
|
33
|
+
"name": "ProxyAdminOwnedBase_NotProxyAdminOwner",
|
|
34
|
+
"type": "error"
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"inputs": [],
|
|
38
|
+
"name": "ProxyAdminOwnedBase_NotResolvedDelegateProxy",
|
|
39
|
+
"type": "error"
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
"inputs": [],
|
|
43
|
+
"name": "ProxyAdminOwnedBase_NotSharedProxyAdminOwner",
|
|
44
|
+
"type": "error"
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
"inputs": [],
|
|
48
|
+
"name": "ProxyAdminOwnedBase_ProxyAdminNotFound",
|
|
49
|
+
"type": "error"
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
"inputs": [],
|
|
53
|
+
"name": "ReinitializableBase_ZeroInitVersion",
|
|
54
|
+
"type": "error"
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"anonymous": false,
|
|
58
|
+
"inputs": [
|
|
59
|
+
{
|
|
60
|
+
"indexed": true,
|
|
61
|
+
"internalType": "address",
|
|
62
|
+
"name": "src",
|
|
63
|
+
"type": "address"
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
"indexed": true,
|
|
67
|
+
"internalType": "address",
|
|
68
|
+
"name": "guy",
|
|
69
|
+
"type": "address"
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
"indexed": false,
|
|
73
|
+
"internalType": "uint256",
|
|
74
|
+
"name": "wad",
|
|
75
|
+
"type": "uint256"
|
|
76
|
+
}
|
|
77
|
+
],
|
|
78
|
+
"name": "Approval",
|
|
79
|
+
"type": "event"
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
"anonymous": false,
|
|
83
|
+
"inputs": [
|
|
84
|
+
{
|
|
85
|
+
"indexed": true,
|
|
86
|
+
"internalType": "address",
|
|
87
|
+
"name": "dst",
|
|
88
|
+
"type": "address"
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
"indexed": false,
|
|
92
|
+
"internalType": "uint256",
|
|
93
|
+
"name": "wad",
|
|
94
|
+
"type": "uint256"
|
|
95
|
+
}
|
|
96
|
+
],
|
|
97
|
+
"name": "Deposit",
|
|
98
|
+
"type": "event"
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
"anonymous": false,
|
|
102
|
+
"inputs": [
|
|
103
|
+
{
|
|
104
|
+
"indexed": false,
|
|
105
|
+
"internalType": "uint8",
|
|
106
|
+
"name": "version",
|
|
107
|
+
"type": "uint8"
|
|
108
|
+
}
|
|
109
|
+
],
|
|
110
|
+
"name": "Initialized",
|
|
111
|
+
"type": "event"
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
"anonymous": false,
|
|
115
|
+
"inputs": [
|
|
116
|
+
{
|
|
117
|
+
"indexed": true,
|
|
118
|
+
"internalType": "address",
|
|
119
|
+
"name": "src",
|
|
120
|
+
"type": "address"
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
"indexed": true,
|
|
124
|
+
"internalType": "address",
|
|
125
|
+
"name": "dst",
|
|
126
|
+
"type": "address"
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
"indexed": false,
|
|
130
|
+
"internalType": "uint256",
|
|
131
|
+
"name": "wad",
|
|
132
|
+
"type": "uint256"
|
|
133
|
+
}
|
|
134
|
+
],
|
|
135
|
+
"name": "Transfer",
|
|
136
|
+
"type": "event"
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
"anonymous": false,
|
|
140
|
+
"inputs": [
|
|
141
|
+
{
|
|
142
|
+
"indexed": true,
|
|
143
|
+
"internalType": "address",
|
|
144
|
+
"name": "src",
|
|
145
|
+
"type": "address"
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
"indexed": false,
|
|
149
|
+
"internalType": "uint256",
|
|
150
|
+
"name": "wad",
|
|
151
|
+
"type": "uint256"
|
|
152
|
+
}
|
|
153
|
+
],
|
|
154
|
+
"name": "Withdrawal",
|
|
155
|
+
"type": "event"
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
"stateMutability": "payable",
|
|
159
|
+
"type": "fallback"
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
"inputs": [
|
|
163
|
+
{
|
|
164
|
+
"internalType": "address",
|
|
165
|
+
"name": "owner",
|
|
166
|
+
"type": "address"
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
"internalType": "address",
|
|
170
|
+
"name": "spender",
|
|
171
|
+
"type": "address"
|
|
172
|
+
}
|
|
173
|
+
],
|
|
174
|
+
"name": "allowance",
|
|
14
175
|
"outputs": [
|
|
15
176
|
{
|
|
177
|
+
"internalType": "uint256",
|
|
16
178
|
"name": "",
|
|
17
|
-
"type": "
|
|
179
|
+
"type": "uint256"
|
|
18
180
|
}
|
|
19
181
|
],
|
|
20
|
-
"payable": false,
|
|
21
182
|
"stateMutability": "view",
|
|
22
183
|
"type": "function"
|
|
23
184
|
},
|
|
24
185
|
{
|
|
25
|
-
"constant": false,
|
|
26
186
|
"inputs": [
|
|
27
187
|
{
|
|
188
|
+
"internalType": "address",
|
|
28
189
|
"name": "guy",
|
|
29
190
|
"type": "address"
|
|
30
191
|
},
|
|
31
192
|
{
|
|
193
|
+
"internalType": "uint256",
|
|
32
194
|
"name": "wad",
|
|
33
195
|
"type": "uint256"
|
|
34
196
|
}
|
|
@@ -36,270 +198,391 @@ export const WETH9_jsonAbi = [
|
|
|
36
198
|
"name": "approve",
|
|
37
199
|
"outputs": [
|
|
38
200
|
{
|
|
201
|
+
"internalType": "bool",
|
|
39
202
|
"name": "",
|
|
40
203
|
"type": "bool"
|
|
41
204
|
}
|
|
42
205
|
],
|
|
43
|
-
"payable": false,
|
|
44
206
|
"stateMutability": "nonpayable",
|
|
45
207
|
"type": "function"
|
|
46
208
|
},
|
|
47
209
|
{
|
|
48
|
-
"
|
|
49
|
-
|
|
50
|
-
|
|
210
|
+
"inputs": [
|
|
211
|
+
{
|
|
212
|
+
"internalType": "address",
|
|
213
|
+
"name": "src",
|
|
214
|
+
"type": "address"
|
|
215
|
+
}
|
|
216
|
+
],
|
|
217
|
+
"name": "balanceOf",
|
|
51
218
|
"outputs": [
|
|
52
219
|
{
|
|
220
|
+
"internalType": "uint256",
|
|
53
221
|
"name": "",
|
|
54
222
|
"type": "uint256"
|
|
55
223
|
}
|
|
56
224
|
],
|
|
57
|
-
"payable": false,
|
|
58
225
|
"stateMutability": "view",
|
|
59
226
|
"type": "function"
|
|
60
227
|
},
|
|
61
228
|
{
|
|
62
|
-
"
|
|
63
|
-
"
|
|
64
|
-
|
|
65
|
-
"name": "src",
|
|
66
|
-
"type": "address"
|
|
67
|
-
},
|
|
229
|
+
"inputs": [],
|
|
230
|
+
"name": "config",
|
|
231
|
+
"outputs": [
|
|
68
232
|
{
|
|
69
|
-
"
|
|
233
|
+
"internalType": "contract ISuperchainConfig",
|
|
234
|
+
"name": "",
|
|
70
235
|
"type": "address"
|
|
71
|
-
}
|
|
236
|
+
}
|
|
237
|
+
],
|
|
238
|
+
"stateMutability": "view",
|
|
239
|
+
"type": "function"
|
|
240
|
+
},
|
|
241
|
+
{
|
|
242
|
+
"inputs": [],
|
|
243
|
+
"name": "decimals",
|
|
244
|
+
"outputs": [
|
|
72
245
|
{
|
|
73
|
-
"
|
|
74
|
-
"
|
|
246
|
+
"internalType": "uint8",
|
|
247
|
+
"name": "",
|
|
248
|
+
"type": "uint8"
|
|
75
249
|
}
|
|
76
250
|
],
|
|
77
|
-
"
|
|
251
|
+
"stateMutability": "view",
|
|
252
|
+
"type": "function"
|
|
253
|
+
},
|
|
254
|
+
{
|
|
255
|
+
"inputs": [],
|
|
256
|
+
"name": "delay",
|
|
78
257
|
"outputs": [
|
|
79
258
|
{
|
|
259
|
+
"internalType": "uint256",
|
|
80
260
|
"name": "",
|
|
81
|
-
"type": "
|
|
261
|
+
"type": "uint256"
|
|
82
262
|
}
|
|
83
263
|
],
|
|
84
|
-
"
|
|
85
|
-
"
|
|
264
|
+
"stateMutability": "view",
|
|
265
|
+
"type": "function"
|
|
266
|
+
},
|
|
267
|
+
{
|
|
268
|
+
"inputs": [],
|
|
269
|
+
"name": "deposit",
|
|
270
|
+
"outputs": [],
|
|
271
|
+
"stateMutability": "payable",
|
|
86
272
|
"type": "function"
|
|
87
273
|
},
|
|
88
274
|
{
|
|
89
|
-
"constant": false,
|
|
90
275
|
"inputs": [
|
|
91
276
|
{
|
|
92
|
-
"
|
|
277
|
+
"internalType": "address",
|
|
278
|
+
"name": "_guy",
|
|
279
|
+
"type": "address"
|
|
280
|
+
},
|
|
281
|
+
{
|
|
282
|
+
"internalType": "uint256",
|
|
283
|
+
"name": "_wad",
|
|
93
284
|
"type": "uint256"
|
|
94
285
|
}
|
|
95
286
|
],
|
|
96
|
-
"name": "
|
|
287
|
+
"name": "hold",
|
|
288
|
+
"outputs": [],
|
|
289
|
+
"stateMutability": "nonpayable",
|
|
290
|
+
"type": "function"
|
|
291
|
+
},
|
|
292
|
+
{
|
|
293
|
+
"inputs": [
|
|
294
|
+
{
|
|
295
|
+
"internalType": "address",
|
|
296
|
+
"name": "_guy",
|
|
297
|
+
"type": "address"
|
|
298
|
+
}
|
|
299
|
+
],
|
|
300
|
+
"name": "hold",
|
|
97
301
|
"outputs": [],
|
|
98
|
-
"payable": false,
|
|
99
302
|
"stateMutability": "nonpayable",
|
|
100
303
|
"type": "function"
|
|
101
304
|
},
|
|
102
305
|
{
|
|
103
|
-
"constant": true,
|
|
104
306
|
"inputs": [],
|
|
105
|
-
"name": "
|
|
307
|
+
"name": "initVersion",
|
|
106
308
|
"outputs": [
|
|
107
309
|
{
|
|
310
|
+
"internalType": "uint8",
|
|
108
311
|
"name": "",
|
|
109
312
|
"type": "uint8"
|
|
110
313
|
}
|
|
111
314
|
],
|
|
112
|
-
"payable": false,
|
|
113
315
|
"stateMutability": "view",
|
|
114
316
|
"type": "function"
|
|
115
317
|
},
|
|
116
318
|
{
|
|
117
|
-
"constant": true,
|
|
118
319
|
"inputs": [
|
|
119
320
|
{
|
|
120
|
-
"
|
|
321
|
+
"internalType": "contract ISystemConfig",
|
|
322
|
+
"name": "_systemConfig",
|
|
121
323
|
"type": "address"
|
|
122
324
|
}
|
|
123
325
|
],
|
|
124
|
-
"name": "
|
|
326
|
+
"name": "initialize",
|
|
327
|
+
"outputs": [],
|
|
328
|
+
"stateMutability": "nonpayable",
|
|
329
|
+
"type": "function"
|
|
330
|
+
},
|
|
331
|
+
{
|
|
332
|
+
"inputs": [],
|
|
333
|
+
"name": "name",
|
|
125
334
|
"outputs": [
|
|
126
335
|
{
|
|
336
|
+
"internalType": "string",
|
|
127
337
|
"name": "",
|
|
128
|
-
"type": "
|
|
338
|
+
"type": "string"
|
|
129
339
|
}
|
|
130
340
|
],
|
|
131
|
-
"payable": false,
|
|
132
341
|
"stateMutability": "view",
|
|
133
342
|
"type": "function"
|
|
134
343
|
},
|
|
135
344
|
{
|
|
136
|
-
"constant": true,
|
|
137
345
|
"inputs": [],
|
|
138
|
-
"name": "
|
|
346
|
+
"name": "proxyAdmin",
|
|
139
347
|
"outputs": [
|
|
140
348
|
{
|
|
349
|
+
"internalType": "contract IProxyAdmin",
|
|
141
350
|
"name": "",
|
|
142
|
-
"type": "
|
|
351
|
+
"type": "address"
|
|
143
352
|
}
|
|
144
353
|
],
|
|
145
|
-
"payable": false,
|
|
146
354
|
"stateMutability": "view",
|
|
147
355
|
"type": "function"
|
|
148
356
|
},
|
|
149
357
|
{
|
|
150
|
-
"
|
|
151
|
-
"
|
|
358
|
+
"inputs": [],
|
|
359
|
+
"name": "proxyAdminOwner",
|
|
360
|
+
"outputs": [
|
|
152
361
|
{
|
|
153
|
-
"
|
|
362
|
+
"internalType": "address",
|
|
363
|
+
"name": "",
|
|
154
364
|
"type": "address"
|
|
155
|
-
}
|
|
365
|
+
}
|
|
366
|
+
],
|
|
367
|
+
"stateMutability": "view",
|
|
368
|
+
"type": "function"
|
|
369
|
+
},
|
|
370
|
+
{
|
|
371
|
+
"inputs": [
|
|
156
372
|
{
|
|
157
|
-
"
|
|
373
|
+
"internalType": "uint256",
|
|
374
|
+
"name": "_wad",
|
|
158
375
|
"type": "uint256"
|
|
159
376
|
}
|
|
160
377
|
],
|
|
161
|
-
"name": "
|
|
378
|
+
"name": "recover",
|
|
379
|
+
"outputs": [],
|
|
380
|
+
"stateMutability": "nonpayable",
|
|
381
|
+
"type": "function"
|
|
382
|
+
},
|
|
383
|
+
{
|
|
384
|
+
"inputs": [],
|
|
385
|
+
"name": "symbol",
|
|
162
386
|
"outputs": [
|
|
163
387
|
{
|
|
388
|
+
"internalType": "string",
|
|
164
389
|
"name": "",
|
|
165
|
-
"type": "
|
|
390
|
+
"type": "string"
|
|
166
391
|
}
|
|
167
392
|
],
|
|
168
|
-
"
|
|
169
|
-
"stateMutability": "nonpayable",
|
|
393
|
+
"stateMutability": "view",
|
|
170
394
|
"type": "function"
|
|
171
395
|
},
|
|
172
396
|
{
|
|
173
|
-
"constant": false,
|
|
174
397
|
"inputs": [],
|
|
175
|
-
"name": "
|
|
176
|
-
"outputs": [
|
|
177
|
-
|
|
178
|
-
|
|
398
|
+
"name": "systemConfig",
|
|
399
|
+
"outputs": [
|
|
400
|
+
{
|
|
401
|
+
"internalType": "contract ISystemConfig",
|
|
402
|
+
"name": "",
|
|
403
|
+
"type": "address"
|
|
404
|
+
}
|
|
405
|
+
],
|
|
406
|
+
"stateMutability": "view",
|
|
179
407
|
"type": "function"
|
|
180
408
|
},
|
|
181
409
|
{
|
|
182
|
-
"
|
|
183
|
-
"
|
|
410
|
+
"inputs": [],
|
|
411
|
+
"name": "totalSupply",
|
|
412
|
+
"outputs": [
|
|
184
413
|
{
|
|
414
|
+
"internalType": "uint256",
|
|
185
415
|
"name": "",
|
|
416
|
+
"type": "uint256"
|
|
417
|
+
}
|
|
418
|
+
],
|
|
419
|
+
"stateMutability": "view",
|
|
420
|
+
"type": "function"
|
|
421
|
+
},
|
|
422
|
+
{
|
|
423
|
+
"inputs": [
|
|
424
|
+
{
|
|
425
|
+
"internalType": "address",
|
|
426
|
+
"name": "dst",
|
|
186
427
|
"type": "address"
|
|
187
428
|
},
|
|
188
429
|
{
|
|
189
|
-
"
|
|
190
|
-
"
|
|
430
|
+
"internalType": "uint256",
|
|
431
|
+
"name": "wad",
|
|
432
|
+
"type": "uint256"
|
|
191
433
|
}
|
|
192
434
|
],
|
|
193
|
-
"name": "
|
|
435
|
+
"name": "transfer",
|
|
194
436
|
"outputs": [
|
|
195
437
|
{
|
|
438
|
+
"internalType": "bool",
|
|
196
439
|
"name": "",
|
|
197
|
-
"type": "
|
|
440
|
+
"type": "bool"
|
|
198
441
|
}
|
|
199
442
|
],
|
|
200
|
-
"
|
|
201
|
-
"stateMutability": "view",
|
|
443
|
+
"stateMutability": "nonpayable",
|
|
202
444
|
"type": "function"
|
|
203
445
|
},
|
|
204
446
|
{
|
|
205
|
-
"payable": true,
|
|
206
|
-
"stateMutability": "payable",
|
|
207
|
-
"type": "fallback"
|
|
208
|
-
},
|
|
209
|
-
{
|
|
210
|
-
"anonymous": false,
|
|
211
447
|
"inputs": [
|
|
212
448
|
{
|
|
213
|
-
"
|
|
449
|
+
"internalType": "address",
|
|
214
450
|
"name": "src",
|
|
215
451
|
"type": "address"
|
|
216
452
|
},
|
|
217
453
|
{
|
|
218
|
-
"
|
|
219
|
-
"name": "
|
|
454
|
+
"internalType": "address",
|
|
455
|
+
"name": "dst",
|
|
220
456
|
"type": "address"
|
|
221
457
|
},
|
|
222
458
|
{
|
|
223
|
-
"
|
|
459
|
+
"internalType": "uint256",
|
|
224
460
|
"name": "wad",
|
|
225
461
|
"type": "uint256"
|
|
226
462
|
}
|
|
227
463
|
],
|
|
228
|
-
"name": "
|
|
229
|
-
"
|
|
464
|
+
"name": "transferFrom",
|
|
465
|
+
"outputs": [
|
|
466
|
+
{
|
|
467
|
+
"internalType": "bool",
|
|
468
|
+
"name": "",
|
|
469
|
+
"type": "bool"
|
|
470
|
+
}
|
|
471
|
+
],
|
|
472
|
+
"stateMutability": "nonpayable",
|
|
473
|
+
"type": "function"
|
|
230
474
|
},
|
|
231
475
|
{
|
|
232
|
-
"anonymous": false,
|
|
233
476
|
"inputs": [
|
|
234
477
|
{
|
|
235
|
-
"
|
|
236
|
-
"name": "
|
|
478
|
+
"internalType": "address",
|
|
479
|
+
"name": "_guy",
|
|
237
480
|
"type": "address"
|
|
238
481
|
},
|
|
239
482
|
{
|
|
240
|
-
"
|
|
241
|
-
"name": "
|
|
242
|
-
"type": "
|
|
243
|
-
}
|
|
483
|
+
"internalType": "uint256",
|
|
484
|
+
"name": "_wad",
|
|
485
|
+
"type": "uint256"
|
|
486
|
+
}
|
|
487
|
+
],
|
|
488
|
+
"name": "unlock",
|
|
489
|
+
"outputs": [],
|
|
490
|
+
"stateMutability": "nonpayable",
|
|
491
|
+
"type": "function"
|
|
492
|
+
},
|
|
493
|
+
{
|
|
494
|
+
"inputs": [],
|
|
495
|
+
"name": "version",
|
|
496
|
+
"outputs": [
|
|
244
497
|
{
|
|
245
|
-
"
|
|
246
|
-
"name": "
|
|
498
|
+
"internalType": "string",
|
|
499
|
+
"name": "",
|
|
500
|
+
"type": "string"
|
|
501
|
+
}
|
|
502
|
+
],
|
|
503
|
+
"stateMutability": "view",
|
|
504
|
+
"type": "function"
|
|
505
|
+
},
|
|
506
|
+
{
|
|
507
|
+
"inputs": [
|
|
508
|
+
{
|
|
509
|
+
"internalType": "uint256",
|
|
510
|
+
"name": "_wad",
|
|
247
511
|
"type": "uint256"
|
|
248
512
|
}
|
|
249
513
|
],
|
|
250
|
-
"name": "
|
|
251
|
-
"
|
|
514
|
+
"name": "withdraw",
|
|
515
|
+
"outputs": [],
|
|
516
|
+
"stateMutability": "nonpayable",
|
|
517
|
+
"type": "function"
|
|
252
518
|
},
|
|
253
519
|
{
|
|
254
|
-
"anonymous": false,
|
|
255
520
|
"inputs": [
|
|
256
521
|
{
|
|
257
|
-
"
|
|
258
|
-
"name": "
|
|
522
|
+
"internalType": "address",
|
|
523
|
+
"name": "_guy",
|
|
259
524
|
"type": "address"
|
|
260
525
|
},
|
|
261
526
|
{
|
|
262
|
-
"
|
|
263
|
-
"name": "
|
|
527
|
+
"internalType": "uint256",
|
|
528
|
+
"name": "_wad",
|
|
264
529
|
"type": "uint256"
|
|
265
530
|
}
|
|
266
531
|
],
|
|
267
|
-
"name": "
|
|
268
|
-
"
|
|
532
|
+
"name": "withdraw",
|
|
533
|
+
"outputs": [],
|
|
534
|
+
"stateMutability": "nonpayable",
|
|
535
|
+
"type": "function"
|
|
269
536
|
},
|
|
270
537
|
{
|
|
271
|
-
"anonymous": false,
|
|
272
538
|
"inputs": [
|
|
273
539
|
{
|
|
274
|
-
"
|
|
275
|
-
"name": "
|
|
540
|
+
"internalType": "address",
|
|
541
|
+
"name": "",
|
|
542
|
+
"type": "address"
|
|
543
|
+
},
|
|
544
|
+
{
|
|
545
|
+
"internalType": "address",
|
|
546
|
+
"name": "",
|
|
276
547
|
"type": "address"
|
|
548
|
+
}
|
|
549
|
+
],
|
|
550
|
+
"name": "withdrawals",
|
|
551
|
+
"outputs": [
|
|
552
|
+
{
|
|
553
|
+
"internalType": "uint256",
|
|
554
|
+
"name": "amount",
|
|
555
|
+
"type": "uint256"
|
|
277
556
|
},
|
|
278
557
|
{
|
|
279
|
-
"
|
|
280
|
-
"name": "
|
|
558
|
+
"internalType": "uint256",
|
|
559
|
+
"name": "timestamp",
|
|
281
560
|
"type": "uint256"
|
|
282
561
|
}
|
|
283
562
|
],
|
|
284
|
-
"
|
|
285
|
-
"type": "
|
|
563
|
+
"stateMutability": "view",
|
|
564
|
+
"type": "function"
|
|
565
|
+
},
|
|
566
|
+
{
|
|
567
|
+
"stateMutability": "payable",
|
|
568
|
+
"type": "receive"
|
|
286
569
|
}
|
|
287
570
|
] as const satisfies Abi;
|
|
288
571
|
|
|
289
572
|
/**
|
|
290
|
-
* Type-safe ABI for
|
|
573
|
+
* Type-safe ABI for DelayedWETH_json
|
|
291
574
|
*/
|
|
292
|
-
export type
|
|
575
|
+
export type DelayedWETH_jsonAbi = typeof DelayedWETH_jsonAbi;
|
|
293
576
|
|
|
294
577
|
/**
|
|
295
|
-
* Contract instance type for
|
|
578
|
+
* Contract instance type for DelayedWETH_json
|
|
296
579
|
*/
|
|
297
580
|
// Use any for contract type to avoid complex viem type issues
|
|
298
581
|
// The runtime behavior is type-safe through viem's ABI typing
|
|
299
|
-
export type
|
|
582
|
+
export type DelayedWETH_jsonContract = any;
|
|
300
583
|
|
|
301
584
|
/**
|
|
302
|
-
*
|
|
585
|
+
* DelayedWETH_json Contract Class
|
|
303
586
|
*
|
|
304
587
|
* Provides a class-based API similar to TypeChain for interacting with the contract.
|
|
305
588
|
*
|
|
@@ -307,12 +590,12 @@ export type WETH9_jsonContract = any;
|
|
|
307
590
|
* ```typescript
|
|
308
591
|
* import { createPublicClient, createWalletClient, http } from 'viem';
|
|
309
592
|
* import { mainnet } from 'viem/chains';
|
|
310
|
-
* import {
|
|
593
|
+
* import { DelayedWETH_json } from 'DelayedWETH_json';
|
|
311
594
|
*
|
|
312
595
|
* const publicClient = createPublicClient({ chain: mainnet, transport: http() });
|
|
313
596
|
* const walletClient = createWalletClient({ chain: mainnet, transport: http() });
|
|
314
597
|
*
|
|
315
|
-
* const contract = new
|
|
598
|
+
* const contract = new DelayedWETH_json('0x...', { publicClient, walletClient });
|
|
316
599
|
*
|
|
317
600
|
* // Read functions
|
|
318
601
|
* const result = await contract.balanceOf('0x...');
|
|
@@ -330,8 +613,8 @@ export type WETH9_jsonContract = any;
|
|
|
330
613
|
* });
|
|
331
614
|
* ```
|
|
332
615
|
*/
|
|
333
|
-
export class
|
|
334
|
-
private contract:
|
|
616
|
+
export class DelayedWETH_json {
|
|
617
|
+
private contract: DelayedWETH_jsonContract;
|
|
335
618
|
private contractAddress: Address;
|
|
336
619
|
private publicClient: PublicClient;
|
|
337
620
|
|
|
@@ -346,7 +629,7 @@ export class WETH9_json {
|
|
|
346
629
|
this.publicClient = clients.publicClient;
|
|
347
630
|
this.contract = getContract({
|
|
348
631
|
address,
|
|
349
|
-
abi:
|
|
632
|
+
abi: DelayedWETH_jsonAbi,
|
|
350
633
|
client: {
|
|
351
634
|
public: clients.publicClient,
|
|
352
635
|
wallet: clients.walletClient,
|
|
@@ -364,24 +647,32 @@ export class WETH9_json {
|
|
|
364
647
|
/**
|
|
365
648
|
* Get the underlying viem contract instance
|
|
366
649
|
*/
|
|
367
|
-
getContract():
|
|
650
|
+
getContract(): DelayedWETH_jsonContract {
|
|
368
651
|
return this.contract;
|
|
369
652
|
}
|
|
370
653
|
|
|
371
654
|
/**
|
|
372
|
-
*
|
|
655
|
+
* allowance
|
|
373
656
|
* view
|
|
374
657
|
*/
|
|
375
|
-
async
|
|
376
|
-
return this.contract.read.
|
|
658
|
+
async allowance(owner: `0x${string}`, spender: `0x${string}`): Promise<bigint> {
|
|
659
|
+
return this.contract.read.allowance([owner, spender] as const) as Promise<bigint>;
|
|
377
660
|
}
|
|
378
661
|
|
|
379
662
|
/**
|
|
380
|
-
*
|
|
663
|
+
* balanceOf
|
|
381
664
|
* view
|
|
382
665
|
*/
|
|
383
|
-
async
|
|
384
|
-
return this.contract.read.
|
|
666
|
+
async balanceOf(src: `0x${string}`): Promise<bigint> {
|
|
667
|
+
return this.contract.read.balanceOf([src] as const) as Promise<bigint>;
|
|
668
|
+
}
|
|
669
|
+
|
|
670
|
+
/**
|
|
671
|
+
* config
|
|
672
|
+
* view
|
|
673
|
+
*/
|
|
674
|
+
async config(): Promise<`0x${string}`> {
|
|
675
|
+
return this.contract.read.config() as Promise<`0x${string}`>;
|
|
385
676
|
}
|
|
386
677
|
|
|
387
678
|
/**
|
|
@@ -393,11 +684,43 @@ export class WETH9_json {
|
|
|
393
684
|
}
|
|
394
685
|
|
|
395
686
|
/**
|
|
396
|
-
*
|
|
687
|
+
* delay
|
|
688
|
+
* view
|
|
689
|
+
*/
|
|
690
|
+
async delay(): Promise<bigint> {
|
|
691
|
+
return this.contract.read.delay() as Promise<bigint>;
|
|
692
|
+
}
|
|
693
|
+
|
|
694
|
+
/**
|
|
695
|
+
* initVersion
|
|
696
|
+
* view
|
|
697
|
+
*/
|
|
698
|
+
async initVersion(): Promise<bigint> {
|
|
699
|
+
return this.contract.read.initVersion() as Promise<bigint>;
|
|
700
|
+
}
|
|
701
|
+
|
|
702
|
+
/**
|
|
703
|
+
* name
|
|
704
|
+
* view
|
|
705
|
+
*/
|
|
706
|
+
async name(): Promise<string> {
|
|
707
|
+
return this.contract.read.name() as Promise<string>;
|
|
708
|
+
}
|
|
709
|
+
|
|
710
|
+
/**
|
|
711
|
+
* proxyAdmin
|
|
712
|
+
* view
|
|
713
|
+
*/
|
|
714
|
+
async proxyAdmin(): Promise<`0x${string}`> {
|
|
715
|
+
return this.contract.read.proxyAdmin() as Promise<`0x${string}`>;
|
|
716
|
+
}
|
|
717
|
+
|
|
718
|
+
/**
|
|
719
|
+
* proxyAdminOwner
|
|
397
720
|
* view
|
|
398
721
|
*/
|
|
399
|
-
async
|
|
400
|
-
return this.contract.read.
|
|
722
|
+
async proxyAdminOwner(): Promise<`0x${string}`> {
|
|
723
|
+
return this.contract.read.proxyAdminOwner() as Promise<`0x${string}`>;
|
|
401
724
|
}
|
|
402
725
|
|
|
403
726
|
/**
|
|
@@ -409,11 +732,35 @@ export class WETH9_json {
|
|
|
409
732
|
}
|
|
410
733
|
|
|
411
734
|
/**
|
|
412
|
-
*
|
|
735
|
+
* systemConfig
|
|
736
|
+
* view
|
|
737
|
+
*/
|
|
738
|
+
async systemConfig(): Promise<`0x${string}`> {
|
|
739
|
+
return this.contract.read.systemConfig() as Promise<`0x${string}`>;
|
|
740
|
+
}
|
|
741
|
+
|
|
742
|
+
/**
|
|
743
|
+
* totalSupply
|
|
744
|
+
* view
|
|
745
|
+
*/
|
|
746
|
+
async totalSupply(): Promise<bigint> {
|
|
747
|
+
return this.contract.read.totalSupply() as Promise<bigint>;
|
|
748
|
+
}
|
|
749
|
+
|
|
750
|
+
/**
|
|
751
|
+
* version
|
|
752
|
+
* view
|
|
753
|
+
*/
|
|
754
|
+
async version(): Promise<string> {
|
|
755
|
+
return this.contract.read.version() as Promise<string>;
|
|
756
|
+
}
|
|
757
|
+
|
|
758
|
+
/**
|
|
759
|
+
* withdrawals
|
|
413
760
|
* view
|
|
414
761
|
*/
|
|
415
|
-
async
|
|
416
|
-
return this.contract.read.
|
|
762
|
+
async withdrawals(arg0: `0x${string}`, arg1: `0x${string}`): Promise<[bigint, bigint]> {
|
|
763
|
+
return this.contract.read.withdrawals([arg0, arg1] as const) as Promise<[bigint, bigint]>;
|
|
417
764
|
}
|
|
418
765
|
|
|
419
766
|
/**
|
|
@@ -440,11 +787,65 @@ export class WETH9_json {
|
|
|
440
787
|
}
|
|
441
788
|
|
|
442
789
|
/**
|
|
443
|
-
*
|
|
790
|
+
* deposit
|
|
791
|
+
* payable
|
|
792
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
793
|
+
*/
|
|
794
|
+
async deposit(options?: {
|
|
795
|
+
accessList?: import('viem').AccessList;
|
|
796
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
797
|
+
chain?: import('viem').Chain | null;
|
|
798
|
+
dataSuffix?: `0x${string}`;
|
|
799
|
+
gas?: bigint;
|
|
800
|
+
gasPrice?: bigint;
|
|
801
|
+
maxFeePerGas?: bigint;
|
|
802
|
+
maxPriorityFeePerGas?: bigint;
|
|
803
|
+
nonce?: number;
|
|
804
|
+
value?: bigint;
|
|
805
|
+
}): Promise<`0x${string}`> {
|
|
806
|
+
if (!this.contract.write) {
|
|
807
|
+
throw new Error('Wallet client is required for write operations');
|
|
808
|
+
}
|
|
809
|
+
return this.contract.write.deposit(options) as Promise<`0x${string}`>;
|
|
810
|
+
}
|
|
811
|
+
|
|
812
|
+
async hold(_guy: `0x${string}`, _wad: bigint, options?: {
|
|
813
|
+
accessList?: import('viem').AccessList;
|
|
814
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
815
|
+
chain?: import('viem').Chain | null;
|
|
816
|
+
dataSuffix?: `0x${string}`;
|
|
817
|
+
gas?: bigint;
|
|
818
|
+
gasPrice?: bigint;
|
|
819
|
+
maxFeePerGas?: bigint;
|
|
820
|
+
maxPriorityFeePerGas?: bigint;
|
|
821
|
+
nonce?: number;
|
|
822
|
+
value?: bigint;
|
|
823
|
+
}): Promise<`0x${string}`>;
|
|
824
|
+
async hold(_guy: `0x${string}`, options?: {
|
|
825
|
+
accessList?: import('viem').AccessList;
|
|
826
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
827
|
+
chain?: import('viem').Chain | null;
|
|
828
|
+
dataSuffix?: `0x${string}`;
|
|
829
|
+
gas?: bigint;
|
|
830
|
+
gasPrice?: bigint;
|
|
831
|
+
maxFeePerGas?: bigint;
|
|
832
|
+
maxPriorityFeePerGas?: bigint;
|
|
833
|
+
nonce?: number;
|
|
834
|
+
value?: bigint;
|
|
835
|
+
}): Promise<`0x${string}`>;
|
|
836
|
+
async hold(...args: any[]): Promise<`0x${string}`> {
|
|
837
|
+
if (!this.contract.write) {
|
|
838
|
+
throw new Error('Wallet client is required for write operations');
|
|
839
|
+
}
|
|
840
|
+
return this.contract.write.hold(args as any) as Promise<`0x${string}`>;
|
|
841
|
+
}
|
|
842
|
+
|
|
843
|
+
/**
|
|
844
|
+
* initialize
|
|
444
845
|
* nonpayable
|
|
445
846
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
446
847
|
*/
|
|
447
|
-
async
|
|
848
|
+
async initialize(_systemConfig: `0x${string}`, options?: {
|
|
448
849
|
accessList?: import('viem').AccessList;
|
|
449
850
|
authorizationList?: import('viem').AuthorizationList;
|
|
450
851
|
chain?: import('viem').Chain | null;
|
|
@@ -459,15 +860,15 @@ export class WETH9_json {
|
|
|
459
860
|
if (!this.contract.write) {
|
|
460
861
|
throw new Error('Wallet client is required for write operations');
|
|
461
862
|
}
|
|
462
|
-
return this.contract.write.
|
|
863
|
+
return this.contract.write.initialize([_systemConfig] as const, options) as Promise<`0x${string}`>;
|
|
463
864
|
}
|
|
464
865
|
|
|
465
866
|
/**
|
|
466
|
-
*
|
|
867
|
+
* recover
|
|
467
868
|
* nonpayable
|
|
468
869
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
469
870
|
*/
|
|
470
|
-
async
|
|
871
|
+
async recover(_wad: bigint, options?: {
|
|
471
872
|
accessList?: import('viem').AccessList;
|
|
472
873
|
authorizationList?: import('viem').AuthorizationList;
|
|
473
874
|
chain?: import('viem').Chain | null;
|
|
@@ -482,7 +883,7 @@ export class WETH9_json {
|
|
|
482
883
|
if (!this.contract.write) {
|
|
483
884
|
throw new Error('Wallet client is required for write operations');
|
|
484
885
|
}
|
|
485
|
-
return this.contract.write.
|
|
886
|
+
return this.contract.write.recover([_wad] as const, options) as Promise<`0x${string}`>;
|
|
486
887
|
}
|
|
487
888
|
|
|
488
889
|
/**
|
|
@@ -509,11 +910,11 @@ export class WETH9_json {
|
|
|
509
910
|
}
|
|
510
911
|
|
|
511
912
|
/**
|
|
512
|
-
*
|
|
513
|
-
*
|
|
913
|
+
* transferFrom
|
|
914
|
+
* nonpayable
|
|
514
915
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
515
916
|
*/
|
|
516
|
-
async
|
|
917
|
+
async transferFrom(src: `0x${string}`, dst: `0x${string}`, wad: bigint, options?: {
|
|
517
918
|
accessList?: import('viem').AccessList;
|
|
518
919
|
authorizationList?: import('viem').AuthorizationList;
|
|
519
920
|
chain?: import('viem').Chain | null;
|
|
@@ -528,7 +929,61 @@ export class WETH9_json {
|
|
|
528
929
|
if (!this.contract.write) {
|
|
529
930
|
throw new Error('Wallet client is required for write operations');
|
|
530
931
|
}
|
|
531
|
-
return this.contract.write.
|
|
932
|
+
return this.contract.write.transferFrom([src, dst, wad] as const, options) as Promise<`0x${string}`>;
|
|
933
|
+
}
|
|
934
|
+
|
|
935
|
+
/**
|
|
936
|
+
* unlock
|
|
937
|
+
* nonpayable
|
|
938
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
939
|
+
*/
|
|
940
|
+
async unlock(_guy: `0x${string}`, _wad: bigint, options?: {
|
|
941
|
+
accessList?: import('viem').AccessList;
|
|
942
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
943
|
+
chain?: import('viem').Chain | null;
|
|
944
|
+
dataSuffix?: `0x${string}`;
|
|
945
|
+
gas?: bigint;
|
|
946
|
+
gasPrice?: bigint;
|
|
947
|
+
maxFeePerGas?: bigint;
|
|
948
|
+
maxPriorityFeePerGas?: bigint;
|
|
949
|
+
nonce?: number;
|
|
950
|
+
value?: bigint;
|
|
951
|
+
}): Promise<`0x${string}`> {
|
|
952
|
+
if (!this.contract.write) {
|
|
953
|
+
throw new Error('Wallet client is required for write operations');
|
|
954
|
+
}
|
|
955
|
+
return this.contract.write.unlock([_guy, _wad] as const, options) as Promise<`0x${string}`>;
|
|
956
|
+
}
|
|
957
|
+
|
|
958
|
+
async withdraw(_wad: bigint, options?: {
|
|
959
|
+
accessList?: import('viem').AccessList;
|
|
960
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
961
|
+
chain?: import('viem').Chain | null;
|
|
962
|
+
dataSuffix?: `0x${string}`;
|
|
963
|
+
gas?: bigint;
|
|
964
|
+
gasPrice?: bigint;
|
|
965
|
+
maxFeePerGas?: bigint;
|
|
966
|
+
maxPriorityFeePerGas?: bigint;
|
|
967
|
+
nonce?: number;
|
|
968
|
+
value?: bigint;
|
|
969
|
+
}): Promise<`0x${string}`>;
|
|
970
|
+
async withdraw(_guy: `0x${string}`, _wad: bigint, options?: {
|
|
971
|
+
accessList?: import('viem').AccessList;
|
|
972
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
973
|
+
chain?: import('viem').Chain | null;
|
|
974
|
+
dataSuffix?: `0x${string}`;
|
|
975
|
+
gas?: bigint;
|
|
976
|
+
gasPrice?: bigint;
|
|
977
|
+
maxFeePerGas?: bigint;
|
|
978
|
+
maxPriorityFeePerGas?: bigint;
|
|
979
|
+
nonce?: number;
|
|
980
|
+
value?: bigint;
|
|
981
|
+
}): Promise<`0x${string}`>;
|
|
982
|
+
async withdraw(...args: any[]): Promise<`0x${string}`> {
|
|
983
|
+
if (!this.contract.write) {
|
|
984
|
+
throw new Error('Wallet client is required for write operations');
|
|
985
|
+
}
|
|
986
|
+
return this.contract.write.withdraw(args as any) as Promise<`0x${string}`>;
|
|
532
987
|
}
|
|
533
988
|
|
|
534
989
|
|
|
@@ -567,11 +1022,11 @@ export class WETH9_json {
|
|
|
567
1022
|
return contract.simulate.approve([guy, wad] as const, options) as Promise<boolean>;
|
|
568
1023
|
},
|
|
569
1024
|
/**
|
|
570
|
-
* Simulate
|
|
1025
|
+
* Simulate deposit
|
|
571
1026
|
* Returns gas estimate and result without sending transaction
|
|
572
1027
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
573
1028
|
*/
|
|
574
|
-
async
|
|
1029
|
+
async deposit(options?: {
|
|
575
1030
|
accessList?: import('viem').AccessList;
|
|
576
1031
|
authorizationList?: import('viem').AuthorizationList;
|
|
577
1032
|
chain?: import('viem').Chain | null;
|
|
@@ -582,15 +1037,43 @@ export class WETH9_json {
|
|
|
582
1037
|
maxPriorityFeePerGas?: bigint;
|
|
583
1038
|
nonce?: number;
|
|
584
1039
|
value?: bigint;
|
|
585
|
-
}): Promise<
|
|
586
|
-
return contract.simulate.
|
|
1040
|
+
}): Promise<void> {
|
|
1041
|
+
return contract.simulate.deposit(options) as Promise<void>;
|
|
587
1042
|
},
|
|
588
1043
|
/**
|
|
589
|
-
* Simulate
|
|
1044
|
+
* Simulate hold
|
|
1045
|
+
* Returns gas estimate and result without sending transaction
|
|
1046
|
+
* Supports multiple overloads: (address, uint256), (address)
|
|
1047
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1048
|
+
*/
|
|
1049
|
+
async hold(...args: any[]): Promise<any> {
|
|
1050
|
+
return contract.simulate.hold(args as any) as Promise<any>;
|
|
1051
|
+
},
|
|
1052
|
+
/**
|
|
1053
|
+
* Simulate initialize
|
|
1054
|
+
* Returns gas estimate and result without sending transaction
|
|
1055
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1056
|
+
*/
|
|
1057
|
+
async initialize(_systemConfig: `0x${string}`, options?: {
|
|
1058
|
+
accessList?: import('viem').AccessList;
|
|
1059
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
1060
|
+
chain?: import('viem').Chain | null;
|
|
1061
|
+
dataSuffix?: `0x${string}`;
|
|
1062
|
+
gas?: bigint;
|
|
1063
|
+
gasPrice?: bigint;
|
|
1064
|
+
maxFeePerGas?: bigint;
|
|
1065
|
+
maxPriorityFeePerGas?: bigint;
|
|
1066
|
+
nonce?: number;
|
|
1067
|
+
value?: bigint;
|
|
1068
|
+
}): Promise<void> {
|
|
1069
|
+
return contract.simulate.initialize([_systemConfig] as const, options) as Promise<void>;
|
|
1070
|
+
},
|
|
1071
|
+
/**
|
|
1072
|
+
* Simulate recover
|
|
590
1073
|
* Returns gas estimate and result without sending transaction
|
|
591
1074
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
592
1075
|
*/
|
|
593
|
-
async
|
|
1076
|
+
async recover(_wad: bigint, options?: {
|
|
594
1077
|
accessList?: import('viem').AccessList;
|
|
595
1078
|
authorizationList?: import('viem').AuthorizationList;
|
|
596
1079
|
chain?: import('viem').Chain | null;
|
|
@@ -602,7 +1085,7 @@ export class WETH9_json {
|
|
|
602
1085
|
nonce?: number;
|
|
603
1086
|
value?: bigint;
|
|
604
1087
|
}): Promise<void> {
|
|
605
|
-
return contract.simulate.
|
|
1088
|
+
return contract.simulate.recover([_wad] as const, options) as Promise<void>;
|
|
606
1089
|
},
|
|
607
1090
|
/**
|
|
608
1091
|
* Simulate transfer
|
|
@@ -624,11 +1107,30 @@ export class WETH9_json {
|
|
|
624
1107
|
return contract.simulate.transfer([dst, wad] as const, options) as Promise<boolean>;
|
|
625
1108
|
},
|
|
626
1109
|
/**
|
|
627
|
-
* Simulate
|
|
1110
|
+
* Simulate transferFrom
|
|
628
1111
|
* Returns gas estimate and result without sending transaction
|
|
629
1112
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
630
1113
|
*/
|
|
631
|
-
async
|
|
1114
|
+
async transferFrom(src: `0x${string}`, dst: `0x${string}`, wad: bigint, options?: {
|
|
1115
|
+
accessList?: import('viem').AccessList;
|
|
1116
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
1117
|
+
chain?: import('viem').Chain | null;
|
|
1118
|
+
dataSuffix?: `0x${string}`;
|
|
1119
|
+
gas?: bigint;
|
|
1120
|
+
gasPrice?: bigint;
|
|
1121
|
+
maxFeePerGas?: bigint;
|
|
1122
|
+
maxPriorityFeePerGas?: bigint;
|
|
1123
|
+
nonce?: number;
|
|
1124
|
+
value?: bigint;
|
|
1125
|
+
}): Promise<boolean> {
|
|
1126
|
+
return contract.simulate.transferFrom([src, dst, wad] as const, options) as Promise<boolean>;
|
|
1127
|
+
},
|
|
1128
|
+
/**
|
|
1129
|
+
* Simulate unlock
|
|
1130
|
+
* Returns gas estimate and result without sending transaction
|
|
1131
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1132
|
+
*/
|
|
1133
|
+
async unlock(_guy: `0x${string}`, _wad: bigint, options?: {
|
|
632
1134
|
accessList?: import('viem').AccessList;
|
|
633
1135
|
authorizationList?: import('viem').AuthorizationList;
|
|
634
1136
|
chain?: import('viem').Chain | null;
|
|
@@ -640,7 +1142,16 @@ export class WETH9_json {
|
|
|
640
1142
|
nonce?: number;
|
|
641
1143
|
value?: bigint;
|
|
642
1144
|
}): Promise<void> {
|
|
643
|
-
return contract.simulate.
|
|
1145
|
+
return contract.simulate.unlock([_guy, _wad] as const, options) as Promise<void>;
|
|
1146
|
+
},
|
|
1147
|
+
/**
|
|
1148
|
+
* Simulate withdraw
|
|
1149
|
+
* Returns gas estimate and result without sending transaction
|
|
1150
|
+
* Supports multiple overloads: (uint256), (address, uint256)
|
|
1151
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1152
|
+
*/
|
|
1153
|
+
async withdraw(...args: any[]): Promise<any> {
|
|
1154
|
+
return contract.simulate.withdraw(args as any) as Promise<any>;
|
|
644
1155
|
}
|
|
645
1156
|
};
|
|
646
1157
|
}
|
|
@@ -668,7 +1179,7 @@ export class WETH9_json {
|
|
|
668
1179
|
Approval: (callback: (event: { src: `0x${string}`; guy: `0x${string}`; wad: bigint }) => void, filter?: { src: `0x${string}`; guy: `0x${string}` }) => {
|
|
669
1180
|
return this.publicClient.watchContractEvent({
|
|
670
1181
|
address: this.contractAddress,
|
|
671
|
-
abi:
|
|
1182
|
+
abi: DelayedWETH_jsonAbi,
|
|
672
1183
|
eventName: 'Approval',
|
|
673
1184
|
args: filter,
|
|
674
1185
|
onLogs: (logs: any[]) => {
|
|
@@ -679,16 +1190,16 @@ export class WETH9_json {
|
|
|
679
1190
|
}) as () => void;
|
|
680
1191
|
},
|
|
681
1192
|
/**
|
|
682
|
-
* Watch
|
|
1193
|
+
* Watch Deposit events
|
|
683
1194
|
* @param callback Function to call when event is emitted
|
|
684
1195
|
* @param filter Optional filter for indexed parameters
|
|
685
1196
|
* @returns Unwatch function to stop listening
|
|
686
1197
|
*/
|
|
687
|
-
|
|
1198
|
+
Deposit: (callback: (event: { dst: `0x${string}`; wad: bigint }) => void, filter?: { dst: `0x${string}` }) => {
|
|
688
1199
|
return this.publicClient.watchContractEvent({
|
|
689
1200
|
address: this.contractAddress,
|
|
690
|
-
abi:
|
|
691
|
-
eventName: '
|
|
1201
|
+
abi: DelayedWETH_jsonAbi,
|
|
1202
|
+
eventName: 'Deposit',
|
|
692
1203
|
args: filter,
|
|
693
1204
|
onLogs: (logs: any[]) => {
|
|
694
1205
|
logs.forEach((log: any) => {
|
|
@@ -698,16 +1209,35 @@ export class WETH9_json {
|
|
|
698
1209
|
}) as () => void;
|
|
699
1210
|
},
|
|
700
1211
|
/**
|
|
701
|
-
* Watch
|
|
1212
|
+
* Watch Initialized events
|
|
702
1213
|
* @param callback Function to call when event is emitted
|
|
703
1214
|
* @param filter Optional filter for indexed parameters
|
|
704
1215
|
* @returns Unwatch function to stop listening
|
|
705
1216
|
*/
|
|
706
|
-
|
|
1217
|
+
Initialized: (callback: (event: { version: bigint }) => void) => {
|
|
707
1218
|
return this.publicClient.watchContractEvent({
|
|
708
1219
|
address: this.contractAddress,
|
|
709
|
-
abi:
|
|
710
|
-
eventName: '
|
|
1220
|
+
abi: DelayedWETH_jsonAbi,
|
|
1221
|
+
eventName: 'Initialized',
|
|
1222
|
+
|
|
1223
|
+
onLogs: (logs: any[]) => {
|
|
1224
|
+
logs.forEach((log: any) => {
|
|
1225
|
+
callback(log.args as any);
|
|
1226
|
+
});
|
|
1227
|
+
},
|
|
1228
|
+
}) as () => void;
|
|
1229
|
+
},
|
|
1230
|
+
/**
|
|
1231
|
+
* Watch Transfer events
|
|
1232
|
+
* @param callback Function to call when event is emitted
|
|
1233
|
+
* @param filter Optional filter for indexed parameters
|
|
1234
|
+
* @returns Unwatch function to stop listening
|
|
1235
|
+
*/
|
|
1236
|
+
Transfer: (callback: (event: { src: `0x${string}`; dst: `0x${string}`; wad: bigint }) => void, filter?: { src: `0x${string}`; dst: `0x${string}` }) => {
|
|
1237
|
+
return this.publicClient.watchContractEvent({
|
|
1238
|
+
address: this.contractAddress,
|
|
1239
|
+
abi: DelayedWETH_jsonAbi,
|
|
1240
|
+
eventName: 'Transfer',
|
|
711
1241
|
args: filter,
|
|
712
1242
|
onLogs: (logs: any[]) => {
|
|
713
1243
|
logs.forEach((log: any) => {
|
|
@@ -725,7 +1255,7 @@ export class WETH9_json {
|
|
|
725
1255
|
Withdrawal: (callback: (event: { src: `0x${string}`; wad: bigint }) => void, filter?: { src: `0x${string}` }) => {
|
|
726
1256
|
return this.publicClient.watchContractEvent({
|
|
727
1257
|
address: this.contractAddress,
|
|
728
|
-
abi:
|
|
1258
|
+
abi: DelayedWETH_jsonAbi,
|
|
729
1259
|
eventName: 'Withdrawal',
|
|
730
1260
|
args: filter,
|
|
731
1261
|
onLogs: (logs: any[]) => {
|