aboutsummaryrefslogtreecommitdiffstats
path: root/contracts/asset-proxy/test/proxies.ts
diff options
context:
space:
mode:
Diffstat (limited to 'contracts/asset-proxy/test/proxies.ts')
-rw-r--r--contracts/asset-proxy/test/proxies.ts53
1 files changed, 29 insertions, 24 deletions
diff --git a/contracts/asset-proxy/test/proxies.ts b/contracts/asset-proxy/test/proxies.ts
index 44ab77087..797787135 100644
--- a/contracts/asset-proxy/test/proxies.ts
+++ b/contracts/asset-proxy/test/proxies.ts
@@ -1,4 +1,15 @@
-import { artifacts as interfacesArtifacts, IAssetDataContract, IAssetProxyContract } from '@0x/contracts-interfaces';
+import {
+ artifacts as erc20Artifacts,
+ DummyERC20TokenContract,
+ DummyERC20TokenTransferEventArgs,
+ DummyMultipleReturnERC20TokenContract,
+ DummyNoReturnERC20TokenContract,
+} from '@0x/contracts-erc20';
+import {
+ artifacts as erc721Artifacts,
+ DummyERC721ReceiverContract,
+ DummyERC721TokenContract,
+} from '@0x/contracts-erc721';
import {
chaiSetup,
constants,
@@ -9,15 +20,6 @@ import {
txDefaults,
web3Wrapper,
} from '@0x/contracts-test-utils';
-import {
- artifacts as tokensArtifacts,
- DummyERC20TokenContract,
- DummyERC20TokenTransferEventArgs,
- DummyERC721ReceiverContract,
- DummyERC721TokenContract,
- DummyMultipleReturnERC20TokenContract,
- DummyNoReturnERC20TokenContract,
-} from '@0x/contracts-tokens';
import { BlockchainLifecycle } from '@0x/dev-utils';
import { assetDataUtils } from '@0x/order-utils';
import { RevertReason } from '@0x/types';
@@ -26,24 +28,27 @@ import * as chai from 'chai';
import { LogWithDecodedArgs } from 'ethereum-types';
import * as _ from 'lodash';
-import { ERC20ProxyContract } from '../generated-wrappers/erc20_proxy';
-import { ERC721ProxyContract } from '../generated-wrappers/erc721_proxy';
-import { MultiAssetProxyContract } from '../generated-wrappers/multi_asset_proxy';
-import { artifacts } from '../src/artifacts';
-
-import { ERC20Wrapper } from './utils/erc20_wrapper';
-import { ERC721Wrapper } from './utils/erc721_wrapper';
+import {
+ artifacts,
+ ERC20ProxyContract,
+ ERC20Wrapper,
+ ERC721ProxyContract,
+ ERC721Wrapper,
+ IAssetDataContract,
+ IAssetProxyContract,
+ MultiAssetProxyContract,
+} from '../src';
chaiSetup.configure();
const expect = chai.expect;
const blockchainLifecycle = new BlockchainLifecycle(web3Wrapper);
const assetProxyInterface = new IAssetProxyContract(
- interfacesArtifacts.IAssetProxy.compilerOutput.abi,
+ artifacts.IAssetProxy.compilerOutput.abi,
constants.NULL_ADDRESS,
provider,
);
const assetDataInterface = new IAssetDataContract(
- interfacesArtifacts.IAssetData.compilerOutput.abi,
+ artifacts.IAssetData.compilerOutput.abi,
constants.NULL_ADDRESS,
provider,
);
@@ -149,7 +154,7 @@ describe('Asset Transfer Proxies', () => {
constants.DUMMY_TOKEN_DECIMALS,
);
noReturnErc20Token = await DummyNoReturnERC20TokenContract.deployFrom0xArtifactAsync(
- tokensArtifacts.DummyNoReturnERC20Token,
+ erc20Artifacts.DummyNoReturnERC20Token,
provider,
txDefaults,
constants.DUMMY_TOKEN_NAME,
@@ -158,7 +163,7 @@ describe('Asset Transfer Proxies', () => {
constants.DUMMY_TOKEN_TOTAL_SUPPLY,
);
multipleReturnErc20Token = await DummyMultipleReturnERC20TokenContract.deployFrom0xArtifactAsync(
- tokensArtifacts.DummyMultipleReturnERC20Token,
+ erc20Artifacts.DummyMultipleReturnERC20Token,
provider,
txDefaults,
constants.DUMMY_TOKEN_NAME,
@@ -199,7 +204,7 @@ describe('Asset Transfer Proxies', () => {
// Deploy and configure ERC721 tokens and receiver
[erc721TokenA, erc721TokenB] = await erc721Wrapper.deployDummyTokensAsync();
erc721Receiver = await DummyERC721ReceiverContract.deployFrom0xArtifactAsync(
- tokensArtifacts.DummyERC721Receiver,
+ erc721Artifacts.DummyERC721Receiver,
provider,
txDefaults,
);
@@ -563,7 +568,7 @@ describe('Asset Transfer Proxies', () => {
erc721Receiver.address,
amount,
);
- const logDecoder = new LogDecoder(web3Wrapper, { ...artifacts, ...tokensArtifacts });
+ const logDecoder = new LogDecoder(web3Wrapper, { ...artifacts, ...erc721Artifacts });
const tx = await logDecoder.getTxWithDecodedLogsAsync(
await web3Wrapper.sendTransactionAsync({
to: erc721Proxy.address,
@@ -755,7 +760,7 @@ describe('Asset Transfer Proxies', () => {
inputAmount,
);
const erc20Balances = await erc20Wrapper.getBalancesAsync();
- const logDecoder = new LogDecoder(web3Wrapper, { ...artifacts, ...tokensArtifacts });
+ const logDecoder = new LogDecoder(web3Wrapper, { ...artifacts, ...erc20Artifacts });
const tx = await logDecoder.getTxWithDecodedLogsAsync(
await web3Wrapper.sendTransactionAsync({
to: multiAssetProxy.address,