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