Updated all instances of deployFrom0xArtifactAsync
This commit is contained in:
@@ -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 () => {
|
||||
|
@@ -137,6 +137,7 @@ describe('AssetProxyDispatcher', () => {
|
||||
proxyArtifacts.ERC20Proxy,
|
||||
provider,
|
||||
txDefaults,
|
||||
dependencyArtifacts,
|
||||
);
|
||||
// Register new ERC20 Transfer Proxy contract
|
||||
return expectTransactionFailedAsync(
|
||||
|
@@ -6,4 +6,4 @@ export const dependencyArtifacts = {
|
||||
...erc20Artifacts,
|
||||
...erc721Artifacts,
|
||||
...erc1155Artifacts,
|
||||
};
|
||||
};
|
||||
|
@@ -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(
|
||||
|
@@ -137,6 +137,7 @@ export async function fillOrderCombinatorialUtilsFactoryAsync(
|
||||
libsArtifacts.TestLibs,
|
||||
provider,
|
||||
txDefaults,
|
||||
dependencyArtifacts,
|
||||
);
|
||||
|
||||
const fillOrderCombinatorialUtils = new FillOrderCombinatorialUtils(
|
||||
|
Reference in New Issue
Block a user