-
Notifications
You must be signed in to change notification settings - Fork 11.8k
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
Make TransparentUpgradeableProxy
deploy its ProxyAdmin
and optimize proxy interfaces
#4382
Make TransparentUpgradeableProxy
deploy its ProxyAdmin
and optimize proxy interfaces
#4382
Conversation
🦋 Changeset detectedLatest commit: 703659e The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
TransparentUpgradeableProxy
deploy its own ProxyAdmin
We are able to optimize We make These are the measured deployment costs. Note that the total for non-embedded is the sum of admin + proxy. But when embedded, the total is just the proxy.
The cheapest version we get is 1:1 using an immutable variable. In this case, the upgrade functions don't have a proxy argument, because the proxy is kept in a contract variable. Note that this changes the interface and we have a similar problem in Upgrades Plugins than what we've discussed before: how do the plugins know which function to call? Unless we add some way to inspect the ProxyAdmin version, we don't know. At least in the case of changing the function signatures it would fail. There is one option that is cheaper which is removing I slightly lean towards |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor comments. We should merge that before the audit
Co-authored-by: Eric Lau <ericglau@outlook.com>
TransparentUpgradeableProxy
deploy its ownProxyAdmin
upgrade
/upgradeTo
in favor ofupgradeAndCall
/upgradeToAndCall
fromProxyAdmin
andUUPSUpgradeable
, now thedata
argument is ignored if empty.UPGRADE_INTERFACE_VERSION
getter that can be used to decide which functions to use in an upgrade to address Revert upgradeTo in favor of upgradeToAndCall #4372 (comment).Fixes LIB-947
Fixes LIB-1008
Fixes LIB-999
PR Checklist
npx changeset add
)