2021-08-17 09:34:16 -07:00
|
|
|
// 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,
|
2022-05-20 08:06:53 -07:00
|
|
|
address WETH,
|
2022-08-30 09:30:32 -07:00
|
|
|
uint8 finality,
|
|
|
|
uint256 evmChainId
|
2021-08-17 09:34:16 -07:00
|
|
|
) public {
|
|
|
|
setChainId(chainId);
|
|
|
|
|
|
|
|
setWormhole(wormhole);
|
|
|
|
|
|
|
|
setGovernanceChainId(governanceChainId);
|
|
|
|
setGovernanceContract(governanceContract);
|
|
|
|
|
|
|
|
setTokenImplementation(tokenImplementation);
|
|
|
|
|
|
|
|
setWETH(WETH);
|
|
|
|
|
2022-05-20 08:06:53 -07:00
|
|
|
setFinality(finality);
|
|
|
|
|
2022-08-30 09:30:32 -07:00
|
|
|
setEvmChainId(evmChainId);
|
|
|
|
|
2021-08-17 09:34:16 -07:00
|
|
|
_upgradeTo(implementation);
|
|
|
|
}
|
|
|
|
}
|