aboutsummaryrefslogtreecommitdiffstats
path: root/packages/subproviders/test/utils/ganache_subprovider.ts
diff options
context:
space:
mode:
authorFabio Berger <me@fabioberger.com>2018-04-06 14:04:17 +0800
committerFabio Berger <me@fabioberger.com>2018-04-06 14:04:17 +0800
commit75a51af00603236e0b80fe04336494944a32739c (patch)
treeb5e605911321cfc148f5eedec842fbe2c6bd0672 /packages/subproviders/test/utils/ganache_subprovider.ts
parent24454938e51e40ae74809f15bd1f612c69c218ec (diff)
downloaddexon-0x-contracts-75a51af00603236e0b80fe04336494944a32739c.tar.gz
dexon-0x-contracts-75a51af00603236e0b80fe04336494944a32739c.tar.zst
dexon-0x-contracts-75a51af00603236e0b80fe04336494944a32739c.zip
Use provider over web3 in deployer, dev-utils and subprovider tests, rename subprovider to ganacheSubprovider in test util
Diffstat (limited to 'packages/subproviders/test/utils/ganache_subprovider.ts')
-rw-r--r--packages/subproviders/test/utils/ganache_subprovider.ts18
1 files changed, 18 insertions, 0 deletions
diff --git a/packages/subproviders/test/utils/ganache_subprovider.ts b/packages/subproviders/test/utils/ganache_subprovider.ts
new file mode 100644
index 000000000..ac4a9325c
--- /dev/null
+++ b/packages/subproviders/test/utils/ganache_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 ganacheSubprovider = new GanacheSubprovider({
+ logger,
+ verbose: false,
+ port: configs.port,
+ networkId: configs.networkId,
+ mnemonic: configs.mnemonic,
+});