Updated all instances of deployFrom0xArtifactAsync

This commit is contained in:
Greg Hysen
2019-07-26 17:51:52 +02:00
parent df746c5ff4
commit d8cf9d54aa
59 changed files with 10373 additions and 10718 deletions

View File

@@ -119,11 +119,13 @@ describe('Exchange core', () => {
proxyArtifacts.MultiAssetProxy,
provider,
txDefaults,
dependencyArtifacts,
);
staticCallProxy = await StaticCallProxyContract.deployFrom0xArtifactAsync(
proxyArtifacts.StaticCallProxy,
provider,
txDefaults,
dependencyArtifacts,
);
const numDummyErc20ToDeploy = 3;
[erc20TokenA, erc20TokenB, zrxToken] = await erc20Wrapper.deployDummyTokensAsync(
@@ -354,6 +356,7 @@ describe('Exchange core', () => {
erc20Artifacts.DummyNoReturnERC20Token,
provider,
txDefaults,
dependencyArtifacts,
constants.DUMMY_TOKEN_NAME,
constants.DUMMY_TOKEN_SYMBOL,
constants.DUMMY_TOKEN_DECIMALS,
@@ -384,7 +387,7 @@ describe('Exchange core', () => {
const initialTakerZrxBalance = await zrxToken.balanceOf.callAsync(takerAddress);
const initialFeeRecipientZrxBalance = await zrxToken.balanceOf.callAsync(feeRecipientAddress);
const txReceipt = await exchangeWrapper.fillOrderAsync(signedOrder, takerAddress);
await exchangeWrapper.fillOrderAsync(signedOrder, takerAddress);
const finalMakerBalanceA = await noReturnErc20Token.balanceOf.callAsync(makerAddress);
const finalMakerBalanceB = await erc20TokenB.balanceOf.callAsync(makerAddress);
@@ -1479,6 +1482,7 @@ describe('Exchange core', () => {
proxyArtifacts.TestStaticCallTarget,
provider,
txDefaults,
dependencyArtifacts,
);
});
it('should revert if the staticcall is unsuccessful', async () => {

View File

@@ -137,6 +137,7 @@ describe('AssetProxyDispatcher', () => {
proxyArtifacts.ERC20Proxy,
provider,
txDefaults,
dependencyArtifacts,
);
// Register new ERC20 Transfer Proxy contract
return expectTransactionFailedAsync(

View File

@@ -6,4 +6,4 @@ export const dependencyArtifacts = {
...erc20Artifacts,
...erc721Artifacts,
...erc1155Artifacts,
};
};

View File

@@ -1,25 +1,17 @@
import { artifacts as erc1155Artifacts } from '@0x/contracts-erc1155';
import { artifacts as erc20Artifacts } from '@0x/contracts-erc20';
import { artifacts as erc721Artifacts } from '@0x/contracts-erc721';
import {
FillResults,
formatters,
OrderInfo,
orderUtils,
Web3ProviderEngine,
} from '@0x/contracts-test-utils';
import { FillResults, formatters, OrderInfo, orderUtils, Web3ProviderEngine } from '@0x/contracts-test-utils';
import { SignedOrder, SignedZeroExTransaction } from '@0x/types';
import { AbiEncoder, BigNumber } from '@0x/utils';
import { Web3Wrapper } from '@0x/web3-wrapper';
import { MethodAbi, TransactionReceiptWithDecodedLogs, ZeroExProvider } from 'ethereum-types';
import * as _ from 'lodash';
import { artifacts, ExchangeContract } from '../../src';
import { ExchangeContract } from '../../src';
import { AbiDecodedFillOrderData } from './types';
export class ExchangeWrapper {
private readonly _exchange: ExchangeContract;
// tslint:disable no-unused-variable
private readonly _web3Wrapper: Web3Wrapper;
constructor(exchangeContract: ExchangeContract, provider: Web3ProviderEngine | ZeroExProvider) {
this._exchange = exchangeContract;
@@ -186,7 +178,9 @@ export class ExchangeWrapper {
assetProxyAddress: string,
from: string,
): Promise<TransactionReceiptWithDecodedLogs> {
const txReceipt = await this._exchange.registerAssetProxy.awaitTransactionSuccessAsync(assetProxyAddress, { from });
const txReceipt = await this._exchange.registerAssetProxy.awaitTransactionSuccessAsync(assetProxyAddress, {
from,
});
return txReceipt;
}
public async executeTransactionAsync(

View File

@@ -137,6 +137,7 @@ export async function fillOrderCombinatorialUtilsFactoryAsync(
libsArtifacts.TestLibs,
provider,
txDefaults,
dependencyArtifacts,
);
const fillOrderCombinatorialUtils = new FillOrderCombinatorialUtils(