aboutsummaryrefslogtreecommitdiffstats
path: root/contracts/asset-proxy/test
diff options
context:
space:
mode:
authorLeonid Logvinov <logvinov.leon@gmail.com>2019-02-04 17:12:49 +0800
committerLeonid Logvinov <logvinov.leon@gmail.com>2019-02-04 17:38:02 +0800
commit6943bbcacbd9a1df0cdddb2696a768aec4b3d2c4 (patch)
tree768bb7240b510a8e9f0c735ae658497583160627 /contracts/asset-proxy/test
parent1d3fff32a29b4e958cd32acb016577683df95d3d (diff)
downloaddexon-0x-contracts-6943bbcacbd9a1df0cdddb2696a768aec4b3d2c4.tar
dexon-0x-contracts-6943bbcacbd9a1df0cdddb2696a768aec4b3d2c4.tar.gz
dexon-0x-contracts-6943bbcacbd9a1df0cdddb2696a768aec4b3d2c4.tar.bz2
dexon-0x-contracts-6943bbcacbd9a1df0cdddb2696a768aec4b3d2c4.tar.lz
dexon-0x-contracts-6943bbcacbd9a1df0cdddb2696a768aec4b3d2c4.tar.xz
dexon-0x-contracts-6943bbcacbd9a1df0cdddb2696a768aec4b3d2c4.tar.zst
dexon-0x-contracts-6943bbcacbd9a1df0cdddb2696a768aec4b3d2c4.zip
Temp
Diffstat (limited to 'contracts/asset-proxy/test')
-rw-r--r--contracts/asset-proxy/test/proxies.ts28
-rw-r--r--contracts/asset-proxy/test/utils/erc20_wrapper.ts6
-rw-r--r--contracts/asset-proxy/test/utils/erc721_wrapper.ts6
3 files changed, 15 insertions, 25 deletions
diff --git a/contracts/asset-proxy/test/proxies.ts b/contracts/asset-proxy/test/proxies.ts
index 797787135..c2f9653aa 100644
--- a/contracts/asset-proxy/test/proxies.ts
+++ b/contracts/asset-proxy/test/proxies.ts
@@ -1,16 +1,4 @@
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,
expectTransactionFailedAsync,
@@ -30,6 +18,12 @@ import * as _ from 'lodash';
import {
artifacts,
+ DummyERC20TokenContract,
+ DummyERC20TokenTransferEventArgs,
+ DummyERC721ReceiverContract,
+ DummyERC721TokenContract,
+ DummyMultipleReturnERC20TokenContract,
+ DummyNoReturnERC20TokenContract,
ERC20ProxyContract,
ERC20Wrapper,
ERC721ProxyContract,
@@ -154,7 +148,7 @@ describe('Asset Transfer Proxies', () => {
constants.DUMMY_TOKEN_DECIMALS,
);
noReturnErc20Token = await DummyNoReturnERC20TokenContract.deployFrom0xArtifactAsync(
- erc20Artifacts.DummyNoReturnERC20Token,
+ artifacts.DummyNoReturnERC20Token,
provider,
txDefaults,
constants.DUMMY_TOKEN_NAME,
@@ -163,7 +157,7 @@ describe('Asset Transfer Proxies', () => {
constants.DUMMY_TOKEN_TOTAL_SUPPLY,
);
multipleReturnErc20Token = await DummyMultipleReturnERC20TokenContract.deployFrom0xArtifactAsync(
- erc20Artifacts.DummyMultipleReturnERC20Token,
+ artifacts.DummyMultipleReturnERC20Token,
provider,
txDefaults,
constants.DUMMY_TOKEN_NAME,
@@ -204,7 +198,7 @@ describe('Asset Transfer Proxies', () => {
// Deploy and configure ERC721 tokens and receiver
[erc721TokenA, erc721TokenB] = await erc721Wrapper.deployDummyTokensAsync();
erc721Receiver = await DummyERC721ReceiverContract.deployFrom0xArtifactAsync(
- erc721Artifacts.DummyERC721Receiver,
+ artifacts.DummyERC721Receiver,
provider,
txDefaults,
);
@@ -568,7 +562,7 @@ describe('Asset Transfer Proxies', () => {
erc721Receiver.address,
amount,
);
- const logDecoder = new LogDecoder(web3Wrapper, { ...artifacts, ...erc721Artifacts });
+ const logDecoder = new LogDecoder(web3Wrapper, artifacts);
const tx = await logDecoder.getTxWithDecodedLogsAsync(
await web3Wrapper.sendTransactionAsync({
to: erc721Proxy.address,
@@ -760,7 +754,7 @@ describe('Asset Transfer Proxies', () => {
inputAmount,
);
const erc20Balances = await erc20Wrapper.getBalancesAsync();
- const logDecoder = new LogDecoder(web3Wrapper, { ...artifacts, ...erc20Artifacts });
+ const logDecoder = new LogDecoder(web3Wrapper, artifacts);
const tx = await logDecoder.getTxWithDecodedLogsAsync(
await web3Wrapper.sendTransactionAsync({
to: multiAssetProxy.address,
diff --git a/contracts/asset-proxy/test/utils/erc20_wrapper.ts b/contracts/asset-proxy/test/utils/erc20_wrapper.ts
index 12cd06ece..09607e776 100644
--- a/contracts/asset-proxy/test/utils/erc20_wrapper.ts
+++ b/contracts/asset-proxy/test/utils/erc20_wrapper.ts
@@ -1,4 +1,3 @@
-import { artifacts as tokensArtifacts, DummyERC20TokenContract } from '@0x/contracts-erc20';
import { constants, ERC20BalancesByOwner, txDefaults } from '@0x/contracts-test-utils';
import { assetDataUtils } from '@0x/order-utils';
import { BigNumber } from '@0x/utils';
@@ -6,8 +5,7 @@ import { Web3Wrapper } from '@0x/web3-wrapper';
import { Provider } from 'ethereum-types';
import * as _ from 'lodash';
-import { ERC20ProxyContract } from '../../generated-wrappers/erc20_proxy';
-import { artifacts } from '../../src/artifacts';
+import { artifacts, DummyERC20TokenContract, ERC20ProxyContract } from '../../src';
export class ERC20Wrapper {
private readonly _tokenOwnerAddresses: string[];
@@ -38,7 +36,7 @@ export class ERC20Wrapper {
for (let i = 0; i < numberToDeploy; i++) {
this._dummyTokenContracts.push(
await DummyERC20TokenContract.deployFrom0xArtifactAsync(
- tokensArtifacts.DummyERC20Token,
+ artifacts.DummyERC20Token,
this._provider,
txDefaults,
constants.DUMMY_TOKEN_NAME,
diff --git a/contracts/asset-proxy/test/utils/erc721_wrapper.ts b/contracts/asset-proxy/test/utils/erc721_wrapper.ts
index fc43d8c52..92d1398a7 100644
--- a/contracts/asset-proxy/test/utils/erc721_wrapper.ts
+++ b/contracts/asset-proxy/test/utils/erc721_wrapper.ts
@@ -1,4 +1,3 @@
-import { artifacts as tokensArtifacts, DummyERC721TokenContract } from '@0x/contracts-erc721';
import { constants, ERC721TokenIdsByOwner, txDefaults } from '@0x/contracts-test-utils';
import { generatePseudoRandomSalt } from '@0x/order-utils';
import { BigNumber } from '@0x/utils';
@@ -6,8 +5,7 @@ import { Web3Wrapper } from '@0x/web3-wrapper';
import { Provider } from 'ethereum-types';
import * as _ from 'lodash';
-import { ERC721ProxyContract } from '../../generated-wrappers/erc721_proxy';
-import { artifacts } from '../../src/artifacts';
+import { artifacts, DummyERC721TokenContract, ERC721ProxyContract } from '../../src';
export class ERC721Wrapper {
private readonly _tokenOwnerAddresses: string[];
@@ -30,7 +28,7 @@ export class ERC721Wrapper {
for (const i of _.times(constants.NUM_DUMMY_ERC721_TO_DEPLOY)) {
this._dummyTokenContracts.push(
await DummyERC721TokenContract.deployFrom0xArtifactAsync(
- tokensArtifacts.DummyERC721Token,
+ artifacts.DummyERC721Token,
this._provider,
txDefaults,
constants.DUMMY_TOKEN_NAME,