-
Notifications
You must be signed in to change notification settings - Fork 314
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
Add rollupManager initializer versioning #314
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -231,6 +231,8 @@ contract PolygonRollupManager is | |
bytes32 internal constant _EMERGENCY_COUNCIL_ADMIN = | ||
keccak256("EMERGENCY_COUNCIL_ADMIN"); | ||
|
||
string internal constant _ROLLUP_MANAGER_VERSION_PESSIMISTIC = "pessimistic"; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. maybe it's worth it to have a constnat that always have the same name, and public, to be able to easy retrieval from the node 🤔 something like currentVersion!?¿ There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yep, agree. See comment above xD |
||
|
||
// Global Exit Root address | ||
IPolygonZkEVMGlobalExitRootV2 public immutable globalExitRootManager; | ||
|
||
|
@@ -382,6 +384,11 @@ contract PolygonRollupManager is | |
*/ | ||
event SetBatchFee(uint256 newBatchFee); | ||
|
||
/** | ||
* @dev Emitted when rollup manager is upgraded | ||
*/ | ||
event UpdateRollupManagerVersion(string rollupManagerVersion); | ||
|
||
/** | ||
* @param _globalExitRootManager Global exit root manager address | ||
* @param _pol POL token address | ||
|
@@ -400,6 +407,13 @@ contract PolygonRollupManager is | |
_disableInitializers(); | ||
} | ||
|
||
/** | ||
* Initializer function to set new rollup manager version | ||
*/ | ||
function initialize() external virtual reinitializer(3) { | ||
emit UpdateRollupManagerVersion(_ROLLUP_MANAGER_VERSION_PESSIMISTIC); | ||
} | ||
|
||
/////////////////////////////////////// | ||
// Rollups management functions | ||
/////////////////////////////////////// | ||
|
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would make this public, so it is easy to check from the SC directly.
Also,
_ROLLUP_MANAGER_VERSION_PESSIMISTIC
should have a generic naming like_ROLLUP_MANAGER_VERSION
and it value reflects the version.