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

Implement UUPS proxy (ERC1822) #2542

Merged
merged 55 commits into from Apr 16, 2021
Merged

Implement UUPS proxy (ERC1822) #2542

merged 55 commits into from Apr 16, 2021

Conversation

Amxx
Copy link
Collaborator

@Amxx Amxx commented Feb 26, 2021

Fixes #2421

Renames UpgradeableProxy into UUPSProxy, with the proxy only containing the initializing constructor and the _implementation() function. UUPS slot related tools are in a UUPS abstract contract, used by both the UUPSProxy and the UUPSProxiable contracts.

Contract that used to inherit from UpgradeableProxy now inherit from UUPSProxy, with no further changes needed.

PR Checklist

  • Tests
  • Documentation
  • Changelog entry

@Amxx Amxx force-pushed the feature/UUPS branch 2 times, most recently from efdd64a to 73b18f7 Compare February 26, 2021 12:50
@Amxx Amxx changed the title Feature/uups Refactor the proxy around UUPS (ERC1822) proxy Feb 26, 2021
@Amxx Amxx force-pushed the feature/UUPS branch 3 times, most recently from 1e133ae to c531138 Compare March 9, 2021 14:11
@frangio frangio marked this pull request as ready for review April 16, 2021 03:12
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.

Two things before merging:

  1. Removing the _upgradeToAndCall* overloads, keeping only the version with the forceCall argument.
  2. Adding a test that an upgrade to a non-UUPSUpgradeable contract reverts.

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.

LGTM. Thank you.

@frangio frangio merged commit 1c676ac into OpenZeppelin:master Apr 16, 2021
@Amxx Amxx deleted the feature/UUPS branch April 16, 2021 14:51
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.

Provide implementation of UUPS proxy pattern
2 participants