diff options
author | Amir Bandeali <abandeali1@gmail.com> | 2018-12-13 08:44:28 +0800 |
---|---|---|
committer | Amir Bandeali <abandeali1@gmail.com> | 2018-12-21 01:13:36 +0800 |
commit | 0a5ecec3e222ae0c5e70e0d3092e57df5dfb75cd (patch) | |
tree | cc4c7d17a46d62a0e8e5a31e27f37ff11be412d7 /contracts/core | |
parent | b6f4c5c7da7d0afe65c0e3dba97aa64e11934595 (diff) | |
download | dexon-sol-tools-0a5ecec3e222ae0c5e70e0d3092e57df5dfb75cd.tar dexon-sol-tools-0a5ecec3e222ae0c5e70e0d3092e57df5dfb75cd.tar.gz dexon-sol-tools-0a5ecec3e222ae0c5e70e0d3092e57df5dfb75cd.tar.bz2 dexon-sol-tools-0a5ecec3e222ae0c5e70e0d3092e57df5dfb75cd.tar.lz dexon-sol-tools-0a5ecec3e222ae0c5e70e0d3092e57df5dfb75cd.tar.xz dexon-sol-tools-0a5ecec3e222ae0c5e70e0d3092e57df5dfb75cd.tar.zst dexon-sol-tools-0a5ecec3e222ae0c5e70e0d3092e57df5dfb75cd.zip |
update comments
Diffstat (limited to 'contracts/core')
-rw-r--r-- | contracts/core/test/extensions/order_matcher.ts | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/contracts/core/test/extensions/order_matcher.ts b/contracts/core/test/extensions/order_matcher.ts index e61d0f8e0..4ea95bc49 100644 --- a/contracts/core/test/extensions/order_matcher.ts +++ b/contracts/core/test/extensions/order_matcher.ts @@ -11,6 +11,7 @@ import { txDefaults, web3Wrapper, } from '@0x/contracts-test-utils'; +import { artifacts as tokenArtifacts, DummyERC20TokenContract, DummyERC721TokenContract } from '@0x/contracts-tokens'; import { BlockchainLifecycle } from '@0x/dev-utils'; import { assetDataUtils } from '@0x/order-utils'; import { RevertReason } from '@0x/types'; @@ -20,8 +21,6 @@ import * as chai from 'chai'; import { LogWithDecodedArgs } from 'ethereum-types'; import * as _ from 'lodash'; -import { DummyERC20TokenContract } from '../../generated-wrappers/dummy_erc20_token'; -import { DummyERC721TokenContract } from '../../generated-wrappers/dummy_erc721_token'; import { ERC20ProxyContract } from '../../generated-wrappers/erc20_proxy'; import { ERC721ProxyContract } from '../../generated-wrappers/erc721_proxy'; import { ExchangeContract, ExchangeFillEventArgs } from '../../generated-wrappers/exchange'; @@ -444,7 +443,7 @@ describe('OrderMatcher', () => { signedOrderLeft.signature, signedOrderRight.signature, ); - const logDecoder = new LogDecoder(web3Wrapper, artifacts); + const logDecoder = new LogDecoder(web3Wrapper, { ...artifacts, ...tokenArtifacts }); const txReceipt = await logDecoder.getTxWithDecodedLogsAsync( await web3Wrapper.sendTransactionAsync({ data, @@ -457,6 +456,7 @@ describe('OrderMatcher', () => { txReceipt.logs, log => (log as LogWithDecodedArgs<ExchangeFillEventArgs>).event === 'Fill', ); + // Only 2 Fill logs should exist for `matchOrders` call. `fillOrder` should not have been called and should not have emitted a Fill event. expect(fillLogs.length).to.be.equal(2); }); it('should only take a spread in rightMakerAsset if entire leftMakerAssetSpread amount can be used to fill rightOrder after matchOrders call', async () => { @@ -680,7 +680,7 @@ describe('OrderMatcher', () => { }); it('should allow owner to withdraw ERC721 tokens', async () => { const erc721Token = await DummyERC721TokenContract.deployFrom0xArtifactAsync( - artifacts.DummyERC721Token, + tokenArtifacts.DummyERC721Token, provider, txDefaults, constants.DUMMY_TOKEN_NAME, @@ -725,7 +725,7 @@ describe('OrderMatcher', () => { }); it('should be able to approve an ERC721 token by passing in allowance = 1', async () => { const erc721Token = await DummyERC721TokenContract.deployFrom0xArtifactAsync( - artifacts.DummyERC721Token, + tokenArtifacts.DummyERC721Token, provider, txDefaults, constants.DUMMY_TOKEN_NAME, @@ -742,7 +742,7 @@ describe('OrderMatcher', () => { }); it('should be able to approve an ERC721 token by passing in allowance > 1', async () => { const erc721Token = await DummyERC721TokenContract.deployFrom0xArtifactAsync( - artifacts.DummyERC721Token, + tokenArtifacts.DummyERC721Token, provider, txDefaults, constants.DUMMY_TOKEN_NAME, |