Skip to content
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

Update solidity #33

Merged
merged 8 commits into from
Feb 5, 2025
Merged

Update solidity #33

merged 8 commits into from
Feb 5, 2025

Conversation

cabrador
Copy link
Contributor

This PR relies on changes from #31 and #32 so those should be merged before reviewing this one.

This PR updates version of solidity to 0.8.27 and uses hardhat evmVersion cancun
It also makes all necessary changes that are required by this solidity version such as:

  1. Using []bytes instead of []bytes32 for voting options
  2. Adding virtual and override to some inherited methods
  3. Correctly calling assembly methods
  4. Using delete when wiping an array instead of setting its len to 0
  5. Using memory instead of calldata in addTemplate in ProposalTeplates.sol due error Stack too deep
  6. Using build-in openzepelin and/or funcs for type casting

@cabrador cabrador marked this pull request as draft January 27, 2025 08:12
This was referenced Jan 27, 2025
@cabrador cabrador force-pushed the c/update-solidity branch 2 times, most recently from 7f1fe96 to 5a8bacb Compare January 30, 2025 10:32
@cabrador cabrador marked this pull request as ready for review January 30, 2025 10:33
@cabrador cabrador requested review from thaarok and Mike-CZ January 30, 2025 10:37
contracts/proposal/NetworkParameterProposal.sol Outdated Show resolved Hide resolved
contracts/proposal/NetworkParameterProposal.sol Outdated Show resolved Hide resolved
contracts/governance/Governance.sol Outdated Show resolved Hide resolved
@cabrador cabrador requested a review from thaarok January 31, 2025 06:51
contracts/adapters/RelayProxy.sol Outdated Show resolved Hide resolved
contracts/proposal/NetworkParameterProposal.sol Outdated Show resolved Hide resolved
contracts/proposal/NetworkParameterProposal.sol Outdated Show resolved Hide resolved
contracts/proposal/base/IProposal.sol Show resolved Hide resolved
contracts/test/UnitTestVoteRecounter.sol Outdated Show resolved Hide resolved
@cabrador cabrador mentioned this pull request Jan 31, 2025
2 tasks
@cabrador cabrador requested a review from thaarok January 31, 2025 13:35
@cabrador cabrador mentioned this pull request Feb 4, 2025
contracts/governance/Governance.sol Show resolved Hide resolved
contracts/governance/Governance.sol Outdated Show resolved Hide resolved
@cabrador cabrador requested a review from Mike-CZ February 5, 2025 09:41
Copy link

@Mike-CZ Mike-CZ left a comment

Choose a reason for hiding this comment

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

LGTM

contracts/test/UnitTestVoteRecounter.sol Outdated Show resolved Hide resolved
contracts/governance/Governance.sol Show resolved Hide resolved
contracts/governance/Governance.sol Show resolved Hide resolved
contracts/governance/Governance.sol Show resolved Hide resolved
@cabrador cabrador merged commit e4446af into master Feb 5, 2025
@cabrador cabrador deleted the c/update-solidity branch February 5, 2025 14:19
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.

3 participants