import { HardhatRuntimeEnvironment } from "hardhat/types" ; import { DeployFunction } from "hardhat-deploy/types" ; import { isTestNetwork } from "../../utils/network" ; const func = async function ( hre ) { const { deployments , getNamedAccounts , getChainId } = hre ; const { deploy , get } = deployments ; const { libraryDeployer } = await getNamedAccounts ( ) ; if ( isTestNetwork ( await getChainId ( ) ) ) { await deploy ( "SwapUtilsV1" , { from : libraryDeployer , log : true , skipIfAlreadyDeployed : true , } ) ; } await deploy ( "SwapUtils" , { from : libraryDeployer , log : true , skipIfAlreadyDeployed : true , } ) ; } ; export default func ; func . tags = [ "SwapUtils" ] ;