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

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

/**
 * @title DeployCCIPReceiverMainnet
 * @notice Deploy CCIPReceiver on Ethereum Mainnet
 */
contract DeployCCIPReceiverMainnet 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");
        
        console.log("Deploying CCIPReceiver on Ethereum Mainnet");
        console.log("Deployer:", deployer);
        console.log("CCIP Router:", ccipRouter);
        console.log("Oracle Aggregator:", oracleAggregator);

        vm.startBroadcast(deployerPrivateKey);

        CCIPReceiver receiver = new CCIPReceiver(ccipRouter, oracleAggregator);
        
        console.log("CCIPReceiver deployed at:", address(receiver));

        vm.stopBroadcast();
    }
}

