Closed njelich closed 1 week ago
Thanks for reporting this. I commented in https://github.com/OpenZeppelin/openzeppelin-upgrades/issues/1037 that this looks like a false positive from the Upgrades plugins validations. Closing this and will continue tracking in the other issue.
A new simple ERC20 upgradeable contract that uses Votes is created using the OpenZeppelin official wizard. Adding that code to a simple hardhat project and trying to deploy it using openzeppelin upgrades library yields the following error:
💻 Environment
The following are all of the dependencies used for the project:
📝 Details
This issue seems to come from the VotesUpgradeable implementation. Looking at the recent git blame in the source repo for transpilation, I noticed this optimization added 2 months ago.
https://github.com/OpenZeppelin/openzeppelin-contracts/commit/427b8bb0280b4e0946a76d417073e9a0c5e0b9ec
This function calls _push and was changed recently from private to internal, which might be triggering this, but I do not have time to dig through it.
Pinging @ernestognw
🔢 Code to reproduce bug
A demo repo with a PoC can be found here: https://github.com/njelich/oz-internal-function-poc
Simply run
npm i
and thennpm test
to reproduce the issue.