aboutsummaryrefslogtreecommitdiffstats
path: root/test/utils
diff options
context:
space:
mode:
authorLeonid Logvinov <logvinov.leon@gmail.com>2017-05-30 20:55:43 +0800
committerLeonid Logvinov <logvinov.leon@gmail.com>2017-05-30 20:55:43 +0800
commit3e65ac018c145d9fb49ece6cb113ae577f84323b (patch)
tree49f3b63f898b78c2b210b56b01e96f62887161b0 /test/utils
parentdfcf49464b1a93b6e5df39289e9d14b2e60e62d2 (diff)
parent6b321ca1c70b9dcf188b2a112015386cba0ad5f2 (diff)
downloaddexon-sol-tools-3e65ac018c145d9fb49ece6cb113ae577f84323b.tar
dexon-sol-tools-3e65ac018c145d9fb49ece6cb113ae577f84323b.tar.gz
dexon-sol-tools-3e65ac018c145d9fb49ece6cb113ae577f84323b.tar.bz2
dexon-sol-tools-3e65ac018c145d9fb49ece6cb113ae577f84323b.tar.lz
dexon-sol-tools-3e65ac018c145d9fb49ece6cb113ae577f84323b.tar.xz
dexon-sol-tools-3e65ac018c145d9fb49ece6cb113ae577f84323b.tar.zst
dexon-sol-tools-3e65ac018c145d9fb49ece6cb113ae577f84323b.zip
Merge branch 'master' into fillOrderAsync
Diffstat (limited to 'test/utils')
-rw-r--r--test/utils/web3_factory.ts10
1 files changed, 7 insertions, 3 deletions
diff --git a/test/utils/web3_factory.ts b/test/utils/web3_factory.ts
index 493fbc2df..ffdc0e4cf 100644
--- a/test/utils/web3_factory.ts
+++ b/test/utils/web3_factory.ts
@@ -10,14 +10,18 @@ import {constants} from './constants';
export const web3Factory = {
create(): Web3 {
+ const provider = this.getRpcProvider();
+ const web3 = new Web3();
+ web3.setProvider(provider);
+ return web3;
+ },
+ getRpcProvider(): Web3.Provider {
const provider = new ProviderEngine();
const rpcUrl = `http://${constants.RPC_HOST}:${constants.RPC_PORT}`;
provider.addProvider(new RpcSubprovider({
rpcUrl,
}));
provider.start();
- const web3 = new Web3();
- web3.setProvider(provider);
- return web3;
+ return provider;
},
};