diff options
author | Leonid Logvinov <logvinov.leon@gmail.com> | 2018-07-18 21:40:45 +0800 |
---|---|---|
committer | Leonid Logvinov <logvinov.leon@gmail.com> | 2018-07-18 21:40:45 +0800 |
commit | 5044fe4fe4486f67408572cf6807482aecf7f6c9 (patch) | |
tree | 59f455c6815059fd4fb011506624c10327b7db61 /packages/contracts/test/exchange/wrapper.ts | |
parent | 8e49169e6b3233cdc39d1867104cd0ec043c600a (diff) | |
parent | e2fb49a8f871fd4b631bb01bb641c632b7c19435 (diff) | |
download | dexon-0x-contracts-5044fe4fe4486f67408572cf6807482aecf7f6c9.tar dexon-0x-contracts-5044fe4fe4486f67408572cf6807482aecf7f6c9.tar.gz dexon-0x-contracts-5044fe4fe4486f67408572cf6807482aecf7f6c9.tar.bz2 dexon-0x-contracts-5044fe4fe4486f67408572cf6807482aecf7f6c9.tar.lz dexon-0x-contracts-5044fe4fe4486f67408572cf6807482aecf7f6c9.tar.xz dexon-0x-contracts-5044fe4fe4486f67408572cf6807482aecf7f6c9.tar.zst dexon-0x-contracts-5044fe4fe4486f67408572cf6807482aecf7f6c9.zip |
Merge branch 'v2-prototype' into feature/order-watcher-v2
Diffstat (limited to 'packages/contracts/test/exchange/wrapper.ts')
-rw-r--r-- | packages/contracts/test/exchange/wrapper.ts | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/packages/contracts/test/exchange/wrapper.ts b/packages/contracts/test/exchange/wrapper.ts index abcb8364a..d48441dca 100644 --- a/packages/contracts/test/exchange/wrapper.ts +++ b/packages/contracts/test/exchange/wrapper.ts @@ -1,5 +1,5 @@ import { BlockchainLifecycle } from '@0xproject/dev-utils'; -import { assetProxyUtils, orderHashUtils } from '@0xproject/order-utils'; +import { assetDataUtils, orderHashUtils } from '@0xproject/order-utils'; import { RevertReason, SignedOrder } from '@0xproject/types'; import { BigNumber } from '@0xproject/utils'; import { Web3Wrapper } from '@0xproject/web3-wrapper'; @@ -85,7 +85,7 @@ describe('Exchange wrappers', () => { artifacts.Exchange, provider, txDefaults, - assetProxyUtils.encodeERC20AssetData(zrxToken.address), + assetDataUtils.encodeERC20AssetData(zrxToken.address), ); exchangeWrapper = new ExchangeWrapper(exchange, provider); await exchangeWrapper.registerAssetProxyAsync(erc20Proxy.address, owner); @@ -112,8 +112,8 @@ describe('Exchange wrappers', () => { exchangeAddress: exchange.address, makerAddress, feeRecipientAddress, - makerAssetData: assetProxyUtils.encodeERC20AssetData(defaultMakerAssetAddress), - takerAssetData: assetProxyUtils.encodeERC20AssetData(defaultTakerAssetAddress), + makerAssetData: assetDataUtils.encodeERC20AssetData(defaultMakerAssetAddress), + takerAssetData: assetDataUtils.encodeERC20AssetData(defaultTakerAssetAddress), }; const privateKey = constants.TESTRPC_PRIVATE_KEYS[accounts.indexOf(makerAddress)]; orderFactory = new OrderFactory(privateKey, defaultOrderParams); @@ -311,7 +311,7 @@ describe('Exchange wrappers', () => { const signedOrder = await orderFactory.newSignedOrderAsync({ makerAssetAmount: makerZRXBalance, makerFee: new BigNumber(1), - makerAssetData: assetProxyUtils.encodeERC20AssetData(zrxToken.address), + makerAssetData: assetDataUtils.encodeERC20AssetData(zrxToken.address), }); await exchangeWrapper.fillOrderNoThrowAsync(signedOrder, takerAddress); const newBalances = await erc20Wrapper.getBalancesAsync(); @@ -323,7 +323,7 @@ describe('Exchange wrappers', () => { const signedOrder = await orderFactory.newSignedOrderAsync({ makerAssetAmount: new BigNumber(makerZRXAllowance), makerFee: new BigNumber(1), - makerAssetData: assetProxyUtils.encodeERC20AssetData(zrxToken.address), + makerAssetData: assetDataUtils.encodeERC20AssetData(zrxToken.address), }); await exchangeWrapper.fillOrderNoThrowAsync(signedOrder, takerAddress); const newBalances = await erc20Wrapper.getBalancesAsync(); @@ -335,7 +335,7 @@ describe('Exchange wrappers', () => { const signedOrder = await orderFactory.newSignedOrderAsync({ takerAssetAmount: takerZRXBalance, takerFee: new BigNumber(1), - takerAssetData: assetProxyUtils.encodeERC20AssetData(zrxToken.address), + takerAssetData: assetDataUtils.encodeERC20AssetData(zrxToken.address), }); await exchangeWrapper.fillOrderNoThrowAsync(signedOrder, takerAddress); const newBalances = await erc20Wrapper.getBalancesAsync(); @@ -347,7 +347,7 @@ describe('Exchange wrappers', () => { const signedOrder = await orderFactory.newSignedOrderAsync({ takerAssetAmount: new BigNumber(takerZRXAllowance), takerFee: new BigNumber(1), - takerAssetData: assetProxyUtils.encodeERC20AssetData(zrxToken.address), + takerAssetData: assetDataUtils.encodeERC20AssetData(zrxToken.address), }); await exchangeWrapper.fillOrderNoThrowAsync(signedOrder, takerAddress); const newBalances = await erc20Wrapper.getBalancesAsync(); @@ -361,8 +361,8 @@ describe('Exchange wrappers', () => { const signedOrder = await orderFactory.newSignedOrderAsync({ makerAssetAmount: new BigNumber(1), takerAssetAmount: new BigNumber(1), - makerAssetData: assetProxyUtils.encodeERC721AssetData(erc721Token.address, makerAssetId), - takerAssetData: assetProxyUtils.encodeERC721AssetData(erc721Token.address, takerAssetId), + makerAssetData: assetDataUtils.encodeERC721AssetData(erc721Token.address, makerAssetId), + takerAssetData: assetDataUtils.encodeERC721AssetData(erc721Token.address, takerAssetId), }); // Verify pre-conditions const initialOwnerMakerAsset = await erc721Token.ownerOf.callAsync(makerAssetId); @@ -700,7 +700,7 @@ describe('Exchange wrappers', () => { signedOrders = [ await orderFactory.newSignedOrderAsync(), await orderFactory.newSignedOrderAsync({ - takerAssetData: assetProxyUtils.encodeERC20AssetData(zrxToken.address), + takerAssetData: assetDataUtils.encodeERC20AssetData(zrxToken.address), }), await orderFactory.newSignedOrderAsync(), ]; @@ -801,7 +801,7 @@ describe('Exchange wrappers', () => { await orderFactory.newSignedOrderAsync(), await orderFactory.newSignedOrderAsync(), await orderFactory.newSignedOrderAsync({ - takerAssetData: assetProxyUtils.encodeERC20AssetData(zrxToken.address), + takerAssetData: assetDataUtils.encodeERC20AssetData(zrxToken.address), }), ]; const takerAssetFillAmount = Web3Wrapper.toBaseUnitAmount(new BigNumber(100000), 18); @@ -918,7 +918,7 @@ describe('Exchange wrappers', () => { signedOrders = [ await orderFactory.newSignedOrderAsync(), await orderFactory.newSignedOrderAsync({ - makerAssetData: assetProxyUtils.encodeERC20AssetData(zrxToken.address), + makerAssetData: assetDataUtils.encodeERC20AssetData(zrxToken.address), }), await orderFactory.newSignedOrderAsync(), ]; @@ -1017,7 +1017,7 @@ describe('Exchange wrappers', () => { await orderFactory.newSignedOrderAsync(), await orderFactory.newSignedOrderAsync(), await orderFactory.newSignedOrderAsync({ - makerAssetData: assetProxyUtils.encodeERC20AssetData(zrxToken.address), + makerAssetData: assetDataUtils.encodeERC20AssetData(zrxToken.address), }), ]; |