forked from wormhole-foundation/wormhole
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bridge: move evm state setup into a separate contract
Change-Id: Ibc790ba971be5144c0af65870d424c9c62b52039
- Loading branch information
valentin
committed
Aug 19, 2021
1 parent
a055af1
commit 45d22ce
Showing
4 changed files
with
42 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
// contracts/BridgeSetup.sol | ||
// SPDX-License-Identifier: Apache 2 | ||
|
||
pragma solidity ^0.8.0; | ||
pragma experimental ABIEncoderV2; | ||
|
||
import "./BridgeGovernance.sol"; | ||
|
||
import "@openzeppelin/contracts/proxy/ERC1967/ERC1967Upgrade.sol"; | ||
|
||
contract BridgeSetup is BridgeSetters, ERC1967Upgrade { | ||
function setup( | ||
address implementation, | ||
uint16 chainId, | ||
address wormhole, | ||
uint16 governanceChainId, | ||
bytes32 governanceContract, | ||
address tokenImplementation, | ||
address WETH | ||
) public { | ||
setChainId(chainId); | ||
|
||
setWormhole(wormhole); | ||
|
||
setGovernanceChainId(governanceChainId); | ||
setGovernanceContract(governanceContract); | ||
|
||
setTokenImplementation(tokenImplementation); | ||
|
||
setWETH(WETH); | ||
|
||
_upgradeTo(implementation); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters