diff options
author | Alex Browne <stephenalexbrowne@gmail.com> | 2018-10-10 14:10:33 +0800 |
---|---|---|
committer | Alex Browne <stephenalexbrowne@gmail.com> | 2018-10-16 04:38:33 +0800 |
commit | 1e9ea09f087c7b3120e758d931a88812b655da08 (patch) | |
tree | b0da3efc0733d566356ed2a938d18eb08192f674 /packages/asset-buyer | |
parent | fa346d94613a43034e1cdaf6b7a3d2de270c58fc (diff) | |
download | dexon-sol-tools-1e9ea09f087c7b3120e758d931a88812b655da08.tar.gz dexon-sol-tools-1e9ea09f087c7b3120e758d931a88812b655da08.tar.zst dexon-sol-tools-1e9ea09f087c7b3120e758d931a88812b655da08.zip |
Introduce new contract-addresses package and use it everywhere
Diffstat (limited to 'packages/asset-buyer')
-rw-r--r-- | packages/asset-buyer/package.json | 1 | ||||
-rw-r--r-- | packages/asset-buyer/src/asset_buyer.ts | 13 |
2 files changed, 3 insertions, 11 deletions
diff --git a/packages/asset-buyer/package.json b/packages/asset-buyer/package.json index 8c8f3c92c..c2797c6ce 100644 --- a/packages/asset-buyer/package.json +++ b/packages/asset-buyer/package.json @@ -37,6 +37,7 @@ "dependencies": { "@0xproject/assert": "^1.0.13", "@0xproject/connect": "^3.0.1", + "@0xproject/contract-addresses": "^1.0.0", "@0xproject/contract-wrappers": "^2.0.2", "@0xproject/json-schemas": "^1.0.7", "@0xproject/order-utils": "^1.0.7", diff --git a/packages/asset-buyer/src/asset_buyer.ts b/packages/asset-buyer/src/asset_buyer.ts index 5863ce5d5..f7b59c1a1 100644 --- a/packages/asset-buyer/src/asset_buyer.ts +++ b/packages/asset-buyer/src/asset_buyer.ts @@ -1,3 +1,4 @@ +import { getContractAddressesForNetwork } from '@0xproject/contract-addresses'; import { ContractWrappers } from '@0xproject/contract-wrappers'; import { schemas } from '@0xproject/json-schemas'; import { SignedOrder } from '@0xproject/order-utils'; @@ -109,17 +110,7 @@ export class AssetBuyer { this.expiryBufferSeconds = expiryBufferSeconds; this._contractWrappers = new ContractWrappers(this.provider, { networkId, - // TODO(albrow): Load in real contract addresses here. - contractAddresses: { - erc20Proxy: '', - erc721Proxy: '', - zrxToken: '', - etherToken: '', - exchange: '', - assetProxyOwner: '', - forwarder: '', - orderValidator: '', - }, + contractAddresses: getContractAddressesForNetwork(networkId), }); } /** |