mirror of
https://github.com/interep-project/contracts.git
synced 2026-01-13 23:37:59 -05:00
18 lines
677 B
TypeScript
18 lines
677 B
TypeScript
import { Contract } from "ethers"
|
|
import { task, types } from "hardhat/config"
|
|
|
|
task("deploy:interep", "Deploy an Interep contract")
|
|
.addOptionalParam<boolean>("logs", "Print the logs", true, types.boolean)
|
|
.addParam("verifiers", "Tree depths and verifier addresses", undefined, types.json)
|
|
.setAction(async ({ logs, verifiers }, { ethers }): Promise<Contract> => {
|
|
const ContractFactory = await ethers.getContractFactory("Interep")
|
|
|
|
const contract = await ContractFactory.deploy(verifiers)
|
|
|
|
await contract.deployed()
|
|
|
|
logs && console.log(`Interep contract has been deployed to: ${contract.address}`)
|
|
|
|
return contract
|
|
})
|