aboutsummaryrefslogtreecommitdiffstats
path: root/contracts/exchange-forwarder/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/exchange-forwarder/test
parent1d3fff32a29b4e958cd32acb016577683df95d3d (diff)
downloaddexon-0x-contracts-6943bbcacbd9a1df0cdddb2696a768aec4b3d2c4.tar.gz
dexon-0x-contracts-6943bbcacbd9a1df0cdddb2696a768aec4b3d2c4.tar.zst
dexon-0x-contracts-6943bbcacbd9a1df0cdddb2696a768aec4b3d2c4.zip
Temp
Diffstat (limited to 'contracts/exchange-forwarder/test')
-rw-r--r--contracts/exchange-forwarder/test/forwarder.ts20
-rw-r--r--contracts/exchange-forwarder/test/utils/forwarder_wrapper.ts10
2 files changed, 14 insertions, 16 deletions
diff --git a/contracts/exchange-forwarder/test/forwarder.ts b/contracts/exchange-forwarder/test/forwarder.ts
index 24c219563..5acf113dd 100644
--- a/contracts/exchange-forwarder/test/forwarder.ts
+++ b/contracts/exchange-forwarder/test/forwarder.ts
@@ -1,7 +1,5 @@
import { ERC20Wrapper, ERC721Wrapper } from '@0x/contracts-asset-proxy';
-import { artifacts as erc20Artifacts, DummyERC20TokenContract, WETH9Contract } from '@0x/contracts-erc20';
-import { DummyERC721TokenContract } from '@0x/contracts-erc721';
-import { artifacts as exchangeArtifacts, ExchangeContract, ExchangeWrapper } from '@0x/contracts-exchange';
+import { ExchangeWrapper } from '@0x/contracts-exchange';
import {
chaiSetup,
constants,
@@ -23,7 +21,15 @@ import { Web3Wrapper } from '@0x/web3-wrapper';
import * as chai from 'chai';
import { TransactionReceiptWithDecodedLogs } from 'ethereum-types';
-import { artifacts, ForwarderContract, ForwarderWrapper } from '../src';
+import {
+ artifacts,
+ DummyERC20TokenContract,
+ DummyERC721TokenContract,
+ ExchangeContract,
+ ForwarderContract,
+ ForwarderWrapper,
+ WETH9Contract,
+} from '../src';
chaiSetup.configure();
const expect = chai.expect;
@@ -88,14 +94,14 @@ describe(ContractName.Forwarder, () => {
const erc721Balances = await erc721Wrapper.getBalancesAsync();
erc721MakerAssetIds = erc721Balances[makerAddress][erc721Token.address];
- wethContract = await WETH9Contract.deployFrom0xArtifactAsync(erc20Artifacts.WETH9, provider, txDefaults);
+ wethContract = await WETH9Contract.deployFrom0xArtifactAsync(artifacts.WETH9, provider, txDefaults);
weth = new DummyERC20TokenContract(wethContract.abi, wethContract.address, provider);
erc20Wrapper.addDummyTokenContract(weth);
wethAssetData = assetDataUtils.encodeERC20AssetData(wethContract.address);
zrxAssetData = assetDataUtils.encodeERC20AssetData(zrxToken.address);
const exchangeInstance = await ExchangeContract.deployFrom0xArtifactAsync(
- exchangeArtifacts.Exchange,
+ artifacts.Exchange,
provider,
txDefaults,
zrxAssetData,
@@ -166,7 +172,7 @@ describe(ContractName.Forwarder, () => {
describe('constructor', () => {
it('should revert if assetProxy is unregistered', async () => {
const exchangeInstance = await ExchangeContract.deployFrom0xArtifactAsync(
- exchangeArtifacts.Exchange,
+ artifacts.Exchange,
provider,
txDefaults,
zrxAssetData,
diff --git a/contracts/exchange-forwarder/test/utils/forwarder_wrapper.ts b/contracts/exchange-forwarder/test/utils/forwarder_wrapper.ts
index 207106852..4f9f6110a 100644
--- a/contracts/exchange-forwarder/test/utils/forwarder_wrapper.ts
+++ b/contracts/exchange-forwarder/test/utils/forwarder_wrapper.ts
@@ -1,6 +1,3 @@
-import { artifacts as erc20Artifacts } from '@0x/contracts-erc20';
-import { artifacts as erc721Artifacts } from '@0x/contracts-erc721';
-import { artifacts as exchangeArtifacts } from '@0x/contracts-exchange';
import { constants, formatters, LogDecoder, MarketSellOrders } from '@0x/contracts-test-utils';
import { SignedOrder } from '@0x/types';
import { BigNumber } from '@0x/utils';
@@ -61,12 +58,7 @@ export class ForwarderWrapper {
constructor(contractInstance: ForwarderContract, provider: Provider) {
this._forwarderContract = contractInstance;
this._web3Wrapper = new Web3Wrapper(provider);
- this._logDecoder = new LogDecoder(this._web3Wrapper, {
- ...artifacts,
- ...erc20Artifacts,
- ...erc721Artifacts,
- ...exchangeArtifacts,
- });
+ this._logDecoder = new LogDecoder(this._web3Wrapper, artifacts);
}
public async marketSellOrdersWithEthAsync(
orders: SignedOrder[],