import { ethers } from "hardhat";
import contracts from "../config/contracts";

async function main() {
  const contractName = 'V3Tool'

  const Contract = await ethers.getContractFactory(contractName);
  console.log('deploying...')
  const contract = await Contract.deploy(contracts.UNIV3_POSITION, contracts.UNIV3_FACTORY);
  console.log(`${ contractName } deployed, confirm...`)
  await contract.deployed();
  console.log(`${ contractName } deployed to ${contract.address}`);
}

// We recommend this pattern to be able to use async/await everywhere
// and properly handle errors.
main().catch((error) => {
  console.error(error);
  process.exitCode = 1;
});
