mirror of
https://github.com/cerc-io/watcher-ts
synced 2025-01-24 12:09:06 +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>
14 lines
504 B
TypeScript
14 lines
504 B
TypeScript
import { task, types } from "hardhat/config";
|
|
|
|
task("deploy-token", "Deploys new token")
|
|
.addParam('name', 'Name of the token', undefined, types.string)
|
|
.addParam('symbol', 'Symbol of the token', undefined, types.string)
|
|
.setAction(async (args, hre) => {
|
|
const { name, symbol } = args
|
|
const Token = await hre.ethers.getContractFactory('ERC20Token');
|
|
const token = await Token.deploy(name, symbol);
|
|
|
|
console.log(`Token ${symbol} deployed to:`, token.address)
|
|
return token;
|
|
});
|