diff options
author | Fabio Berger <me@fabioberger.com> | 2018-04-06 14:03:14 +0800 |
---|---|---|
committer | Fabio Berger <me@fabioberger.com> | 2018-04-06 14:03:14 +0800 |
commit | 24454938e51e40ae74809f15bd1f612c69c218ec (patch) | |
tree | 706a1a738d3e0a172c62343c0dfb5bad39163d9f /packages/0x.js/test/utils | |
parent | 89a72ebf0dbff606d511ae51bfee7ffc0a5df18f (diff) | |
download | dexon-sol-tools-24454938e51e40ae74809f15bd1f612c69c218ec.tar dexon-sol-tools-24454938e51e40ae74809f15bd1f612c69c218ec.tar.gz dexon-sol-tools-24454938e51e40ae74809f15bd1f612c69c218ec.tar.bz2 dexon-sol-tools-24454938e51e40ae74809f15bd1f612c69c218ec.tar.lz dexon-sol-tools-24454938e51e40ae74809f15bd1f612c69c218ec.tar.xz dexon-sol-tools-24454938e51e40ae74809f15bd1f612c69c218ec.tar.zst dexon-sol-tools-24454938e51e40ae74809f15bd1f612c69c218ec.zip |
Move away from using web3 directly in 0x.js tests
Diffstat (limited to 'packages/0x.js/test/utils')
-rw-r--r-- | packages/0x.js/test/utils/deployer.ts | 18 | ||||
-rw-r--r-- | packages/0x.js/test/utils/web3_wrapper.ts | 4 |
2 files changed, 21 insertions, 1 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 35898f553..b7b3f0b7f 100644 --- a/packages/0x.js/test/utils/web3_wrapper.ts +++ b/packages/0x.js/test/utils/web3_wrapper.ts @@ -1,10 +1,12 @@ import { devConstants, web3Factory } from '@0xproject/dev-utils'; +import { Provider } from '@0xproject/types'; import { Web3Wrapper } from '@0xproject/web3-wrapper'; import * as Web3 from 'web3'; import { constants } from './constants'; const web3 = web3Factory.create({ shouldUseInProcessGanache: true }); +const provider: Provider = web3.currentProvider; const web3Wrapper = new Web3Wrapper(web3.currentProvider); -export { web3, web3Wrapper }; +export { provider, web3Wrapper }; |