aboutsummaryrefslogtreecommitdiffstats
path: root/src/0x.ts
diff options
context:
space:
mode:
authorLeonid Logvinov <logvinov.leon@gmail.com>2017-07-12 03:53:22 +0800
committerLeonid Logvinov <logvinov.leon@gmail.com>2017-07-12 07:15:08 +0800
commit8052625e76675fbe8c894e7a58fe8707ee14c5ad (patch)
tree9fc20b56c46fdd76525cdf5ef2e1a7c839ed03bc /src/0x.ts
parent2787bdc46b1670fb0444578b62ae85e6aa626264 (diff)
downloaddexon-sol-tools-8052625e76675fbe8c894e7a58fe8707ee14c5ad.tar
dexon-sol-tools-8052625e76675fbe8c894e7a58fe8707ee14c5ad.tar.gz
dexon-sol-tools-8052625e76675fbe8c894e7a58fe8707ee14c5ad.tar.bz2
dexon-sol-tools-8052625e76675fbe8c894e7a58fe8707ee14c5ad.tar.lz
dexon-sol-tools-8052625e76675fbe8c894e7a58fe8707ee14c5ad.tar.xz
dexon-sol-tools-8052625e76675fbe8c894e7a58fe8707ee14c5ad.tar.zst
dexon-sol-tools-8052625e76675fbe8c894e7a58fe8707ee14c5ad.zip
Migrate to using a single Exchange contract
Diffstat (limited to 'src/0x.ts')
-rw-r--r--src/0x.ts39
1 files changed, 0 insertions, 39 deletions
diff --git a/src/0x.ts b/src/0x.ts
index 92a892336..aeed7b042 100644
--- a/src/0x.ts
+++ b/src/0x.ts
@@ -21,7 +21,6 @@ import {ECSignature, ZeroExError, Order, SignedOrder, Web3Provider} from './type
import {orderHashSchema} from './schemas/order_hash_schema';
import {orderSchema} from './schemas/order_schemas';
import {SchemaValidator} from './utils/schema_validator';
-import {ExchangeArtifactsByName} from './exchange_artifacts_by_name';
// Customize our BigNumber instances
bigNumberConfigs.configure();
@@ -245,42 +244,4 @@ export class ZeroEx {
throw new Error(ZeroExError.INVALID_SIGNATURE);
}
- /**
- * Returns the ethereum addresses of all available exchange contracts
- * supported by this library on the network that the supplied web3
- * provider is connected to
- * @return The ethereum addresses of all available exchange contracts.
- */
- public async getAvailableExchangeContractAddressesAsync(): Promise<string[]> {
- const networkId = await this._web3Wrapper.getNetworkIdIfExistsAsync();
- if (_.isUndefined(networkId)) {
- return [];
- } else {
- const exchangeArtifacts = _.values(ExchangeArtifactsByName);
- const networkSpecificExchangeArtifacts = _.compact(_.map(
- exchangeArtifacts, exchangeArtifact => exchangeArtifact.networks[networkId]));
- const exchangeAddresses = _.map(
- networkSpecificExchangeArtifacts,
- networkSpecificExchangeArtifact => networkSpecificExchangeArtifact.address,
- );
- return exchangeAddresses;
- }
- }
- /**
- * Returns the ethereum addresses of all available exchange contracts
- * supported by this library on the network that the supplied web3
- * provider is connected to that are currently authorized by the Proxy contract
- * @return The ethereum addresses of all available and authorized exchange contract.
- */
- public async getProxyAuthorizedExchangeContractAddressesAsync(): Promise<string[]> {
- const exchangeContractAddresses = await this.getAvailableExchangeContractAddressesAsync();
- const proxyAuthorizedExchangeContractAddresses = [];
- for (const exchangeContractAddress of exchangeContractAddresses) {
- const isAuthorized = await this.proxy.isAuthorizedAsync(exchangeContractAddress);
- if (isAuthorized) {
- proxyAuthorizedExchangeContractAddresses.push(exchangeContractAddress);
- }
- }
- return proxyAuthorizedExchangeContractAddresses;
- }
}