// SPDX-License-Identifier: MIT
pragma solidity ^0.8.19;

import {Script, console} from "forge-std/Script.sol";
import {TwoWayTokenBridgeL1} from "../contracts/bridge/TwoWayTokenBridgeL1.sol";
import {TwoWayTokenBridgeL2} from "../contracts/bridge/TwoWayTokenBridgeL2.sol";

contract DeployTwoWayBridge is Script {
    function run() external {
        uint256 pk = vm.envUint("PRIVATE_KEY");
        address router = vm.envAddress("CCIP_ROUTER");
        address feeToken = vm.envAddress("CCIP_FEE_TOKEN"); // LINK
        address l1Token = vm.envAddress("BRIDGE_L1_TOKEN"); // canonical token on L1
        address l2Token = vm.envAddress("BRIDGE_L2_TOKEN"); // mintable token on L2

        vm.startBroadcast(pk);
        TwoWayTokenBridgeL1 l1 = new TwoWayTokenBridgeL1(router, l1Token, feeToken);
        TwoWayTokenBridgeL2 l2 = new TwoWayTokenBridgeL2(router, l2Token, feeToken);
        console.log("TwoWayTokenBridgeL1:", address(l1));
        console.log("TwoWayTokenBridgeL2:", address(l2));
        vm.stopBroadcast();
    }
}


