@zarclays/zswap-trident
Version:
34 lines (27 loc) • 900 B
text/typescript
import { DeployFunction } from "hardhat-deploy/types";
import { HardhatRuntimeEnvironment } from "hardhat/types";
const deployFunction: DeployFunction = async function ({
deployments,
getNamedAccounts,
ethers,
run,
}: HardhatRuntimeEnvironment) {
const { deploy } = deployments;
const { deployer } = await getNamedAccounts();
const { address, newlyDeployed } = await deploy("ConstantProductPoolFactoryHelper", {
from: deployer,
deterministicDeployment: false,
waitConfirmations: process.env.VERIFY_ON_DEPLOY === "true" ? 10 : undefined,
});
if (newlyDeployed && process.env.VERIFY_ON_DEPLOY === "true") {
try {
await run("verify:verify", {
address,
});
} catch (error) {
console.error(error);
}
}
};
export default deployFunction;
deployFunction.tags = ["ConstantProductPoolFactoryHelper"];