Deploy ERC20

This commit is contained in:
Oskar Thoren 2021-01-29 13:26:28 +08:00
parent 102aa7f7f9
commit d9a9a67277
No known key found for this signature in database
GPG Key ID: BDB55C8C0EF29911
1 changed files with 20 additions and 0 deletions

20
scripts/setup-swap.js Normal file
View File

@ -0,0 +1,20 @@
const hre = require("hardhat");
async function main() {
// Deploy ERC20 Token
// XXX Who is default signer here?
const ERC20 = await hre.ethers.getContractFactory("ERC20PresetMinterPauser");
var erc20 = await ERC20.deploy("TestToken", "TEST");
await erc20.deployed();
console.log("ERC20: ", erc20.address);
}
// We recommend this pattern to be able to use async/await everywhere
// and properly handle errors.
main()
.then(() => process.exit(0))
.catch(error => {
console.error(error);
process.exit(1);
});