OpenZeppelin 5.0 Upgrade - erc1967.getImplementationAddress result

Hello,

I am implementing the contract upgrade using the upgrade plugins for Hardhat. I'm doing the implementation with the UUPS proxy.

In my script, after calling upgradeProxy, when I call the function erc1967.getImplementationAddress, it always returns the address of the previous implementation contract.

Should I put a wait after calling upgradeProxy before calling erc1967.getImplementationAddress? Or is this a potential bug?

My project's dependencies:

"@nomicfoundation/hardhat-ethers": "^3.0.5",
"@nomicfoundation/hardhat-toolbox": "^3.0.0",
"@openzeppelin/contracts-upgradeable": "^5.0.0",
"@openzeppelin/hardhat-upgrades": "^2.4.1",

Thank you

Ensure you are using await when calling each of those functions, e.g. await upgrades.upgradeProxy(...)

If that doesn't resolve it, can you please provide the information listed in Required information when requesting support for Upgrades Plugins?

1 Like