"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const hardhat_1 = require("hardhat");
const deploymentConfig_1 = require("../helpers/deploymentConfig");
const func = async function (hre) {
    const { deployments, network } = hre;
    const adminAccount = {
        sepolia: "0x94fa6078b6b8a26f0b6edffbe6501b22a10470fb",
        ethereum: "0x285960C5B22fD66A736C7136967A3eB15e93CC67",
        opbnbtestnet: "0xb15f6EfEbC276A3b9805df81b5FB3D50C2A62BDf",
        opbnbmainnet: "0xC46796a21a3A9FAB6546aF3434F2eBfFd0604207",
        arbitrumsepolia: "0x1426A5Ae009c4443188DA8793751024E358A61C2",
        arbitrumone: "0x14e0E151b33f9802b3e75b621c1457afc44DcAA0",
        bscmainnet: await (0, deploymentConfig_1.getContractAddressOrNullAddress)(deployments, "NormalTimelock"),
        bsctestnet: await (0, deploymentConfig_1.getContractAddressOrNullAddress)(deployments, "NormalTimelock"),
    };
    const prime = await hardhat_1.ethers.getContract("Prime");
    const plp = await hardhat_1.ethers.getContract("PrimeLiquidityProvider");
    if (network.name !== "hardhat") {
        console.log("Transferring Prime ownership to Timelock");
        await prime.transferOwnership(adminAccount[network.name]);
        console.log("Transferring PLP ownership to Timelock");
        await plp.transferOwnership(adminAccount[network.name]);
    }
};
func.tags = ["Prime"];
func.id = "configure_prime"; // id required to prevent re-execution
exports.default = func;
