mirror of
https://github.com/cerc-io/watcher-ts
synced 2025-02-03 08:42:50 +00:00
da758aceaa
* Initial setup with hardhat. * Deploy Factory contract. * Deploy tokens and create pool using factory contract. * Deploy contract to private network. * Implement separate scripts for deploying Factory, Token and Pool. Co-authored-by: nikugogoi <95nikass@gmail.com>
15 lines
565 B
TypeScript
15 lines
565 B
TypeScript
import { task, types } from "hardhat/config";
|
|
import {
|
|
abi as FACTORY_ABI,
|
|
bytecode as FACTORY_BYTECODE,
|
|
} from '@uniswap/v3-core/artifacts/contracts/UniswapV3Factory.sol/UniswapV3Factory.json'
|
|
|
|
task("deploy-factory", "Deploys Factory contract")
|
|
.setAction(async (_, hre) => {
|
|
const [signer] = await hre.ethers.getSigners();
|
|
const Factory = new hre.ethers.ContractFactory(FACTORY_ABI , FACTORY_BYTECODE, signer);
|
|
const factory = await Factory.deploy();
|
|
await factory.deployed();
|
|
console.log("Factory deployed to:", factory.address);
|
|
});
|