From 9fb7865292e52a62e90facfd57670366c8caf3a8 Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Mon, 9 Jul 2018 11:43:00 +0200 Subject: Dedupe AssetProxyId types --- .../contract-wrappers/src/contract_wrappers/erc20_proxy_wrapper.ts | 2 +- .../contract-wrappers/src/contract_wrappers/erc721_proxy_wrapper.ts | 2 +- packages/contract-wrappers/src/contract_wrappers/exchange_wrapper.ts | 3 +-- packages/contract-wrappers/src/types.ts | 5 ----- packages/types/src/index.ts | 1 - 5 files changed, 3 insertions(+), 10 deletions(-) diff --git a/packages/contract-wrappers/src/contract_wrappers/erc20_proxy_wrapper.ts b/packages/contract-wrappers/src/contract_wrappers/erc20_proxy_wrapper.ts index 68bdc2de7..821d1a8a2 100644 --- a/packages/contract-wrappers/src/contract_wrappers/erc20_proxy_wrapper.ts +++ b/packages/contract-wrappers/src/contract_wrappers/erc20_proxy_wrapper.ts @@ -1,9 +1,9 @@ +import { AssetProxyId } from '@0xproject/types'; import { Web3Wrapper } from '@0xproject/web3-wrapper'; import { ContractAbi } from 'ethereum-types'; import * as _ from 'lodash'; import { artifacts } from '../artifacts'; -import { AssetProxyId } from '../types'; import { assert } from '../utils/assert'; import { ContractWrapper } from './contract_wrapper'; diff --git a/packages/contract-wrappers/src/contract_wrappers/erc721_proxy_wrapper.ts b/packages/contract-wrappers/src/contract_wrappers/erc721_proxy_wrapper.ts index e249f2f74..38ecd4687 100644 --- a/packages/contract-wrappers/src/contract_wrappers/erc721_proxy_wrapper.ts +++ b/packages/contract-wrappers/src/contract_wrappers/erc721_proxy_wrapper.ts @@ -1,9 +1,9 @@ +import { AssetProxyId } from '@0xproject/types'; import { Web3Wrapper } from '@0xproject/web3-wrapper'; import { ContractAbi } from 'ethereum-types'; import * as _ from 'lodash'; import { artifacts } from '../artifacts'; -import { AssetProxyId } from '../types'; import { assert } from '../utils/assert'; import { ContractWrapper } from './contract_wrapper'; diff --git a/packages/contract-wrappers/src/contract_wrappers/exchange_wrapper.ts b/packages/contract-wrappers/src/contract_wrappers/exchange_wrapper.ts index 0e6be132b..8b7148aed 100644 --- a/packages/contract-wrappers/src/contract_wrappers/exchange_wrapper.ts +++ b/packages/contract-wrappers/src/contract_wrappers/exchange_wrapper.ts @@ -1,5 +1,5 @@ import { schemas } from '@0xproject/json-schemas'; -import { ExchangeContractErrs, Order, SignedOrder } from '@0xproject/types'; +import { AssetProxyId, Order, SignedOrder } from '@0xproject/types'; import { BigNumber } from '@0xproject/utils'; import { Web3Wrapper } from '@0xproject/web3-wrapper'; import { ContractAbi, LogWithDecodedArgs } from 'ethereum-types'; @@ -10,7 +10,6 @@ import { methodOptsSchema } from '../schemas/method_opts_schema'; import { orderTxOptsSchema } from '../schemas/order_tx_opts_schema'; import { txOptsSchema } from '../schemas/tx_opts_schema'; import { - AssetProxyId, BlockRange, EventCallback, ExchangeWrapperError, diff --git a/packages/contract-wrappers/src/types.ts b/packages/contract-wrappers/src/types.ts index e0d83f6ed..f9d7a6b9f 100644 --- a/packages/contract-wrappers/src/types.ts +++ b/packages/contract-wrappers/src/types.ts @@ -33,11 +33,6 @@ export enum ContractWrappersError { ERC721NoApproval = 'ERC_721_NO_APPROVAL', } -export declare enum AssetProxyId { - ERC20 = '0xf47261b0', - ERC721 = '0x08e937fa', -} - export enum InternalContractWrappersError { NoAbiDecoder = 'NO_ABI_DECODER', } diff --git a/packages/types/src/index.ts b/packages/types/src/index.ts index 3b71366f5..03fa2fe8a 100644 --- a/packages/types/src/index.ts +++ b/packages/types/src/index.ts @@ -158,7 +158,6 @@ export interface ECSignature { } export enum AssetProxyId { - INVALID = '0x00000000', ERC20 = '0xf47261b0', ERC721 = '0x08e937fa', } -- cgit v1.2.3