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

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

/**
 * @title DeployCompliantUSDC
 * @notice Deploy CompliantUSDC token contract
 */
contract DeployCompliantUSDC is Script {
    function run() external {
        uint256 deployerPrivateKey = vm.envUint("PRIVATE_KEY");
        address deployer = vm.addr(deployerPrivateKey);
        
        // Load environment variables
        address owner = vm.envOr("USDC_OWNER", deployer);
        address admin = vm.envOr("COMPLIANCE_ADMIN", deployer);
        
        console.log("Deploying CompliantUSDC with deployer:", vm.toString(deployer));
        console.log("Owner:", vm.toString(owner));
        console.log("Compliance Admin:", vm.toString(admin));
        
        vm.startBroadcast(deployerPrivateKey);
        
        CompliantUSDC usdc = new CompliantUSDC(owner, admin);
        console.log("CompliantUSDC deployed at:", vm.toString(address(usdc)));
        
        vm.stopBroadcast();
        
        console.log("\n=== Deployment Summary ===");
        console.log("CompliantUSDC:", vm.toString(address(usdc)));
        console.log("Owner:", vm.toString(owner));
        console.log("Compliance Admin:", vm.toString(admin));
        console.log("Initial Supply: 1,000,000 cUSDC");
        console.log("Decimals: 6");
    }
}

