aboutsummaryrefslogtreecommitdiffstats
path: root/packages/contracts/src/utils/web3_wrapper.ts
diff options
context:
space:
mode:
authorAmir Bandeali <abandeali1@gmail.com>2018-05-16 03:52:49 +0800
committerAmir Bandeali <abandeali1@gmail.com>2018-05-16 03:52:49 +0800
commit9e0471bfbb4bb2b3b490e10ce34b16c88e8bab9a (patch)
treef72aae5170b6f1f6d3d70ebf6c03ed171680ff50 /packages/contracts/src/utils/web3_wrapper.ts
parent9744b1906a111aa0c65c8fafb4db66aef32a5a23 (diff)
parent6aed4fb1ae27dabed027c855f2cbdc0bfb4f3b6b (diff)
downloaddexon-0x-contracts-9e0471bfbb4bb2b3b490e10ce34b16c88e8bab9a.tar.gz
dexon-0x-contracts-9e0471bfbb4bb2b3b490e10ce34b16c88e8bab9a.tar.zst
dexon-0x-contracts-9e0471bfbb4bb2b3b490e10ce34b16c88e8bab9a.zip
Merge branch 'development' into v2-prototype
Diffstat (limited to 'packages/contracts/src/utils/web3_wrapper.ts')
-rw-r--r--packages/contracts/src/utils/web3_wrapper.ts12
1 files changed, 12 insertions, 0 deletions
diff --git a/packages/contracts/src/utils/web3_wrapper.ts b/packages/contracts/src/utils/web3_wrapper.ts
new file mode 100644
index 000000000..ed1c488a2
--- /dev/null
+++ b/packages/contracts/src/utils/web3_wrapper.ts
@@ -0,0 +1,12 @@
+import { devConstants, web3Factory } from '@0xproject/dev-utils';
+import { Provider } from '@0xproject/types';
+import { Web3Wrapper } from '@0xproject/web3-wrapper';
+
+export const txDefaults = {
+ from: devConstants.TESTRPC_FIRST_ADDRESS,
+ gas: devConstants.GAS_ESTIMATE,
+};
+const providerConfigs = { shouldUseInProcessGanache: true };
+export const web3 = web3Factory.create(providerConfigs);
+export const provider = web3.currentProvider;
+export const web3Wrapper = new Web3Wrapper(provider);