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

[ETHEREUM-CONTRACTS] Upgrade to OpenZeppelin 5 and Rework Its Dependency Management (Breaking Chnage) #2016

Open
hellwolf opened this issue Sep 2, 2024 · 0 comments
Labels
Project: PROTOCOL-EVMv1 Superfluid protocol EVM v1 implementation in Solidity Type: Enhancement New feature or request

Comments

@hellwolf
Copy link
Contributor

hellwolf commented Sep 2, 2024

Synopsis

OpenZeppelin was released on October 2023. It is a major upgrade, aiming to "modernizing its contracts." Inevitably it contains a few breaking changes, hence making the upgrade to it in the monorepo non-trivial.

Additionally, OpenZeppelin dependency has been managed as part of node dependency in monorepo, while other ethereum contracts dependencies are managed by git submodule directly. It would be a good opportunity to remove this nuisance when upgrading the major version of OpenZeppelin.

Also, monorepo is often distributed to developers as a "git submodule". To use the monorepo, developers usually must "remap" "@openzeppelin/contracts/" to the OpenZeppelin the developer uses. This may introduce a conflict between v4 and v5 OpenZeppelin, although this has a workaround that is noted in the "technical notes" section.

Acceptance Criteria

This issue aims to upgrade OpenZeppelin to v5 in monorepo and provides a developer smooth breaking-change upgrade while allowing v4/v5 co-existance in developers' repo.

Technical Notes

To Remap both v4/v5

remapping.txt

@openzeppelin/contracts/=lib/openzeppelin-contracts-v4/contracts/
@openzeppelin-v5/contracts/=lib/openzeppelin-contracts-v5/contracts/
@hellwolf hellwolf added Type: Enhancement New feature or request Project: PROTOCOL-EVMv1 Superfluid protocol EVM v1 implementation in Solidity labels Sep 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Project: PROTOCOL-EVMv1 Superfluid protocol EVM v1 implementation in Solidity Type: Enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant