Skip to content

Commit

Permalink
fix script
Browse files Browse the repository at this point in the history
  • Loading branch information
StanislavBreadless committed Sep 21, 2024
1 parent 8db3824 commit 4568e1f
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions l1-contracts/deploy-scripts/dev/SetupLegacyBridge.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ pragma solidity ^0.8.0;
import {Script} from "forge-std/Script.sol";
import {stdToml} from "forge-std/StdToml.sol";
import {Utils} from "./../Utils.sol";
import {L2ContractsBytecodesLib} from "../L2ContractsBytecodesLib.sol";
import {L1SharedBridge} from "contracts/bridge/L1SharedBridge.sol";
import {DummyL1ERC20Bridge} from "contracts/dev-contracts/DummyL1ERC20Bridge.sol";
import {ProxyAdmin} from "@openzeppelin/contracts/proxy/transparent/ProxyAdmin.sol";
Expand Down Expand Up @@ -112,24 +113,18 @@ contract SetupLegacyBridge is Script {
internal
returns (address tokenBeaconAddress, bytes32 tokenBeaconBytecodeHash)
{
bytes memory l2StandardTokenCode = Utils.readHardhatBytecode(
"/../l2-contracts/artifacts-zk/contracts/bridge/L2StandardERC20.sol/L2StandardERC20.json"
);
bytes memory l2StandardTokenCode = L2ContractsBytecodesLib.readStandardERC20Bytecode();
(address l2StandardToken, ) = calculateL2Create2Address(
config.l2SharedBridgeAddress,
l2StandardTokenCode,
bytes32(0),
""
);

bytes memory beaconProxy = Utils.readHardhatBytecode(
"/../l2-contracts/artifacts-zk/@openzeppelin/contracts/proxy/beacon/BeaconProxy.sol/BeaconProxy.json"
);
bytes memory beaconProxy = L2ContractsBytecodesLib.readBeaconProxyBytecode();
tokenBeaconBytecodeHash = L2ContractHelper.hashL2Bytecode(beaconProxy);

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

(tokenBeaconAddress, ) = calculateL2Create2Address(
config.l2SharedBridgeAddress,
Expand Down

0 comments on commit 4568e1f

Please sign in to comment.