aboutsummaryrefslogtreecommitdiffstats
path: root/contracts/exchange/test
diff options
context:
space:
mode:
Diffstat (limited to 'contracts/exchange/test')
-rw-r--r--contracts/exchange/test/core.ts31
-rw-r--r--contracts/exchange/test/dispatcher.ts14
-rw-r--r--contracts/exchange/test/match_orders.ts19
-rw-r--r--contracts/exchange/test/signature_validator.ts3
-rw-r--r--contracts/exchange/test/utils/exchange_wrapper.ts4
-rw-r--r--contracts/exchange/test/utils/fill_order_combinatorial_utils.ts9
-rw-r--r--contracts/exchange/test/wrapper.ts17
7 files changed, 47 insertions, 50 deletions
diff --git a/contracts/exchange/test/core.ts b/contracts/exchange/test/core.ts
index 74161cc73..7e61ef7ac 100644
--- a/contracts/exchange/test/core.ts
+++ b/contracts/exchange/test/core.ts
@@ -1,19 +1,4 @@
-import {
- artifacts as proxyArtifacts,
- ERC20ProxyContract,
- ERC20Wrapper,
- ERC721ProxyContract,
- ERC721Wrapper,
- MultiAssetProxyContract,
-} from '@0x/contracts-asset-proxy';
-import {
- artifacts as erc20Artifacts,
- DummyERC20TokenContract,
- DummyERC20TokenTransferEventArgs,
- DummyNoReturnERC20TokenContract,
- ReentrantERC20TokenContract,
-} from '@0x/contracts-erc20';
-import { DummyERC721TokenContract } from '@0x/contracts-erc721';
+import { ERC20Wrapper, ERC721Wrapper } from '@0x/contracts-asset-proxy';
import {
chaiSetup,
constants,
@@ -39,9 +24,17 @@ import * as _ from 'lodash';
import {
artifacts,
+ DummyERC20TokenContract,
+ DummyERC20TokenTransferEventArgs,
+ DummyERC721TokenContract,
+ DummyNoReturnERC20TokenContract,
+ ERC20ProxyContract,
+ ERC721ProxyContract,
ExchangeCancelEventArgs,
ExchangeContract,
ExchangeWrapper,
+ MultiAssetProxyContract,
+ ReentrantERC20TokenContract,
TestStaticCallReceiverContract,
} from '../src';
@@ -98,7 +91,7 @@ describe('Exchange core', () => {
erc20Proxy = await erc20Wrapper.deployProxyAsync();
erc721Proxy = await erc721Wrapper.deployProxyAsync();
multiAssetProxy = await MultiAssetProxyContract.deployFrom0xArtifactAsync(
- proxyArtifacts.MultiAssetProxy,
+ artifacts.MultiAssetProxy,
provider,
txDefaults,
);
@@ -120,7 +113,7 @@ describe('Exchange core', () => {
txDefaults,
);
reentrantErc20Token = await ReentrantERC20TokenContract.deployFrom0xArtifactAsync(
- erc20Artifacts.ReentrantERC20Token,
+ artifacts.ReentrantERC20Token,
provider,
txDefaults,
exchange.address,
@@ -345,7 +338,7 @@ describe('Exchange core', () => {
describe('Testing exchange of ERC20 tokens with no return values', () => {
before(async () => {
noReturnErc20Token = await DummyNoReturnERC20TokenContract.deployFrom0xArtifactAsync(
- erc20Artifacts.DummyNoReturnERC20Token,
+ artifacts.DummyNoReturnERC20Token,
provider,
txDefaults,
constants.DUMMY_TOKEN_NAME,
diff --git a/contracts/exchange/test/dispatcher.ts b/contracts/exchange/test/dispatcher.ts
index a25755936..8263b0402 100644
--- a/contracts/exchange/test/dispatcher.ts
+++ b/contracts/exchange/test/dispatcher.ts
@@ -1,11 +1,4 @@
-import {
- artifacts as proxyArtifacts,
- ERC20ProxyContract,
- ERC20Wrapper,
- ERC721ProxyContract,
- ERC721Wrapper,
-} from '@0x/contracts-asset-proxy';
-import { DummyERC20TokenContract } from '@0x/contracts-erc20';
+import { ERC20Wrapper, ERC721Wrapper } from '@0x/contracts-asset-proxy';
import {
chaiSetup,
constants,
@@ -25,6 +18,9 @@ import * as _ from 'lodash';
import {
artifacts,
+ DummyERC20TokenContract,
+ ERC20ProxyContract,
+ ERC721ProxyContract,
TestAssetProxyDispatcherAssetProxyRegisteredEventArgs,
TestAssetProxyDispatcherContract,
} from '../src';
@@ -131,7 +127,7 @@ describe('AssetProxyDispatcher', () => {
expect(proxyAddress).to.be.equal(erc20Proxy.address);
// Deploy a new version of the ERC20 Transfer Proxy contract
const newErc20TransferProxy = await ERC20ProxyContract.deployFrom0xArtifactAsync(
- proxyArtifacts.ERC20Proxy,
+ artifacts.ERC20Proxy,
provider,
txDefaults,
);
diff --git a/contracts/exchange/test/match_orders.ts b/contracts/exchange/test/match_orders.ts
index d17025ddd..98fea67ea 100644
--- a/contracts/exchange/test/match_orders.ts
+++ b/contracts/exchange/test/match_orders.ts
@@ -1,6 +1,4 @@
-import { ERC20ProxyContract, ERC20Wrapper, ERC721ProxyContract, ERC721Wrapper } from '@0x/contracts-asset-proxy';
-import { artifacts as erc20Artifacts, DummyERC20TokenContract, ReentrantERC20TokenContract } from '@0x/contracts-erc20';
-import { DummyERC721TokenContract } from '@0x/contracts-erc721';
+import { ERC20Wrapper, ERC721Wrapper } from '@0x/contracts-asset-proxy';
import {
chaiSetup,
constants,
@@ -20,7 +18,18 @@ import { Web3Wrapper } from '@0x/web3-wrapper';
import * as chai from 'chai';
import * as _ from 'lodash';
-import { artifacts, ExchangeContract, ExchangeWrapper, MatchOrderTester, TestExchangeInternalsContract } from '../src';
+import {
+ artifacts,
+ DummyERC20TokenContract,
+ DummyERC721TokenContract,
+ ERC20ProxyContract,
+ ERC721ProxyContract,
+ ExchangeContract,
+ ExchangeWrapper,
+ MatchOrderTester,
+ ReentrantERC20TokenContract,
+ TestExchangeInternalsContract,
+} from '../src';
const blockchainLifecycle = new BlockchainLifecycle(web3Wrapper);
chaiSetup.configure();
@@ -131,7 +140,7 @@ describe('matchOrders', () => {
);
reentrantErc20Token = await ReentrantERC20TokenContract.deployFrom0xArtifactAsync(
- erc20Artifacts.ReentrantERC20Token,
+ artifacts.ReentrantERC20Token,
provider,
txDefaults,
exchange.address,
diff --git a/contracts/exchange/test/signature_validator.ts b/contracts/exchange/test/signature_validator.ts
index 89eac4ddb..33510e50c 100644
--- a/contracts/exchange/test/signature_validator.ts
+++ b/contracts/exchange/test/signature_validator.ts
@@ -1,4 +1,3 @@
-import { artifacts as erc20Artifacts } from '@0x/contracts-erc20';
import {
addressUtils,
chaiSetup,
@@ -78,7 +77,7 @@ describe('MixinSignatureValidator', () => {
provider,
txDefaults,
);
- signatureValidatorLogDecoder = new LogDecoder(web3Wrapper, { ...artifacts, ...erc20Artifacts });
+ signatureValidatorLogDecoder = new LogDecoder(web3Wrapper, artifacts);
await web3Wrapper.awaitTransactionSuccessAsync(
await signatureValidator.setSignatureValidatorApproval.sendTransactionAsync(testValidator.address, true, {
from: signerAddress,
diff --git a/contracts/exchange/test/utils/exchange_wrapper.ts b/contracts/exchange/test/utils/exchange_wrapper.ts
index 03c37c4a9..535e3bcf2 100644
--- a/contracts/exchange/test/utils/exchange_wrapper.ts
+++ b/contracts/exchange/test/utils/exchange_wrapper.ts
@@ -1,5 +1,3 @@
-import { artifacts as erc20Artifacts } from '@0x/contracts-erc20';
-import { artifacts as erc721Artifacts } from '@0x/contracts-erc721';
import { FillResults, formatters, LogDecoder, OrderInfo, orderUtils } from '@0x/contracts-test-utils';
import { SignedOrder, SignedZeroExTransaction } from '@0x/types';
import { AbiEncoder, BigNumber } from '@0x/utils';
@@ -18,7 +16,7 @@ export class ExchangeWrapper {
constructor(exchangeContract: ExchangeContract, provider: Provider) {
this._exchange = exchangeContract;
this._web3Wrapper = new Web3Wrapper(provider);
- this._logDecoder = new LogDecoder(this._web3Wrapper, { ...artifacts, ...erc20Artifacts, ...erc721Artifacts });
+ this._logDecoder = new LogDecoder(this._web3Wrapper, artifacts);
}
public async fillOrderAsync(
signedOrder: SignedOrder,
diff --git a/contracts/exchange/test/utils/fill_order_combinatorial_utils.ts b/contracts/exchange/test/utils/fill_order_combinatorial_utils.ts
index 26b168909..00ca8a9fc 100644
--- a/contracts/exchange/test/utils/fill_order_combinatorial_utils.ts
+++ b/contracts/exchange/test/utils/fill_order_combinatorial_utils.ts
@@ -1,5 +1,4 @@
import { ERC20Wrapper, ERC721Wrapper } from '@0x/contracts-asset-proxy';
-import { artifacts as libsArtifacts, TestLibsContract } from '@0x/contracts-exchange-libs';
import {
AllowanceAmountScenario,
AssetDataScenario,
@@ -33,7 +32,7 @@ import { LogWithDecodedArgs, Provider, TxData } from 'ethereum-types';
import * as _ from 'lodash';
import 'make-promises-safe';
-import { artifacts, ExchangeContract, ExchangeFillEventArgs } from '../../src';
+import { artifacts, ExchangeContract, ExchangeFillEventArgs, TestLibsContract } from '../../src';
import { AssetWrapper } from './asset_wrapper';
import { ExchangeWrapper } from './exchange_wrapper';
@@ -129,11 +128,7 @@ export async function fillOrderCombinatorialUtilsFactoryAsync(
exchangeContract.address,
);
- const testLibsContract = await TestLibsContract.deployFrom0xArtifactAsync(
- libsArtifacts.TestLibs,
- provider,
- txDefaults,
- );
+ const testLibsContract = await TestLibsContract.deployFrom0xArtifactAsync(artifacts.TestLibs, provider, txDefaults);
const fillOrderCombinatorialUtils = new FillOrderCombinatorialUtils(
orderFactory,
diff --git a/contracts/exchange/test/wrapper.ts b/contracts/exchange/test/wrapper.ts
index 62a0d426f..5476ac99d 100644
--- a/contracts/exchange/test/wrapper.ts
+++ b/contracts/exchange/test/wrapper.ts
@@ -1,6 +1,4 @@
-import { ERC20ProxyContract, ERC20Wrapper, ERC721ProxyContract, ERC721Wrapper } from '@0x/contracts-asset-proxy';
-import { artifacts as erc20Artifacts, DummyERC20TokenContract, ReentrantERC20TokenContract } from '@0x/contracts-erc20';
-import { DummyERC721TokenContract } from '@0x/contracts-erc721';
+import { ERC20Wrapper, ERC721Wrapper } from '@0x/contracts-asset-proxy';
import {
chaiSetup,
constants,
@@ -22,7 +20,16 @@ import { Web3Wrapper } from '@0x/web3-wrapper';
import * as chai from 'chai';
import * as _ from 'lodash';
-import { artifacts, ExchangeContract, ExchangeWrapper } from '../src';
+import {
+ artifacts,
+ DummyERC20TokenContract,
+ DummyERC721TokenContract,
+ ERC20ProxyContract,
+ ERC721ProxyContract,
+ ExchangeContract,
+ ExchangeWrapper,
+ ReentrantERC20TokenContract,
+} from '../src';
chaiSetup.configure();
const expect = chai.expect;
@@ -107,7 +114,7 @@ describe('Exchange wrappers', () => {
);
reentrantErc20Token = await ReentrantERC20TokenContract.deployFrom0xArtifactAsync(
- erc20Artifacts.ReentrantERC20Token,
+ artifacts.ReentrantERC20Token,
provider,
txDefaults,
exchange.address,