-
Notifications
You must be signed in to change notification settings - Fork 296
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
Add an option to conditionally perform upgrade #215
base: master
Are you sure you want to change the base?
Conversation
Passing `proxy.performUpgrade: false` allows not running the changeImplementation/upgradeTo transaction. This supports deployments where the owner is a multisig that requires approvals / multiple signatures out of band. We can still deploy the implementation and and save the deployment in a way that hardhat-deploy expects / makes etherscan verification work, but the actual upgrade can be performed separately.
You can do this right now using See Line 2122 in 09c1ad5
|
Using This PR would support that, but if there's another way to achieve this / another direction to go in, I'm open to it |
been thinking of an option where it would pause execution ask you to perform the upragde (or any tx that requires an external signer) and then allow you to continue after you perform the operation Your solution can be achieved by checking if the contract exist and skip the call to deploy, no ? |
Honestly, what would be great is to be able to optionally pass in an "upgrade handler" that controls / performs the upgrade i.e. the function signature is: (proxyAddress: string, implementationAddress: string) => Promise<void> and, if not passed in, defaults to the existing upgrade logic in hardhat-deploy that runs If you think this would be a viable direction, I'd be happy to put up another PR |
I like that, one thing that this should do is replay the deployment, after the promise resolve (this way hardhat-deploy can automatically update the deployments file) the promise could also resolve to a tx hash that hardhat-deploy can then wait for or it could also resolve to a deployment object so hardhat-deploy can save it. Need to think about it more and usual implementation work help to see what's best |
@wighawag was there any method like this added in? I also have a similar use case, we use a safe for ownership on our proxies after initial deploy, my use case here is to deploy an implementation only (and update the hardhat-deploy info) and then run a defender propose upgrade. |
Passing
proxy.performUpgrade: false
allows not running the changeImplementation/upgradeTotransaction. This supports deployments where the owner is a multisig and changing implementation requires
approvals / multiple signatures out of band. We can still deploy the implementation and
and save the deployment in a way that hardhat-deploy expects / makes etherscan
verification work, but the actual upgrade can be performed separately.