|
| 1 | +import hre from "hardhat"; |
| 2 | +import { DeployFunction } from "hardhat-deploy/dist/types"; |
| 3 | +import { HardhatRuntimeEnvironment } from "hardhat/types"; |
| 4 | + |
| 5 | +import { ADDRESSES } from "../helpers/deploymentConfig"; |
| 6 | + |
| 7 | +const func: DeployFunction = async function ({ getNamedAccounts, deployments, network }: HardhatRuntimeEnvironment) { |
| 8 | + const { deploy } = deployments; |
| 9 | + const { deployer } = await getNamedAccounts(); |
| 10 | + const proxyOwnerAddress = ADDRESSES[network.name].timelock; |
| 11 | + const { xSolvBTC, SolvBTC } = ADDRESSES[network.name]; |
| 12 | + |
| 13 | + const redstoneOracle = await hre.ethers.getContract("RedStoneOracle"); |
| 14 | + const resilientOracle = await hre.ethers.getContract("ResilientOracle"); |
| 15 | + |
| 16 | + await deploy("xSolvBTCOneJumpRedStoneOracle", { |
| 17 | + contract: "OneJumpOracle", |
| 18 | + from: deployer, |
| 19 | + log: true, |
| 20 | + deterministicDeployment: false, |
| 21 | + args: [xSolvBTC, SolvBTC, resilientOracle.address, redstoneOracle.address], |
| 22 | + proxy: { |
| 23 | + owner: proxyOwnerAddress, |
| 24 | + proxyContract: "OptimizedTransparentProxy", |
| 25 | + }, |
| 26 | + skipIfAlreadyDeployed: true, |
| 27 | + }); |
| 28 | +}; |
| 29 | + |
| 30 | +func.skip = async () => hre.network.name !== "bscmainnet" && hre.network.name !== "bsctestnet"; |
| 31 | +func.tags = ["xSolvBTC"]; |
| 32 | +export default func; |
0 commit comments