diff options
author | Amir Bandeali <abandeali1@gmail.com> | 2018-03-13 00:52:35 +0800 |
---|---|---|
committer | Amir Bandeali <abandeali1@gmail.com> | 2018-04-21 04:56:17 +0800 |
commit | 56ade9c44e1a729d98d64b688464118be671983c (patch) | |
tree | 3e8ec74d778c2963b5278a86560b54c8328aa086 /packages/contracts/scripts/testrpc.ts | |
parent | 6db0b2e39821f27f6f31a8247159864dacd1d2bd (diff) | |
download | dexon-sol-tools-56ade9c44e1a729d98d64b688464118be671983c.tar dexon-sol-tools-56ade9c44e1a729d98d64b688464118be671983c.tar.gz dexon-sol-tools-56ade9c44e1a729d98d64b688464118be671983c.tar.bz2 dexon-sol-tools-56ade9c44e1a729d98d64b688464118be671983c.tar.lz dexon-sol-tools-56ade9c44e1a729d98d64b688464118be671983c.tar.xz dexon-sol-tools-56ade9c44e1a729d98d64b688464118be671983c.tar.zst dexon-sol-tools-56ade9c44e1a729d98d64b688464118be671983c.zip |
Add private keys for testrpc mnemonic
Diffstat (limited to 'packages/contracts/scripts/testrpc.ts')
-rw-r--r-- | packages/contracts/scripts/testrpc.ts | 44 |
1 files changed, 0 insertions, 44 deletions
diff --git a/packages/contracts/scripts/testrpc.ts b/packages/contracts/scripts/testrpc.ts deleted file mode 100644 index 347673b90..000000000 --- a/packages/contracts/scripts/testrpc.ts +++ /dev/null @@ -1,44 +0,0 @@ -import * as testrpc from 'ganache-cli'; -import * as _ from 'lodash'; - -import { constants } from '../src/utils/constants'; -import { utils } from '../src/utils/utils'; - -const opts = { - accounts: constants.TESTRPC_ACCOUNTS, - logger: console, -}; - -const server = testrpc.server(opts); - -server.listen(constants.TESTRPC_PORT, (err: any, result: any) => { - if (err) { - utils.consoleLog(err); - return; - } - - const state = result ? result : server.provider.manager.state; - - utils.consoleLog(''); - utils.consoleLog('Available Accounts'); - utils.consoleLog('=================='); - - const accounts = state.accounts; - const addresses = _.keys(accounts); - - _.forEach(addresses, (address, index) => { - const line = `(${index}) ${address}`; - utils.consoleLog(line); - }); - - utils.consoleLog(''); - utils.consoleLog('Private Keys'); - utils.consoleLog('=================='); - - _.forEach(addresses, (address, index) => { - utils.consoleLog(`(${index}) ${accounts[address].secretKey.toString('hex')}`); - }); - - utils.consoleLog(''); - utils.consoleLog('Listening on localhost:' + constants.TESTRPC_PORT); -}); |