"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const hardhat_1 = require("hardhat");
const deploymentConfig_1 = require("../helpers/deploymentConfig");
const func = async ({ getNamedAccounts, deployments, network }) => {
    const { deploy } = deployments;
    const { deployer } = await getNamedAccounts();
    const proxyOwnerAddress = network.live ? deploymentConfig_1.ADDRESSES[network.name].timelock : deployer;
    await deploy("MockPendlePtOracle", {
        contract: "MockPendlePtOracle",
        from: deployer,
        log: true,
        autoMine: true,
        skipIfAlreadyDeployed: true,
        args: [],
    });
    const pendleOracleContract = await hardhat_1.ethers.getContract("MockPendlePtOracle");
    if ((await pendleOracleContract.owner()) === deployer) {
        await pendleOracleContract.transferOwnership(proxyOwnerAddress);
    }
};
exports.default = func;
func.tags = ["pendle", "mock-pt-oracle"];
func.skip = async (hre) => hre.network.name !== "sepolia" && hre.network.name !== "bsctestnet";
//# sourceMappingURL=7-dependencies-pendle-oracle.js.map