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

Use upgradeToAndCall depending on upgrade interface version #883

Merged
merged 15 commits into from
Sep 27, 2023

Conversation

ericglau
Copy link
Member

@ericglau ericglau commented Sep 22, 2023

Fixes #881

This PR enables the use of UUPS implementations and proxy admins from OpenZeppelin Contracts 5.0. Other 5.0 proxy kinds can be imported as well (added test cases).

  • Call upgradeToAndCall depending on UPGRADE_INTERFACE_VERSION
    • when upgrading with a UUPS implementation
    • when upgrading a transparent proxy using a 5.0 proxy admin (which was imported via forceImport)
  • Fixes inferring of UUPS proxies when only upgradeToAndCall is available
  • Add note about changeProxyAdmin not being supported for 5.0 admins or proxies

@ericglau ericglau requested review from Amxx and frangio September 22, 2023 23:01
@ericglau ericglau marked this pull request as draft September 25, 2023 19:53
@ericglau ericglau removed request for frangio and Amxx September 25, 2023 19:53
@socket-security
Copy link

New dependencies detected. Learn more about Socket for GitHub ↗︎

Packages Version New capabilities Transitives Size Publisher
@openzeppelin/contracts 5.0.0-rc.0 None +0 1.69 MB frangio

@ericglau ericglau marked this pull request as ready for review September 25, 2023 21:21
@ericglau ericglau requested a review from frangio September 25, 2023 21:21
@ericglau ericglau requested a review from a team September 26, 2023 16:10
packages/core/CHANGELOG.md Outdated Show resolved Hide resolved
Copy link
Contributor

@frangio frangio left a comment

Choose a reason for hiding this comment

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

Looks good, minor comments above.

ericglau and others added 2 commits September 26, 2023 21:58
Co-authored-by: Francisco <fg@frang.io>
@ericglau ericglau requested a review from frangio September 27, 2023 02:12
Co-authored-by: Hadrien Croubois <hadrien.croubois@gmail.com>
@ericglau ericglau merged commit 9274324 into OpenZeppelin:master Sep 27, 2023
7 checks passed
@ericglau ericglau deleted the upgradeToAndCallHardhat branch September 27, 2023 14:44
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.

Call upgradeToAndCall with no data
3 participants