This commit is contained in:
Amir Bandeali
2019-03-07 19:36:26 -08:00
parent 2f7dd177c1
commit 22af796302
36 changed files with 56 additions and 149 deletions

View File

@@ -1,3 +1,5 @@
import { artifacts as erc20Artifacts } from '@0x/contracts-erc20';
import { artifacts as erc721Artifacts } from '@0x/contracts-erc721';
import {
FillResults,
formatters,
@@ -23,7 +25,7 @@ export class ExchangeWrapper {
constructor(exchangeContract: ExchangeContract, provider: Web3ProviderEngine | ZeroExProvider) {
this._exchange = exchangeContract;
this._web3Wrapper = new Web3Wrapper(provider);
this._logDecoder = new LogDecoder(this._web3Wrapper, artifacts);
this._logDecoder = new LogDecoder(this._web3Wrapper, { ...artifacts, ...erc20Artifacts, ...erc721Artifacts });
}
public async fillOrderAsync(
signedOrder: SignedOrder,

View File

@@ -1,4 +1,5 @@
import { ERC20Wrapper, ERC721Wrapper } from '@0x/contracts-asset-proxy';
import { artifacts as libsArtifacts, TestLibsContract } from '@0x/contracts-exchange-libs';
import {
AllowanceAmountScenario,
AssetDataScenario,
@@ -33,7 +34,7 @@ import { LogWithDecodedArgs, TxData } from 'ethereum-types';
import * as _ from 'lodash';
import 'make-promises-safe';
import { artifacts, ExchangeContract, ExchangeFillEventArgs, TestLibsContract } from '../../src';
import { artifacts, ExchangeContract, ExchangeFillEventArgs } from '../../src';
import { AssetWrapper } from './asset_wrapper';
import { ExchangeWrapper } from './exchange_wrapper';
@@ -130,7 +131,11 @@ export async function fillOrderCombinatorialUtilsFactoryAsync(
exchangeContract.address,
);
const testLibsContract = await TestLibsContract.deployFrom0xArtifactAsync(artifacts.TestLibs, provider, txDefaults);
const testLibsContract = await TestLibsContract.deployFrom0xArtifactAsync(
libsArtifacts.TestLibs,
provider,
txDefaults,
);
const fillOrderCombinatorialUtils = new FillOrderCombinatorialUtils(
orderFactory,