This repository has been archived by the owner on Apr 27, 2022. It is now read-only.
[playground] Upgradeable authenticator: split proxy ownership and authenticator ownership #379
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Findings of a discussion with @bh2smith. This PR is not supposed to be merged nor reviewed.
The base PR #351 makes the authenticator contract upgradeable with a proxy.
This PR removes
OwnableUpgradeable
from the contract and separates the ownership of the proxy (owned byowned
) from the ownership of the authenticator (previously calledowner
, which conflicted, now calledmanager
). The "managership" of the authenticator is set as part of the proxy deployment. This makes the "proxiness" of the authenticator implicit and not explicit, since it's only evident from the deployment scripts.The next task would be to write the authenticator contract so that it "inherits" the owner of the proxy. The function setting the manager should be restricted (maybe only called once?). Then I'd test that the upgrading changes the manager and has the right owner.
I didn't investigate on who owns the proxy, however. I suppose the deployer?
Test Plan
Note that the end to end tests are passing, showing that the proxy contract is deployed correctly and the owner-manager is being set correctly in the deployment.