-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Fix compilation errors, upgrade Solidity #210
Conversation
}); | ||
|
||
proposals[newProposal.id] = newProposal; | ||
Proposal storage newProposal = proposals[proposalCount]; |
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.
This is incorrect since it doesn't create a new proprosal, but only creates link to a previous one.
You can test this
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.
Your test is using memory
structs while this is using storage
. This is effectively creating a pointer to the struct at the array index in storage and modifying the fields there, not copying anything.
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.
Okay, nvm
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.
.
@@ -292,7 +296,15 @@ contract GovernorBravoDelegate is GovernorBravoDelegateStorageV2, GovernorBravoE | |||
* @return If the account is whitelisted | |||
*/ | |||
function isWhitelisted(address account) public view returns (bool) { | |||
return (whitelistAccountExpirations[account] > now); | |||
uint currentBlockTimestamp = getBlockTimestamp(); |
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.
Strange idea, it would change nothing only making deployment gas cost increase.
Pulls in some changes from #208 to get the new GovernorBravoG2 contracts compileable, and updates the Solidity version to 0.8.15 (latest as of the time of this PR). There are a couple of breaking inheritance changes that required code changes here and here