-
Notifications
You must be signed in to change notification settings - Fork 234
feat(L1): add ProtocolVersions upgrade schedule contract #353
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
Merged
Merged
Changes from all commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
25d2cf5
feat(L1): add ProtocolVersions upgrade schedule contract
PelleKrab 1b89555
fix(L1): refine ProtocolVersions with reproducible scheduleId and rep…
PelleKrab b8e9c39
feat(L1): add getSchedule view to ProtocolVersions
PelleKrab e30e60c
chore(L1): apply forge fmt and update semver-lock for ProtocolVersions
PelleKrab 018ca7c
refactor(L1): cache hash chain seed as immutable in ProtocolVersions
PelleKrab 50a37cd
chore(L1): update semver-lock for ProtocolVersions
PelleKrab ab5924d
refactor(L1): simplify ProtocolVersions ownership, storage, and acces…
PelleKrab 6cd39d7
refactor(L1): switch ProtocolVersions to numeric upgrade IDs and prox…
PelleKrab b917183
fix(L1): apply code-review corrections to ProtocolVersions
PelleKrab c034032
refactor(L1): minimumProtocolVersion, no-arg registerUpgrade, write h…
PelleKrab 1f39756
test: exclude ProtocolVersions from initializer tracking
PelleKrab 871e6d4
feat(L1): deploy ProtocolVersions in standard deployment script
PelleKrab 766f563
refactor(L1): simplify ProtocolVersions schedule seed
PelleKrab 29fff2f
fix(L1): apply ProtocolVersions review nits
PelleKrab 2257727
refactor(L1): reduce ProtocolVersions API surface
PelleKrab e1ebc49
refactor(L1): rename chainTeam to incidentResponder, combine config, …
PelleKrab b465d95
refactor(L1): address ProtocolVersions review nits
PelleKrab 21e6cc7
fix(deploy): upgrade ProtocolVersions proxy
PelleKrab 2e348fa
refactor(L1): reorder IProtocolVersions members to match style guide
PelleKrab File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,42 @@ | ||
| // SPDX-License-Identifier: MIT | ||
| pragma solidity ^0.8.0; | ||
|
|
||
| import { ISemver } from "interfaces/universal/ISemver.sol"; | ||
| import { IProxyAdminOwnedBase } from "interfaces/L1/IProxyAdminOwnedBase.sol"; | ||
| import { IReinitializableBase } from "interfaces/universal/IReinitializableBase.sol"; | ||
|
|
||
| /// @title IProtocolVersions | ||
| /// @notice Interface for the ProtocolVersions upgrade schedule contract. | ||
| interface IProtocolVersions is IProxyAdminOwnedBase, ISemver, IReinitializableBase { | ||
| event UpgradeRegistered(uint256 indexed id); | ||
| event MinimumProtocolVersionUpdated(uint256 indexed protocolVersion); | ||
| event TimestampSet(uint256 indexed id, uint256 timestamp); | ||
| event ScheduleIdUpdated(bytes32 indexed newScheduleId); | ||
| event IncidentResponderUpdated(address indexed previousIncidentResponder, address indexed newIncidentResponder); | ||
| event Initialized(uint8 version); | ||
|
|
||
| error ProtocolVersions_UnknownUpgrade(uint256 id); | ||
| error ProtocolVersions_InvalidProtocolVersion(); | ||
| error ProtocolVersions_ActivationAlreadyPassed(uint256 id, uint64 activationTimestamp); | ||
| error ProtocolVersions_NotIncidentResponder(); | ||
| error ProtocolVersions_NotScheduled(uint256 id); | ||
| error ProtocolVersions_DelayMustBeLater(uint64 currentTimestamp, uint64 newTimestamp); | ||
| error ProtocolVersions_NotInitialized(); | ||
| error ProtocolVersions_InsufficientNotice(uint64 timestamp); | ||
|
|
||
| function initialize(address _incidentResponder) external; | ||
| function registerUpgrade(uint64 timestamp, uint256 minProtocolVersion) external returns (uint256); | ||
| function setMinimumProtocolVersion(uint256 protocolVersion) external; | ||
| function setTimestamp(uint256 id, uint64 timestamp) external; | ||
| function setIncidentResponder(address newIncidentResponder) external; | ||
| function delayTimestamp(uint256 id, uint64 newTimestamp) external; | ||
|
|
||
| function MIN_NOTICE() external view returns (uint64); | ||
| function minimumProtocolVersion() external view returns (uint256); | ||
| function incidentResponder() external view returns (address); | ||
| function scheduleId() external view returns (bytes32); | ||
| function scheduleId(uint256 id) external view returns (bytes32); | ||
| function getSchedule() external view returns (uint64[] memory); | ||
|
|
||
| function __constructor__() external; | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.