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

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

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

