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
plugin-hardhat upgradeProxy upgradeTo call doesnt await receipt #354
Comments
Thanks for reporting this issue! We've purposely avoided unnecessarily waiting for transactions to mine, since it can introduce unwanted delays. In your case it seems like you want that delay, but the plugin doesn't give you any way to do that. Something we could do is assign the upgrade transaction as the
If we did this you would be able to write const v2 = await upgrades.upgradeProxy(proxyAddress, ImplV2);
await v2.deployed(); Would this work for you? As a workaround, I think you should be able to use |
That might work. As you say, we tried It seems like .deployed() isnt really used much in favor of |
Fixed in 1c92fb7#diff-b28b1ed9821f38c64524ea13e19264bb0772f8376afffd5d8a1f8277621833eb and released in the latest version of the Hardhat plugin. @jacobrosenthal Please try it out and let me know. Both |
@frangio curious if this can help my use-case. I want to deploy the new implementation and store that TX that will be used for a Governance voting eventually by
|
Hello @5hanth You can use the This function will return the instance of the newly deployed version. You can then do you governance operation and perform the upgrade at a later stage. |
@Amxx Yes, I was planning in that approach. But for some reason calling |
If you're using transparent proxies (the default) you need to call the |
@frangio I'm using UUPS |
@5hanth Can you post your question on the OpenZeppeiln Forum? Include more details about how you have defined |
I posted on OpenZeppelin. Just in case anyone wants to know this:
signer has an admin role. The error occurs on reading any state variable. |
Hi guys! I'm deploying a proxy contract and its implementation using "deployProxy" instruction but I get a "Timed out waiting for transaction" error. I use ".deployed()" to await transaction mined but is not working. Am I doing something wrong? |
@joaquinperea You're not doing anything wrong. If it times out, you can retry the same |
Hello, It seems now deployed() is deprecated, I am using await .waitForDeployment(), and it still returns before the contract getting upgraded. |
Weve largely had success with manual one off upgrades until when we started to script multiple upgrades at a time and kept getting
Adding an
await receipt.wait();
afterupgradeTo
seemed to fix it for ushttps://github.com/OpenZeppelin/openzeppelin-upgrades/blob/master/packages/plugin-hardhat/src/upgrade-proxy.ts#L37
But it seems like the codebase should be combed for other receipts it might be eating?
The text was updated successfully, but these errors were encountered: