import { HardhatRuntimeEnvironment } from "hardhat/types" ; export const sleep = ( ms ) : Promise < void > => new Promise ( ( resolve ) => setTimeout ( resolve , ms ) ) ; interface VerifyEtherscan { address : string ; contract ? : string ; constructorArguments ? : any [ ] ; libraries ? : { [ libraryName ] : string ; } ; } export const verifyEtherscan = async ( hre , contract ) : Promise < void > => { await sleep ( 10000 ) ; if ( hre . network . name !== "hardhat" ) { console . log ( `About to verify ${ contract . address } on Etherscan` ) ; await hre . run ( "verify:verify" , contract ) ; } } ;