"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
    function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
Object.defineProperty(exports, "__esModule", { value: true });
const hardhat_1 = require("hardhat");
const deploymentConfig_1 = require("../helpers/deploymentConfig");
const func = ({ getNamedAccounts, deployments, network }) => __awaiter(void 0, void 0, void 0, function* () {
    const { deploy } = deployments;
    const { deployer } = yield getNamedAccounts();
    const proxyOwnerAddress = network.live ? deploymentConfig_1.ADDRESSES[network.name].timelock : deployer;
    yield deploy("MockAnkrBNB", {
        from: deployer,
        log: true,
        autoMine: true,
        skipIfAlreadyDeployed: true,
        args: ["Ankr Staked BNB ", "ankrBNB", "18"],
    });
    const ankrBNBContract = yield hardhat_1.ethers.getContract("MockAnkrBNB");
    if ((yield ankrBNBContract.owner()) === deployer) {
        yield ankrBNBContract.transferOwnership(proxyOwnerAddress);
    }
    yield deploy("MockWBETH", {
        from: deployer,
        log: true,
        autoMine: true,
        skipIfAlreadyDeployed: true,
        args: ["Wrapped Binance Beacon ETH", "wBETH", "18"],
    });
    const wBETHContract = yield hardhat_1.ethers.getContract("MockWBETH");
    if ((yield wBETHContract.owner()) === deployer) {
        yield wBETHContract.transferOwnership(proxyOwnerAddress);
    }
});
exports.default = func;
func.tags = ["bnb_lst"];
func.skip = (hre) => __awaiter(void 0, void 0, void 0, function* () { return hre.network.name !== "bsctestnet"; });
//# sourceMappingURL=5-dependencies-bnb-lst-oracles.js.map