Skip to content
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

With contracts-upgradeable v5.0.0-rc.0 adminAddress is zero #882

Closed
SKYBITDev3 opened this issue Sep 22, 2023 · 8 comments · Fixed by #887
Closed

With contracts-upgradeable v5.0.0-rc.0 adminAddress is zero #882

SKYBITDev3 opened this issue Sep 22, 2023 · 8 comments · Fixed by #887

Comments

@SKYBITDev3
Copy link

When trying contracts-upgradeable v5.0.0-rc.0 and hardhat-upgrades, calling forceImport now fails because adminAddress is 0x0000000000000000000000000000000000000000.

@frangio
Copy link
Contributor

frangio commented Sep 22, 2023

The Upgrades Plugins haven't yet been updated for 5.0 proxies.

@SKYBITDev3
Copy link
Author

SKYBITDev3 commented Sep 24, 2023

The Upgrades Plugins haven't yet been updated for 5.0 proxies.

When will they be updated? I'm eager to try it.

@frangio
Copy link
Contributor

frangio commented Sep 25, 2023

This is likely to happen a few weeks after we release 5.0.

@ericglau
Copy link
Member

@SKYBITDev3 Can you provide more information about what you mean by adminAddress is 0x0000000000000000000000000000000000000000? Where are you seeing that value being zero and how are you retrieving that value?

In #883 we are enabling the import and upgrading of 5.0 proxies, but we did not encounter any issues for the actual import. If possible, can you share what your scripts look like for deploying and importing the proxies?

@SKYBITDev3
Copy link
Author

SKYBITDev3 commented Sep 26, 2023

Here is my deployment script and failure location: https://github.com/SKYBITDev3/SKYBIT-Keyless-Deployment/blob/0e8051ba6bffb2a296ed2234f0429b8a5a3c1ba0/scripts/deployViaCREATE3-TESTERC20UG.js#L92

InvalidDeployment [Error]: No contract at address 0x0000000000000000000000000000000000000000 (Removed from manifest)
    at waitAndValidateDeployment (C:\Users\-\Documents\Projects\project\node_modules\@openzeppelin\upgrades-core\src\deployment.ts:251:15)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at fetchOrDeployGeneric (C:\Users\-\Documents\Projects\project\node_modules\@openzeppelin\upgrades-core\src\impl-store.ts:88:5)
    at fetchOrDeployAdmin (C:\Users\-\Documents\Projects\project\node_modules\@openzeppelin\upgrades-core\src\impl-store.ts:210:11)
    at simulateDeployAdmin (C:\Users\-\Documents\Projects\project\node_modules\@openzeppelin\hardhat-upgrades\src\utils\simulate-deploy.ts:19:32)
    at addAdminToManifest (C:\Users\-\Documents\Projects\project\node_modules\@openzeppelin\hardhat-upgrades\src\force-import.ts:111:3)
    at importProxyToManifest (C:\Users\-\Documents\Projects\project\node_modules\@openzeppelin\hardhat-upgrades\src\force-import.ts:89:5)
    at Proxy.forceImport (C:\Users\-\Documents\Projects\project\node_modules\@openzeppelin\hardhat-upgrades\src\force-import.ts:46:7)
    at main (C:\Users\-\Documents\Projects\project\scripts\deployViaCREATE3-TESTERC20UG.js:92:26)

I found adminAddress was 0 when I edited node_modules@openzeppelin\hardhat-upgrades\src\force-import.ts to print out variable values.

@ericglau
Copy link
Member

ericglau commented Sep 27, 2023

Thanks for those details. The issue is that forceImport is incorrectly inferring a UUPS proxy to be a transparent proxy. This will be fixed by #883, which we will release imminently.

@ericglau
Copy link
Member

@SKYBITDev3 This is fixed in @openzeppelin/hardhat-upgrades@2.3.0, you can update to that release to get the forceImport to work.

I've opened an additional PR #887 to give a more helpful error message in this kind of scenario.

@SKYBITDev3
Copy link
Author

Thank you @ericglau. I've tried it and it's now working.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants