deploy.ts 252 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12
import hre from 'hardhat'

export const deploy = async (
  name: string,
  opts?: {
    args?: any[]
    signer?: any
  }
) => {
  const factory = await hre.ethers.getContractFactory(name, opts?.signer)
  return factory.deploy(...(opts?.args || []))
}