-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Role Admin should be handling provers, as before
- Loading branch information
1 parent
b2bac2d
commit 2f300e6
Showing
6 changed files
with
24 additions
and
25 deletions.
There are no files selected for viewing
This file contains 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 |
---|---|---|
|
@@ -90,7 +90,7 @@ contract AdminV2 is AccessControlEnumerable, IAdminV2, IAdminV2Errors { | |
} | ||
|
||
/// @inheritdoc IAdminV2 | ||
function addProver(address prover) external onlyRole(GOVERNOR_ROLE) { | ||
function addProver(address prover) external onlyRole(DEFAULT_ADMIN_ROLE) { | ||
if (getActiveProverID(prover) != 0) revert ProverAlreadyActive(); | ||
ProverInfo storage $ = _proverInfos[prover]; | ||
// Add the prover to the list of all provers and record its id (its position + 1), | ||
|
@@ -109,7 +109,7 @@ contract AdminV2 is AccessControlEnumerable, IAdminV2, IAdminV2Errors { | |
} | ||
Check notice Code scanning / Slither Block timestamp Low
AdminV2.addProver(address) uses timestamp for comparisons
Dangerous comparisons: - getActiveProverID(prover) != 0 |
||
|
||
/// @inheritdoc IAdminV2 | ||
function removeProver(address prover) external onlyRole(GOVERNOR_ROLE) { | ||
function removeProver(address prover) external onlyRole(DEFAULT_ADMIN_ROLE) { | ||
if (getActiveProverID(prover) == 0) revert ProverNotActive(); | ||
// We never remove provers from the list of all provers to preserve their IDs, | ||
// so we just need to reset the activeFrom timestamp. | ||
|
This file contains 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 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 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 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 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