deployV3Tool.ts 661 B

1234567891011121314151617181920
  1. import { ethers } from "hardhat";
  2. import contracts from "../config/contracts";
  3. async function main() {
  4. const contractName = 'V3Tool'
  5. const Contract = await ethers.getContractFactory(contractName);
  6. console.log('deploying...')
  7. const contract = await Contract.deploy(contracts.UNIV3_POSITION, contracts.UNIV3_FACTORY);
  8. console.log(`${ contractName } deployed, confirm...`)
  9. await contract.deployed();
  10. console.log(`${ contractName } deployed to ${contract.address}`);
  11. }
  12. // We recommend this pattern to be able to use async/await everywhere
  13. // and properly handle errors.
  14. main().catch((error) => {
  15. console.error(error);
  16. process.exitCode = 1;
  17. });