@gitmyabi/nounsdaoexecutor 1.0.0 → 1.0.1
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 +5 -5
- package/contracts/{NounsDAOExecutorV2_json.d.ts → NounsDAOExecutor_json.d.ts} +17 -392
- package/contracts/{NounsDAOExecutorV2_json.js → NounsDAOExecutor_json.js} +21 -398
- package/contracts/{NounsDAOExecutorV2_json.ts → NounsDAOExecutor_json.ts} +25 -519
- package/contracts/index.d.ts +2 -4
- package/contracts/index.js +4 -7
- package/contracts/index.ts +2 -4
- package/package.json +3 -3
- package/contracts/NounsDAOExecutorProxy_json.d.ts +0 -169
- package/contracts/NounsDAOExecutorProxy_json.js +0 -221
- package/contracts/NounsDAOExecutorProxy_json.ts +0 -251
|
@@ -2,47 +2,26 @@ import type { Abi, Address, PublicClient, WalletClient, GetContractReturnType }
|
|
|
2
2
|
import { getContract } from 'viem';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
5
|
+
* NounsDAOExecutor_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 NounsDAOExecutor_jsonAbi = [
|
|
10
10
|
{
|
|
11
|
-
"inputs": [],
|
|
12
|
-
"stateMutability": "nonpayable",
|
|
13
|
-
"type": "constructor"
|
|
14
|
-
},
|
|
15
|
-
{
|
|
16
|
-
"anonymous": false,
|
|
17
11
|
"inputs": [
|
|
18
12
|
{
|
|
19
|
-
"indexed": false,
|
|
20
13
|
"internalType": "address",
|
|
21
|
-
"name": "
|
|
14
|
+
"name": "admin_",
|
|
22
15
|
"type": "address"
|
|
23
16
|
},
|
|
24
17
|
{
|
|
25
|
-
"
|
|
26
|
-
"
|
|
27
|
-
"
|
|
28
|
-
"type": "address"
|
|
29
|
-
}
|
|
30
|
-
],
|
|
31
|
-
"name": "AdminChanged",
|
|
32
|
-
"type": "event"
|
|
33
|
-
},
|
|
34
|
-
{
|
|
35
|
-
"anonymous": false,
|
|
36
|
-
"inputs": [
|
|
37
|
-
{
|
|
38
|
-
"indexed": true,
|
|
39
|
-
"internalType": "address",
|
|
40
|
-
"name": "beacon",
|
|
41
|
-
"type": "address"
|
|
18
|
+
"internalType": "uint256",
|
|
19
|
+
"name": "delay_",
|
|
20
|
+
"type": "uint256"
|
|
42
21
|
}
|
|
43
22
|
],
|
|
44
|
-
"
|
|
45
|
-
"type": "
|
|
23
|
+
"stateMutability": "nonpayable",
|
|
24
|
+
"type": "constructor"
|
|
46
25
|
},
|
|
47
26
|
{
|
|
48
27
|
"anonymous": false,
|
|
@@ -87,50 +66,6 @@ export const NounsDAOExecutorV2_jsonAbi = [
|
|
|
87
66
|
"name": "CancelTransaction",
|
|
88
67
|
"type": "event"
|
|
89
68
|
},
|
|
90
|
-
{
|
|
91
|
-
"anonymous": false,
|
|
92
|
-
"inputs": [
|
|
93
|
-
{
|
|
94
|
-
"indexed": true,
|
|
95
|
-
"internalType": "address",
|
|
96
|
-
"name": "to",
|
|
97
|
-
"type": "address"
|
|
98
|
-
},
|
|
99
|
-
{
|
|
100
|
-
"indexed": true,
|
|
101
|
-
"internalType": "address",
|
|
102
|
-
"name": "erc20Token",
|
|
103
|
-
"type": "address"
|
|
104
|
-
},
|
|
105
|
-
{
|
|
106
|
-
"indexed": false,
|
|
107
|
-
"internalType": "uint256",
|
|
108
|
-
"name": "amount",
|
|
109
|
-
"type": "uint256"
|
|
110
|
-
}
|
|
111
|
-
],
|
|
112
|
-
"name": "ERC20Sent",
|
|
113
|
-
"type": "event"
|
|
114
|
-
},
|
|
115
|
-
{
|
|
116
|
-
"anonymous": false,
|
|
117
|
-
"inputs": [
|
|
118
|
-
{
|
|
119
|
-
"indexed": true,
|
|
120
|
-
"internalType": "address",
|
|
121
|
-
"name": "to",
|
|
122
|
-
"type": "address"
|
|
123
|
-
},
|
|
124
|
-
{
|
|
125
|
-
"indexed": false,
|
|
126
|
-
"internalType": "uint256",
|
|
127
|
-
"name": "amount",
|
|
128
|
-
"type": "uint256"
|
|
129
|
-
}
|
|
130
|
-
],
|
|
131
|
-
"name": "ETHSent",
|
|
132
|
-
"type": "event"
|
|
133
|
-
},
|
|
134
69
|
{
|
|
135
70
|
"anonymous": false,
|
|
136
71
|
"inputs": [
|
|
@@ -256,19 +191,6 @@ export const NounsDAOExecutorV2_jsonAbi = [
|
|
|
256
191
|
"name": "QueueTransaction",
|
|
257
192
|
"type": "event"
|
|
258
193
|
},
|
|
259
|
-
{
|
|
260
|
-
"anonymous": false,
|
|
261
|
-
"inputs": [
|
|
262
|
-
{
|
|
263
|
-
"indexed": true,
|
|
264
|
-
"internalType": "address",
|
|
265
|
-
"name": "implementation",
|
|
266
|
-
"type": "address"
|
|
267
|
-
}
|
|
268
|
-
],
|
|
269
|
-
"name": "Upgraded",
|
|
270
|
-
"type": "event"
|
|
271
|
-
},
|
|
272
194
|
{
|
|
273
195
|
"stateMutability": "payable",
|
|
274
196
|
"type": "fallback"
|
|
@@ -312,19 +234,6 @@ export const NounsDAOExecutorV2_jsonAbi = [
|
|
|
312
234
|
"stateMutability": "view",
|
|
313
235
|
"type": "function"
|
|
314
236
|
},
|
|
315
|
-
{
|
|
316
|
-
"inputs": [],
|
|
317
|
-
"name": "NAME",
|
|
318
|
-
"outputs": [
|
|
319
|
-
{
|
|
320
|
-
"internalType": "string",
|
|
321
|
-
"name": "",
|
|
322
|
-
"type": "string"
|
|
323
|
-
}
|
|
324
|
-
],
|
|
325
|
-
"stateMutability": "view",
|
|
326
|
-
"type": "function"
|
|
327
|
-
},
|
|
328
237
|
{
|
|
329
238
|
"inputs": [],
|
|
330
239
|
"name": "acceptAdmin",
|
|
@@ -430,24 +339,6 @@ export const NounsDAOExecutorV2_jsonAbi = [
|
|
|
430
339
|
"stateMutability": "nonpayable",
|
|
431
340
|
"type": "function"
|
|
432
341
|
},
|
|
433
|
-
{
|
|
434
|
-
"inputs": [
|
|
435
|
-
{
|
|
436
|
-
"internalType": "address",
|
|
437
|
-
"name": "admin_",
|
|
438
|
-
"type": "address"
|
|
439
|
-
},
|
|
440
|
-
{
|
|
441
|
-
"internalType": "uint256",
|
|
442
|
-
"name": "delay_",
|
|
443
|
-
"type": "uint256"
|
|
444
|
-
}
|
|
445
|
-
],
|
|
446
|
-
"name": "initialize",
|
|
447
|
-
"outputs": [],
|
|
448
|
-
"stateMutability": "nonpayable",
|
|
449
|
-
"type": "function"
|
|
450
|
-
},
|
|
451
342
|
{
|
|
452
343
|
"inputs": [],
|
|
453
344
|
"name": "pendingAdmin",
|
|
@@ -519,47 +410,6 @@ export const NounsDAOExecutorV2_jsonAbi = [
|
|
|
519
410
|
"stateMutability": "view",
|
|
520
411
|
"type": "function"
|
|
521
412
|
},
|
|
522
|
-
{
|
|
523
|
-
"inputs": [
|
|
524
|
-
{
|
|
525
|
-
"internalType": "address",
|
|
526
|
-
"name": "recipient",
|
|
527
|
-
"type": "address"
|
|
528
|
-
},
|
|
529
|
-
{
|
|
530
|
-
"internalType": "address",
|
|
531
|
-
"name": "erc20Token",
|
|
532
|
-
"type": "address"
|
|
533
|
-
},
|
|
534
|
-
{
|
|
535
|
-
"internalType": "uint256",
|
|
536
|
-
"name": "tokensToSend",
|
|
537
|
-
"type": "uint256"
|
|
538
|
-
}
|
|
539
|
-
],
|
|
540
|
-
"name": "sendERC20",
|
|
541
|
-
"outputs": [],
|
|
542
|
-
"stateMutability": "nonpayable",
|
|
543
|
-
"type": "function"
|
|
544
|
-
},
|
|
545
|
-
{
|
|
546
|
-
"inputs": [
|
|
547
|
-
{
|
|
548
|
-
"internalType": "address payable",
|
|
549
|
-
"name": "recipient",
|
|
550
|
-
"type": "address"
|
|
551
|
-
},
|
|
552
|
-
{
|
|
553
|
-
"internalType": "uint256",
|
|
554
|
-
"name": "ethToSend",
|
|
555
|
-
"type": "uint256"
|
|
556
|
-
}
|
|
557
|
-
],
|
|
558
|
-
"name": "sendETH",
|
|
559
|
-
"outputs": [],
|
|
560
|
-
"stateMutability": "nonpayable",
|
|
561
|
-
"type": "function"
|
|
562
|
-
},
|
|
563
413
|
{
|
|
564
414
|
"inputs": [
|
|
565
415
|
{
|
|
@@ -586,37 +436,6 @@ export const NounsDAOExecutorV2_jsonAbi = [
|
|
|
586
436
|
"stateMutability": "nonpayable",
|
|
587
437
|
"type": "function"
|
|
588
438
|
},
|
|
589
|
-
{
|
|
590
|
-
"inputs": [
|
|
591
|
-
{
|
|
592
|
-
"internalType": "address",
|
|
593
|
-
"name": "newImplementation",
|
|
594
|
-
"type": "address"
|
|
595
|
-
}
|
|
596
|
-
],
|
|
597
|
-
"name": "upgradeTo",
|
|
598
|
-
"outputs": [],
|
|
599
|
-
"stateMutability": "nonpayable",
|
|
600
|
-
"type": "function"
|
|
601
|
-
},
|
|
602
|
-
{
|
|
603
|
-
"inputs": [
|
|
604
|
-
{
|
|
605
|
-
"internalType": "address",
|
|
606
|
-
"name": "newImplementation",
|
|
607
|
-
"type": "address"
|
|
608
|
-
},
|
|
609
|
-
{
|
|
610
|
-
"internalType": "bytes",
|
|
611
|
-
"name": "data",
|
|
612
|
-
"type": "bytes"
|
|
613
|
-
}
|
|
614
|
-
],
|
|
615
|
-
"name": "upgradeToAndCall",
|
|
616
|
-
"outputs": [],
|
|
617
|
-
"stateMutability": "payable",
|
|
618
|
-
"type": "function"
|
|
619
|
-
},
|
|
620
439
|
{
|
|
621
440
|
"stateMutability": "payable",
|
|
622
441
|
"type": "receive"
|
|
@@ -624,19 +443,19 @@ export const NounsDAOExecutorV2_jsonAbi = [
|
|
|
624
443
|
] as const satisfies Abi;
|
|
625
444
|
|
|
626
445
|
/**
|
|
627
|
-
* Type-safe ABI for
|
|
446
|
+
* Type-safe ABI for NounsDAOExecutor_json
|
|
628
447
|
*/
|
|
629
|
-
export type
|
|
448
|
+
export type NounsDAOExecutor_jsonAbi = typeof NounsDAOExecutor_jsonAbi;
|
|
630
449
|
|
|
631
450
|
/**
|
|
632
|
-
* Contract instance type for
|
|
451
|
+
* Contract instance type for NounsDAOExecutor_json
|
|
633
452
|
*/
|
|
634
453
|
// Use any for contract type to avoid complex viem type issues
|
|
635
454
|
// The runtime behavior is type-safe through viem's ABI typing
|
|
636
|
-
export type
|
|
455
|
+
export type NounsDAOExecutor_jsonContract = any;
|
|
637
456
|
|
|
638
457
|
/**
|
|
639
|
-
*
|
|
458
|
+
* NounsDAOExecutor_json Contract Class
|
|
640
459
|
*
|
|
641
460
|
* Provides a class-based API similar to TypeChain for interacting with the contract.
|
|
642
461
|
*
|
|
@@ -644,12 +463,12 @@ export type NounsDAOExecutorV2_jsonContract = any;
|
|
|
644
463
|
* ```typescript
|
|
645
464
|
* import { createPublicClient, createWalletClient, http } from 'viem';
|
|
646
465
|
* import { mainnet } from 'viem/chains';
|
|
647
|
-
* import {
|
|
466
|
+
* import { NounsDAOExecutor_json } from 'NounsDAOExecutor_json';
|
|
648
467
|
*
|
|
649
468
|
* const publicClient = createPublicClient({ chain: mainnet, transport: http() });
|
|
650
469
|
* const walletClient = createWalletClient({ chain: mainnet, transport: http() });
|
|
651
470
|
*
|
|
652
|
-
* const contract = new
|
|
471
|
+
* const contract = new NounsDAOExecutor_json('0x...', { publicClient, walletClient });
|
|
653
472
|
*
|
|
654
473
|
* // Read functions
|
|
655
474
|
* const result = await contract.balanceOf('0x...');
|
|
@@ -667,8 +486,8 @@ export type NounsDAOExecutorV2_jsonContract = any;
|
|
|
667
486
|
* });
|
|
668
487
|
* ```
|
|
669
488
|
*/
|
|
670
|
-
export class
|
|
671
|
-
private contract:
|
|
489
|
+
export class NounsDAOExecutor_json {
|
|
490
|
+
private contract: NounsDAOExecutor_jsonContract;
|
|
672
491
|
private contractAddress: Address;
|
|
673
492
|
private publicClient: PublicClient;
|
|
674
493
|
|
|
@@ -683,7 +502,7 @@ export class NounsDAOExecutorV2_json {
|
|
|
683
502
|
this.publicClient = clients.publicClient;
|
|
684
503
|
this.contract = getContract({
|
|
685
504
|
address,
|
|
686
|
-
abi:
|
|
505
|
+
abi: NounsDAOExecutor_jsonAbi,
|
|
687
506
|
client: {
|
|
688
507
|
public: clients.publicClient,
|
|
689
508
|
wallet: clients.walletClient,
|
|
@@ -701,7 +520,7 @@ export class NounsDAOExecutorV2_json {
|
|
|
701
520
|
/**
|
|
702
521
|
* Get the underlying viem contract instance
|
|
703
522
|
*/
|
|
704
|
-
getContract():
|
|
523
|
+
getContract(): NounsDAOExecutor_jsonContract {
|
|
705
524
|
return this.contract;
|
|
706
525
|
}
|
|
707
526
|
|
|
@@ -729,14 +548,6 @@ export class NounsDAOExecutorV2_json {
|
|
|
729
548
|
return this.contract.read.MINIMUM_DELAY() as Promise<bigint>;
|
|
730
549
|
}
|
|
731
550
|
|
|
732
|
-
/**
|
|
733
|
-
* NAME
|
|
734
|
-
* view
|
|
735
|
-
*/
|
|
736
|
-
async NAME(): Promise<string> {
|
|
737
|
-
return this.contract.read.NAME() as Promise<string>;
|
|
738
|
-
}
|
|
739
|
-
|
|
740
551
|
/**
|
|
741
552
|
* admin
|
|
742
553
|
* view
|
|
@@ -838,29 +649,6 @@ export class NounsDAOExecutorV2_json {
|
|
|
838
649
|
return this.contract.write.executeTransaction([target, value, signature, data, eta] as const, options) as Promise<`0x${string}`>;
|
|
839
650
|
}
|
|
840
651
|
|
|
841
|
-
/**
|
|
842
|
-
* initialize
|
|
843
|
-
* nonpayable
|
|
844
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
845
|
-
*/
|
|
846
|
-
async initialize(admin_: `0x${string}`, delay_: bigint, options?: {
|
|
847
|
-
accessList?: import('viem').AccessList;
|
|
848
|
-
authorizationList?: import('viem').AuthorizationList;
|
|
849
|
-
chain?: import('viem').Chain | null;
|
|
850
|
-
dataSuffix?: `0x${string}`;
|
|
851
|
-
gas?: bigint;
|
|
852
|
-
gasPrice?: bigint;
|
|
853
|
-
maxFeePerGas?: bigint;
|
|
854
|
-
maxPriorityFeePerGas?: bigint;
|
|
855
|
-
nonce?: number;
|
|
856
|
-
value?: bigint;
|
|
857
|
-
}): Promise<`0x${string}`> {
|
|
858
|
-
if (!this.contract.write) {
|
|
859
|
-
throw new Error('Wallet client is required for write operations');
|
|
860
|
-
}
|
|
861
|
-
return this.contract.write.initialize([admin_, delay_] as const, options) as Promise<`0x${string}`>;
|
|
862
|
-
}
|
|
863
|
-
|
|
864
652
|
/**
|
|
865
653
|
* queueTransaction
|
|
866
654
|
* nonpayable
|
|
@@ -884,52 +672,6 @@ export class NounsDAOExecutorV2_json {
|
|
|
884
672
|
return this.contract.write.queueTransaction([target, value, signature, data, eta] as const, options) as Promise<`0x${string}`>;
|
|
885
673
|
}
|
|
886
674
|
|
|
887
|
-
/**
|
|
888
|
-
* sendERC20
|
|
889
|
-
* nonpayable
|
|
890
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
891
|
-
*/
|
|
892
|
-
async sendERC20(recipient: `0x${string}`, erc20Token: `0x${string}`, tokensToSend: bigint, options?: {
|
|
893
|
-
accessList?: import('viem').AccessList;
|
|
894
|
-
authorizationList?: import('viem').AuthorizationList;
|
|
895
|
-
chain?: import('viem').Chain | null;
|
|
896
|
-
dataSuffix?: `0x${string}`;
|
|
897
|
-
gas?: bigint;
|
|
898
|
-
gasPrice?: bigint;
|
|
899
|
-
maxFeePerGas?: bigint;
|
|
900
|
-
maxPriorityFeePerGas?: bigint;
|
|
901
|
-
nonce?: number;
|
|
902
|
-
value?: bigint;
|
|
903
|
-
}): Promise<`0x${string}`> {
|
|
904
|
-
if (!this.contract.write) {
|
|
905
|
-
throw new Error('Wallet client is required for write operations');
|
|
906
|
-
}
|
|
907
|
-
return this.contract.write.sendERC20([recipient, erc20Token, tokensToSend] as const, options) as Promise<`0x${string}`>;
|
|
908
|
-
}
|
|
909
|
-
|
|
910
|
-
/**
|
|
911
|
-
* sendETH
|
|
912
|
-
* nonpayable
|
|
913
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
914
|
-
*/
|
|
915
|
-
async sendETH(recipient: `0x${string}`, ethToSend: bigint, options?: {
|
|
916
|
-
accessList?: import('viem').AccessList;
|
|
917
|
-
authorizationList?: import('viem').AuthorizationList;
|
|
918
|
-
chain?: import('viem').Chain | null;
|
|
919
|
-
dataSuffix?: `0x${string}`;
|
|
920
|
-
gas?: bigint;
|
|
921
|
-
gasPrice?: bigint;
|
|
922
|
-
maxFeePerGas?: bigint;
|
|
923
|
-
maxPriorityFeePerGas?: bigint;
|
|
924
|
-
nonce?: number;
|
|
925
|
-
value?: bigint;
|
|
926
|
-
}): Promise<`0x${string}`> {
|
|
927
|
-
if (!this.contract.write) {
|
|
928
|
-
throw new Error('Wallet client is required for write operations');
|
|
929
|
-
}
|
|
930
|
-
return this.contract.write.sendETH([recipient, ethToSend] as const, options) as Promise<`0x${string}`>;
|
|
931
|
-
}
|
|
932
|
-
|
|
933
675
|
/**
|
|
934
676
|
* setDelay
|
|
935
677
|
* nonpayable
|
|
@@ -976,52 +718,6 @@ export class NounsDAOExecutorV2_json {
|
|
|
976
718
|
return this.contract.write.setPendingAdmin([pendingAdmin_] as const, options) as Promise<`0x${string}`>;
|
|
977
719
|
}
|
|
978
720
|
|
|
979
|
-
/**
|
|
980
|
-
* upgradeTo
|
|
981
|
-
* nonpayable
|
|
982
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
983
|
-
*/
|
|
984
|
-
async upgradeTo(newImplementation: `0x${string}`, options?: {
|
|
985
|
-
accessList?: import('viem').AccessList;
|
|
986
|
-
authorizationList?: import('viem').AuthorizationList;
|
|
987
|
-
chain?: import('viem').Chain | null;
|
|
988
|
-
dataSuffix?: `0x${string}`;
|
|
989
|
-
gas?: bigint;
|
|
990
|
-
gasPrice?: bigint;
|
|
991
|
-
maxFeePerGas?: bigint;
|
|
992
|
-
maxPriorityFeePerGas?: bigint;
|
|
993
|
-
nonce?: number;
|
|
994
|
-
value?: bigint;
|
|
995
|
-
}): Promise<`0x${string}`> {
|
|
996
|
-
if (!this.contract.write) {
|
|
997
|
-
throw new Error('Wallet client is required for write operations');
|
|
998
|
-
}
|
|
999
|
-
return this.contract.write.upgradeTo([newImplementation] as const, options) as Promise<`0x${string}`>;
|
|
1000
|
-
}
|
|
1001
|
-
|
|
1002
|
-
/**
|
|
1003
|
-
* upgradeToAndCall
|
|
1004
|
-
* payable
|
|
1005
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1006
|
-
*/
|
|
1007
|
-
async upgradeToAndCall(newImplementation: `0x${string}`, data: `0x${string}`, options?: {
|
|
1008
|
-
accessList?: import('viem').AccessList;
|
|
1009
|
-
authorizationList?: import('viem').AuthorizationList;
|
|
1010
|
-
chain?: import('viem').Chain | null;
|
|
1011
|
-
dataSuffix?: `0x${string}`;
|
|
1012
|
-
gas?: bigint;
|
|
1013
|
-
gasPrice?: bigint;
|
|
1014
|
-
maxFeePerGas?: bigint;
|
|
1015
|
-
maxPriorityFeePerGas?: bigint;
|
|
1016
|
-
nonce?: number;
|
|
1017
|
-
value?: bigint;
|
|
1018
|
-
}): Promise<`0x${string}`> {
|
|
1019
|
-
if (!this.contract.write) {
|
|
1020
|
-
throw new Error('Wallet client is required for write operations');
|
|
1021
|
-
}
|
|
1022
|
-
return this.contract.write.upgradeToAndCall([newImplementation, data] as const, options) as Promise<`0x${string}`>;
|
|
1023
|
-
}
|
|
1024
|
-
|
|
1025
721
|
|
|
1026
722
|
|
|
1027
723
|
/**
|
|
@@ -1095,25 +791,6 @@ export class NounsDAOExecutorV2_json {
|
|
|
1095
791
|
}): Promise<`0x${string}`> {
|
|
1096
792
|
return contract.simulate.executeTransaction([target, value, signature, data, eta] as const, options) as Promise<`0x${string}`>;
|
|
1097
793
|
},
|
|
1098
|
-
/**
|
|
1099
|
-
* Simulate initialize
|
|
1100
|
-
* Returns gas estimate and result without sending transaction
|
|
1101
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1102
|
-
*/
|
|
1103
|
-
async initialize(admin_: `0x${string}`, delay_: bigint, options?: {
|
|
1104
|
-
accessList?: import('viem').AccessList;
|
|
1105
|
-
authorizationList?: import('viem').AuthorizationList;
|
|
1106
|
-
chain?: import('viem').Chain | null;
|
|
1107
|
-
dataSuffix?: `0x${string}`;
|
|
1108
|
-
gas?: bigint;
|
|
1109
|
-
gasPrice?: bigint;
|
|
1110
|
-
maxFeePerGas?: bigint;
|
|
1111
|
-
maxPriorityFeePerGas?: bigint;
|
|
1112
|
-
nonce?: number;
|
|
1113
|
-
value?: bigint;
|
|
1114
|
-
}): Promise<void> {
|
|
1115
|
-
return contract.simulate.initialize([admin_, delay_] as const, options) as Promise<void>;
|
|
1116
|
-
},
|
|
1117
794
|
/**
|
|
1118
795
|
* Simulate queueTransaction
|
|
1119
796
|
* Returns gas estimate and result without sending transaction
|
|
@@ -1133,44 +810,6 @@ export class NounsDAOExecutorV2_json {
|
|
|
1133
810
|
}): Promise<`0x${string}`> {
|
|
1134
811
|
return contract.simulate.queueTransaction([target, value, signature, data, eta] as const, options) as Promise<`0x${string}`>;
|
|
1135
812
|
},
|
|
1136
|
-
/**
|
|
1137
|
-
* Simulate sendERC20
|
|
1138
|
-
* Returns gas estimate and result without sending transaction
|
|
1139
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1140
|
-
*/
|
|
1141
|
-
async sendERC20(recipient: `0x${string}`, erc20Token: `0x${string}`, tokensToSend: bigint, options?: {
|
|
1142
|
-
accessList?: import('viem').AccessList;
|
|
1143
|
-
authorizationList?: import('viem').AuthorizationList;
|
|
1144
|
-
chain?: import('viem').Chain | null;
|
|
1145
|
-
dataSuffix?: `0x${string}`;
|
|
1146
|
-
gas?: bigint;
|
|
1147
|
-
gasPrice?: bigint;
|
|
1148
|
-
maxFeePerGas?: bigint;
|
|
1149
|
-
maxPriorityFeePerGas?: bigint;
|
|
1150
|
-
nonce?: number;
|
|
1151
|
-
value?: bigint;
|
|
1152
|
-
}): Promise<void> {
|
|
1153
|
-
return contract.simulate.sendERC20([recipient, erc20Token, tokensToSend] as const, options) as Promise<void>;
|
|
1154
|
-
},
|
|
1155
|
-
/**
|
|
1156
|
-
* Simulate sendETH
|
|
1157
|
-
* Returns gas estimate and result without sending transaction
|
|
1158
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1159
|
-
*/
|
|
1160
|
-
async sendETH(recipient: `0x${string}`, ethToSend: bigint, options?: {
|
|
1161
|
-
accessList?: import('viem').AccessList;
|
|
1162
|
-
authorizationList?: import('viem').AuthorizationList;
|
|
1163
|
-
chain?: import('viem').Chain | null;
|
|
1164
|
-
dataSuffix?: `0x${string}`;
|
|
1165
|
-
gas?: bigint;
|
|
1166
|
-
gasPrice?: bigint;
|
|
1167
|
-
maxFeePerGas?: bigint;
|
|
1168
|
-
maxPriorityFeePerGas?: bigint;
|
|
1169
|
-
nonce?: number;
|
|
1170
|
-
value?: bigint;
|
|
1171
|
-
}): Promise<void> {
|
|
1172
|
-
return contract.simulate.sendETH([recipient, ethToSend] as const, options) as Promise<void>;
|
|
1173
|
-
},
|
|
1174
813
|
/**
|
|
1175
814
|
* Simulate setDelay
|
|
1176
815
|
* Returns gas estimate and result without sending transaction
|
|
@@ -1208,44 +847,6 @@ export class NounsDAOExecutorV2_json {
|
|
|
1208
847
|
value?: bigint;
|
|
1209
848
|
}): Promise<void> {
|
|
1210
849
|
return contract.simulate.setPendingAdmin([pendingAdmin_] as const, options) as Promise<void>;
|
|
1211
|
-
},
|
|
1212
|
-
/**
|
|
1213
|
-
* Simulate upgradeTo
|
|
1214
|
-
* Returns gas estimate and result without sending transaction
|
|
1215
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1216
|
-
*/
|
|
1217
|
-
async upgradeTo(newImplementation: `0x${string}`, options?: {
|
|
1218
|
-
accessList?: import('viem').AccessList;
|
|
1219
|
-
authorizationList?: import('viem').AuthorizationList;
|
|
1220
|
-
chain?: import('viem').Chain | null;
|
|
1221
|
-
dataSuffix?: `0x${string}`;
|
|
1222
|
-
gas?: bigint;
|
|
1223
|
-
gasPrice?: bigint;
|
|
1224
|
-
maxFeePerGas?: bigint;
|
|
1225
|
-
maxPriorityFeePerGas?: bigint;
|
|
1226
|
-
nonce?: number;
|
|
1227
|
-
value?: bigint;
|
|
1228
|
-
}): Promise<void> {
|
|
1229
|
-
return contract.simulate.upgradeTo([newImplementation] as const, options) as Promise<void>;
|
|
1230
|
-
},
|
|
1231
|
-
/**
|
|
1232
|
-
* Simulate upgradeToAndCall
|
|
1233
|
-
* Returns gas estimate and result without sending transaction
|
|
1234
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1235
|
-
*/
|
|
1236
|
-
async upgradeToAndCall(newImplementation: `0x${string}`, data: `0x${string}`, options?: {
|
|
1237
|
-
accessList?: import('viem').AccessList;
|
|
1238
|
-
authorizationList?: import('viem').AuthorizationList;
|
|
1239
|
-
chain?: import('viem').Chain | null;
|
|
1240
|
-
dataSuffix?: `0x${string}`;
|
|
1241
|
-
gas?: bigint;
|
|
1242
|
-
gasPrice?: bigint;
|
|
1243
|
-
maxFeePerGas?: bigint;
|
|
1244
|
-
maxPriorityFeePerGas?: bigint;
|
|
1245
|
-
nonce?: number;
|
|
1246
|
-
value?: bigint;
|
|
1247
|
-
}): Promise<void> {
|
|
1248
|
-
return contract.simulate.upgradeToAndCall([newImplementation, data] as const, options) as Promise<void>;
|
|
1249
850
|
}
|
|
1250
851
|
};
|
|
1251
852
|
}
|
|
@@ -1264,44 +865,6 @@ export class NounsDAOExecutorV2_json {
|
|
|
1264
865
|
*/
|
|
1265
866
|
get watch() {
|
|
1266
867
|
return {
|
|
1267
|
-
/**
|
|
1268
|
-
* Watch AdminChanged events
|
|
1269
|
-
* @param callback Function to call when event is emitted
|
|
1270
|
-
* @param filter Optional filter for indexed parameters
|
|
1271
|
-
* @returns Unwatch function to stop listening
|
|
1272
|
-
*/
|
|
1273
|
-
AdminChanged: (callback: (event: { previousAdmin: `0x${string}`; newAdmin: `0x${string}` }) => void) => {
|
|
1274
|
-
return this.publicClient.watchContractEvent({
|
|
1275
|
-
address: this.contractAddress,
|
|
1276
|
-
abi: NounsDAOExecutorV2_jsonAbi,
|
|
1277
|
-
eventName: 'AdminChanged',
|
|
1278
|
-
|
|
1279
|
-
onLogs: (logs: any[]) => {
|
|
1280
|
-
logs.forEach((log: any) => {
|
|
1281
|
-
callback(log.args as any);
|
|
1282
|
-
});
|
|
1283
|
-
},
|
|
1284
|
-
}) as () => void;
|
|
1285
|
-
},
|
|
1286
|
-
/**
|
|
1287
|
-
* Watch BeaconUpgraded events
|
|
1288
|
-
* @param callback Function to call when event is emitted
|
|
1289
|
-
* @param filter Optional filter for indexed parameters
|
|
1290
|
-
* @returns Unwatch function to stop listening
|
|
1291
|
-
*/
|
|
1292
|
-
BeaconUpgraded: (callback: (event: { beacon: `0x${string}` }) => void, filter?: { beacon: `0x${string}` }) => {
|
|
1293
|
-
return this.publicClient.watchContractEvent({
|
|
1294
|
-
address: this.contractAddress,
|
|
1295
|
-
abi: NounsDAOExecutorV2_jsonAbi,
|
|
1296
|
-
eventName: 'BeaconUpgraded',
|
|
1297
|
-
args: filter,
|
|
1298
|
-
onLogs: (logs: any[]) => {
|
|
1299
|
-
logs.forEach((log: any) => {
|
|
1300
|
-
callback(log.args as any);
|
|
1301
|
-
});
|
|
1302
|
-
},
|
|
1303
|
-
}) as () => void;
|
|
1304
|
-
},
|
|
1305
868
|
/**
|
|
1306
869
|
* Watch CancelTransaction events
|
|
1307
870
|
* @param callback Function to call when event is emitted
|
|
@@ -1311,7 +874,7 @@ export class NounsDAOExecutorV2_json {
|
|
|
1311
874
|
CancelTransaction: (callback: (event: { txHash: `0x${string}`; target: `0x${string}`; value: bigint; signature: string; data: `0x${string}`; eta: bigint }) => void, filter?: { txHash: `0x${string}`; target: `0x${string}` }) => {
|
|
1312
875
|
return this.publicClient.watchContractEvent({
|
|
1313
876
|
address: this.contractAddress,
|
|
1314
|
-
abi:
|
|
877
|
+
abi: NounsDAOExecutor_jsonAbi,
|
|
1315
878
|
eventName: 'CancelTransaction',
|
|
1316
879
|
args: filter,
|
|
1317
880
|
onLogs: (logs: any[]) => {
|
|
@@ -1321,44 +884,6 @@ export class NounsDAOExecutorV2_json {
|
|
|
1321
884
|
},
|
|
1322
885
|
}) as () => void;
|
|
1323
886
|
},
|
|
1324
|
-
/**
|
|
1325
|
-
* Watch ERC20Sent events
|
|
1326
|
-
* @param callback Function to call when event is emitted
|
|
1327
|
-
* @param filter Optional filter for indexed parameters
|
|
1328
|
-
* @returns Unwatch function to stop listening
|
|
1329
|
-
*/
|
|
1330
|
-
ERC20Sent: (callback: (event: { to: `0x${string}`; erc20Token: `0x${string}`; amount: bigint }) => void, filter?: { to: `0x${string}`; erc20Token: `0x${string}` }) => {
|
|
1331
|
-
return this.publicClient.watchContractEvent({
|
|
1332
|
-
address: this.contractAddress,
|
|
1333
|
-
abi: NounsDAOExecutorV2_jsonAbi,
|
|
1334
|
-
eventName: 'ERC20Sent',
|
|
1335
|
-
args: filter,
|
|
1336
|
-
onLogs: (logs: any[]) => {
|
|
1337
|
-
logs.forEach((log: any) => {
|
|
1338
|
-
callback(log.args as any);
|
|
1339
|
-
});
|
|
1340
|
-
},
|
|
1341
|
-
}) as () => void;
|
|
1342
|
-
},
|
|
1343
|
-
/**
|
|
1344
|
-
* Watch ETHSent events
|
|
1345
|
-
* @param callback Function to call when event is emitted
|
|
1346
|
-
* @param filter Optional filter for indexed parameters
|
|
1347
|
-
* @returns Unwatch function to stop listening
|
|
1348
|
-
*/
|
|
1349
|
-
ETHSent: (callback: (event: { to: `0x${string}`; amount: bigint }) => void, filter?: { to: `0x${string}` }) => {
|
|
1350
|
-
return this.publicClient.watchContractEvent({
|
|
1351
|
-
address: this.contractAddress,
|
|
1352
|
-
abi: NounsDAOExecutorV2_jsonAbi,
|
|
1353
|
-
eventName: 'ETHSent',
|
|
1354
|
-
args: filter,
|
|
1355
|
-
onLogs: (logs: any[]) => {
|
|
1356
|
-
logs.forEach((log: any) => {
|
|
1357
|
-
callback(log.args as any);
|
|
1358
|
-
});
|
|
1359
|
-
},
|
|
1360
|
-
}) as () => void;
|
|
1361
|
-
},
|
|
1362
887
|
/**
|
|
1363
888
|
* Watch ExecuteTransaction events
|
|
1364
889
|
* @param callback Function to call when event is emitted
|
|
@@ -1368,7 +893,7 @@ export class NounsDAOExecutorV2_json {
|
|
|
1368
893
|
ExecuteTransaction: (callback: (event: { txHash: `0x${string}`; target: `0x${string}`; value: bigint; signature: string; data: `0x${string}`; eta: bigint }) => void, filter?: { txHash: `0x${string}`; target: `0x${string}` }) => {
|
|
1369
894
|
return this.publicClient.watchContractEvent({
|
|
1370
895
|
address: this.contractAddress,
|
|
1371
|
-
abi:
|
|
896
|
+
abi: NounsDAOExecutor_jsonAbi,
|
|
1372
897
|
eventName: 'ExecuteTransaction',
|
|
1373
898
|
args: filter,
|
|
1374
899
|
onLogs: (logs: any[]) => {
|
|
@@ -1387,7 +912,7 @@ export class NounsDAOExecutorV2_json {
|
|
|
1387
912
|
NewAdmin: (callback: (event: { newAdmin: `0x${string}` }) => void, filter?: { newAdmin: `0x${string}` }) => {
|
|
1388
913
|
return this.publicClient.watchContractEvent({
|
|
1389
914
|
address: this.contractAddress,
|
|
1390
|
-
abi:
|
|
915
|
+
abi: NounsDAOExecutor_jsonAbi,
|
|
1391
916
|
eventName: 'NewAdmin',
|
|
1392
917
|
args: filter,
|
|
1393
918
|
onLogs: (logs: any[]) => {
|
|
@@ -1406,7 +931,7 @@ export class NounsDAOExecutorV2_json {
|
|
|
1406
931
|
NewDelay: (callback: (event: { newDelay: bigint }) => void, filter?: { newDelay: bigint }) => {
|
|
1407
932
|
return this.publicClient.watchContractEvent({
|
|
1408
933
|
address: this.contractAddress,
|
|
1409
|
-
abi:
|
|
934
|
+
abi: NounsDAOExecutor_jsonAbi,
|
|
1410
935
|
eventName: 'NewDelay',
|
|
1411
936
|
args: filter,
|
|
1412
937
|
onLogs: (logs: any[]) => {
|
|
@@ -1425,7 +950,7 @@ export class NounsDAOExecutorV2_json {
|
|
|
1425
950
|
NewPendingAdmin: (callback: (event: { newPendingAdmin: `0x${string}` }) => void, filter?: { newPendingAdmin: `0x${string}` }) => {
|
|
1426
951
|
return this.publicClient.watchContractEvent({
|
|
1427
952
|
address: this.contractAddress,
|
|
1428
|
-
abi:
|
|
953
|
+
abi: NounsDAOExecutor_jsonAbi,
|
|
1429
954
|
eventName: 'NewPendingAdmin',
|
|
1430
955
|
args: filter,
|
|
1431
956
|
onLogs: (logs: any[]) => {
|
|
@@ -1444,7 +969,7 @@ export class NounsDAOExecutorV2_json {
|
|
|
1444
969
|
QueueTransaction: (callback: (event: { txHash: `0x${string}`; target: `0x${string}`; value: bigint; signature: string; data: `0x${string}`; eta: bigint }) => void, filter?: { txHash: `0x${string}`; target: `0x${string}` }) => {
|
|
1445
970
|
return this.publicClient.watchContractEvent({
|
|
1446
971
|
address: this.contractAddress,
|
|
1447
|
-
abi:
|
|
972
|
+
abi: NounsDAOExecutor_jsonAbi,
|
|
1448
973
|
eventName: 'QueueTransaction',
|
|
1449
974
|
args: filter,
|
|
1450
975
|
onLogs: (logs: any[]) => {
|
|
@@ -1453,25 +978,6 @@ export class NounsDAOExecutorV2_json {
|
|
|
1453
978
|
});
|
|
1454
979
|
},
|
|
1455
980
|
}) as () => void;
|
|
1456
|
-
},
|
|
1457
|
-
/**
|
|
1458
|
-
* Watch Upgraded events
|
|
1459
|
-
* @param callback Function to call when event is emitted
|
|
1460
|
-
* @param filter Optional filter for indexed parameters
|
|
1461
|
-
* @returns Unwatch function to stop listening
|
|
1462
|
-
*/
|
|
1463
|
-
Upgraded: (callback: (event: { implementation: `0x${string}` }) => void, filter?: { implementation: `0x${string}` }) => {
|
|
1464
|
-
return this.publicClient.watchContractEvent({
|
|
1465
|
-
address: this.contractAddress,
|
|
1466
|
-
abi: NounsDAOExecutorV2_jsonAbi,
|
|
1467
|
-
eventName: 'Upgraded',
|
|
1468
|
-
args: filter,
|
|
1469
|
-
onLogs: (logs: any[]) => {
|
|
1470
|
-
logs.forEach((log: any) => {
|
|
1471
|
-
callback(log.args as any);
|
|
1472
|
-
});
|
|
1473
|
-
},
|
|
1474
|
-
}) as () => void;
|
|
1475
981
|
}
|
|
1476
982
|
};
|
|
1477
983
|
}
|