ethereum: fix core contract upgradeability

Missed initializer
This commit is contained in:
Csongor Kiss 2022-06-25 15:10:09 +01:00 committed by Csongor Kiss
parent 7942393b18
commit 2c9f7c239e
4 changed files with 6 additions and 6 deletions

View File

@ -30,6 +30,10 @@ contract Implementation is Governance {
setNextSequence(emitter, sequence + 1);
}
function initialize() initializer public virtual {
// this function needs to be exposed for an upgrade to pass
}
modifier initializer() {
address implementation = ERC1967Upgrade._getImplementation();

View File

@ -46,4 +46,4 @@ contract Storage {
contract State {
Storage.WormholeState _state;
}
}

View File

@ -49,4 +49,4 @@ contract BridgeStorage {
contract BridgeState {
BridgeStorage.State _state;
}
}

View File

@ -6,10 +6,6 @@ pragma solidity ^0.8.0;
import "../Implementation.sol";
contract MockImplementation is Implementation {
function initialize() initializer public {
// this function needs to be exposed for an upgrade to pass
}
function testNewImplementationActive() external pure returns (bool) {
return true;
}