-
Notifications
You must be signed in to change notification settings - Fork 7
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
feat: support whitelisted proposers #116
base: develop
Are you sure you want to change the base?
Conversation
87a1dda
to
753a5a5
Compare
9754981
to
d674786
Compare
This reverts commit 5fc0e65.
|
||
uint latestProposalId = latestProposalIds[msg.sender]; | ||
if ( | ||
whitelistedProposers[msg.sender] != address(0) && |
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.
Do we need to check this condition again, as we are already ensuring it in previous condition?
_; | ||
} | ||
|
||
modifier onlyGuardianOrAdmin() { |
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.
Should we remove it as we are using ACM for authorisation?
* @param proposer The address of the proposer to whitelist | ||
*/ | ||
function whitelistProposer(address proposer, ProposalType proposalType) external { | ||
_checkAccessAllowed("whitelistProposer(address,ProposalType)"); |
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.
_checkAccessAllowed("whitelistProposer(address,ProposalType)"); | |
_checkAccessAllowed("whitelistProposer(address,ProposalType)"); | |
ensureNonzeroAddress(proposer) |
@@ -280,35 +364,61 @@ contract GovernorBravoDelegate is GovernorBravoDelegateStorageV2, GovernorBravoE | |||
emit ProposalQueued(proposalId, eta); | |||
} | |||
|
|||
/** | |||
* @notice Whitelists a proposer | |||
* @param proposer The address of the proposer to whitelist |
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.
natspec is missing for event and access
require(c >= a, "addition overflow"); | ||
return c; | ||
} | ||
|
||
function sub256(uint256 a, uint256 b) internal pure returns (uint) { | ||
function sub256(uint256 a, uint256 b) internal pure returns (uint256) { |
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.
We don;t these functionalities to check overflows in 0.8.25 version of solidity.
d674786
to
d8b8274
Compare
Description
This PR is to support whitelisted proposers that can be set and removed with a timelock. The idea is to allow programmatically creating proposals.