aboutsummaryrefslogtreecommitdiffstats
path: root/packages/0x.js/test/utils
diff options
context:
space:
mode:
Diffstat (limited to 'packages/0x.js/test/utils')
-rw-r--r--packages/0x.js/test/utils/deployer.ts18
-rw-r--r--packages/0x.js/test/utils/web3_wrapper.ts12
2 files changed, 27 insertions, 3 deletions
diff --git a/packages/0x.js/test/utils/deployer.ts b/packages/0x.js/test/utils/deployer.ts
new file mode 100644
index 000000000..b092322e2
--- /dev/null
+++ b/packages/0x.js/test/utils/deployer.ts
@@ -0,0 +1,18 @@
+import { Deployer } from '@0xproject/deployer';
+import { devConstants } from '@0xproject/dev-utils';
+import * as path from 'path';
+
+import { constants } from './constants';
+
+import { provider } from './web3_wrapper';
+
+const artifactsDir = path.resolve('test', 'artifacts');
+const deployerOpts = {
+ artifactsDir,
+ provider,
+ networkId: constants.TESTRPC_NETWORK_ID,
+ defaults: {
+ gas: devConstants.GAS_ESTIMATE,
+ },
+};
+export const deployer = new Deployer(deployerOpts);
diff --git a/packages/0x.js/test/utils/web3_wrapper.ts b/packages/0x.js/test/utils/web3_wrapper.ts
index 4b374fc7e..b7b3f0b7f 100644
--- a/packages/0x.js/test/utils/web3_wrapper.ts
+++ b/packages/0x.js/test/utils/web3_wrapper.ts
@@ -1,6 +1,12 @@
-import { web3Factory } from '@0xproject/dev-utils';
+import { devConstants, web3Factory } from '@0xproject/dev-utils';
+import { Provider } from '@0xproject/types';
import { Web3Wrapper } from '@0xproject/web3-wrapper';
import * as Web3 from 'web3';
-export const web3 = web3Factory.create();
-export const web3Wrapper = new Web3Wrapper(web3.currentProvider);
+import { constants } from './constants';
+
+const web3 = web3Factory.create({ shouldUseInProcessGanache: true });
+const provider: Provider = web3.currentProvider;
+const web3Wrapper = new Web3Wrapper(web3.currentProvider);
+
+export { provider, web3Wrapper };