diff options
author | Amir Bandeali <abandeali1@gmail.com> | 2018-12-01 07:53:07 +0800 |
---|---|---|
committer | Amir Bandeali <abandeali1@gmail.com> | 2019-01-08 02:31:11 +0800 |
commit | d957cd53441cf08b3210d24751fdbc70fbfd29a4 (patch) | |
tree | 7b6855bb4008808a09bb43595a4e2df6075d244d /contracts/protocol/test/exchange/core.ts | |
parent | 354f7053dc3f322412da64460ae8295a6076b3e0 (diff) | |
download | dexon-sol-tools-d957cd53441cf08b3210d24751fdbc70fbfd29a4.tar dexon-sol-tools-d957cd53441cf08b3210d24751fdbc70fbfd29a4.tar.gz dexon-sol-tools-d957cd53441cf08b3210d24751fdbc70fbfd29a4.tar.bz2 dexon-sol-tools-d957cd53441cf08b3210d24751fdbc70fbfd29a4.tar.lz dexon-sol-tools-d957cd53441cf08b3210d24751fdbc70fbfd29a4.tar.xz dexon-sol-tools-d957cd53441cf08b3210d24751fdbc70fbfd29a4.tar.zst dexon-sol-tools-d957cd53441cf08b3210d24751fdbc70fbfd29a4.zip |
Use assetDataUtils instead of IAssetData for encoding MultiAsset values
Diffstat (limited to 'contracts/protocol/test/exchange/core.ts')
-rw-r--r-- | contracts/protocol/test/exchange/core.ts | 30 |
1 files changed, 5 insertions, 25 deletions
diff --git a/contracts/protocol/test/exchange/core.ts b/contracts/protocol/test/exchange/core.ts index 9b948f991..8367898de 100644 --- a/contracts/protocol/test/exchange/core.ts +++ b/contracts/protocol/test/exchange/core.ts @@ -43,11 +43,6 @@ import { ExchangeWrapper } from '../utils/exchange_wrapper'; chaiSetup.configure(); const expect = chai.expect; const blockchainLifecycle = new BlockchainLifecycle(web3Wrapper); -const assetDataInterface = new IAssetDataContract( - interfacesArtifacts.IAssetData.compilerOutput.abi, - constants.NULL_ADDRESS, - provider, -); // tslint:disable:no-unnecessary-type-assertion describe('Exchange core', () => { let makerAddress: string; @@ -777,10 +772,7 @@ describe('Exchange core', () => { assetDataUtils.encodeERC20AssetData(erc20TokenA.address), assetDataUtils.encodeERC20AssetData(erc20TokenB.address), ]; - const makerAssetData = assetDataInterface.MultiAsset.getABIEncodedTransactionData( - makerAmounts, - makerNestedAssetData, - ); + const makerAssetData = assetDataUtils.encodeMultiAssetData(makerAmounts, makerNestedAssetData); const makerAssetAmount = new BigNumber(1); const takerAssetData = assetDataUtils.encodeERC20AssetData(zrxToken.address); const takerAssetAmount = new BigNumber(10); @@ -830,10 +822,7 @@ describe('Exchange core', () => { assetDataUtils.encodeERC20AssetData(erc20TokenA.address), assetDataUtils.encodeERC20AssetData(erc20TokenB.address), ]; - const makerAssetData = assetDataInterface.MultiAsset.getABIEncodedTransactionData( - makerAmounts, - makerNestedAssetData, - ); + const makerAssetData = assetDataUtils.encodeMultiAssetData(makerAmounts, makerNestedAssetData); const makerAssetAmount = new BigNumber(1); const takerAmounts = [new BigNumber(10), new BigNumber(1)]; const takerAssetId = erc721TakerAssetIds[0]; @@ -841,10 +830,7 @@ describe('Exchange core', () => { assetDataUtils.encodeERC20AssetData(zrxToken.address), assetDataUtils.encodeERC721AssetData(erc721Token.address, takerAssetId), ]; - const takerAssetData = assetDataInterface.MultiAsset.getABIEncodedTransactionData( - takerAmounts, - takerNestedAssetData, - ); + const takerAssetData = assetDataUtils.encodeMultiAssetData(takerAmounts, takerNestedAssetData); const takerAssetAmount = new BigNumber(1); signedOrder = await orderFactory.newSignedOrderAsync({ makerAssetData, @@ -900,10 +886,7 @@ describe('Exchange core', () => { assetDataUtils.encodeERC20AssetData(erc20TokenA.address), assetDataUtils.encodeERC20AssetData(erc20TokenB.address), ]; - const makerAssetData = assetDataInterface.MultiAsset.getABIEncodedTransactionData( - makerAmounts, - makerNestedAssetData, - ); + const makerAssetData = assetDataUtils.encodeMultiAssetData(makerAmounts, makerNestedAssetData); const makerAssetAmount = new BigNumber(30); const takerAssetData = assetDataUtils.encodeERC20AssetData(zrxToken.address); const takerAssetAmount = new BigNumber(10); @@ -980,10 +963,7 @@ describe('Exchange core', () => { assetDataUtils.encodeERC20AssetData(erc20TokenA.address), assetDataUtils.encodeERC20AssetData(erc20TokenB.address), ]; - const takerAssetData = assetDataInterface.MultiAsset.getABIEncodedTransactionData( - takerAmounts, - takerNestedAssetData, - ); + const takerAssetData = assetDataUtils.encodeMultiAssetData(takerAmounts, takerNestedAssetData); const takerAssetAmount = new BigNumber(30); const makerAssetData = assetDataUtils.encodeERC20AssetData(zrxToken.address); const makerAssetAmount = new BigNumber(10); |