Files

21 lines
552 B
TypeScript

import { DeployFunction } from "hardhat-deploy/types";
import { HardhatRuntimeEnvironment } from "hardhat/types";
const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
const { deployer } = await hre.getNamedAccounts();
const { deploy } = hre.deployments;
const counter = await deploy("Counter", {
from: deployer,
args: [],
log: true,
skipIfAlreadyDeployed: false,
});
console.log(`Counter contract: `, counter.address);
};
export default func;
func.id = "deploy_counter";
func.tags = ["Counter"];