watcher-ts/packages/uniswap/tasks/deploy-token.ts
Ashwin Phatak da758aceaa
Script to deploy uniswap contracts locally for testing (#118)
* 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>
2021-07-05 11:05:45 +05:30

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;
});