import { HardhatRuntimeEnvironment } from "hardhat/types" ; import { DeployFunction } from "hardhat-deploy/types" ; import { ethers , upgrades } from "hardhat" ; import { DexPriceOracle__factory } from "../../../../typechain" ; const func = async function ( hre ) { const DEX_FACTORY_ADDR = "" ; console . log ( ">> Deploying an upgradable DexPriceOracle contract" ) ; const DexPriceOracle = ( await ethers . getContractFactory ( "DexPriceOracle" , ( await ethers . getSigners ( ) ) [ 0 ] ) ) as DexPriceOracle__factory ; const dexPriceOracle = await upgrades . deployProxy ( DexPriceOracle , [ DEX_FACTORY_ADDR ] ) ; await dexPriceOracle . deployed ( ) ; console . log ( `>> Deployed at ${ dexPriceOracle . address }` ) ; const tx = await dexPriceOracle . deployTransaction . wait ( ) ; console . log ( `>> Deploy block ${ tx . blockNumber }` ) ; } ; export default func ; func . tags = [ "DexPriceOracle" ] ;