Rename core package to protocol

This commit is contained in:
Leonid Logvinov
2018-12-10 14:37:48 -08:00
parent 14ea4ee1d3
commit 9f5eeed309
67 changed files with 32 additions and 26 deletions

View File

@@ -1,10 +1,10 @@
import {
artifacts as coreArtifacts,
artifacts as protocolArtifacts,
ERC20Wrapper,
ERC721Wrapper,
ExchangeContract,
ExchangeWrapper,
} from '@0x/contracts-core';
} from '@0x/contracts-protocol';
import {
chaiSetup,
constants,
@@ -109,7 +109,7 @@ describe(ContractName.DutchAuction, () => {
const zrxAssetData = assetDataUtils.encodeERC20AssetData(zrxToken.address);
const exchangeInstance = await ExchangeContract.deployFrom0xArtifactAsync(
coreArtifacts.Exchange,
protocolArtifacts.Exchange,
provider,
txDefaults,
zrxAssetData,

View File

@@ -1,10 +1,10 @@
import {
artifacts as coreArtifacts,
artifacts as protocolArtifacts,
ERC20Wrapper,
ERC721Wrapper,
ExchangeContract,
ExchangeWrapper,
} from '@0x/contracts-core';
} from '@0x/contracts-protocol';
import {
chaiSetup,
constants,
@@ -108,7 +108,7 @@ describe(ContractName.Forwarder, () => {
wethAssetData = assetDataUtils.encodeERC20AssetData(wethContract.address);
zrxAssetData = assetDataUtils.encodeERC20AssetData(zrxToken.address);
const exchangeInstance = await ExchangeContract.deployFrom0xArtifactAsync(
coreArtifacts.Exchange,
protocolArtifacts.Exchange,
provider,
txDefaults,
zrxAssetData,
@@ -179,7 +179,7 @@ describe(ContractName.Forwarder, () => {
describe('constructor', () => {
it('should revert if assetProxy is unregistered', async () => {
const exchangeInstance = await ExchangeContract.deployFrom0xArtifactAsync(
coreArtifacts.Exchange,
protocolArtifacts.Exchange,
provider,
txDefaults,
zrxAssetData,

View File

@@ -1,12 +1,12 @@
import {
artifacts as coreArtifacts,
artifacts as protocolArtifacts,
ERC20ProxyContract,
ERC20Wrapper,
ERC721ProxyContract,
ERC721Wrapper,
ExchangeContract,
ExchangeWrapper,
} from '@0x/contracts-core';
} from '@0x/contracts-protocol';
import {
chaiSetup,
constants,
@@ -81,7 +81,7 @@ describe('OrderValidator', () => {
const zrxAssetData = assetDataUtils.encodeERC20AssetData(zrxToken.address);
exchange = await ExchangeContract.deployFrom0xArtifactAsync(
coreArtifacts.Exchange,
protocolArtifacts.Exchange,
provider,
txDefaults,
zrxAssetData,

View File

@@ -1,4 +1,4 @@
import { artifacts as coreArtifacts } from '@0x/contracts-core';
import { artifacts as protocolArtifacts } from '@0x/contracts-protocol';
import { constants, formatters, LogDecoder, MarketSellOrders } from '@0x/contracts-test-utils';
import { artifacts as tokensArtifacts } from '@0x/contracts-tokens';
import { SignedOrder } from '@0x/types';
@@ -60,7 +60,11 @@ export class ForwarderWrapper {
constructor(contractInstance: ForwarderContract, provider: Provider) {
this._forwarderContract = contractInstance;
this._web3Wrapper = new Web3Wrapper(provider);
this._logDecoder = new LogDecoder(this._web3Wrapper, { ...artifacts, ...tokensArtifacts, ...coreArtifacts });
this._logDecoder = new LogDecoder(this._web3Wrapper, {
...artifacts,
...tokensArtifacts,
...protocolArtifacts,
});
}
public async marketSellOrdersWithEthAsync(
orders: SignedOrder[],