From 648b3616233215d656e96bec156139ece4fafa3a Mon Sep 17 00:00:00 2001 From: Csongor Kiss Date: Fri, 18 Nov 2022 14:03:46 +0000 Subject: [PATCH] ethereum: Set impl initialised during setup (fixes #1930) --- ethereum/contracts/Setup.sol | 4 ++++ ethereum/contracts/bridge/BridgeSetup.sol | 4 ++++ ethereum/contracts/nft/NFTBridgeSetup.sol | 4 ++++ 3 files changed, 12 insertions(+) diff --git a/ethereum/contracts/Setup.sol b/ethereum/contracts/Setup.sol index 5b0d4f4e5..abcd3a645 100644 --- a/ethereum/contracts/Setup.sol +++ b/ethereum/contracts/Setup.sol @@ -35,5 +35,9 @@ contract Setup is Setters, ERC1967Upgrade { setEvmChainId(evmChainId); _upgradeTo(implementation); + + // See https://github.com/wormhole-foundation/wormhole/issues/1930 for + // why we set this here + setInitialized(implementation); } } diff --git a/ethereum/contracts/bridge/BridgeSetup.sol b/ethereum/contracts/bridge/BridgeSetup.sol index 59993b5bb..9732fb96a 100644 --- a/ethereum/contracts/bridge/BridgeSetup.sol +++ b/ethereum/contracts/bridge/BridgeSetup.sol @@ -36,5 +36,9 @@ contract BridgeSetup is BridgeSetters, ERC1967Upgrade { setEvmChainId(evmChainId); _upgradeTo(implementation); + + // See https://github.com/wormhole-foundation/wormhole/issues/1930 for + // why we set this here + setInitialized(implementation); } } diff --git a/ethereum/contracts/nft/NFTBridgeSetup.sol b/ethereum/contracts/nft/NFTBridgeSetup.sol index c83503064..c1c7aeaf5 100644 --- a/ethereum/contracts/nft/NFTBridgeSetup.sol +++ b/ethereum/contracts/nft/NFTBridgeSetup.sol @@ -33,5 +33,9 @@ contract NFTBridgeSetup is NFTBridgeSetters, ERC1967Upgrade { setEvmChainId(evmChainId); _upgradeTo(implementation); + + // See https://github.com/wormhole-foundation/wormhole/issues/1930 for + // why we set this here + setInitialized(implementation); } }