diff options
Diffstat (limited to 'packages/contract-wrappers')
4 files changed, 21 insertions, 10 deletions
diff --git a/packages/contract-wrappers/package.json b/packages/contract-wrappers/package.json index a781496ab..cf4286e1b 100644 --- a/packages/contract-wrappers/package.json +++ b/packages/contract-wrappers/package.json @@ -69,8 +69,9 @@ "shx": "^0.2.2", "sinon": "^4.0.0", "source-map-support": "^0.5.0", - "tslint": "5.8.0", - "typescript": "2.7.1" + "tslint": "5.10.0", + "typescript": "2.7.1", + "web3-provider-engine": "14.0.6" }, "dependencies": { "@0xproject/assert": "^0.3.0", diff --git a/packages/contract-wrappers/src/contract_wrappers/exchange_wrapper.ts b/packages/contract-wrappers/src/contract_wrappers/exchange_wrapper.ts index 8b7148aed..abe373dcf 100644 --- a/packages/contract-wrappers/src/contract_wrappers/exchange_wrapper.ts +++ b/packages/contract-wrappers/src/contract_wrappers/exchange_wrapper.ts @@ -1,4 +1,5 @@ import { schemas } from '@0xproject/json-schemas'; +import { assetProxyUtils } from '@0xproject/order-utils'; import { AssetProxyId, Order, SignedOrder } from '@0xproject/types'; import { BigNumber } from '@0xproject/utils'; import { Web3Wrapper } from '@0xproject/web3-wrapper'; @@ -1068,9 +1069,9 @@ export class ExchangeWrapper extends ContractWrapper { * Returns the ZRX asset data used by the exchange contract. * @return ZRX asset data */ - public async getZRXAssetDataAsync(): Promise<string> { - const exchangeInstance = await this._getExchangeContractAsync(); - const zrxAssetData = exchangeInstance.ZRX_ASSET_DATA.callAsync(); + public getZRXAssetData(): string { + const zrxTokenAddress = this.getZRXTokenAddress(); + const zrxAssetData = assetProxyUtils.encodeERC20AssetData(zrxTokenAddress); return zrxAssetData; } // tslint:disable:no-unused-variable diff --git a/packages/contract-wrappers/src/index.ts b/packages/contract-wrappers/src/index.ts index d8e597ed1..e5485d7a6 100644 --- a/packages/contract-wrappers/src/index.ts +++ b/packages/contract-wrappers/src/index.ts @@ -1,9 +1,9 @@ export { ContractWrappers } from './contract_wrappers'; export { ERC20TokenWrapper } from './contract_wrappers/erc20_token_wrapper'; +export { ERC721TokenWrapper } from './contract_wrappers/erc721_token_wrapper'; export { EtherTokenWrapper } from './contract_wrappers/ether_token_wrapper'; -export { ERC20ProxyWrapper } from './contract_wrappers/erc20_proxy_wrapper'; export { ExchangeWrapper } from './contract_wrappers/exchange_wrapper'; -export { ERC721TokenWrapper } from './contract_wrappers/erc721_token_wrapper'; +export { ERC20ProxyWrapper } from './contract_wrappers/erc20_proxy_wrapper'; export { ERC721ProxyWrapper } from './contract_wrappers/erc721_proxy_wrapper'; export { @@ -26,7 +26,15 @@ export { OrderInfo, } from './types'; -export { Order, SignedOrder, ECSignature, OrderStateValid, OrderStateInvalid, OrderState } from '@0xproject/types'; +export { + Order, + SignedOrder, + ECSignature, + OrderStateValid, + OrderStateInvalid, + OrderState, + AssetProxyId, +} from '@0xproject/types'; export { BlockParamLiteral, @@ -60,6 +68,7 @@ export { ERC721TokenApprovalForAllEventArgs, ERC721TokenTransferEventArgs, ERC721TokenEvents, + ERC721TokenEventArgs, } from './contract_wrappers/generated/erc721_token'; export { diff --git a/packages/contract-wrappers/test/exchange_wrapper_test.ts b/packages/contract-wrappers/test/exchange_wrapper_test.ts index b2c716008..33da19aee 100644 --- a/packages/contract-wrappers/test/exchange_wrapper_test.ts +++ b/packages/contract-wrappers/test/exchange_wrapper_test.ts @@ -264,8 +264,8 @@ describe('ExchangeWrapper', () => { }); }); describe('#getZRXAssetData', () => { - it('should get the asset data', async () => { - const ZRX_ASSET_DATA = await contractWrappers.exchange.getZRXAssetDataAsync(); + it('should get the asset data', () => { + const ZRX_ASSET_DATA = contractWrappers.exchange.getZRXAssetData(); const ASSET_DATA_HEX_LENGTH = 74; expect(ZRX_ASSET_DATA).to.have.length(ASSET_DATA_HEX_LENGTH); }); |