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

release: 1.1.0 with solidity 0.8 bump #33

Merged
merged 236 commits into from
Oct 26, 2023
Merged

release: 1.1.0 with solidity 0.8 bump #33

merged 236 commits into from
Oct 26, 2023

Conversation

gvladika
Copy link
Contributor

@gvladika gvladika commented Jun 4, 2023

This PR adds transition of all smart contracts from old 0.6.x Solidity version to 0.8.17.

Includes:

  • use ^0.8.0; pragma for all contracts, and <0.9.0 for interfaces
  • Solidity 0.8.17 set in compiler config
  • use custom version of ERC20Upgradeable (and ERC20PermitUpgradeable) to avoid storage layout changes
  • fix compilation errors and warnings
  • add storage layout checker to CI

Reason why custom version of ERC20Upgradeable is used instead of OpenZeppelin implementation directly is following - Openzeppelin removed _decimals storage variable in ERC20Upgradeable when they did their upgrade to 0.8 (commit here). They hard-coded decimals to 18 in getter, and if you want different number you have to store decimals yourself and override decimals() function. This is an issue because we're using ERC20Upgradeable as base for bridged standard ERC20 tokens (when token is 1st time bridged to L2 we automatically create token contract on L2). Beacon proxy is used which means there's a single implementation contract for all the bridged tokens out there (via standard bridge).
Solution we used is -> copy paste Openzeppelin's ERC20Upgradeable locally, put back decimals variable and getter and setter, and use that contract as base for aeERC20/StandardArbERC20 instead of OZ import.

Also include a few other PR e.g.

@gzeoneth gzeoneth changed the title Move to solidity 0.8 release: 1.1.0 with solidity 0.8 bump Oct 11, 2023
@gzeoneth gzeoneth merged commit 6f47c07 into main Oct 26, 2023
4 checks passed
@gzeoneth gzeoneth deleted the solidity-0.8 branch October 26, 2023 16:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants