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