@gitmyabi/nounsdaoexecutor 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 +108 -0
- package/contracts/NounsDAOExecutorProxy_json.d.ts +169 -0
- package/contracts/NounsDAOExecutorProxy_json.js +221 -0
- package/contracts/NounsDAOExecutorProxy_json.ts +251 -0
- package/contracts/NounsDAOExecutorV2_json.d.ts +1125 -0
- package/contracts/NounsDAOExecutorV2_json.js +1189 -0
- package/contracts/NounsDAOExecutorV2_json.ts +1478 -0
- package/contracts/index.d.ts +4 -0
- package/contracts/index.js +10 -0
- package/contracts/index.ts +5 -0
- package/index.d.ts +1 -0
- package/index.js +19 -0
- package/package.json +43 -0
|
@@ -0,0 +1,1189 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NounsDAOExecutorV2_json = exports.NounsDAOExecutorV2_jsonAbi = void 0;
|
|
4
|
+
const viem_1 = require("viem");
|
|
5
|
+
/**
|
|
6
|
+
* NounsDAOExecutorV2_json ABI
|
|
7
|
+
*
|
|
8
|
+
* This ABI is typed using viem's type system for full type safety.
|
|
9
|
+
*/
|
|
10
|
+
exports.NounsDAOExecutorV2_jsonAbi = [
|
|
11
|
+
{
|
|
12
|
+
"inputs": [],
|
|
13
|
+
"stateMutability": "nonpayable",
|
|
14
|
+
"type": "constructor"
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"anonymous": false,
|
|
18
|
+
"inputs": [
|
|
19
|
+
{
|
|
20
|
+
"indexed": false,
|
|
21
|
+
"internalType": "address",
|
|
22
|
+
"name": "previousAdmin",
|
|
23
|
+
"type": "address"
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"indexed": false,
|
|
27
|
+
"internalType": "address",
|
|
28
|
+
"name": "newAdmin",
|
|
29
|
+
"type": "address"
|
|
30
|
+
}
|
|
31
|
+
],
|
|
32
|
+
"name": "AdminChanged",
|
|
33
|
+
"type": "event"
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"anonymous": false,
|
|
37
|
+
"inputs": [
|
|
38
|
+
{
|
|
39
|
+
"indexed": true,
|
|
40
|
+
"internalType": "address",
|
|
41
|
+
"name": "beacon",
|
|
42
|
+
"type": "address"
|
|
43
|
+
}
|
|
44
|
+
],
|
|
45
|
+
"name": "BeaconUpgraded",
|
|
46
|
+
"type": "event"
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
"anonymous": false,
|
|
50
|
+
"inputs": [
|
|
51
|
+
{
|
|
52
|
+
"indexed": true,
|
|
53
|
+
"internalType": "bytes32",
|
|
54
|
+
"name": "txHash",
|
|
55
|
+
"type": "bytes32"
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
"indexed": true,
|
|
59
|
+
"internalType": "address",
|
|
60
|
+
"name": "target",
|
|
61
|
+
"type": "address"
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
"indexed": false,
|
|
65
|
+
"internalType": "uint256",
|
|
66
|
+
"name": "value",
|
|
67
|
+
"type": "uint256"
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
"indexed": false,
|
|
71
|
+
"internalType": "string",
|
|
72
|
+
"name": "signature",
|
|
73
|
+
"type": "string"
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
"indexed": false,
|
|
77
|
+
"internalType": "bytes",
|
|
78
|
+
"name": "data",
|
|
79
|
+
"type": "bytes"
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
"indexed": false,
|
|
83
|
+
"internalType": "uint256",
|
|
84
|
+
"name": "eta",
|
|
85
|
+
"type": "uint256"
|
|
86
|
+
}
|
|
87
|
+
],
|
|
88
|
+
"name": "CancelTransaction",
|
|
89
|
+
"type": "event"
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
"anonymous": false,
|
|
93
|
+
"inputs": [
|
|
94
|
+
{
|
|
95
|
+
"indexed": true,
|
|
96
|
+
"internalType": "address",
|
|
97
|
+
"name": "to",
|
|
98
|
+
"type": "address"
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
"indexed": true,
|
|
102
|
+
"internalType": "address",
|
|
103
|
+
"name": "erc20Token",
|
|
104
|
+
"type": "address"
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
"indexed": false,
|
|
108
|
+
"internalType": "uint256",
|
|
109
|
+
"name": "amount",
|
|
110
|
+
"type": "uint256"
|
|
111
|
+
}
|
|
112
|
+
],
|
|
113
|
+
"name": "ERC20Sent",
|
|
114
|
+
"type": "event"
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
"anonymous": false,
|
|
118
|
+
"inputs": [
|
|
119
|
+
{
|
|
120
|
+
"indexed": true,
|
|
121
|
+
"internalType": "address",
|
|
122
|
+
"name": "to",
|
|
123
|
+
"type": "address"
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
"indexed": false,
|
|
127
|
+
"internalType": "uint256",
|
|
128
|
+
"name": "amount",
|
|
129
|
+
"type": "uint256"
|
|
130
|
+
}
|
|
131
|
+
],
|
|
132
|
+
"name": "ETHSent",
|
|
133
|
+
"type": "event"
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
"anonymous": false,
|
|
137
|
+
"inputs": [
|
|
138
|
+
{
|
|
139
|
+
"indexed": true,
|
|
140
|
+
"internalType": "bytes32",
|
|
141
|
+
"name": "txHash",
|
|
142
|
+
"type": "bytes32"
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
"indexed": true,
|
|
146
|
+
"internalType": "address",
|
|
147
|
+
"name": "target",
|
|
148
|
+
"type": "address"
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
"indexed": false,
|
|
152
|
+
"internalType": "uint256",
|
|
153
|
+
"name": "value",
|
|
154
|
+
"type": "uint256"
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
"indexed": false,
|
|
158
|
+
"internalType": "string",
|
|
159
|
+
"name": "signature",
|
|
160
|
+
"type": "string"
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
"indexed": false,
|
|
164
|
+
"internalType": "bytes",
|
|
165
|
+
"name": "data",
|
|
166
|
+
"type": "bytes"
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
"indexed": false,
|
|
170
|
+
"internalType": "uint256",
|
|
171
|
+
"name": "eta",
|
|
172
|
+
"type": "uint256"
|
|
173
|
+
}
|
|
174
|
+
],
|
|
175
|
+
"name": "ExecuteTransaction",
|
|
176
|
+
"type": "event"
|
|
177
|
+
},
|
|
178
|
+
{
|
|
179
|
+
"anonymous": false,
|
|
180
|
+
"inputs": [
|
|
181
|
+
{
|
|
182
|
+
"indexed": true,
|
|
183
|
+
"internalType": "address",
|
|
184
|
+
"name": "newAdmin",
|
|
185
|
+
"type": "address"
|
|
186
|
+
}
|
|
187
|
+
],
|
|
188
|
+
"name": "NewAdmin",
|
|
189
|
+
"type": "event"
|
|
190
|
+
},
|
|
191
|
+
{
|
|
192
|
+
"anonymous": false,
|
|
193
|
+
"inputs": [
|
|
194
|
+
{
|
|
195
|
+
"indexed": true,
|
|
196
|
+
"internalType": "uint256",
|
|
197
|
+
"name": "newDelay",
|
|
198
|
+
"type": "uint256"
|
|
199
|
+
}
|
|
200
|
+
],
|
|
201
|
+
"name": "NewDelay",
|
|
202
|
+
"type": "event"
|
|
203
|
+
},
|
|
204
|
+
{
|
|
205
|
+
"anonymous": false,
|
|
206
|
+
"inputs": [
|
|
207
|
+
{
|
|
208
|
+
"indexed": true,
|
|
209
|
+
"internalType": "address",
|
|
210
|
+
"name": "newPendingAdmin",
|
|
211
|
+
"type": "address"
|
|
212
|
+
}
|
|
213
|
+
],
|
|
214
|
+
"name": "NewPendingAdmin",
|
|
215
|
+
"type": "event"
|
|
216
|
+
},
|
|
217
|
+
{
|
|
218
|
+
"anonymous": false,
|
|
219
|
+
"inputs": [
|
|
220
|
+
{
|
|
221
|
+
"indexed": true,
|
|
222
|
+
"internalType": "bytes32",
|
|
223
|
+
"name": "txHash",
|
|
224
|
+
"type": "bytes32"
|
|
225
|
+
},
|
|
226
|
+
{
|
|
227
|
+
"indexed": true,
|
|
228
|
+
"internalType": "address",
|
|
229
|
+
"name": "target",
|
|
230
|
+
"type": "address"
|
|
231
|
+
},
|
|
232
|
+
{
|
|
233
|
+
"indexed": false,
|
|
234
|
+
"internalType": "uint256",
|
|
235
|
+
"name": "value",
|
|
236
|
+
"type": "uint256"
|
|
237
|
+
},
|
|
238
|
+
{
|
|
239
|
+
"indexed": false,
|
|
240
|
+
"internalType": "string",
|
|
241
|
+
"name": "signature",
|
|
242
|
+
"type": "string"
|
|
243
|
+
},
|
|
244
|
+
{
|
|
245
|
+
"indexed": false,
|
|
246
|
+
"internalType": "bytes",
|
|
247
|
+
"name": "data",
|
|
248
|
+
"type": "bytes"
|
|
249
|
+
},
|
|
250
|
+
{
|
|
251
|
+
"indexed": false,
|
|
252
|
+
"internalType": "uint256",
|
|
253
|
+
"name": "eta",
|
|
254
|
+
"type": "uint256"
|
|
255
|
+
}
|
|
256
|
+
],
|
|
257
|
+
"name": "QueueTransaction",
|
|
258
|
+
"type": "event"
|
|
259
|
+
},
|
|
260
|
+
{
|
|
261
|
+
"anonymous": false,
|
|
262
|
+
"inputs": [
|
|
263
|
+
{
|
|
264
|
+
"indexed": true,
|
|
265
|
+
"internalType": "address",
|
|
266
|
+
"name": "implementation",
|
|
267
|
+
"type": "address"
|
|
268
|
+
}
|
|
269
|
+
],
|
|
270
|
+
"name": "Upgraded",
|
|
271
|
+
"type": "event"
|
|
272
|
+
},
|
|
273
|
+
{
|
|
274
|
+
"stateMutability": "payable",
|
|
275
|
+
"type": "fallback"
|
|
276
|
+
},
|
|
277
|
+
{
|
|
278
|
+
"inputs": [],
|
|
279
|
+
"name": "GRACE_PERIOD",
|
|
280
|
+
"outputs": [
|
|
281
|
+
{
|
|
282
|
+
"internalType": "uint256",
|
|
283
|
+
"name": "",
|
|
284
|
+
"type": "uint256"
|
|
285
|
+
}
|
|
286
|
+
],
|
|
287
|
+
"stateMutability": "view",
|
|
288
|
+
"type": "function"
|
|
289
|
+
},
|
|
290
|
+
{
|
|
291
|
+
"inputs": [],
|
|
292
|
+
"name": "MAXIMUM_DELAY",
|
|
293
|
+
"outputs": [
|
|
294
|
+
{
|
|
295
|
+
"internalType": "uint256",
|
|
296
|
+
"name": "",
|
|
297
|
+
"type": "uint256"
|
|
298
|
+
}
|
|
299
|
+
],
|
|
300
|
+
"stateMutability": "view",
|
|
301
|
+
"type": "function"
|
|
302
|
+
},
|
|
303
|
+
{
|
|
304
|
+
"inputs": [],
|
|
305
|
+
"name": "MINIMUM_DELAY",
|
|
306
|
+
"outputs": [
|
|
307
|
+
{
|
|
308
|
+
"internalType": "uint256",
|
|
309
|
+
"name": "",
|
|
310
|
+
"type": "uint256"
|
|
311
|
+
}
|
|
312
|
+
],
|
|
313
|
+
"stateMutability": "view",
|
|
314
|
+
"type": "function"
|
|
315
|
+
},
|
|
316
|
+
{
|
|
317
|
+
"inputs": [],
|
|
318
|
+
"name": "NAME",
|
|
319
|
+
"outputs": [
|
|
320
|
+
{
|
|
321
|
+
"internalType": "string",
|
|
322
|
+
"name": "",
|
|
323
|
+
"type": "string"
|
|
324
|
+
}
|
|
325
|
+
],
|
|
326
|
+
"stateMutability": "view",
|
|
327
|
+
"type": "function"
|
|
328
|
+
},
|
|
329
|
+
{
|
|
330
|
+
"inputs": [],
|
|
331
|
+
"name": "acceptAdmin",
|
|
332
|
+
"outputs": [],
|
|
333
|
+
"stateMutability": "nonpayable",
|
|
334
|
+
"type": "function"
|
|
335
|
+
},
|
|
336
|
+
{
|
|
337
|
+
"inputs": [],
|
|
338
|
+
"name": "admin",
|
|
339
|
+
"outputs": [
|
|
340
|
+
{
|
|
341
|
+
"internalType": "address",
|
|
342
|
+
"name": "",
|
|
343
|
+
"type": "address"
|
|
344
|
+
}
|
|
345
|
+
],
|
|
346
|
+
"stateMutability": "view",
|
|
347
|
+
"type": "function"
|
|
348
|
+
},
|
|
349
|
+
{
|
|
350
|
+
"inputs": [
|
|
351
|
+
{
|
|
352
|
+
"internalType": "address",
|
|
353
|
+
"name": "target",
|
|
354
|
+
"type": "address"
|
|
355
|
+
},
|
|
356
|
+
{
|
|
357
|
+
"internalType": "uint256",
|
|
358
|
+
"name": "value",
|
|
359
|
+
"type": "uint256"
|
|
360
|
+
},
|
|
361
|
+
{
|
|
362
|
+
"internalType": "string",
|
|
363
|
+
"name": "signature",
|
|
364
|
+
"type": "string"
|
|
365
|
+
},
|
|
366
|
+
{
|
|
367
|
+
"internalType": "bytes",
|
|
368
|
+
"name": "data",
|
|
369
|
+
"type": "bytes"
|
|
370
|
+
},
|
|
371
|
+
{
|
|
372
|
+
"internalType": "uint256",
|
|
373
|
+
"name": "eta",
|
|
374
|
+
"type": "uint256"
|
|
375
|
+
}
|
|
376
|
+
],
|
|
377
|
+
"name": "cancelTransaction",
|
|
378
|
+
"outputs": [],
|
|
379
|
+
"stateMutability": "nonpayable",
|
|
380
|
+
"type": "function"
|
|
381
|
+
},
|
|
382
|
+
{
|
|
383
|
+
"inputs": [],
|
|
384
|
+
"name": "delay",
|
|
385
|
+
"outputs": [
|
|
386
|
+
{
|
|
387
|
+
"internalType": "uint256",
|
|
388
|
+
"name": "",
|
|
389
|
+
"type": "uint256"
|
|
390
|
+
}
|
|
391
|
+
],
|
|
392
|
+
"stateMutability": "view",
|
|
393
|
+
"type": "function"
|
|
394
|
+
},
|
|
395
|
+
{
|
|
396
|
+
"inputs": [
|
|
397
|
+
{
|
|
398
|
+
"internalType": "address",
|
|
399
|
+
"name": "target",
|
|
400
|
+
"type": "address"
|
|
401
|
+
},
|
|
402
|
+
{
|
|
403
|
+
"internalType": "uint256",
|
|
404
|
+
"name": "value",
|
|
405
|
+
"type": "uint256"
|
|
406
|
+
},
|
|
407
|
+
{
|
|
408
|
+
"internalType": "string",
|
|
409
|
+
"name": "signature",
|
|
410
|
+
"type": "string"
|
|
411
|
+
},
|
|
412
|
+
{
|
|
413
|
+
"internalType": "bytes",
|
|
414
|
+
"name": "data",
|
|
415
|
+
"type": "bytes"
|
|
416
|
+
},
|
|
417
|
+
{
|
|
418
|
+
"internalType": "uint256",
|
|
419
|
+
"name": "eta",
|
|
420
|
+
"type": "uint256"
|
|
421
|
+
}
|
|
422
|
+
],
|
|
423
|
+
"name": "executeTransaction",
|
|
424
|
+
"outputs": [
|
|
425
|
+
{
|
|
426
|
+
"internalType": "bytes",
|
|
427
|
+
"name": "",
|
|
428
|
+
"type": "bytes"
|
|
429
|
+
}
|
|
430
|
+
],
|
|
431
|
+
"stateMutability": "nonpayable",
|
|
432
|
+
"type": "function"
|
|
433
|
+
},
|
|
434
|
+
{
|
|
435
|
+
"inputs": [
|
|
436
|
+
{
|
|
437
|
+
"internalType": "address",
|
|
438
|
+
"name": "admin_",
|
|
439
|
+
"type": "address"
|
|
440
|
+
},
|
|
441
|
+
{
|
|
442
|
+
"internalType": "uint256",
|
|
443
|
+
"name": "delay_",
|
|
444
|
+
"type": "uint256"
|
|
445
|
+
}
|
|
446
|
+
],
|
|
447
|
+
"name": "initialize",
|
|
448
|
+
"outputs": [],
|
|
449
|
+
"stateMutability": "nonpayable",
|
|
450
|
+
"type": "function"
|
|
451
|
+
},
|
|
452
|
+
{
|
|
453
|
+
"inputs": [],
|
|
454
|
+
"name": "pendingAdmin",
|
|
455
|
+
"outputs": [
|
|
456
|
+
{
|
|
457
|
+
"internalType": "address",
|
|
458
|
+
"name": "",
|
|
459
|
+
"type": "address"
|
|
460
|
+
}
|
|
461
|
+
],
|
|
462
|
+
"stateMutability": "view",
|
|
463
|
+
"type": "function"
|
|
464
|
+
},
|
|
465
|
+
{
|
|
466
|
+
"inputs": [
|
|
467
|
+
{
|
|
468
|
+
"internalType": "address",
|
|
469
|
+
"name": "target",
|
|
470
|
+
"type": "address"
|
|
471
|
+
},
|
|
472
|
+
{
|
|
473
|
+
"internalType": "uint256",
|
|
474
|
+
"name": "value",
|
|
475
|
+
"type": "uint256"
|
|
476
|
+
},
|
|
477
|
+
{
|
|
478
|
+
"internalType": "string",
|
|
479
|
+
"name": "signature",
|
|
480
|
+
"type": "string"
|
|
481
|
+
},
|
|
482
|
+
{
|
|
483
|
+
"internalType": "bytes",
|
|
484
|
+
"name": "data",
|
|
485
|
+
"type": "bytes"
|
|
486
|
+
},
|
|
487
|
+
{
|
|
488
|
+
"internalType": "uint256",
|
|
489
|
+
"name": "eta",
|
|
490
|
+
"type": "uint256"
|
|
491
|
+
}
|
|
492
|
+
],
|
|
493
|
+
"name": "queueTransaction",
|
|
494
|
+
"outputs": [
|
|
495
|
+
{
|
|
496
|
+
"internalType": "bytes32",
|
|
497
|
+
"name": "",
|
|
498
|
+
"type": "bytes32"
|
|
499
|
+
}
|
|
500
|
+
],
|
|
501
|
+
"stateMutability": "nonpayable",
|
|
502
|
+
"type": "function"
|
|
503
|
+
},
|
|
504
|
+
{
|
|
505
|
+
"inputs": [
|
|
506
|
+
{
|
|
507
|
+
"internalType": "bytes32",
|
|
508
|
+
"name": "",
|
|
509
|
+
"type": "bytes32"
|
|
510
|
+
}
|
|
511
|
+
],
|
|
512
|
+
"name": "queuedTransactions",
|
|
513
|
+
"outputs": [
|
|
514
|
+
{
|
|
515
|
+
"internalType": "bool",
|
|
516
|
+
"name": "",
|
|
517
|
+
"type": "bool"
|
|
518
|
+
}
|
|
519
|
+
],
|
|
520
|
+
"stateMutability": "view",
|
|
521
|
+
"type": "function"
|
|
522
|
+
},
|
|
523
|
+
{
|
|
524
|
+
"inputs": [
|
|
525
|
+
{
|
|
526
|
+
"internalType": "address",
|
|
527
|
+
"name": "recipient",
|
|
528
|
+
"type": "address"
|
|
529
|
+
},
|
|
530
|
+
{
|
|
531
|
+
"internalType": "address",
|
|
532
|
+
"name": "erc20Token",
|
|
533
|
+
"type": "address"
|
|
534
|
+
},
|
|
535
|
+
{
|
|
536
|
+
"internalType": "uint256",
|
|
537
|
+
"name": "tokensToSend",
|
|
538
|
+
"type": "uint256"
|
|
539
|
+
}
|
|
540
|
+
],
|
|
541
|
+
"name": "sendERC20",
|
|
542
|
+
"outputs": [],
|
|
543
|
+
"stateMutability": "nonpayable",
|
|
544
|
+
"type": "function"
|
|
545
|
+
},
|
|
546
|
+
{
|
|
547
|
+
"inputs": [
|
|
548
|
+
{
|
|
549
|
+
"internalType": "address payable",
|
|
550
|
+
"name": "recipient",
|
|
551
|
+
"type": "address"
|
|
552
|
+
},
|
|
553
|
+
{
|
|
554
|
+
"internalType": "uint256",
|
|
555
|
+
"name": "ethToSend",
|
|
556
|
+
"type": "uint256"
|
|
557
|
+
}
|
|
558
|
+
],
|
|
559
|
+
"name": "sendETH",
|
|
560
|
+
"outputs": [],
|
|
561
|
+
"stateMutability": "nonpayable",
|
|
562
|
+
"type": "function"
|
|
563
|
+
},
|
|
564
|
+
{
|
|
565
|
+
"inputs": [
|
|
566
|
+
{
|
|
567
|
+
"internalType": "uint256",
|
|
568
|
+
"name": "delay_",
|
|
569
|
+
"type": "uint256"
|
|
570
|
+
}
|
|
571
|
+
],
|
|
572
|
+
"name": "setDelay",
|
|
573
|
+
"outputs": [],
|
|
574
|
+
"stateMutability": "nonpayable",
|
|
575
|
+
"type": "function"
|
|
576
|
+
},
|
|
577
|
+
{
|
|
578
|
+
"inputs": [
|
|
579
|
+
{
|
|
580
|
+
"internalType": "address",
|
|
581
|
+
"name": "pendingAdmin_",
|
|
582
|
+
"type": "address"
|
|
583
|
+
}
|
|
584
|
+
],
|
|
585
|
+
"name": "setPendingAdmin",
|
|
586
|
+
"outputs": [],
|
|
587
|
+
"stateMutability": "nonpayable",
|
|
588
|
+
"type": "function"
|
|
589
|
+
},
|
|
590
|
+
{
|
|
591
|
+
"inputs": [
|
|
592
|
+
{
|
|
593
|
+
"internalType": "address",
|
|
594
|
+
"name": "newImplementation",
|
|
595
|
+
"type": "address"
|
|
596
|
+
}
|
|
597
|
+
],
|
|
598
|
+
"name": "upgradeTo",
|
|
599
|
+
"outputs": [],
|
|
600
|
+
"stateMutability": "nonpayable",
|
|
601
|
+
"type": "function"
|
|
602
|
+
},
|
|
603
|
+
{
|
|
604
|
+
"inputs": [
|
|
605
|
+
{
|
|
606
|
+
"internalType": "address",
|
|
607
|
+
"name": "newImplementation",
|
|
608
|
+
"type": "address"
|
|
609
|
+
},
|
|
610
|
+
{
|
|
611
|
+
"internalType": "bytes",
|
|
612
|
+
"name": "data",
|
|
613
|
+
"type": "bytes"
|
|
614
|
+
}
|
|
615
|
+
],
|
|
616
|
+
"name": "upgradeToAndCall",
|
|
617
|
+
"outputs": [],
|
|
618
|
+
"stateMutability": "payable",
|
|
619
|
+
"type": "function"
|
|
620
|
+
},
|
|
621
|
+
{
|
|
622
|
+
"stateMutability": "payable",
|
|
623
|
+
"type": "receive"
|
|
624
|
+
}
|
|
625
|
+
];
|
|
626
|
+
/**
|
|
627
|
+
* NounsDAOExecutorV2_json Contract Class
|
|
628
|
+
*
|
|
629
|
+
* Provides a class-based API similar to TypeChain for interacting with the contract.
|
|
630
|
+
*
|
|
631
|
+
* @example
|
|
632
|
+
* ```typescript
|
|
633
|
+
* import { createPublicClient, createWalletClient, http } from 'viem';
|
|
634
|
+
* import { mainnet } from 'viem/chains';
|
|
635
|
+
* import { NounsDAOExecutorV2_json } from 'NounsDAOExecutorV2_json';
|
|
636
|
+
*
|
|
637
|
+
* const publicClient = createPublicClient({ chain: mainnet, transport: http() });
|
|
638
|
+
* const walletClient = createWalletClient({ chain: mainnet, transport: http() });
|
|
639
|
+
*
|
|
640
|
+
* const contract = new NounsDAOExecutorV2_json('0x...', { publicClient, walletClient });
|
|
641
|
+
*
|
|
642
|
+
* // Read functions
|
|
643
|
+
* const result = await contract.balanceOf('0x...');
|
|
644
|
+
*
|
|
645
|
+
* // Write functions
|
|
646
|
+
* const hash = await contract.transfer('0x...', 1000n);
|
|
647
|
+
*
|
|
648
|
+
* // Simulate transactions (dry-run)
|
|
649
|
+
* const simulation = await contract.simulate.transfer('0x...', 1000n);
|
|
650
|
+
* console.log('Gas estimate:', simulation.request.gas);
|
|
651
|
+
*
|
|
652
|
+
* // Watch events
|
|
653
|
+
* const unwatch = contract.watch.Transfer((event) => {
|
|
654
|
+
* console.log('Transfer event:', event);
|
|
655
|
+
* });
|
|
656
|
+
* ```
|
|
657
|
+
*/
|
|
658
|
+
class NounsDAOExecutorV2_json {
|
|
659
|
+
constructor(address, clients) {
|
|
660
|
+
this.contractAddress = address;
|
|
661
|
+
this.publicClient = clients.publicClient;
|
|
662
|
+
this.contract = (0, viem_1.getContract)({
|
|
663
|
+
address,
|
|
664
|
+
abi: exports.NounsDAOExecutorV2_jsonAbi,
|
|
665
|
+
client: {
|
|
666
|
+
public: clients.publicClient,
|
|
667
|
+
wallet: clients.walletClient,
|
|
668
|
+
},
|
|
669
|
+
});
|
|
670
|
+
}
|
|
671
|
+
/**
|
|
672
|
+
* Get the contract address
|
|
673
|
+
*/
|
|
674
|
+
get address() {
|
|
675
|
+
return this.contractAddress;
|
|
676
|
+
}
|
|
677
|
+
/**
|
|
678
|
+
* Get the underlying viem contract instance
|
|
679
|
+
*/
|
|
680
|
+
getContract() {
|
|
681
|
+
return this.contract;
|
|
682
|
+
}
|
|
683
|
+
/**
|
|
684
|
+
* GRACE_PERIOD
|
|
685
|
+
* view
|
|
686
|
+
*/
|
|
687
|
+
async GRACE_PERIOD() {
|
|
688
|
+
return this.contract.read.GRACE_PERIOD();
|
|
689
|
+
}
|
|
690
|
+
/**
|
|
691
|
+
* MAXIMUM_DELAY
|
|
692
|
+
* view
|
|
693
|
+
*/
|
|
694
|
+
async MAXIMUM_DELAY() {
|
|
695
|
+
return this.contract.read.MAXIMUM_DELAY();
|
|
696
|
+
}
|
|
697
|
+
/**
|
|
698
|
+
* MINIMUM_DELAY
|
|
699
|
+
* view
|
|
700
|
+
*/
|
|
701
|
+
async MINIMUM_DELAY() {
|
|
702
|
+
return this.contract.read.MINIMUM_DELAY();
|
|
703
|
+
}
|
|
704
|
+
/**
|
|
705
|
+
* NAME
|
|
706
|
+
* view
|
|
707
|
+
*/
|
|
708
|
+
async NAME() {
|
|
709
|
+
return this.contract.read.NAME();
|
|
710
|
+
}
|
|
711
|
+
/**
|
|
712
|
+
* admin
|
|
713
|
+
* view
|
|
714
|
+
*/
|
|
715
|
+
async admin() {
|
|
716
|
+
return this.contract.read.admin();
|
|
717
|
+
}
|
|
718
|
+
/**
|
|
719
|
+
* delay
|
|
720
|
+
* view
|
|
721
|
+
*/
|
|
722
|
+
async delay() {
|
|
723
|
+
return this.contract.read.delay();
|
|
724
|
+
}
|
|
725
|
+
/**
|
|
726
|
+
* pendingAdmin
|
|
727
|
+
* view
|
|
728
|
+
*/
|
|
729
|
+
async pendingAdmin() {
|
|
730
|
+
return this.contract.read.pendingAdmin();
|
|
731
|
+
}
|
|
732
|
+
/**
|
|
733
|
+
* queuedTransactions
|
|
734
|
+
* view
|
|
735
|
+
*/
|
|
736
|
+
async queuedTransactions(arg0) {
|
|
737
|
+
return this.contract.read.queuedTransactions([arg0]);
|
|
738
|
+
}
|
|
739
|
+
/**
|
|
740
|
+
* acceptAdmin
|
|
741
|
+
* nonpayable
|
|
742
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
743
|
+
*/
|
|
744
|
+
async acceptAdmin(options) {
|
|
745
|
+
if (!this.contract.write) {
|
|
746
|
+
throw new Error('Wallet client is required for write operations');
|
|
747
|
+
}
|
|
748
|
+
return this.contract.write.acceptAdmin(options);
|
|
749
|
+
}
|
|
750
|
+
/**
|
|
751
|
+
* cancelTransaction
|
|
752
|
+
* nonpayable
|
|
753
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
754
|
+
*/
|
|
755
|
+
async cancelTransaction(target, value, signature, data, eta, options) {
|
|
756
|
+
if (!this.contract.write) {
|
|
757
|
+
throw new Error('Wallet client is required for write operations');
|
|
758
|
+
}
|
|
759
|
+
return this.contract.write.cancelTransaction([target, value, signature, data, eta], options);
|
|
760
|
+
}
|
|
761
|
+
/**
|
|
762
|
+
* executeTransaction
|
|
763
|
+
* nonpayable
|
|
764
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
765
|
+
*/
|
|
766
|
+
async executeTransaction(target, value, signature, data, eta, options) {
|
|
767
|
+
if (!this.contract.write) {
|
|
768
|
+
throw new Error('Wallet client is required for write operations');
|
|
769
|
+
}
|
|
770
|
+
return this.contract.write.executeTransaction([target, value, signature, data, eta], options);
|
|
771
|
+
}
|
|
772
|
+
/**
|
|
773
|
+
* initialize
|
|
774
|
+
* nonpayable
|
|
775
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
776
|
+
*/
|
|
777
|
+
async initialize(admin_, delay_, options) {
|
|
778
|
+
if (!this.contract.write) {
|
|
779
|
+
throw new Error('Wallet client is required for write operations');
|
|
780
|
+
}
|
|
781
|
+
return this.contract.write.initialize([admin_, delay_], options);
|
|
782
|
+
}
|
|
783
|
+
/**
|
|
784
|
+
* queueTransaction
|
|
785
|
+
* nonpayable
|
|
786
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
787
|
+
*/
|
|
788
|
+
async queueTransaction(target, value, signature, data, eta, options) {
|
|
789
|
+
if (!this.contract.write) {
|
|
790
|
+
throw new Error('Wallet client is required for write operations');
|
|
791
|
+
}
|
|
792
|
+
return this.contract.write.queueTransaction([target, value, signature, data, eta], options);
|
|
793
|
+
}
|
|
794
|
+
/**
|
|
795
|
+
* sendERC20
|
|
796
|
+
* nonpayable
|
|
797
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
798
|
+
*/
|
|
799
|
+
async sendERC20(recipient, erc20Token, tokensToSend, options) {
|
|
800
|
+
if (!this.contract.write) {
|
|
801
|
+
throw new Error('Wallet client is required for write operations');
|
|
802
|
+
}
|
|
803
|
+
return this.contract.write.sendERC20([recipient, erc20Token, tokensToSend], options);
|
|
804
|
+
}
|
|
805
|
+
/**
|
|
806
|
+
* sendETH
|
|
807
|
+
* nonpayable
|
|
808
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
809
|
+
*/
|
|
810
|
+
async sendETH(recipient, ethToSend, options) {
|
|
811
|
+
if (!this.contract.write) {
|
|
812
|
+
throw new Error('Wallet client is required for write operations');
|
|
813
|
+
}
|
|
814
|
+
return this.contract.write.sendETH([recipient, ethToSend], options);
|
|
815
|
+
}
|
|
816
|
+
/**
|
|
817
|
+
* setDelay
|
|
818
|
+
* nonpayable
|
|
819
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
820
|
+
*/
|
|
821
|
+
async setDelay(delay_, options) {
|
|
822
|
+
if (!this.contract.write) {
|
|
823
|
+
throw new Error('Wallet client is required for write operations');
|
|
824
|
+
}
|
|
825
|
+
return this.contract.write.setDelay([delay_], options);
|
|
826
|
+
}
|
|
827
|
+
/**
|
|
828
|
+
* setPendingAdmin
|
|
829
|
+
* nonpayable
|
|
830
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
831
|
+
*/
|
|
832
|
+
async setPendingAdmin(pendingAdmin_, options) {
|
|
833
|
+
if (!this.contract.write) {
|
|
834
|
+
throw new Error('Wallet client is required for write operations');
|
|
835
|
+
}
|
|
836
|
+
return this.contract.write.setPendingAdmin([pendingAdmin_], options);
|
|
837
|
+
}
|
|
838
|
+
/**
|
|
839
|
+
* upgradeTo
|
|
840
|
+
* nonpayable
|
|
841
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
842
|
+
*/
|
|
843
|
+
async upgradeTo(newImplementation, options) {
|
|
844
|
+
if (!this.contract.write) {
|
|
845
|
+
throw new Error('Wallet client is required for write operations');
|
|
846
|
+
}
|
|
847
|
+
return this.contract.write.upgradeTo([newImplementation], options);
|
|
848
|
+
}
|
|
849
|
+
/**
|
|
850
|
+
* upgradeToAndCall
|
|
851
|
+
* payable
|
|
852
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
853
|
+
*/
|
|
854
|
+
async upgradeToAndCall(newImplementation, data, options) {
|
|
855
|
+
if (!this.contract.write) {
|
|
856
|
+
throw new Error('Wallet client is required for write operations');
|
|
857
|
+
}
|
|
858
|
+
return this.contract.write.upgradeToAndCall([newImplementation, data], options);
|
|
859
|
+
}
|
|
860
|
+
/**
|
|
861
|
+
* Simulate contract write operations (dry-run without sending transaction)
|
|
862
|
+
*
|
|
863
|
+
* @example
|
|
864
|
+
* const result = await contract.simulate.transfer('0x...', 1000n);
|
|
865
|
+
* console.log('Gas estimate:', result.request.gas);
|
|
866
|
+
* console.log('Would succeed:', result.result);
|
|
867
|
+
*/
|
|
868
|
+
get simulate() {
|
|
869
|
+
const contract = this.contract;
|
|
870
|
+
if (!contract.simulate) {
|
|
871
|
+
throw new Error('Public client is required for simulation');
|
|
872
|
+
}
|
|
873
|
+
return {
|
|
874
|
+
/**
|
|
875
|
+
* Simulate acceptAdmin
|
|
876
|
+
* Returns gas estimate and result without sending transaction
|
|
877
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
878
|
+
*/
|
|
879
|
+
async acceptAdmin(options) {
|
|
880
|
+
return contract.simulate.acceptAdmin(options);
|
|
881
|
+
},
|
|
882
|
+
/**
|
|
883
|
+
* Simulate cancelTransaction
|
|
884
|
+
* Returns gas estimate and result without sending transaction
|
|
885
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
886
|
+
*/
|
|
887
|
+
async cancelTransaction(target, value, signature, data, eta, options) {
|
|
888
|
+
return contract.simulate.cancelTransaction([target, value, signature, data, eta], options);
|
|
889
|
+
},
|
|
890
|
+
/**
|
|
891
|
+
* Simulate executeTransaction
|
|
892
|
+
* Returns gas estimate and result without sending transaction
|
|
893
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
894
|
+
*/
|
|
895
|
+
async executeTransaction(target, value, signature, data, eta, options) {
|
|
896
|
+
return contract.simulate.executeTransaction([target, value, signature, data, eta], options);
|
|
897
|
+
},
|
|
898
|
+
/**
|
|
899
|
+
* Simulate initialize
|
|
900
|
+
* Returns gas estimate and result without sending transaction
|
|
901
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
902
|
+
*/
|
|
903
|
+
async initialize(admin_, delay_, options) {
|
|
904
|
+
return contract.simulate.initialize([admin_, delay_], options);
|
|
905
|
+
},
|
|
906
|
+
/**
|
|
907
|
+
* Simulate queueTransaction
|
|
908
|
+
* Returns gas estimate and result without sending transaction
|
|
909
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
910
|
+
*/
|
|
911
|
+
async queueTransaction(target, value, signature, data, eta, options) {
|
|
912
|
+
return contract.simulate.queueTransaction([target, value, signature, data, eta], options);
|
|
913
|
+
},
|
|
914
|
+
/**
|
|
915
|
+
* Simulate sendERC20
|
|
916
|
+
* Returns gas estimate and result without sending transaction
|
|
917
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
918
|
+
*/
|
|
919
|
+
async sendERC20(recipient, erc20Token, tokensToSend, options) {
|
|
920
|
+
return contract.simulate.sendERC20([recipient, erc20Token, tokensToSend], options);
|
|
921
|
+
},
|
|
922
|
+
/**
|
|
923
|
+
* Simulate sendETH
|
|
924
|
+
* Returns gas estimate and result without sending transaction
|
|
925
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
926
|
+
*/
|
|
927
|
+
async sendETH(recipient, ethToSend, options) {
|
|
928
|
+
return contract.simulate.sendETH([recipient, ethToSend], options);
|
|
929
|
+
},
|
|
930
|
+
/**
|
|
931
|
+
* Simulate setDelay
|
|
932
|
+
* Returns gas estimate and result without sending transaction
|
|
933
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
934
|
+
*/
|
|
935
|
+
async setDelay(delay_, options) {
|
|
936
|
+
return contract.simulate.setDelay([delay_], options);
|
|
937
|
+
},
|
|
938
|
+
/**
|
|
939
|
+
* Simulate setPendingAdmin
|
|
940
|
+
* Returns gas estimate and result without sending transaction
|
|
941
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
942
|
+
*/
|
|
943
|
+
async setPendingAdmin(pendingAdmin_, options) {
|
|
944
|
+
return contract.simulate.setPendingAdmin([pendingAdmin_], options);
|
|
945
|
+
},
|
|
946
|
+
/**
|
|
947
|
+
* Simulate upgradeTo
|
|
948
|
+
* Returns gas estimate and result without sending transaction
|
|
949
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
950
|
+
*/
|
|
951
|
+
async upgradeTo(newImplementation, options) {
|
|
952
|
+
return contract.simulate.upgradeTo([newImplementation], options);
|
|
953
|
+
},
|
|
954
|
+
/**
|
|
955
|
+
* Simulate upgradeToAndCall
|
|
956
|
+
* Returns gas estimate and result without sending transaction
|
|
957
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
958
|
+
*/
|
|
959
|
+
async upgradeToAndCall(newImplementation, data, options) {
|
|
960
|
+
return contract.simulate.upgradeToAndCall([newImplementation, data], options);
|
|
961
|
+
}
|
|
962
|
+
};
|
|
963
|
+
}
|
|
964
|
+
/**
|
|
965
|
+
* Watch contract events
|
|
966
|
+
*
|
|
967
|
+
* @example
|
|
968
|
+
* // Watch all Transfer events
|
|
969
|
+
* const unwatch = contract.watch.Transfer((event) => {
|
|
970
|
+
* console.log('Transfer:', event);
|
|
971
|
+
* });
|
|
972
|
+
*
|
|
973
|
+
* // Stop watching
|
|
974
|
+
* unwatch();
|
|
975
|
+
*/
|
|
976
|
+
get watch() {
|
|
977
|
+
return {
|
|
978
|
+
/**
|
|
979
|
+
* Watch AdminChanged events
|
|
980
|
+
* @param callback Function to call when event is emitted
|
|
981
|
+
* @param filter Optional filter for indexed parameters
|
|
982
|
+
* @returns Unwatch function to stop listening
|
|
983
|
+
*/
|
|
984
|
+
AdminChanged: (callback) => {
|
|
985
|
+
return this.publicClient.watchContractEvent({
|
|
986
|
+
address: this.contractAddress,
|
|
987
|
+
abi: exports.NounsDAOExecutorV2_jsonAbi,
|
|
988
|
+
eventName: 'AdminChanged',
|
|
989
|
+
onLogs: (logs) => {
|
|
990
|
+
logs.forEach((log) => {
|
|
991
|
+
callback(log.args);
|
|
992
|
+
});
|
|
993
|
+
},
|
|
994
|
+
});
|
|
995
|
+
},
|
|
996
|
+
/**
|
|
997
|
+
* Watch BeaconUpgraded events
|
|
998
|
+
* @param callback Function to call when event is emitted
|
|
999
|
+
* @param filter Optional filter for indexed parameters
|
|
1000
|
+
* @returns Unwatch function to stop listening
|
|
1001
|
+
*/
|
|
1002
|
+
BeaconUpgraded: (callback, filter) => {
|
|
1003
|
+
return this.publicClient.watchContractEvent({
|
|
1004
|
+
address: this.contractAddress,
|
|
1005
|
+
abi: exports.NounsDAOExecutorV2_jsonAbi,
|
|
1006
|
+
eventName: 'BeaconUpgraded',
|
|
1007
|
+
args: filter,
|
|
1008
|
+
onLogs: (logs) => {
|
|
1009
|
+
logs.forEach((log) => {
|
|
1010
|
+
callback(log.args);
|
|
1011
|
+
});
|
|
1012
|
+
},
|
|
1013
|
+
});
|
|
1014
|
+
},
|
|
1015
|
+
/**
|
|
1016
|
+
* Watch CancelTransaction events
|
|
1017
|
+
* @param callback Function to call when event is emitted
|
|
1018
|
+
* @param filter Optional filter for indexed parameters
|
|
1019
|
+
* @returns Unwatch function to stop listening
|
|
1020
|
+
*/
|
|
1021
|
+
CancelTransaction: (callback, filter) => {
|
|
1022
|
+
return this.publicClient.watchContractEvent({
|
|
1023
|
+
address: this.contractAddress,
|
|
1024
|
+
abi: exports.NounsDAOExecutorV2_jsonAbi,
|
|
1025
|
+
eventName: 'CancelTransaction',
|
|
1026
|
+
args: filter,
|
|
1027
|
+
onLogs: (logs) => {
|
|
1028
|
+
logs.forEach((log) => {
|
|
1029
|
+
callback(log.args);
|
|
1030
|
+
});
|
|
1031
|
+
},
|
|
1032
|
+
});
|
|
1033
|
+
},
|
|
1034
|
+
/**
|
|
1035
|
+
* Watch ERC20Sent events
|
|
1036
|
+
* @param callback Function to call when event is emitted
|
|
1037
|
+
* @param filter Optional filter for indexed parameters
|
|
1038
|
+
* @returns Unwatch function to stop listening
|
|
1039
|
+
*/
|
|
1040
|
+
ERC20Sent: (callback, filter) => {
|
|
1041
|
+
return this.publicClient.watchContractEvent({
|
|
1042
|
+
address: this.contractAddress,
|
|
1043
|
+
abi: exports.NounsDAOExecutorV2_jsonAbi,
|
|
1044
|
+
eventName: 'ERC20Sent',
|
|
1045
|
+
args: filter,
|
|
1046
|
+
onLogs: (logs) => {
|
|
1047
|
+
logs.forEach((log) => {
|
|
1048
|
+
callback(log.args);
|
|
1049
|
+
});
|
|
1050
|
+
},
|
|
1051
|
+
});
|
|
1052
|
+
},
|
|
1053
|
+
/**
|
|
1054
|
+
* Watch ETHSent events
|
|
1055
|
+
* @param callback Function to call when event is emitted
|
|
1056
|
+
* @param filter Optional filter for indexed parameters
|
|
1057
|
+
* @returns Unwatch function to stop listening
|
|
1058
|
+
*/
|
|
1059
|
+
ETHSent: (callback, filter) => {
|
|
1060
|
+
return this.publicClient.watchContractEvent({
|
|
1061
|
+
address: this.contractAddress,
|
|
1062
|
+
abi: exports.NounsDAOExecutorV2_jsonAbi,
|
|
1063
|
+
eventName: 'ETHSent',
|
|
1064
|
+
args: filter,
|
|
1065
|
+
onLogs: (logs) => {
|
|
1066
|
+
logs.forEach((log) => {
|
|
1067
|
+
callback(log.args);
|
|
1068
|
+
});
|
|
1069
|
+
},
|
|
1070
|
+
});
|
|
1071
|
+
},
|
|
1072
|
+
/**
|
|
1073
|
+
* Watch ExecuteTransaction events
|
|
1074
|
+
* @param callback Function to call when event is emitted
|
|
1075
|
+
* @param filter Optional filter for indexed parameters
|
|
1076
|
+
* @returns Unwatch function to stop listening
|
|
1077
|
+
*/
|
|
1078
|
+
ExecuteTransaction: (callback, filter) => {
|
|
1079
|
+
return this.publicClient.watchContractEvent({
|
|
1080
|
+
address: this.contractAddress,
|
|
1081
|
+
abi: exports.NounsDAOExecutorV2_jsonAbi,
|
|
1082
|
+
eventName: 'ExecuteTransaction',
|
|
1083
|
+
args: filter,
|
|
1084
|
+
onLogs: (logs) => {
|
|
1085
|
+
logs.forEach((log) => {
|
|
1086
|
+
callback(log.args);
|
|
1087
|
+
});
|
|
1088
|
+
},
|
|
1089
|
+
});
|
|
1090
|
+
},
|
|
1091
|
+
/**
|
|
1092
|
+
* Watch NewAdmin events
|
|
1093
|
+
* @param callback Function to call when event is emitted
|
|
1094
|
+
* @param filter Optional filter for indexed parameters
|
|
1095
|
+
* @returns Unwatch function to stop listening
|
|
1096
|
+
*/
|
|
1097
|
+
NewAdmin: (callback, filter) => {
|
|
1098
|
+
return this.publicClient.watchContractEvent({
|
|
1099
|
+
address: this.contractAddress,
|
|
1100
|
+
abi: exports.NounsDAOExecutorV2_jsonAbi,
|
|
1101
|
+
eventName: 'NewAdmin',
|
|
1102
|
+
args: filter,
|
|
1103
|
+
onLogs: (logs) => {
|
|
1104
|
+
logs.forEach((log) => {
|
|
1105
|
+
callback(log.args);
|
|
1106
|
+
});
|
|
1107
|
+
},
|
|
1108
|
+
});
|
|
1109
|
+
},
|
|
1110
|
+
/**
|
|
1111
|
+
* Watch NewDelay events
|
|
1112
|
+
* @param callback Function to call when event is emitted
|
|
1113
|
+
* @param filter Optional filter for indexed parameters
|
|
1114
|
+
* @returns Unwatch function to stop listening
|
|
1115
|
+
*/
|
|
1116
|
+
NewDelay: (callback, filter) => {
|
|
1117
|
+
return this.publicClient.watchContractEvent({
|
|
1118
|
+
address: this.contractAddress,
|
|
1119
|
+
abi: exports.NounsDAOExecutorV2_jsonAbi,
|
|
1120
|
+
eventName: 'NewDelay',
|
|
1121
|
+
args: filter,
|
|
1122
|
+
onLogs: (logs) => {
|
|
1123
|
+
logs.forEach((log) => {
|
|
1124
|
+
callback(log.args);
|
|
1125
|
+
});
|
|
1126
|
+
},
|
|
1127
|
+
});
|
|
1128
|
+
},
|
|
1129
|
+
/**
|
|
1130
|
+
* Watch NewPendingAdmin events
|
|
1131
|
+
* @param callback Function to call when event is emitted
|
|
1132
|
+
* @param filter Optional filter for indexed parameters
|
|
1133
|
+
* @returns Unwatch function to stop listening
|
|
1134
|
+
*/
|
|
1135
|
+
NewPendingAdmin: (callback, filter) => {
|
|
1136
|
+
return this.publicClient.watchContractEvent({
|
|
1137
|
+
address: this.contractAddress,
|
|
1138
|
+
abi: exports.NounsDAOExecutorV2_jsonAbi,
|
|
1139
|
+
eventName: 'NewPendingAdmin',
|
|
1140
|
+
args: filter,
|
|
1141
|
+
onLogs: (logs) => {
|
|
1142
|
+
logs.forEach((log) => {
|
|
1143
|
+
callback(log.args);
|
|
1144
|
+
});
|
|
1145
|
+
},
|
|
1146
|
+
});
|
|
1147
|
+
},
|
|
1148
|
+
/**
|
|
1149
|
+
* Watch QueueTransaction events
|
|
1150
|
+
* @param callback Function to call when event is emitted
|
|
1151
|
+
* @param filter Optional filter for indexed parameters
|
|
1152
|
+
* @returns Unwatch function to stop listening
|
|
1153
|
+
*/
|
|
1154
|
+
QueueTransaction: (callback, filter) => {
|
|
1155
|
+
return this.publicClient.watchContractEvent({
|
|
1156
|
+
address: this.contractAddress,
|
|
1157
|
+
abi: exports.NounsDAOExecutorV2_jsonAbi,
|
|
1158
|
+
eventName: 'QueueTransaction',
|
|
1159
|
+
args: filter,
|
|
1160
|
+
onLogs: (logs) => {
|
|
1161
|
+
logs.forEach((log) => {
|
|
1162
|
+
callback(log.args);
|
|
1163
|
+
});
|
|
1164
|
+
},
|
|
1165
|
+
});
|
|
1166
|
+
},
|
|
1167
|
+
/**
|
|
1168
|
+
* Watch Upgraded events
|
|
1169
|
+
* @param callback Function to call when event is emitted
|
|
1170
|
+
* @param filter Optional filter for indexed parameters
|
|
1171
|
+
* @returns Unwatch function to stop listening
|
|
1172
|
+
*/
|
|
1173
|
+
Upgraded: (callback, filter) => {
|
|
1174
|
+
return this.publicClient.watchContractEvent({
|
|
1175
|
+
address: this.contractAddress,
|
|
1176
|
+
abi: exports.NounsDAOExecutorV2_jsonAbi,
|
|
1177
|
+
eventName: 'Upgraded',
|
|
1178
|
+
args: filter,
|
|
1179
|
+
onLogs: (logs) => {
|
|
1180
|
+
logs.forEach((log) => {
|
|
1181
|
+
callback(log.args);
|
|
1182
|
+
});
|
|
1183
|
+
},
|
|
1184
|
+
});
|
|
1185
|
+
}
|
|
1186
|
+
};
|
|
1187
|
+
}
|
|
1188
|
+
}
|
|
1189
|
+
exports.NounsDAOExecutorV2_json = NounsDAOExecutorV2_json;
|