-
Notifications
You must be signed in to change notification settings - Fork 89
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
Setting an owner on upgradeable contracts without being able to call constructor #120
Comments
IIRC, it sets the owner to the |
@treeder The proxy constructor does run: https://github.com/gochain/web3/blob/master/assets/OwnerUpgradeableProxy.sol#L16 |
I mean the constructor of the underlying contract, that doesn't run right? (or if it does, the docs are wrong). |
AFAIK that is correct. Perhaps the contract would need to reference the proxy owner via |
Maybe we should have the proxy call an |
An generalized |
It's not just owner, it's anything you'd put in a constructor. That's just a common one. |
Alternatively, can we figure out a way to call the constructor? |
AFAIK running the constructor of the target contract against the state of the proxy contract is not possible. It does run when the target is deployed, but against its own state, not the proxy state. |
If the contract requires an owner, how can you securely set it to the deployers address when using upgradeable contracts? cc @benbjohnson
The text was updated successfully, but these errors were encountered: