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

import "forge-std/Script.sol";
import "../../../contracts/bridge/ZedxionCustomBridge.sol";

/**
 * @notice Deploy ZedxionCustomBridge on Chain 138 and/or ZEDXION (83872).
 * @dev For CREATE2 same-address deploy, use DeployDeterministicCore pattern with salt keccak256("ZedxionCustomBridge").
 * Env: PRIVATE_KEY, ADMIN (defaults msg.sender)
 */
contract DeployZedxionCustomBridge is Script {
    function run() external {
        uint256 pk = vm.envUint("PRIVATE_KEY");
        address admin = vm.envOr("ADMIN", vm.addr(pk));
        vm.startBroadcast(pk);
        ZedxionCustomBridge bridge = new ZedxionCustomBridge(admin);
        vm.stopBroadcast();
        console2.log("ZedxionCustomBridge", address(bridge));
        console2.log("Admin", admin);
    }
}
