Skip to content

Commit

Permalink
deploy legacy bridge (#795)
Browse files Browse the repository at this point in the history
Signed-off-by: Danil <[email protected]>
Co-authored-by: Vlad Bochok <[email protected]>
  • Loading branch information
Deniallugo and vladbochok committed Sep 12, 2024
1 parent ec8e9da commit 73b20c4
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions l1-contracts/deploy-scripts/dev/SetupLegacyBridge.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ contract SetupLegacyBridge is Script {
function setParamsForDummyBridge() internal {
(address l2TokenBeacon, bytes32 l2TokenBeaconHash) = calculateTokenBeaconAddress();
DummyL1ERC20Bridge bridge = DummyL1ERC20Bridge(addresses.erc20BridgeProxy);
vm.broadcast();
bridge.setValues(config.l2SharedBridgeAddress, l2TokenBeacon, l2TokenBeaconHash);
}

Expand All @@ -124,10 +125,15 @@ contract SetupLegacyBridge is Script {
bytes memory beaconProxy = Utils.readHardhatBytecode(
"/../l2-contracts/artifacts-zk/@openzeppelin/contracts/proxy/beacon/BeaconProxy.sol/BeaconProxy.json"
);
tokenBeaconBytecodeHash = L2ContractHelper.hashL2Bytecode(beaconProxy);

(tokenBeaconAddress, tokenBeaconBytecodeHash) = calculateL2Create2Address(
bytes memory upgradableBeacon = Utils.readHardhatBytecode(
"/../l2-contracts/artifacts-zk/@openzeppelin/contracts/proxy/beacon/UpgradeableBeacon.sol/UpgradeableBeacon.json"
);

(tokenBeaconAddress, ) = calculateL2Create2Address(
config.l2SharedBridgeAddress,
beaconProxy,
upgradableBeacon,
bytes32(0),
abi.encode(l2StandardToken)
);
Expand Down

0 comments on commit 73b20c4

Please sign in to comment.