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

import {Script, console} from "forge-std/Script.sol";
import {Chain138MainnetCheckpoint} from "../../contracts/mainnet-checkpoint/Chain138MainnetCheckpoint.sol";
import {ExtensionIds} from "../../contracts/mainnet-checkpoint/libraries/ExtensionIds.sol";

/// @notice Re-enable extensions after hub v3 + token filter replace (env: EXT_VALIDATOR_SIG optional sanity).
contract ReenableCheckpointExtensions is Script {
    function run() external {
        uint256 pk = vm.envUint("PRIVATE_KEY");
        Chain138MainnetCheckpoint hub = Chain138MainnetCheckpoint(vm.envAddress("CHAIN138_MAINNET_CHECKPOINT_PROXY"));

        vm.startBroadcast(pk);
        hub.setExtensionActive(ExtensionIds.VALIDATOR_SIG, true);
        console.log("VALIDATOR_SIG active");
        hub.setExtensionActive(ExtensionIds.TOKEN_FILTER, true);
        console.log("TOKEN_FILTER active");
        vm.stopBroadcast();
    }
}
