diff options
author | Brandon Millman <brandon.millman@gmail.com> | 2018-01-25 09:13:16 +0800 |
---|---|---|
committer | Brandon Millman <brandon.millman@gmail.com> | 2018-01-25 09:13:16 +0800 |
commit | 3f0ec89f11fe405711c6b7509d6043339b8b4258 (patch) | |
tree | a6b5dea7d16d7ad2a02e2d0015c96c9e07ca2d84 /packages/0x.js/src | |
parent | d3aa4f2bc7f2341a98c4aa6018c0d2ede221a3ed (diff) | |
parent | f58f0ddb67555c3f0c7252ea3e003824984c48ad (diff) | |
download | dexon-sol-tools-3f0ec89f11fe405711c6b7509d6043339b8b4258.tar dexon-sol-tools-3f0ec89f11fe405711c6b7509d6043339b8b4258.tar.gz dexon-sol-tools-3f0ec89f11fe405711c6b7509d6043339b8b4258.tar.bz2 dexon-sol-tools-3f0ec89f11fe405711c6b7509d6043339b8b4258.tar.lz dexon-sol-tools-3f0ec89f11fe405711c6b7509d6043339b8b4258.tar.xz dexon-sol-tools-3f0ec89f11fe405711c6b7509d6043339b8b4258.tar.zst dexon-sol-tools-3f0ec89f11fe405711c6b7509d6043339b8b4258.zip |
Merge branch 'development' into feature/kovan-faucets/all-testnet-support
* development:
Publish
Update yarn.lock
Update the CHANGELOG
Fix the bug making it impossible to specify the custom ZRX address
Diffstat (limited to 'packages/0x.js/src')
-rw-r--r-- | packages/0x.js/src/0x.ts | 1 | ||||
-rw-r--r-- | packages/0x.js/src/contract_wrappers/exchange_wrapper.ts | 2 | ||||
-rw-r--r-- | packages/0x.js/src/types.ts | 2 |
3 files changed, 5 insertions, 0 deletions
diff --git a/packages/0x.js/src/0x.ts b/packages/0x.js/src/0x.ts index e1b0ef08e..503a937c4 100644 --- a/packages/0x.js/src/0x.ts +++ b/packages/0x.js/src/0x.ts @@ -191,6 +191,7 @@ export class ZeroEx { this._abiDecoder, this.token, config.exchangeContractAddress, + config.zrxContractAddress, ); this.tokenRegistry = new TokenRegistryWrapper( this._web3Wrapper, diff --git a/packages/0x.js/src/contract_wrappers/exchange_wrapper.ts b/packages/0x.js/src/contract_wrappers/exchange_wrapper.ts index be88cdb20..2b6117729 100644 --- a/packages/0x.js/src/contract_wrappers/exchange_wrapper.ts +++ b/packages/0x.js/src/contract_wrappers/exchange_wrapper.ts @@ -87,11 +87,13 @@ export class ExchangeWrapper extends ContractWrapper { abiDecoder: AbiDecoder, tokenWrapper: TokenWrapper, contractAddressIfExists?: string, + zrxContractAddressIfExists?: string, ) { super(web3Wrapper, networkId, abiDecoder); this._tokenWrapper = tokenWrapper; this._orderValidationUtils = new OrderValidationUtils(this); this._contractAddressIfExists = contractAddressIfExists; + this._zrxContractAddressIfExists = zrxContractAddressIfExists; } /** * Returns the unavailable takerAmount of an order. Unavailable amount is defined as the total diff --git a/packages/0x.js/src/types.ts b/packages/0x.js/src/types.ts index 2decd92ba..3c93910e9 100644 --- a/packages/0x.js/src/types.ts +++ b/packages/0x.js/src/types.ts @@ -290,6 +290,7 @@ export interface OrderStateWatcherConfig { * networkId: The id of the underlying ethereum network your provider is connected to. (1-mainnet, 42-kovan, 50-testrpc) * gasPrice: Gas price to use with every transaction * exchangeContractAddress: The address of an exchange contract to use + * zrxContractAddress: The address of the ZRX contract to use * tokenRegistryContractAddress: The address of a token registry contract to use * tokenTransferProxyContractAddress: The address of the token transfer proxy contract to use * orderWatcherConfig: All the configs related to the orderWatcher @@ -298,6 +299,7 @@ export interface ZeroExConfig { networkId: number; gasPrice?: BigNumber; exchangeContractAddress?: string; + zrxContractAddress?: string; tokenRegistryContractAddress?: string; tokenTransferProxyContractAddress?: string; orderWatcherConfig?: OrderStateWatcherConfig; |