mirror of
https://github.com/cerc-io/watcher-ts
synced 2024-11-20 04:46:20 +00:00
nikugogoi
168689a7c7
* Fix codegen for non subgraph watchers * Remove graphWatcher.init from generated non subgraph watcher
22 lines
770 B
TypeScript
22 lines
770 B
TypeScript
//
|
|
// Copyright 2021 Vulcanize, Inc.
|
|
//
|
|
|
|
import { task, types } from 'hardhat/config';
|
|
import '@nomiclabs/hardhat-ethers';
|
|
|
|
const DEFAULT_INITIAL_SUPPLY = '1000000000000000000000';
|
|
|
|
task('token-deploy', 'Deploys GLD token')
|
|
.addOptionalParam('initialSupply', 'Set total supply', DEFAULT_INITIAL_SUPPLY, types.string)
|
|
.setAction(async (args, hre) => {
|
|
const { initialSupply } = args;
|
|
await hre.run('compile');
|
|
const Token = await hre.ethers.getContractFactory('GLDToken');
|
|
const token = await Token.deploy(hre.ethers.BigNumber.from(initialSupply));
|
|
|
|
const receipt = await token.deployTransaction.wait();
|
|
console.log('GLD Token deployed to:', token.address);
|
|
console.log('Deployed at block:', receipt.blockNumber, receipt.blockHash);
|
|
});
|