diff options
author | Fabio Berger <me@fabioberger.com> | 2018-04-04 10:35:58 +0800 |
---|---|---|
committer | Fabio Berger <me@fabioberger.com> | 2018-04-04 10:35:58 +0800 |
commit | 5e4e27fed5b9b7c889e6e6e1805377b9eff31a3a (patch) | |
tree | c6894bbd970482b111498827464f3930e501c212 /packages/subproviders/test/utils | |
parent | 6c02722f56dd37dd4237248e73d070755f86f318 (diff) | |
download | dexon-0x-contracts-5e4e27fed5b9b7c889e6e6e1805377b9eff31a3a.tar.gz dexon-0x-contracts-5e4e27fed5b9b7c889e6e6e1805377b9eff31a3a.tar.zst dexon-0x-contracts-5e4e27fed5b9b7c889e6e6e1805377b9eff31a3a.zip |
Update dev-utils and subproviders tests to use ganache in-process provider
Diffstat (limited to 'packages/subproviders/test/utils')
-rw-r--r-- | packages/subproviders/test/utils/configs.ts | 5 | ||||
-rw-r--r-- | packages/subproviders/test/utils/subprovider.ts | 18 |
2 files changed, 23 insertions, 0 deletions
diff --git a/packages/subproviders/test/utils/configs.ts b/packages/subproviders/test/utils/configs.ts new file mode 100644 index 000000000..341037e4f --- /dev/null +++ b/packages/subproviders/test/utils/configs.ts @@ -0,0 +1,5 @@ +export const configs = { + port: 8545, + networkId: 50, + mnemonic: 'concert load couple harbor equip island argue ramp clarify fence smart topic', +}; diff --git a/packages/subproviders/test/utils/subprovider.ts b/packages/subproviders/test/utils/subprovider.ts new file mode 100644 index 000000000..b1c459746 --- /dev/null +++ b/packages/subproviders/test/utils/subprovider.ts @@ -0,0 +1,18 @@ +import * as fs from 'fs'; + +import { GanacheSubprovider } from '../../src/subproviders/ganache'; +import { configs } from '../utils/configs'; + +const logger = { + log: (arg: any) => { + fs.appendFileSync('ganache.log', `${arg}\n`); + }, +}; + +export const subprovider = new GanacheSubprovider({ + logger, + verbose: false, + port: configs.port, + networkId: configs.networkId, + mnemonic: configs.mnemonic, +}); |