Fix build errors

This commit is contained in:
Amir Bandeali
2019-07-24 10:26:28 -07:00
parent 1d8cb1b107
commit 90d1decb87
6 changed files with 10 additions and 20 deletions

View File

@@ -71,7 +71,7 @@ contract ERC1155Proxy is
// to avoid copying over `ids` or `data`. This is possible if they are
// identical to `values` and the offsets for each are pointing to the
// same location in the ABI encoded calldata.
scaledValues[i] = safeMul(values[i], amount);
scaledValues[i] = _safeMul(values[i], amount);
}
// Execute `safeBatchTransferFrom` call

View File

@@ -48,7 +48,6 @@
"homepage": "https://github.com/0xProject/0x-monorepo/contracts/dev-utils/README.md",
"devDependencies": {
"@0x/abi-gen": "^2.1.1",
"@0x/contract-wrappers": "^9.1.7",
"@0x/contracts-gen": "^1.0.10",
"@0x/contracts-test-utils": "^3.1.10",
"@0x/dev-utils": "^2.2.4",

View File

@@ -47,7 +47,6 @@
"homepage": "https://github.com/0xProject/0x-monorepo/contracts/extensions/README.md",
"devDependencies": {
"@0x/abi-gen": "^2.1.1",
"@0x/contract-wrappers": "^9.1.7",
"@0x/contracts-gen": "^1.0.10",
"@0x/contracts-test-utils": "^3.1.10",
"@0x/dev-utils": "^2.2.4",

View File

@@ -5,7 +5,7 @@ import { SignedOrder } from '@0x/types';
import { constants as exchangeConstants, ExchangeFunctionName, IExchangeContract } from '../../src';
export const exchangeDataEncoder = {
encodeOrdersToExchangeData(fnName: string, orders: SignedOrder[] = []): string {
encodeOrdersToExchangeData(fnName: ExchangeFunctionName, orders: SignedOrder[] = []): string {
const exchangeInstance = new IExchangeContract(constants.NULL_ADDRESS, provider);
let data;
if (exchangeConstants.SINGLE_FILL_FN_NAMES.indexOf(fnName) !== -1) {

View File

@@ -4874,7 +4874,7 @@ export class ExchangeContract extends BaseContract {
artifact: ContractArtifact | SimpleContractArtifact,
supportedProvider: SupportedProvider,
txDefaults: Partial<TxData>,
_zrxAssetData: string,
_zrxAssetData: string,
): Promise<ExchangeContract> {
assert.doesConformToSchema('txDefaults', txDefaults, schemas.txDataSchema, [
schemas.addressSchema,
@@ -4887,15 +4887,14 @@ export class ExchangeContract extends BaseContract {
const provider = providerUtils.standardizeOrThrow(supportedProvider);
const bytecode = artifact.compilerOutput.evm.bytecode.object;
const abi = artifact.compilerOutput.abi;
return ExchangeContract.deployAsync(bytecode, abi, provider, txDefaults, _zrxAssetData
);
return ExchangeContract.deployAsync(bytecode, abi, provider, txDefaults, _zrxAssetData);
}
public static async deployAsync(
bytecode: string,
abi: ContractAbi,
supportedProvider: SupportedProvider,
txDefaults: Partial<TxData>,
_zrxAssetData: string,
_zrxAssetData: string,
): Promise<ExchangeContract> {
assert.isHexString('bytecode', bytecode);
assert.doesConformToSchema('txDefaults', txDefaults, schemas.txDataSchema, [
@@ -4905,17 +4904,14 @@ export class ExchangeContract extends BaseContract {
]);
const provider = providerUtils.standardizeOrThrow(supportedProvider);
const constructorAbi = BaseContract._lookupConstructorAbi(abi);
[_zrxAssetData
] = BaseContract._formatABIDataItemList(
[_zrxAssetData] = BaseContract._formatABIDataItemList(
constructorAbi.inputs,
[_zrxAssetData
],
[_zrxAssetData],
BaseContract._bigNumberToString,
);
const iface = new ethers.utils.Interface(abi);
const deployInfo = iface.deployFunction;
const txData = deployInfo.encode(bytecode, [_zrxAssetData
]);
const txData = deployInfo.encode(bytecode, [_zrxAssetData]);
const web3Wrapper = new Web3Wrapper(provider);
const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync(
{ data: txData },
@@ -4926,9 +4922,8 @@ export class ExchangeContract extends BaseContract {
logUtils.log(`transactionHash: ${txHash}`);
const txReceipt = await web3Wrapper.awaitTransactionSuccessAsync(txHash);
logUtils.log(`Exchange successfully deployed at ${txReceipt.contractAddress}`);
const contractInstance = new ExchangeContract(abi, txReceipt.contractAddress as string, provider, txDefaults);
contractInstance.constructorArgs = [_zrxAssetData
];
const contractInstance = new ExchangeContract(txReceipt.contractAddress as string, provider, txDefaults);
contractInstance.constructorArgs = [_zrxAssetData];
return contractInstance;
}

View File

@@ -22,7 +22,6 @@ export async function runMigrationsAsync(
txDefaults: TxData,
): Promise<ContractAddresses> {
const provider = providerUtils.standardizeOrThrow(supportedProvider);
const chainId = await providerUtils.getChainIdAsync(provider);
const web3Wrapper = new Web3Wrapper(provider);
// Proxies
@@ -54,7 +53,6 @@ export async function runMigrationsAsync(
provider,
txDefaults,
zrxAssetData,
new BigNumber(chainId),
);
// Dummy ERC20 tokens
@@ -198,7 +196,6 @@ export async function runMigrationsAsync(
provider,
txDefaults,
exchange.address,
new BigNumber(chainId),
);
const contractAddresses = {