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

import {Script, console} from "forge-std/Script.sol";
import {CCIPSender} from "../contracts/ccip/CCIPSender.sol";

/**
 * @title DeployCCIPSenderMainnet
 * @notice Deploy CCIPSender on Ethereum Mainnet
 */
contract DeployCCIPSenderMainnet is Script {
    function run() external {
        uint256 deployerPrivateKey = vm.envUint("PRIVATE_KEY");
        address deployer = vm.addr(deployerPrivateKey);

        address ccipRouter = vm.envAddress("CCIP_ROUTER_MAINNET");
        address oracleAggregator = vm.envAddress("ORACLE_AGGREGATOR_MAINNET");
        address feeToken = vm.envAddress("LINK_TOKEN_MAINNET");
        
        console.log("Deploying CCIPSender on Ethereum Mainnet");
        console.log("Deployer:", deployer);
        console.log("CCIP Router:", ccipRouter);
        console.log("Oracle Aggregator:", oracleAggregator);
        console.log("Fee Token (LINK):", feeToken);

        vm.startBroadcast(deployerPrivateKey);

        CCIPSender sender = new CCIPSender(ccipRouter, oracleAggregator, feeToken);
        
        console.log("CCIPSender deployed at:", address(sender));

        vm.stopBroadcast();
    }
}

