From 38fcadc92a36ae4a3fb53beb571bb762d0bb2e69 Mon Sep 17 00:00:00 2001 From: deniallugo Date: Tue, 16 Aug 2022 16:08:09 +0200 Subject: [PATCH] Fix init Signed-off-by: deniallugo --- contracts/scripts/deploy-erc20.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/contracts/scripts/deploy-erc20.ts b/contracts/scripts/deploy-erc20.ts index 4228340d1..d6c96cd99 100644 --- a/contracts/scripts/deploy-erc20.ts +++ b/contracts/scripts/deploy-erc20.ts @@ -37,10 +37,12 @@ async function deployToken(token: TokenDescription): Promise { [token.name, token.symbol, token.decimals], { gasLimit: 5000000 } ); - await erc20.mint(wallet.address, parseEther('3000000000')); for (let i = 0; i < 10; ++i) { - const testWallet = Wallet.fromMnemonic(process.env.MNEMONIC as string, "m/44'/60'/0'/0/" + i).connect(provider); + const testWallet = Wallet.fromMnemonic( + process.env.MNEMONIC ? process.env.MNEMONIC : ethTestConfig.mnemonic, + "m/44'/60'/0'/0/" + i + ).connect(provider); await erc20.mint(testWallet.address, parseEther('3000000000')); } token.address = erc20.address; @@ -82,7 +84,6 @@ async function main() { .action(async (tokens_json: string) => { const tokens: Array = JSON.parse(tokens_json); const result = []; - for (const token of tokens) { result.push(await deployToken(token)); }