hifi-finance/hifi

[protocol] Use "upgrades.erc1967.getImplementationAddress" to read the implementation address

PaulRBerg opened this issue · 1 comments

Use the newly implemented getImplementationAddress function in the Hardhat plugin to read the implementation address. This is to replace the current workaround to use a locally defined storage slot:

const balanceSheetImplementation: string = hexStripZeros(
await ethers.provider.getStorageAt(balanceSheetProxy.address, ERC1967_IMPLEMENTATION_STORAGE_SLOT),
);

Implemented in 075f9c2.