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

import {Script, console2} from "forge-std/Script.sol";
import {OMNLJurisdictionPolicyRegistry} from "../../contracts/hybx-omnl/OMNLJurisdictionPolicyRegistry.sol";
import {OMNLNotaryRegistry} from "../../contracts/hybx-omnl/OMNLNotaryRegistry.sol";
import {OMNLComplianceMultisig} from "../../contracts/hybx-omnl/OMNLComplianceMultisig.sol";

/// @notice Deploy Web3 compliance layer: jurisdiction policy registry, notary, multisig.
contract DeployOMNLWeb3Compliance is Script {
    function run() external {
        uint256 pk = vm.envUint("PRIVATE_KEY");
        address admin = vm.envOr("OMNL_WEB3_ADMIN", vm.addr(pk));

        vm.startBroadcast(pk);

        OMNLJurisdictionPolicyRegistry jurisdiction = new OMNLJurisdictionPolicyRegistry(admin);
        OMNLNotaryRegistry notary = new OMNLNotaryRegistry(admin, address(jurisdiction));
        OMNLComplianceMultisig multisig = new OMNLComplianceMultisig(admin, address(notary));

        vm.stopBroadcast();

        console2.log("OMNLJurisdictionPolicyRegistry", address(jurisdiction));
        console2.log("OMNLNotaryRegistry", address(notary));
        console2.log("OMNLComplianceMultisig", address(multisig));
    }
}
