aboutsummaryrefslogtreecommitdiffstats
path: root/packages/0x.js/src/0x.ts
diff options
context:
space:
mode:
authorFabio Berger <me@fabioberger.com>2017-12-09 01:21:51 +0800
committerFabio Berger <me@fabioberger.com>2017-12-09 01:21:51 +0800
commitaf8d24d0eb5af781f4731b5559979f2b02579785 (patch)
tree6f429e6f2b3050de6dd7ce16e42c7f387bd5018a /packages/0x.js/src/0x.ts
parentca85a97106ea6d09fbceafac8f9516945ccff399 (diff)
parent5eea829be9f5e8669c40dac965231051b668ed37 (diff)
downloaddexon-sol-tools-af8d24d0eb5af781f4731b5559979f2b02579785.tar
dexon-sol-tools-af8d24d0eb5af781f4731b5559979f2b02579785.tar.gz
dexon-sol-tools-af8d24d0eb5af781f4731b5559979f2b02579785.tar.bz2
dexon-sol-tools-af8d24d0eb5af781f4731b5559979f2b02579785.tar.lz
dexon-sol-tools-af8d24d0eb5af781f4731b5559979f2b02579785.tar.xz
dexon-sol-tools-af8d24d0eb5af781f4731b5559979f2b02579785.tar.zst
dexon-sol-tools-af8d24d0eb5af781f4731b5559979f2b02579785.zip
Merge branch 'development' into feature/addSubproviders
* development: Update README.md Inline network module Stop supporting different file extensions in abi-gen Refactor networkId out of web3Wrapper Update connect types in preperation for publishing Fix CI command Address feedback Refactor web3Wrapper to a separate package # Conflicts: # package.json # packages/website/ts/blockchain.ts
Diffstat (limited to 'packages/0x.js/src/0x.ts')
-rw-r--r--packages/0x.js/src/0x.ts15
1 files changed, 11 insertions, 4 deletions
diff --git a/packages/0x.js/src/0x.ts b/packages/0x.js/src/0x.ts
index 0616b3078..935e4ac1a 100644
--- a/packages/0x.js/src/0x.ts
+++ b/packages/0x.js/src/0x.ts
@@ -1,4 +1,5 @@
import {schemas, SchemaValidator} from '@0xproject/json-schemas';
+import {Web3Wrapper} from '@0xproject/web3-wrapper';
import BigNumber from 'bignumber.js';
import * as ethUtil from 'ethereumjs-util';
import * as _ from 'lodash';
@@ -29,7 +30,6 @@ import {intervalUtils} from './utils/interval_utils';
import {OrderStateUtils} from './utils/order_state_utils';
import {signatureUtils} from './utils/signature_utils';
import {utils} from './utils/utils';
-import {Web3Wrapper} from './web3_wrapper';
// Customize our BigNumber instances
bigNumberConfigs.configure();
@@ -179,24 +179,31 @@ export class ZeroEx {
const defaults = {
gasPrice: config.gasPrice,
};
- this._web3Wrapper = new Web3Wrapper(provider, config.networkId, defaults);
+ this._web3Wrapper = new Web3Wrapper(provider, defaults);
this.proxy = new TokenTransferProxyWrapper(
this._web3Wrapper,
+ config.networkId,
config.tokenTransferProxyContractAddress,
);
this.token = new TokenWrapper(
this._web3Wrapper,
+ config.networkId,
this._abiDecoder,
this.proxy,
);
this.exchange = new ExchangeWrapper(
this._web3Wrapper,
+ config.networkId,
this._abiDecoder,
this.token,
config.exchangeContractAddress,
);
- this.tokenRegistry = new TokenRegistryWrapper(this._web3Wrapper, config.tokenRegistryContractAddress);
- this.etherToken = new EtherTokenWrapper(this._web3Wrapper, this.token, config.etherTokenContractAddress);
+ this.tokenRegistry = new TokenRegistryWrapper(
+ this._web3Wrapper, config.networkId, config.tokenRegistryContractAddress,
+ );
+ this.etherToken = new EtherTokenWrapper(
+ this._web3Wrapper, config.networkId, this.token, config.etherTokenContractAddress,
+ );
this.orderStateWatcher = new OrderStateWatcher(
this._web3Wrapper, this._abiDecoder, this.token, this.exchange, config.orderWatcherConfig,
);