Rebased against v2-prototype

This commit is contained in:
Greg Hysen
2018-05-18 11:31:27 -07:00
parent bb74789b42
commit 8c1ae35088
22 changed files with 7708 additions and 7557 deletions

View File

@@ -4,7 +4,7 @@
"compilerSettings": {
"optimizer": {
"enabled": true,
"runs": 200
"runs": 0
},
"outputSelection": {
"*": {

View File

@@ -12,7 +12,7 @@
},
"scripts": {
"watch": "tsc -w",
"prebuild": "run-s clean copy_artifacts generate_contract_wrappers",
"prebuild": "run-s clean compile copy_artifacts generate_contract_wrappers",
"copy_artifacts": "copyfiles -u 4 '../migrations/artifacts/2.0.0/**/*' ./lib/src/artifacts;",
"build": "tsc",
"test": "run-s build run_mocha",

View File

@@ -17,6 +17,7 @@
*/
pragma solidity ^0.4.23;
pragma experimental ABIEncoderV2;
import "./mixins/MSettlement.sol";
import "./mixins/MAssetProxyDispatcher.sol";

View File

@@ -26,7 +26,7 @@ import { ExchangeWrapper } from '../../src/utils/exchange_wrapper';
import { OrderFactory } from '../../src/utils/order_factory';
import { orderUtils } from '../../src/utils/order_utils';
import { AssetProxyId, ContractName, ERC20BalancesByOwner, ExchangeStatus, SignedOrder } from '../../src/utils/types';
import { provider, txDefaults, web3Wrapper } from '../utils/web3_wrapper';
import { provider, txDefaults, web3Wrapper } from '../../src/utils/web3_wrapper';
chaiSetup.configure();
const expect = chai.expect;

View File

@@ -15,7 +15,9 @@ import {
ExchangeStatusContractEventArgs,
FillContractEventArgs,
} from '../../src/contract_wrappers/generated/exchange';
import { artifacts } from '../../src/utils/artifacts';
import { assetProxyUtils } from '../../src/utils/asset_proxy_utils';
import { chaiSetup } from '../../src/utils/chai_setup';
import { constants } from '../../src/utils/constants';
import { crypto } from '../../src/utils/crypto';
import { ERC20Wrapper } from '../../src/utils/erc20_wrapper';
@@ -32,9 +34,7 @@ import {
OrderInfo,
SignedOrder,
} from '../../src/utils/types';
import { chaiSetup } from '../utils/chai_setup';
import { deployer } from '../utils/deployer';
import { provider, web3Wrapper } from '../utils/web3_wrapper';
import { provider, txDefaults, web3Wrapper } from '../../src/utils/web3_wrapper';
import { MatchOrderTester } from '../utils/match_order_tester';
@@ -90,8 +90,8 @@ describe('matchOrders', () => {
feeRecipientAddressRight,
] = accounts);
// Create wrappers
erc20Wrapper = new ERC20Wrapper(deployer, provider, usedAddresses, owner);
erc721Wrapper = new ERC721Wrapper(deployer, provider, usedAddresses, owner);
erc20Wrapper = new ERC20Wrapper(provider, usedAddresses, owner);
erc721Wrapper = new ERC721Wrapper(provider, usedAddresses, owner);
// Deploy ERC20 token & ERC20 proxy
[erc20TokenA, erc20TokenB, zrxToken] = await erc20Wrapper.deployDummyTokensAsync();
erc20Proxy = await erc20Wrapper.deployProxyAsync();
@@ -105,10 +105,12 @@ describe('matchOrders', () => {
erc721RightMakerAssetIds = erc721Balances[makerAddressRight][erc721Token.address];
erc721TakerAssetIds = erc721Balances[takerAddress][erc721Token.address];
// Depoy exchange
const exchangeInstance = await deployer.deployAsync(ContractName.Exchange, [
exchange = await ExchangeContract.deployFrom0xArtifactAsync(
artifacts.Exchange,
provider,
txDefaults,
assetProxyUtils.encodeERC20ProxyData(zrxToken.address),
]);
exchange = new ExchangeContract(exchangeInstance.abi, exchangeInstance.address, provider);
);
zeroEx = new ZeroEx(provider, {
exchangeContractAddress: exchange.address,
networkId: constants.TESTRPC_NETWORK_ID,

View File

@@ -15,6 +15,7 @@ import {
FillContractEventArgs,
} from '../../src/contract_wrappers/generated/exchange';
import { assetProxyUtils } from '../../src/utils/asset_proxy_utils';
import { chaiSetup } from '../../src/utils/chai_setup';
import { constants } from '../../src/utils/constants';
import { crypto } from '../../src/utils/crypto';
import { ERC20Wrapper } from '../../src/utils/erc20_wrapper';
@@ -31,8 +32,7 @@ import {
SignedOrder,
TransferAmountsByMatchOrders as TransferAmounts,
} from '../../src/utils/types';
import { chaiSetup } from '../utils/chai_setup';
import { provider, web3Wrapper } from '../utils/web3_wrapper';
import { provider, web3Wrapper } from '../../src/utils/web3_wrapper';
chaiSetup.configure();
const expect = chai.expect;

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long