Deployed UUPS Proxy contains test contracts


I deployed a UUPS Proxy (generated using Openzeppelin Wizard) as one will normally do after following the Openzeppelin. After checking the deployed proxy contract code. There are other contracts included like ValidationsNatspec.sol, ValidationsNatspecImport.sol, Standalone.sol. I assume these are test contracts, but are they essential to the actual proxy contract and potentially affect it in anyway (ValidationsNatspec has a public selfdestruct)? Another one, is there an option during proxy deployment to not include these test contracts?

Thank you, regards

This was fixed in @openzeppelin/upgrades-core@1.24.1

Can you try updating your package to that version or later?

Note that the test contracts do not affect the actual proxy, because they are not used. They only appear in the Etherscan source code section.

Oh, good to know. Thank you for the response

I've been using @openzeppelin/hardhat-upgrades@1.22.1 as a dev dependency to do the deployment which I believe is the latest one. is '@openzeppelin/upgrades-core' a direct substitute to use in Hardhat? I think I'm missing something here.

Thank you for the support

@openzeppelin/hardhat-upgrades depends on @openzeppelin/upgrades-core, in this case "@openzeppelin/upgrades-core": "^1.20.0" as seen in its package.json

So while that means some older versions of @openzeppelin/upgrades-core would also work with it, you should update the installed dependency to the latest version to get the above fix.