Skip to content

Fix compilation errors, upgrade Solidity#210

Closed
arjun-io wants to merge 2 commits into
compound-finance:masterfrom
equilibria-xyz:upg-solidity
Closed

Fix compilation errors, upgrade Solidity#210
arjun-io wants to merge 2 commits into
compound-finance:masterfrom
equilibria-xyz:upg-solidity

Conversation

@arjun-io
Copy link
Copy Markdown
Contributor

@arjun-io arjun-io commented Jul 8, 2022

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

});

proposals[newProposal.id] = newProposal;
Proposal storage newProposal = proposals[proposalCount];
Copy link
Copy Markdown

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

Copy link
Copy Markdown
Contributor Author

@arjun-io arjun-io Aug 27, 2022

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.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, nvm

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.

*/
function isWhitelisted(address account) public view returns (bool) {
return (whitelistAccountExpirations[account] > now);
uint currentBlockTimestamp = getBlockTimestamp();
Copy link
Copy Markdown

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.

@arjun-io arjun-io closed this Jul 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants