-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathUpdateBatch.s.sol
More file actions
127 lines (115 loc) · 4.85 KB
/
UpdateBatch.s.sol
File metadata and controls
127 lines (115 loc) · 4.85 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
// // SPDX-License-Identifier: MIT
// pragma solidity ^0.8.25;
// import {ITimelockAction} from "./interfaces/ITimelockAction.sol";
// import {ActionBase} from "./base/ActionBase.sol";
// import {SetMaxNetworkLimitBase} from "./base/SetMaxNetworkLimitBase.sol";
// import {SetMiddlewareBase} from "./base/SetMiddlewareBase.sol";
// import {SetResolverBase} from "./base/SetResolverBase.sol";
// import {UpgradeProxyBase} from "./base/UpgradeProxyBase.sol";
// contract UpdateBatch is ActionBase {
// // Configuration constants - UPDATE THESE BEFORE EXECUTING
// // Address of the Network
// address constant NETWORK = 0x0000000000000000000000000000000000000000;
// // Delay for the action to be executed
// uint256 constant DELAY = 14 days;
// // Salt for TimelockController operations
// bytes32 constant SALT = "UpdateBatch";
// // Address of the Vault
// address constant VAULT1 = 0x0000000000000000000000000000000000000000;
// // Subnetwork Identifier (multiple subnetworks can be used, e.g., to have different resolvers for the same network)
// uint96 constant SUBNETWORK_IDENTIFIER1 = 0;
// // Maximum amount of delegation that network is ready to receive
// uint256 constant MAX_NETWORK_LIMIT1 = 0;
// // Address of the Vault
// address constant VAULT2 = 0x0000000000000000000000000000000000000000;
// // Subnetwork Identifier (multiple subnetworks can be used, e.g., to have different resolvers for the same network)
// uint96 constant SUBNETWORK_IDENTIFIER2 = 0;
// // Maximum amount of delegation that network is ready to receive
// uint256 constant MAX_NETWORK_LIMIT2 = 0;
// // Address of the Middleware
// address constant MIDDLEWARE = 0x0000000000000000000000000000000000000000;
// // Address of the Resolver
// address constant RESOLVER = 0x0000000000000000000000000000000000000000;
// // Address of the New Implementation
// address constant NEW_IMPLEMENTATION = 0x0000000000000000000000000000000000000000;
// // Data to pass to the new implementation after upgrade
// bytes constant UPGRADE_DATA = hex"";
// // Hints for the Resolver
// bytes constant HINTS = hex"";
// ITimelockAction[] public actions;
// constructor() {
// // Add all actions needed for the update batch to the array
// actions.push(
// new SetMaxNetworkLimitBase(
// SetMaxNetworkLimitBase.SetMaxNetworkLimitParams({
// network: NETWORK,
// vault: VAULT1,
// subnetworkId: SUBNETWORK_IDENTIFIER1,
// maxNetworkLimit: MAX_NETWORK_LIMIT1,
// delay: DELAY,
// salt: SALT
// })
// )
// );
// actions.push(
// new SetMaxNetworkLimitBase(
// SetMaxNetworkLimitBase.SetMaxNetworkLimitParams({
// network: NETWORK,
// vault: VAULT2,
// subnetworkId: SUBNETWORK_IDENTIFIER2,
// maxNetworkLimit: MAX_NETWORK_LIMIT2,
// delay: DELAY,
// salt: SALT
// })
// )
// );
// actions.push(
// new SetMiddlewareBase(
// SetMiddlewareBase.SetMiddlewareParams({
// network: NETWORK,
// middleware: MIDDLEWARE,
// delay: DELAY,
// salt: SALT
// })
// )
// );
// actions.push(
// new SetResolverBase(
// SetResolverBase.SetResolverParams({
// network: NETWORK,
// vault: VAULT1,
// identifier: SUBNETWORK_IDENTIFIER1,
// resolver: RESOLVER,
// hints: HINTS,
// delay: DELAY,
// salt: SALT
// })
// )
// );
// actions.push(
// new UpgradeProxyBase(
// UpgradeProxyBase.UpgradeProxyParams({
// network: NETWORK,
// newImplementation: NEW_IMPLEMENTATION,
// upgradeData: UPGRADE_DATA,
// delay: DELAY,
// salt: SALT
// })
// )
// );
// }
// function runS() public {
// callTimelockBatch(
// TimelockBatchParams({network: NETWORK, isExecutionMode: false, actions: actions, delay: DELAY, salt: SALT})
// );
// }
// function runE() public {
// callTimelockBatch(
// TimelockBatchParams({network: NETWORK, isExecutionMode: true, actions: actions, delay: 0, salt: SALT})
// );
// }
// function runSE() public {
// runS();
// runE();
// }
// }