Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1.0.0-rc1 #236

Merged
merged 134 commits into from
Dec 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
134 commits
Select commit Hold shift + click to select a range
b0a51b4
Add scenario test of time-sensitive proposal launch
Psirex Nov 13, 2024
f1c9482
Reset RageQuitRound in the VetoCooldown state
Psirex Nov 14, 2024
83adb3b
Cancel pending proposals on governance change
Psirex Nov 15, 2024
b656180
check if minAssetsLockDuration changed on set
bulbozaur Nov 22, 2024
76d22fc
gas optimization
bulbozaur Nov 27, 2024
d5ed8cd
Add deploy script draft
sandstone-ag Aug 23, 2024
8b486bb
Move Lido addresses file
sandstone-ag Aug 23, 2024
14a9080
Use deployer address
sandstone-ag Aug 23, 2024
427d744
Implement switching between networks
sandstone-ag Aug 23, 2024
ca6638b
Merge changes from the develop branch
sandstone-ag Aug 26, 2024
b1fe19b
Validate deployed contracts as a last step of the script
sandstone-ag Aug 27, 2024
e2fc06c
Implement missing methods in DeployValidation
sandstone-ag Sep 2, 2024
cc5c69e
Make deploy validation errors more verbose
sandstone-ag Sep 2, 2024
ae569d5
Various improvements
sandstone-ag Sep 3, 2024
b43b8f4
Various improvements
sandstone-ag Sep 10, 2024
9e7e0a2
Rename some files
sandstone-ag Sep 10, 2024
fd67602
Rename Deploy.s.sol to DeployBase.s.sol
sandstone-ag Sep 10, 2024
d77ec35
Extract deploy main functionality to a separate abstract contract. Ad…
sandstone-ag Sep 10, 2024
2102f8d
Add support for mocked Lido contracts on Holesky
sandstone-ag Sep 11, 2024
67fffa7
Add more checks to DeployVerification and config validation
sandstone-ag Sep 11, 2024
3490786
Fix DeployConfig fields according to changed DGConfig fields
sandstone-ag Sep 12, 2024
67a1f62
Update forge-std library
sandstone-ag Oct 4, 2024
4779f2e
Allow to read files from project dir. Update .env.example.
sandstone-ag Oct 4, 2024
df42233
Move deploy config defaults to Config.sol
sandstone-ag Oct 4, 2024
1a606b0
Read deploy parameters from JSON file
sandstone-ag Oct 4, 2024
998b38c
Use deploy script for scenario tests configuration
sandstone-ag Oct 4, 2024
e93de56
Update Readme file
sandstone-ag Oct 4, 2024
c100709
Fix deploy verification
sandstone-ag Oct 4, 2024
2f5cd8d
Use the credentials stored in cast wallet
sandstone-ag Oct 4, 2024
5cef796
Remove deployment of EmergencyActivationCommittee, EmergencyExecution…
sandstone-ag Oct 7, 2024
9f4579e
Update .env.example
sandstone-ag Oct 7, 2024
20a4d37
Support etherscan verification
sandstone-ag Oct 13, 2024
4f17d3b
Fix review comments
sandstone-ag Oct 16, 2024
55e1880
Remove unnecessary comments
sandstone-ag Oct 16, 2024
a0be879
Remove reseal, emergency activation and execution committees
Psirex Oct 15, 2024
fada19f
change reseal manager variable in dual governance
rkolpakov Oct 14, 2024
5f40d3a
change admin executor variable in timelock
rkolpakov Oct 14, 2024
adb4b2e
review fixes
rkolpakov Oct 15, 2024
c3f2e97
Fix build after merge of PR#136
sandstone-ag Oct 23, 2024
ec7eaf1
add draft for resealer library
rkolpakov Oct 18, 2024
c1a6c67
review fixes
rkolpakov Oct 22, 2024
2e5e723
tests: add test case to forbid front-running claim of unStETH from batch
bulbozaur Oct 25, 2024
318ea70
Fix not working test
Psirex Oct 27, 2024
f7b34ef
Add missing executeProposal to plan-b doc
Psirex Nov 28, 2024
59f35d4
Merge branch 'develop' into develop-archive-sorted-through
Psirex Nov 29, 2024
407dd5d
Remove unused interfaces and tests.
sandstone-ag Nov 13, 2024
d1188d2
Update interfaces
sandstone-ag Nov 13, 2024
490bb0e
Move IAragonVoting interface to tests folder
sandstone-ag Nov 20, 2024
d6251ac
Move some methods to ITimelock interface
sandstone-ag Nov 20, 2024
fabdd30
Move struct declarations
sandstone-ag Nov 20, 2024
3b2201a
Add methods executeProposal(), canExecuteProposal() to DualGovernance…
sandstone-ag Nov 21, 2024
d69602d
Merge pull request #199 from lidofinance/feature/cancel-proposals-on-…
bulbozaur Nov 29, 2024
a92f290
Merge pull request #180 from lidofinance/fix/rage-quit-round-reset-state
bulbozaur Nov 29, 2024
d42354f
Merge pull request #179 from lidofinance/feature/time-sensitive-propo…
bulbozaur Nov 29, 2024
942dde0
Merge develop-archive-sorted-through into fix/interfaces-update
bulbozaur Nov 29, 2024
60999a3
Merge pull request #224 from lidofinance/fix/interfaces-update-rebuild
Psirex Nov 29, 2024
eeede1a
fix test and natspec
bulbozaur Nov 29, 2024
9341cd9
Merge pull request #210 from lidofinance/fix/check-minAssetsLockDurat…
bulbozaur Nov 29, 2024
eed31d5
Remove unused AssetsAccounting.getLockedAssetsTotal getter
Psirex Oct 27, 2024
a09d696
Merge pull request #150 from lidofinance/feature/remove-unused-assets…
bulbozaur Nov 29, 2024
f41b870
Fix merge errors
Psirex Nov 29, 2024
10ec606
Move checkCallerIsAdminExecutor into TimelockState
Psirex Oct 27, 2024
ed8f264
Merge pull request #151 from lidofinance/refactor/check-admin-executor
bulbozaur Nov 29, 2024
8d12fa4
Include only contracts dir to coverage report
Psirex Oct 28, 2024
047e85a
Merge pull request #148 from lidofinance/fix/coverage-ignore-scripts
bulbozaur Nov 29, 2024
3654668
Add separate flag to manage proposals cancelling permission
Psirex Oct 27, 2024
fa587f2
Single canceller address. Add tests
Psirex Oct 28, 2024
5429798
Exclude changes for setting proposer's executor
Psirex Nov 20, 2024
215e22e
Add natspec to set/getProposalsCanceller
Psirex Nov 28, 2024
07ffeea
Use expectEmit() without params in tests
Psirex Nov 28, 2024
2efe1b2
Fix merging changes
Psirex Nov 29, 2024
6663f09
Merge pull request #152 from lidofinance/feature/proposals-canceller-…
bulbozaur Nov 29, 2024
6ab5448
Split owner and operator roles in Executor
Psirex Oct 28, 2024
fec6667
Make Executor.execute() compatible with Agent.execute()
Psirex Oct 28, 2024
f0077d8
Add method to set executor for registered proposer
Psirex Nov 20, 2024
58ad456
Add scenario test on executors management
Psirex Nov 20, 2024
0f583d8
Revert the changes in the Executor’s ownership flow
Psirex Nov 27, 2024
5af27ca
Update agent as executor tests
Psirex Nov 27, 2024
db161b9
Add scenario test with calls to EOA from agent
Psirex Nov 28, 2024
4b9a8e5
Update Executor natspec
Psirex Nov 28, 2024
64a212c
Naming convention for the proposers and executors
Psirex Nov 28, 2024
27ec2b3
Restore transferExecutorOwnership unit tests
Psirex Nov 29, 2024
9912f75
Merge pull request #153 from lidofinance/feature/add-operator-to-exec…
bulbozaur Nov 29, 2024
39e74b5
Merge pull request #222 from lidofinance/develop-archive-sorted-through
bulbozaur Nov 29, 2024
4a9350f
Escrow interface refactor
Psirex Nov 28, 2024
61b03c0
Add mock contracts for StEth, WstEth, WithdrawalQueue for testing the…
sandstone-ag Oct 24, 2024
38c9224
Change rage quit support checks
sandstone-ag Nov 29, 2024
adecd91
Update changelog, change test name
sandstone-ag Dec 4, 2024
4cc7230
Implement getters logic. Split IEscrow file.
Psirex Dec 4, 2024
4b1120c
Merge pull request #143 from lidofinance/feature/lido-contracts-mock
sandstone-ag Dec 5, 2024
278dc69
Add missing natspec to Escrow. Remove EscrowMock
Psirex Dec 5, 2024
f696d5a
increase MIN_TRANSFERRABLE_ST_ETH_AMOUNT
bulbozaur Dec 5, 2024
88a133f
test getter
bulbozaur Dec 5, 2024
8409ce8
Merge pull request #228 from lidofinance/feature/increase-min-transfe…
Psirex Dec 5, 2024
72e8bdf
Update graph of DG timelock duration
sandstone-ag Dec 5, 2024
822670c
Merge pull request #227 from lidofinance/feature/change-rage-quit-sup…
Psirex Dec 5, 2024
dbc39d2
Escrow.startRageQuit() without returning value
Psirex Dec 5, 2024
0bd250f
Use prefix new for arguments in the setters
Psirex Dec 5, 2024
e8a2688
Refactor Executor event
Psirex Dec 6, 2024
80fa52e
Add unit tests for Executor contract
Psirex Dec 6, 2024
784dfd5
Add separate ProposalReported event
Psirex Dec 6, 2024
1ee0b1b
Remove "registered" prefix from DG methods for proposers and executors
Psirex Dec 6, 2024
4449541
Add maximum assets lock duration to Escrow contract
bulbozaur Dec 6, 2024
b418666
DualGovernance dependencies split
bulbozaur Dec 6, 2024
27ca769
Add some unit tests for WithdrawalBatchesQueue. Minor improvements.
sandstone-ag Oct 29, 2024
c5906b8
Add unit tests for Escrow contract
sandstone-ag Dec 6, 2024
9a2043e
Merge pull request #232 from lidofinance/refactor/proposers-executors…
bulbozaur Dec 6, 2024
e77f36c
Rename MAX_ASSETS_LOCK_DURATION to MAX_MIN_ASSETS_LOCK_DURATION for c…
bulbozaur Dec 6, 2024
01a4b83
Merge pull request #176 from lidofinance/feature/escrow-contract-unit…
Psirex Dec 6, 2024
ef21895
Add setProposerExecutor to IDualGovernance. Fix test assume
Psirex Dec 6, 2024
6e4e91c
Merge pull request #229 from lidofinance/refactor/setter-args-prefix-…
bulbozaur Dec 6, 2024
364c63f
Merge remote-tracking branch 'origin/develop' into fix/max-assets-loc…
bulbozaur Dec 6, 2024
e324c68
Added AssetsAccounting.getLockedUnstETHDetails(). Update RageQuitEscr…
Psirex Dec 6, 2024
d7da5ab
Merge branch 'develop' into refactor/escrow-master-copy
Psirex Dec 6, 2024
c9d4442
Add tests for getLockedUnstETHDetails method
Psirex Dec 6, 2024
9d03b29
Add getEscrowState() unit test
Psirex Dec 6, 2024
38cbf38
AssetsAccounting test improvement. Small gas tweaks
Psirex Dec 6, 2024
6120941
Merge pull request #219 from lidofinance/refactor/escrow-master-copy
bulbozaur Dec 6, 2024
b985214
IGovernance.ProposalReported() -> IGovernance.ProposalSubmitted()
Psirex Dec 6, 2024
f1e279d
Merge remote-tracking branch 'origin/develop' into fix/max-assets-loc…
bulbozaur Dec 6, 2024
a8f3ede
using IResealManager
bulbozaur Dec 6, 2024
77c1117
Update checks on unexpected state
Psirex Dec 5, 2024
8e39d28
Use NotInitialized as default state for StateMachine and WithdrawalsB…
Psirex Dec 5, 2024
835b5a0
Refactor ExecutableProposals invalid states error
Psirex Dec 6, 2024
602235f
detailed error
bulbozaur Dec 6, 2024
e0e266a
Fix tests
sandstone-ag Dec 6, 2024
ade2290
getters order
bulbozaur Dec 6, 2024
13736dd
Merge pull request #230 from lidofinance/refactor/error-names-improve…
Psirex Dec 6, 2024
5aaab5b
Merge pull request #233 from lidofinance/fix/max-assets-lock-duration
bulbozaur Dec 6, 2024
8c28258
Merge pull request #231 from lidofinance/refactor/events
Psirex Dec 6, 2024
dafd887
hashConsensus gas optimization
bulbozaur Dec 6, 2024
024717c
Merge pull request #234 from lidofinance/fix/hashConsensus-gas-optimi…
bulbozaur Dec 6, 2024
20baa96
Update spec with the code changes. Add scheduleProposal method
Psirex Dec 9, 2024
1f1b02d
Merge pull request #235 from lidofinance/fix/specification-updates
bulbozaur Dec 9, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1 +1,7 @@
MAINNET_RPC_URL=<your RPC url>

# Deploy script env vars
CHAIN=<"mainnet" OR "holesky" OR "holesky-mocks">
ETHERSCAN_MAINNET_KEY=...
DEPLOY_CONFIG_FILE_PATH=deploy-config/deploy-config.json
DEPLOYED_ADDRESSES_FILE_PATH=deploy-config/deployed-addrs.json
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ cache_forge/
out/

# Foundry: development broadcast logs
!/broadcast
/broadcast
/broadcast/*/31337/
/broadcast/**/dry-run/
.vscode/
deploy-config
1 change: 1 addition & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
[submodule "lib/forge-std"]
path = lib/forge-std
url = https://github.com/foundry-rs/forge-std
branch = tags/v1.9.3
[submodule "lib/kontrol-cheatcodes"]
path = lib/kontrol-cheatcodes
url = https://github.com/runtimeverification/kontrol-cheatcodes
Expand Down
7 changes: 7 additions & 0 deletions addresses/holesky-addresses.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.26;

address constant DAO_VOTING = 0xdA7d2573Df555002503F29aA4003e398d28cc00f;
address constant ST_ETH = 0x3F1c547b21f65e10480dE3ad8E19fAAC46C95034;
address constant WST_ETH = 0x8d09a4502Cc8Cf1547aD300E066060D043f6982D;
address constant WITHDRAWAL_QUEUE = 0xc7cc160b58F8Bb0baC94b80847E2CF2800565C50;
File renamed without changes.
245 changes: 147 additions & 98 deletions contracts/DualGovernance.sol

Large diffs are not rendered by default.

92 changes: 37 additions & 55 deletions contracts/EmergencyProtectedTimelock.sol
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,6 @@ contract EmergencyProtectedTimelock is IEmergencyProtectedTimelock {
using ExecutableProposals for ExecutableProposals.Context;
using EmergencyProtection for EmergencyProtection.Context;

// ---
// Errors
// ---

error CallerIsNotAdminExecutor(address value);

// ---
// Sanity Check Parameters & Immutables
// ---
Expand Down Expand Up @@ -61,13 +55,6 @@ contract EmergencyProtectedTimelock is IEmergencyProtectedTimelock {
/// @notice The upper bound for the time the emergency protection mechanism can be activated.
Duration public immutable MAX_EMERGENCY_PROTECTION_DURATION;

// ---
// Admin Executor Immutables
// ---

/// @dev The address of the admin executor, authorized to manage the EmergencyProtectedTimelock instance.
address private immutable _ADMIN_EXECUTOR;

// ---
// Aspects
// ---
Expand All @@ -91,14 +78,14 @@ contract EmergencyProtectedTimelock is IEmergencyProtectedTimelock {
Duration afterSubmitDelay,
Duration afterScheduleDelay
) {
_ADMIN_EXECUTOR = adminExecutor;

MIN_EXECUTION_DELAY = sanityCheckParams.minExecutionDelay;
MAX_AFTER_SUBMIT_DELAY = sanityCheckParams.maxAfterSubmitDelay;
MAX_AFTER_SCHEDULE_DELAY = sanityCheckParams.maxAfterScheduleDelay;
MAX_EMERGENCY_MODE_DURATION = sanityCheckParams.maxEmergencyModeDuration;
MAX_EMERGENCY_PROTECTION_DURATION = sanityCheckParams.maxEmergencyProtectionDuration;

_timelockState.setAdminExecutor(adminExecutor);

if (afterSubmitDelay > Durations.ZERO) {
_timelockState.setAfterSubmitDelay(afterSubmitDelay, MAX_AFTER_SUBMIT_DELAY);
}
Expand All @@ -115,19 +102,12 @@ contract EmergencyProtectedTimelock is IEmergencyProtectedTimelock {
// ---

/// @notice Submits a new proposal to execute a series of calls through an executor.
/// @param proposer The address of the proposer submitting the proposal.
/// @param executor The address of the executor contract that will execute the calls.
/// @param calls An array of `ExternalCall` structs representing the calls to be executed.
/// @param metadata A string containing additional information about the proposal.
/// @return newProposalId The id of the newly created proposal.
function submit(
address proposer,
address executor,
ExternalCall[] calldata calls,
string calldata metadata
) external returns (uint256 newProposalId) {
function submit(address executor, ExternalCall[] calldata calls) external returns (uint256 newProposalId) {
_timelockState.checkCallerIsGovernance();
newProposalId = _proposals.submit(proposer, executor, calls, metadata);
newProposalId = _proposals.submit(executor, calls);
}

/// @notice Schedules a proposal for execution after a specified delay.
Expand Down Expand Up @@ -157,15 +137,16 @@ contract EmergencyProtectedTimelock is IEmergencyProtectedTimelock {
/// @notice Updates the address of the governance contract.
/// @param newGovernance The address of the new governance contract to be set.
function setGovernance(address newGovernance) external {
_checkCallerIsAdminExecutor();
_timelockState.checkCallerIsAdminExecutor();
_timelockState.setGovernance(newGovernance);
_proposals.cancelAll();
}

/// @notice Sets the delay required to pass from the submission of a proposal before it can be scheduled for execution.
/// Ensures that the new delay value complies with the defined sanity check bounds.
/// @param newAfterSubmitDelay The delay required before a submitted proposal can be scheduled.
function setAfterSubmitDelay(Duration newAfterSubmitDelay) external {
_checkCallerIsAdminExecutor();
_timelockState.checkCallerIsAdminExecutor();
_timelockState.setAfterSubmitDelay(newAfterSubmitDelay, MAX_AFTER_SUBMIT_DELAY);
_timelockState.checkExecutionDelay(MIN_EXECUTION_DELAY);
}
Expand All @@ -174,7 +155,7 @@ contract EmergencyProtectedTimelock is IEmergencyProtectedTimelock {
/// Ensures that the new delay value complies with the defined sanity check bounds.
/// @param newAfterScheduleDelay The delay required before a scheduled proposal can be executed.
function setAfterScheduleDelay(Duration newAfterScheduleDelay) external {
_checkCallerIsAdminExecutor();
_timelockState.checkCallerIsAdminExecutor();
_timelockState.setAfterScheduleDelay(newAfterScheduleDelay, MAX_AFTER_SCHEDULE_DELAY);
_timelockState.checkExecutionDelay(MIN_EXECUTION_DELAY);
}
Expand All @@ -183,7 +164,7 @@ contract EmergencyProtectedTimelock is IEmergencyProtectedTimelock {
/// @param executor The address of the executor contract.
/// @param owner The address of the new owner.
function transferExecutorOwnership(address executor, address owner) external {
_checkCallerIsAdminExecutor();
_timelockState.checkCallerIsAdminExecutor();
IOwnable(executor).transferOwnership(owner);
}

Expand All @@ -192,40 +173,40 @@ contract EmergencyProtectedTimelock is IEmergencyProtectedTimelock {
// ---

/// @notice Sets the emergency activation committee address.
/// @param emergencyActivationCommittee The address of the emergency activation committee.
function setEmergencyProtectionActivationCommittee(address emergencyActivationCommittee) external {
_checkCallerIsAdminExecutor();
_emergencyProtection.setEmergencyActivationCommittee(emergencyActivationCommittee);
/// @param newEmergencyActivationCommittee The address of the emergency activation committee.
function setEmergencyProtectionActivationCommittee(address newEmergencyActivationCommittee) external {
_timelockState.checkCallerIsAdminExecutor();
_emergencyProtection.setEmergencyActivationCommittee(newEmergencyActivationCommittee);
}

/// @notice Sets the emergency execution committee address.
/// @param emergencyExecutionCommittee The address of the emergency execution committee.
function setEmergencyProtectionExecutionCommittee(address emergencyExecutionCommittee) external {
_checkCallerIsAdminExecutor();
_emergencyProtection.setEmergencyExecutionCommittee(emergencyExecutionCommittee);
/// @param newEmergencyExecutionCommittee The address of the emergency execution committee.
function setEmergencyProtectionExecutionCommittee(address newEmergencyExecutionCommittee) external {
_timelockState.checkCallerIsAdminExecutor();
_emergencyProtection.setEmergencyExecutionCommittee(newEmergencyExecutionCommittee);
}

/// @notice Sets the emergency protection end date.
/// @param emergencyProtectionEndDate The timestamp of the emergency protection end date.
function setEmergencyProtectionEndDate(Timestamp emergencyProtectionEndDate) external {
_checkCallerIsAdminExecutor();
/// @param newEmergencyProtectionEndDate The timestamp of the emergency protection end date.
function setEmergencyProtectionEndDate(Timestamp newEmergencyProtectionEndDate) external {
_timelockState.checkCallerIsAdminExecutor();
_emergencyProtection.setEmergencyProtectionEndDate(
emergencyProtectionEndDate, MAX_EMERGENCY_PROTECTION_DURATION
newEmergencyProtectionEndDate, MAX_EMERGENCY_PROTECTION_DURATION
);
}

/// @notice Sets the emergency mode duration.
/// @param emergencyModeDuration The duration of the emergency mode.
function setEmergencyModeDuration(Duration emergencyModeDuration) external {
_checkCallerIsAdminExecutor();
_emergencyProtection.setEmergencyModeDuration(emergencyModeDuration, MAX_EMERGENCY_MODE_DURATION);
/// @param newEmergencyModeDuration The duration of the emergency mode.
function setEmergencyModeDuration(Duration newEmergencyModeDuration) external {
_timelockState.checkCallerIsAdminExecutor();
_emergencyProtection.setEmergencyModeDuration(newEmergencyModeDuration, MAX_EMERGENCY_MODE_DURATION);
}

/// @notice Sets the emergency governance address.
/// @param emergencyGovernance The address of the emergency governance.
function setEmergencyGovernance(address emergencyGovernance) external {
_checkCallerIsAdminExecutor();
_emergencyProtection.setEmergencyGovernance(emergencyGovernance);
/// @param newEmergencyGovernance The address of the emergency governance.
function setEmergencyGovernance(address newEmergencyGovernance) external {
_timelockState.checkCallerIsAdminExecutor();
_emergencyProtection.setEmergencyGovernance(newEmergencyGovernance);
}

/// @notice Activates the emergency mode.
Expand All @@ -247,7 +228,7 @@ contract EmergencyProtectedTimelock is IEmergencyProtectedTimelock {
function deactivateEmergencyMode() external {
_emergencyProtection.checkEmergencyMode({isActive: true});
if (!_emergencyProtection.isEmergencyModeDurationPassed()) {
_checkCallerIsAdminExecutor();
_timelockState.checkCallerIsAdminExecutor();
}
_emergencyProtection.deactivateEmergencyMode();
_proposals.cancelAll();
Expand Down Expand Up @@ -312,7 +293,7 @@ contract EmergencyProtectedTimelock is IEmergencyProtectedTimelock {
/// @notice Returns the address of the admin executor.
/// @return adminExecutor The address of the admin executor.
function getAdminExecutor() external view returns (address) {
return _ADMIN_EXECUTOR;
return _timelockState.adminExecutor;
}

/// @notice Returns the configured delay duration required before a submitted proposal can be scheduled.
Expand Down Expand Up @@ -388,12 +369,13 @@ contract EmergencyProtectedTimelock is IEmergencyProtectedTimelock {
}

// ---
// Internal Methods
// Admin Executor Methods
// ---

function _checkCallerIsAdminExecutor() internal view {
if (msg.sender != _ADMIN_EXECUTOR) {
revert CallerIsNotAdminExecutor(msg.sender);
}
/// @notice Sets the address of the admin executor.
/// @param newAdminExecutor The address of the new admin executor.
function setAdminExecutor(address newAdminExecutor) external {
_timelockState.checkCallerIsAdminExecutor();
_timelockState.setAdminExecutor(newAdminExecutor);
}
}
Loading
Loading