diff --git a/lib/utils/accountParser.js b/lib/utils/accountParser.js index f407cf54b..1399108cd 100644 --- a/lib/utils/accountParser.js +++ b/lib/utils/accountParser.js @@ -47,6 +47,12 @@ class AccountParser { if (accountConfig.balance) { hexBalance = AccountParser.getHexBalance(accountConfig.balance, web3); } + + if (accountConfig.privateKey === 'random') { + let randomAccount = web3.eth.accounts.create(); + accountConfig.privateKey = randomAccount.privateKey; + } + if (accountConfig.privateKey) { if (!accountConfig.privateKey.startsWith('0x')) { accountConfig.privateKey = '0x' + accountConfig.privateKey;