aboutsummaryrefslogtreecommitdiffstats
path: root/contracts/exchange
diff options
context:
space:
mode:
authorFabio Berger <me@fabioberger.com>2019-02-07 22:28:24 +0800
committerFabio Berger <me@fabioberger.com>2019-02-07 22:28:24 +0800
commit3dd652e7cf6da63831da143b73c13231a46da376 (patch)
tree52218d0b88717360fa8bfadf4bbf7e35b9ab5f66 /contracts/exchange
parent8de955f3d891620c90c668b4ac0b046e772d4da8 (diff)
parentf003298ce4c7a2201d2d59685b0d5d0411aeb55d (diff)
downloaddexon-0x-contracts-3dd652e7cf6da63831da143b73c13231a46da376.tar
dexon-0x-contracts-3dd652e7cf6da63831da143b73c13231a46da376.tar.gz
dexon-0x-contracts-3dd652e7cf6da63831da143b73c13231a46da376.tar.bz2
dexon-0x-contracts-3dd652e7cf6da63831da143b73c13231a46da376.tar.lz
dexon-0x-contracts-3dd652e7cf6da63831da143b73c13231a46da376.tar.xz
dexon-0x-contracts-3dd652e7cf6da63831da143b73c13231a46da376.tar.zst
dexon-0x-contracts-3dd652e7cf6da63831da143b73c13231a46da376.zip
Merge branch 'development' into addAnalyticsToDevToolsPages
* development: (51 commits) Publish Updated CHANGELOGS Updated CHANGELOGS Update packages/sol-compiler/CHANGELOG.json Update packages/sol-compiler/CHANGELOG.json Move from devDep to dep Fix linter Update CHANGELOG Re-run yarn since fails again on first run Add PR numbers Omit remapping in compiler settings equality checks Omit remapping in compiler settings equality checks Fix a bug when ast and legacyAST were not present in the artifacts even if requested Update yarn.lock Remove the bin_paths and fetch the solidity release list from github repo Remove postinstall hack Fix the undefined opts bug Fix sol-compiler bug with remappings causing smart recompilation to now work re-add postinstall hack Fix deps versions ...
Diffstat (limited to 'contracts/exchange')
-rw-r--r--contracts/exchange/CHANGELOG.json27
-rw-r--r--contracts/exchange/CHANGELOG.md12
-rw-r--r--contracts/exchange/compiler.json49
-rw-r--r--contracts/exchange/package.json37
-rw-r--r--contracts/exchange/src/artifacts.ts61
-rw-r--r--contracts/exchange/src/artifacts/index.ts41
-rw-r--r--contracts/exchange/src/wrappers.ts31
-rw-r--r--contracts/exchange/src/wrappers/index.ts18
-rw-r--r--contracts/exchange/test/core.ts31
-rw-r--r--contracts/exchange/test/dispatcher.ts14
-rw-r--r--contracts/exchange/test/match_orders.ts19
-rw-r--r--contracts/exchange/test/signature_validator.ts3
-rw-r--r--contracts/exchange/test/transactions.ts5
-rw-r--r--contracts/exchange/test/utils/exchange_wrapper.ts17
-rw-r--r--contracts/exchange/test/utils/fill_order_combinatorial_utils.ts9
-rw-r--r--contracts/exchange/test/wrapper.ts17
-rw-r--r--contracts/exchange/tsconfig.json50
17 files changed, 257 insertions, 184 deletions
diff --git a/contracts/exchange/CHANGELOG.json b/contracts/exchange/CHANGELOG.json
index a03a08c29..02c614b1a 100644
--- a/contracts/exchange/CHANGELOG.json
+++ b/contracts/exchange/CHANGELOG.json
@@ -1,5 +1,32 @@
[
{
+ "version": "1.0.4",
+ "changes": [
+ {
+ "note": "Dependencies updated"
+ }
+ ],
+ "timestamp": 1549547375
+ },
+ {
+ "version": "1.0.3",
+ "changes": [
+ {
+ "note": "Fake publish to enable pinning"
+ }
+ ],
+ "timestamp": 1549504360
+ },
+ {
+ "timestamp": 1549452781,
+ "version": "1.0.2",
+ "changes": [
+ {
+ "note": "Dependencies updated"
+ }
+ ]
+ },
+ {
"timestamp": 1549373905,
"version": "1.0.1",
"changes": [
diff --git a/contracts/exchange/CHANGELOG.md b/contracts/exchange/CHANGELOG.md
index f59bbf5d4..f265cd96f 100644
--- a/contracts/exchange/CHANGELOG.md
+++ b/contracts/exchange/CHANGELOG.md
@@ -5,6 +5,18 @@ Edit the package's CHANGELOG.json file only.
CHANGELOG
+## v1.0.4 - _February 7, 2019_
+
+ * Dependencies updated
+
+## v1.0.3 - _February 7, 2019_
+
+ * Fake publish to enable pinning
+
+## v1.0.2 - _February 6, 2019_
+
+ * Dependencies updated
+
## v1.0.1 - _February 5, 2019_
* Dependencies updated
diff --git a/contracts/exchange/compiler.json b/contracts/exchange/compiler.json
index 6a5f666d1..b7a94cd13 100644
--- a/contracts/exchange/compiler.json
+++ b/contracts/exchange/compiler.json
@@ -3,10 +3,7 @@
"contractsDir": "./contracts",
"useDockerisedSolc": true,
"compilerSettings": {
- "optimizer": {
- "enabled": true,
- "runs": 1000000
- },
+ "optimizer": { "enabled": true, "runs": 1000000 },
"outputSelection": {
"*": {
"*": [
@@ -20,23 +17,31 @@
}
},
"contracts": [
- "Exchange",
- "IAssetProxyDispatcher",
- "IExchange",
- "IExchangeCore",
- "IMatchOrders",
- "ISignatureValidator",
- "ITransactions",
- "IValidator",
- "IWallet",
- "IWrapperFunctions",
- "TestAssetProxyDispatcher",
- "TestExchangeInternals",
- "TestSignatureValidator",
- "TestStaticCallReceiver",
- "ExchangeWrapper",
- "Validator",
- "Wallet",
- "Whitelist"
+ "@0x/contracts-asset-proxy/contracts/src/ERC20Proxy.sol",
+ "@0x/contracts-asset-proxy/contracts/src/ERC721Proxy.sol",
+ "@0x/contracts-asset-proxy/contracts/src/MultiAssetProxy.sol",
+ "@0x/contracts-erc20/contracts/test/DummyERC20Token.sol",
+ "@0x/contracts-erc20/contracts/test/DummyNoReturnERC20Token.sol",
+ "@0x/contracts-erc20/contracts/test/ReentrantERC20Token.sol",
+ "@0x/contracts-erc721/contracts/test/DummyERC721Token.sol",
+ "@0x/contracts-exchange-libs/contracts/test/TestLibs.sol",
+ "examples/ExchangeWrapper.sol",
+ "examples/Validator.sol",
+ "examples/Wallet.sol",
+ "examples/Whitelist.sol",
+ "src/Exchange.sol",
+ "src/interfaces/IAssetProxyDispatcher.sol",
+ "src/interfaces/IExchange.sol",
+ "src/interfaces/IExchangeCore.sol",
+ "src/interfaces/IMatchOrders.sol",
+ "src/interfaces/ISignatureValidator.sol",
+ "src/interfaces/ITransactions.sol",
+ "src/interfaces/IValidator.sol",
+ "src/interfaces/IWallet.sol",
+ "src/interfaces/IWrapperFunctions.sol",
+ "test/TestAssetProxyDispatcher.sol",
+ "test/TestExchangeInternals.sol",
+ "test/TestSignatureValidator.sol",
+ "test/TestStaticCallReceiver.sol"
]
}
diff --git a/contracts/exchange/package.json b/contracts/exchange/package.json
index 76fe7f215..b16785087 100644
--- a/contracts/exchange/package.json
+++ b/contracts/exchange/package.json
@@ -1,6 +1,6 @@
{
"name": "@0x/contracts-exchange",
- "version": "1.0.1",
+ "version": "1.0.4",
"engines": {
"node": ">=6.12"
},
@@ -29,10 +29,12 @@
"profiler:report:html": "istanbul report html && open coverage/index.html",
"coverage:report:lcov": "istanbul report lcov",
"test:circleci": "yarn test",
+ "contracts:gen": "contracts-gen",
"lint-contracts": "solhint -c ../.solhint.json contracts/**/**/**/**/*.sol"
},
"config": {
- "abis": "generated-artifacts/@(ERC20Proxy|ERC721Proxy|Exchange|IAssetProxyDispatcher|IExchange|IExchangeCore|IMatchOrders|ISignatureValidator|ITransactions|IWrapperFunctions|IValidator|IWallet|MixinAuthorizable|MultiAssetProxy|TestSignatureValidator|TestAssetProxyDispatcher|TestExchangeInternals|TestStaticCallReceiver|ExchangeWrapper|Validator|Wallet|Whitelist).json"
+ "abis": "./generated-artifacts/@(DummyERC20Token|DummyERC721Token|DummyNoReturnERC20Token|ERC20Proxy|ERC721Proxy|Exchange|ExchangeWrapper|IAssetProxyDispatcher|IExchange|IExchangeCore|IMatchOrders|ISignatureValidator|ITransactions|IValidator|IWallet|IWrapperFunctions|MultiAssetProxy|ReentrantERC20Token|TestAssetProxyDispatcher|TestExchangeInternals|TestLibs|TestSignatureValidator|TestStaticCallReceiver|Validator|Wallet|Whitelist).json",
+ "abis:comment": "This list is auto-generated by contracts-gen. Don't edit manually."
},
"repository": {
"type": "git",
@@ -44,9 +46,11 @@
},
"homepage": "https://github.com/0xProject/0x-monorepo/contracts/protocol/README.md",
"devDependencies": {
- "@0x/abi-gen": "^2.0.0",
- "@0x/dev-utils": "^2.0.0",
- "@0x/sol-compiler": "^3.0.0",
+ "@0x/abi-gen": "^2.0.2",
+ "@0x/contracts-gen": "^1.0.1",
+ "@0x/contracts-test-utils": "^3.0.3",
+ "@0x/dev-utils": "^2.0.2",
+ "@0x/sol-compiler": "^3.0.2",
"@0x/tslint-config": "^3.0.0",
"@types/lodash": "4.14.104",
"@types/node": "*",
@@ -63,21 +67,20 @@
"typescript": "3.0.1"
},
"dependencies": {
- "@0x/base-contract": "^4.0.0",
- "@0x/contracts-asset-proxy": "^1.0.1",
- "@0x/contracts-erc20": "^1.0.1",
- "@0x/contracts-erc721": "^1.0.1",
- "@0x/contracts-exchange-libs": "^1.0.1",
- "@0x/contracts-test-utils": "^3.0.0",
- "@0x/contracts-utils": "^2.0.0",
- "@0x/order-utils": "^4.0.0",
- "@0x/types": "^2.0.0",
+ "@0x/base-contract": "^4.0.2",
+ "@0x/contracts-asset-proxy": "1.0.2",
+ "@0x/contracts-erc20": "1.0.2",
+ "@0x/contracts-erc721": "1.0.2",
+ "@0x/contracts-exchange-libs": "1.0.2",
+ "@0x/contracts-utils": "2.0.1",
+ "@0x/order-utils": "^6.0.1",
+ "@0x/types": "^2.0.2",
"@0x/typescript-typings": "^4.0.0",
- "@0x/utils": "^4.0.1",
- "@0x/web3-wrapper": "^4.0.0",
+ "@0x/utils": "^4.0.3",
+ "@0x/web3-wrapper": "^4.0.2",
"ethereum-types": "^2.0.0",
"ethereumjs-util": "^5.1.1",
- "lodash": "^4.17.5"
+ "lodash": "^4.17.11"
},
"publishConfig": {
"access": "public"
diff --git a/contracts/exchange/src/artifacts.ts b/contracts/exchange/src/artifacts.ts
new file mode 100644
index 000000000..efdacd376
--- /dev/null
+++ b/contracts/exchange/src/artifacts.ts
@@ -0,0 +1,61 @@
+/*
+ * -----------------------------------------------------------------------------
+ * Warning: This file is auto-generated by contracts-gen. Don't edit manually.
+ * -----------------------------------------------------------------------------
+ */
+import { ContractArtifact } from 'ethereum-types';
+
+import * as DummyERC20Token from '../generated-artifacts/DummyERC20Token.json';
+import * as DummyERC721Token from '../generated-artifacts/DummyERC721Token.json';
+import * as DummyNoReturnERC20Token from '../generated-artifacts/DummyNoReturnERC20Token.json';
+import * as ERC20Proxy from '../generated-artifacts/ERC20Proxy.json';
+import * as ERC721Proxy from '../generated-artifacts/ERC721Proxy.json';
+import * as Exchange from '../generated-artifacts/Exchange.json';
+import * as ExchangeWrapper from '../generated-artifacts/ExchangeWrapper.json';
+import * as IAssetProxyDispatcher from '../generated-artifacts/IAssetProxyDispatcher.json';
+import * as IExchange from '../generated-artifacts/IExchange.json';
+import * as IExchangeCore from '../generated-artifacts/IExchangeCore.json';
+import * as IMatchOrders from '../generated-artifacts/IMatchOrders.json';
+import * as ISignatureValidator from '../generated-artifacts/ISignatureValidator.json';
+import * as ITransactions from '../generated-artifacts/ITransactions.json';
+import * as IValidator from '../generated-artifacts/IValidator.json';
+import * as IWallet from '../generated-artifacts/IWallet.json';
+import * as IWrapperFunctions from '../generated-artifacts/IWrapperFunctions.json';
+import * as MultiAssetProxy from '../generated-artifacts/MultiAssetProxy.json';
+import * as ReentrantERC20Token from '../generated-artifacts/ReentrantERC20Token.json';
+import * as TestAssetProxyDispatcher from '../generated-artifacts/TestAssetProxyDispatcher.json';
+import * as TestExchangeInternals from '../generated-artifacts/TestExchangeInternals.json';
+import * as TestLibs from '../generated-artifacts/TestLibs.json';
+import * as TestSignatureValidator from '../generated-artifacts/TestSignatureValidator.json';
+import * as TestStaticCallReceiver from '../generated-artifacts/TestStaticCallReceiver.json';
+import * as Validator from '../generated-artifacts/Validator.json';
+import * as Wallet from '../generated-artifacts/Wallet.json';
+import * as Whitelist from '../generated-artifacts/Whitelist.json';
+export const artifacts = {
+ ERC20Proxy: ERC20Proxy as ContractArtifact,
+ ERC721Proxy: ERC721Proxy as ContractArtifact,
+ MultiAssetProxy: MultiAssetProxy as ContractArtifact,
+ DummyERC20Token: DummyERC20Token as ContractArtifact,
+ DummyNoReturnERC20Token: DummyNoReturnERC20Token as ContractArtifact,
+ ReentrantERC20Token: ReentrantERC20Token as ContractArtifact,
+ DummyERC721Token: DummyERC721Token as ContractArtifact,
+ TestLibs: TestLibs as ContractArtifact,
+ ExchangeWrapper: ExchangeWrapper as ContractArtifact,
+ Validator: Validator as ContractArtifact,
+ Wallet: Wallet as ContractArtifact,
+ Whitelist: Whitelist as ContractArtifact,
+ Exchange: Exchange as ContractArtifact,
+ IAssetProxyDispatcher: IAssetProxyDispatcher as ContractArtifact,
+ IExchange: IExchange as ContractArtifact,
+ IExchangeCore: IExchangeCore as ContractArtifact,
+ IMatchOrders: IMatchOrders as ContractArtifact,
+ ISignatureValidator: ISignatureValidator as ContractArtifact,
+ ITransactions: ITransactions as ContractArtifact,
+ IValidator: IValidator as ContractArtifact,
+ IWallet: IWallet as ContractArtifact,
+ IWrapperFunctions: IWrapperFunctions as ContractArtifact,
+ TestAssetProxyDispatcher: TestAssetProxyDispatcher as ContractArtifact,
+ TestExchangeInternals: TestExchangeInternals as ContractArtifact,
+ TestSignatureValidator: TestSignatureValidator as ContractArtifact,
+ TestStaticCallReceiver: TestStaticCallReceiver as ContractArtifact,
+};
diff --git a/contracts/exchange/src/artifacts/index.ts b/contracts/exchange/src/artifacts/index.ts
deleted file mode 100644
index 798ff17ab..000000000
--- a/contracts/exchange/src/artifacts/index.ts
+++ /dev/null
@@ -1,41 +0,0 @@
-import { ContractArtifact } from 'ethereum-types';
-
-import * as Exchange from '../../generated-artifacts/Exchange.json';
-import * as ExchangeWrapper from '../../generated-artifacts/ExchangeWrapper.json';
-import * as IAssetProxyDispatcher from '../../generated-artifacts/IAssetProxyDispatcher.json';
-import * as IExchange from '../../generated-artifacts/IExchange.json';
-import * as IExchangeCore from '../../generated-artifacts/IExchangeCore.json';
-import * as IMatchOrders from '../../generated-artifacts/IMatchOrders.json';
-import * as ISignatureValidator from '../../generated-artifacts/ISignatureValidator.json';
-import * as ITransactions from '../../generated-artifacts/ITransactions.json';
-import * as IValidator from '../../generated-artifacts/IValidator.json';
-import * as IWallet from '../../generated-artifacts/IWallet.json';
-import * as IWrapperFunctions from '../../generated-artifacts/IWrapperFunctions.json';
-import * as TestAssetProxyDispatcher from '../../generated-artifacts/TestAssetProxyDispatcher.json';
-import * as TestExchangeInternals from '../../generated-artifacts/TestExchangeInternals.json';
-import * as TestSignatureValidator from '../../generated-artifacts/TestSignatureValidator.json';
-import * as TestStaticCallReceiver from '../../generated-artifacts/TestStaticCallReceiver.json';
-import * as Validator from '../../generated-artifacts/Validator.json';
-import * as Wallet from '../../generated-artifacts/Wallet.json';
-import * as Whitelist from '../../generated-artifacts/Whitelist.json';
-
-export const artifacts = {
- Exchange: Exchange as ContractArtifact,
- TestAssetProxyDispatcher: TestAssetProxyDispatcher as ContractArtifact,
- TestExchangeInternals: TestExchangeInternals as ContractArtifact,
- TestSignatureValidator: TestSignatureValidator as ContractArtifact,
- TestStaticCallReceiver: TestStaticCallReceiver as ContractArtifact,
- IExchange: IExchange as ContractArtifact,
- IExchangeCore: IExchangeCore as ContractArtifact,
- IMatchOrders: IMatchOrders as ContractArtifact,
- ISignatureValidator: ISignatureValidator as ContractArtifact,
- ITransactions: ITransactions as ContractArtifact,
- IWrapperFunctions: IWrapperFunctions as ContractArtifact,
- IAssetProxyDispatcher: IAssetProxyDispatcher as ContractArtifact,
- IValidator: IValidator as ContractArtifact,
- IWallet: IWallet as ContractArtifact,
- ExchangeWrapper: ExchangeWrapper as ContractArtifact,
- Validator: Validator as ContractArtifact,
- Wallet: Wallet as ContractArtifact,
- Whitelist: Whitelist as ContractArtifact,
-};
diff --git a/contracts/exchange/src/wrappers.ts b/contracts/exchange/src/wrappers.ts
new file mode 100644
index 000000000..1c1d7fdb4
--- /dev/null
+++ b/contracts/exchange/src/wrappers.ts
@@ -0,0 +1,31 @@
+/*
+ * -----------------------------------------------------------------------------
+ * Warning: This file is auto-generated by contracts-gen. Don't edit manually.
+ * -----------------------------------------------------------------------------
+ */
+export * from '../generated-wrappers/dummy_erc20_token';
+export * from '../generated-wrappers/dummy_erc721_token';
+export * from '../generated-wrappers/dummy_no_return_erc20_token';
+export * from '../generated-wrappers/erc20_proxy';
+export * from '../generated-wrappers/erc721_proxy';
+export * from '../generated-wrappers/exchange';
+export * from '../generated-wrappers/exchange_wrapper';
+export * from '../generated-wrappers/i_asset_proxy_dispatcher';
+export * from '../generated-wrappers/i_exchange';
+export * from '../generated-wrappers/i_exchange_core';
+export * from '../generated-wrappers/i_match_orders';
+export * from '../generated-wrappers/i_signature_validator';
+export * from '../generated-wrappers/i_transactions';
+export * from '../generated-wrappers/i_validator';
+export * from '../generated-wrappers/i_wallet';
+export * from '../generated-wrappers/i_wrapper_functions';
+export * from '../generated-wrappers/multi_asset_proxy';
+export * from '../generated-wrappers/reentrant_erc20_token';
+export * from '../generated-wrappers/test_asset_proxy_dispatcher';
+export * from '../generated-wrappers/test_exchange_internals';
+export * from '../generated-wrappers/test_libs';
+export * from '../generated-wrappers/test_signature_validator';
+export * from '../generated-wrappers/test_static_call_receiver';
+export * from '../generated-wrappers/validator';
+export * from '../generated-wrappers/wallet';
+export * from '../generated-wrappers/whitelist';
diff --git a/contracts/exchange/src/wrappers/index.ts b/contracts/exchange/src/wrappers/index.ts
deleted file mode 100644
index 86e939b56..000000000
--- a/contracts/exchange/src/wrappers/index.ts
+++ /dev/null
@@ -1,18 +0,0 @@
-export * from '../../generated-wrappers/exchange';
-export * from '../../generated-wrappers/test_asset_proxy_dispatcher';
-export * from '../../generated-wrappers/test_exchange_internals';
-export * from '../../generated-wrappers/test_signature_validator';
-export * from '../../generated-wrappers/test_static_call_receiver';
-export * from '../../generated-wrappers/i_asset_proxy_dispatcher';
-export * from '../../generated-wrappers/i_exchange';
-export * from '../../generated-wrappers/i_exchange_core';
-export * from '../../generated-wrappers/i_match_orders';
-export * from '../../generated-wrappers/i_signature_validator';
-export * from '../../generated-wrappers/i_transactions';
-export * from '../../generated-wrappers/i_wrapper_functions';
-export * from '../../generated-wrappers/i_validator';
-export * from '../../generated-wrappers/i_wallet';
-export * from '../../generated-wrappers/exchange_wrapper';
-export * from '../../generated-wrappers/validator';
-export * from '../../generated-wrappers/wallet';
-export * from '../../generated-wrappers/whitelist';
diff --git a/contracts/exchange/test/core.ts b/contracts/exchange/test/core.ts
index 74161cc73..7e61ef7ac 100644
--- a/contracts/exchange/test/core.ts
+++ b/contracts/exchange/test/core.ts
@@ -1,19 +1,4 @@
-import {
- artifacts as proxyArtifacts,
- ERC20ProxyContract,
- ERC20Wrapper,
- ERC721ProxyContract,
- ERC721Wrapper,
- MultiAssetProxyContract,
-} from '@0x/contracts-asset-proxy';
-import {
- artifacts as erc20Artifacts,
- DummyERC20TokenContract,
- DummyERC20TokenTransferEventArgs,
- DummyNoReturnERC20TokenContract,
- ReentrantERC20TokenContract,
-} from '@0x/contracts-erc20';
-import { DummyERC721TokenContract } from '@0x/contracts-erc721';
+import { ERC20Wrapper, ERC721Wrapper } from '@0x/contracts-asset-proxy';
import {
chaiSetup,
constants,
@@ -39,9 +24,17 @@ import * as _ from 'lodash';
import {
artifacts,
+ DummyERC20TokenContract,
+ DummyERC20TokenTransferEventArgs,
+ DummyERC721TokenContract,
+ DummyNoReturnERC20TokenContract,
+ ERC20ProxyContract,
+ ERC721ProxyContract,
ExchangeCancelEventArgs,
ExchangeContract,
ExchangeWrapper,
+ MultiAssetProxyContract,
+ ReentrantERC20TokenContract,
TestStaticCallReceiverContract,
} from '../src';
@@ -98,7 +91,7 @@ describe('Exchange core', () => {
erc20Proxy = await erc20Wrapper.deployProxyAsync();
erc721Proxy = await erc721Wrapper.deployProxyAsync();
multiAssetProxy = await MultiAssetProxyContract.deployFrom0xArtifactAsync(
- proxyArtifacts.MultiAssetProxy,
+ artifacts.MultiAssetProxy,
provider,
txDefaults,
);
@@ -120,7 +113,7 @@ describe('Exchange core', () => {
txDefaults,
);
reentrantErc20Token = await ReentrantERC20TokenContract.deployFrom0xArtifactAsync(
- erc20Artifacts.ReentrantERC20Token,
+ artifacts.ReentrantERC20Token,
provider,
txDefaults,
exchange.address,
@@ -345,7 +338,7 @@ describe('Exchange core', () => {
describe('Testing exchange of ERC20 tokens with no return values', () => {
before(async () => {
noReturnErc20Token = await DummyNoReturnERC20TokenContract.deployFrom0xArtifactAsync(
- erc20Artifacts.DummyNoReturnERC20Token,
+ artifacts.DummyNoReturnERC20Token,
provider,
txDefaults,
constants.DUMMY_TOKEN_NAME,
diff --git a/contracts/exchange/test/dispatcher.ts b/contracts/exchange/test/dispatcher.ts
index a25755936..8263b0402 100644
--- a/contracts/exchange/test/dispatcher.ts
+++ b/contracts/exchange/test/dispatcher.ts
@@ -1,11 +1,4 @@
-import {
- artifacts as proxyArtifacts,
- ERC20ProxyContract,
- ERC20Wrapper,
- ERC721ProxyContract,
- ERC721Wrapper,
-} from '@0x/contracts-asset-proxy';
-import { DummyERC20TokenContract } from '@0x/contracts-erc20';
+import { ERC20Wrapper, ERC721Wrapper } from '@0x/contracts-asset-proxy';
import {
chaiSetup,
constants,
@@ -25,6 +18,9 @@ import * as _ from 'lodash';
import {
artifacts,
+ DummyERC20TokenContract,
+ ERC20ProxyContract,
+ ERC721ProxyContract,
TestAssetProxyDispatcherAssetProxyRegisteredEventArgs,
TestAssetProxyDispatcherContract,
} from '../src';
@@ -131,7 +127,7 @@ describe('AssetProxyDispatcher', () => {
expect(proxyAddress).to.be.equal(erc20Proxy.address);
// Deploy a new version of the ERC20 Transfer Proxy contract
const newErc20TransferProxy = await ERC20ProxyContract.deployFrom0xArtifactAsync(
- proxyArtifacts.ERC20Proxy,
+ artifacts.ERC20Proxy,
provider,
txDefaults,
);
diff --git a/contracts/exchange/test/match_orders.ts b/contracts/exchange/test/match_orders.ts
index d17025ddd..98fea67ea 100644
--- a/contracts/exchange/test/match_orders.ts
+++ b/contracts/exchange/test/match_orders.ts
@@ -1,6 +1,4 @@
-import { ERC20ProxyContract, ERC20Wrapper, ERC721ProxyContract, ERC721Wrapper } from '@0x/contracts-asset-proxy';
-import { artifacts as erc20Artifacts, DummyERC20TokenContract, ReentrantERC20TokenContract } from '@0x/contracts-erc20';
-import { DummyERC721TokenContract } from '@0x/contracts-erc721';
+import { ERC20Wrapper, ERC721Wrapper } from '@0x/contracts-asset-proxy';
import {
chaiSetup,
constants,
@@ -20,7 +18,18 @@ import { Web3Wrapper } from '@0x/web3-wrapper';
import * as chai from 'chai';
import * as _ from 'lodash';
-import { artifacts, ExchangeContract, ExchangeWrapper, MatchOrderTester, TestExchangeInternalsContract } from '../src';
+import {
+ artifacts,
+ DummyERC20TokenContract,
+ DummyERC721TokenContract,
+ ERC20ProxyContract,
+ ERC721ProxyContract,
+ ExchangeContract,
+ ExchangeWrapper,
+ MatchOrderTester,
+ ReentrantERC20TokenContract,
+ TestExchangeInternalsContract,
+} from '../src';
const blockchainLifecycle = new BlockchainLifecycle(web3Wrapper);
chaiSetup.configure();
@@ -131,7 +140,7 @@ describe('matchOrders', () => {
);
reentrantErc20Token = await ReentrantERC20TokenContract.deployFrom0xArtifactAsync(
- erc20Artifacts.ReentrantERC20Token,
+ artifacts.ReentrantERC20Token,
provider,
txDefaults,
exchange.address,
diff --git a/contracts/exchange/test/signature_validator.ts b/contracts/exchange/test/signature_validator.ts
index 89eac4ddb..33510e50c 100644
--- a/contracts/exchange/test/signature_validator.ts
+++ b/contracts/exchange/test/signature_validator.ts
@@ -1,4 +1,3 @@
-import { artifacts as erc20Artifacts } from '@0x/contracts-erc20';
import {
addressUtils,
chaiSetup,
@@ -78,7 +77,7 @@ describe('MixinSignatureValidator', () => {
provider,
txDefaults,
);
- signatureValidatorLogDecoder = new LogDecoder(web3Wrapper, { ...artifacts, ...erc20Artifacts });
+ signatureValidatorLogDecoder = new LogDecoder(web3Wrapper, artifacts);
await web3Wrapper.awaitTransactionSuccessAsync(
await signatureValidator.setSignatureValidatorApproval.sendTransactionAsync(testValidator.address, true, {
from: signerAddress,
diff --git a/contracts/exchange/test/transactions.ts b/contracts/exchange/test/transactions.ts
index 613953493..4f8c07579 100644
--- a/contracts/exchange/test/transactions.ts
+++ b/contracts/exchange/test/transactions.ts
@@ -8,14 +8,13 @@ import {
OrderFactory,
orderUtils,
provider,
- SignedTransaction,
TransactionFactory,
txDefaults,
web3Wrapper,
} from '@0x/contracts-test-utils';
import { BlockchainLifecycle } from '@0x/dev-utils';
import { assetDataUtils, generatePseudoRandomSalt } from '@0x/order-utils';
-import { OrderWithoutExchangeAddress, RevertReason, SignedOrder } from '@0x/types';
+import { OrderWithoutExchangeAddress, RevertReason, SignedOrder, SignedZeroExTransaction } from '@0x/types';
import { BigNumber } from '@0x/utils';
import * as chai from 'chai';
import * as _ from 'lodash';
@@ -41,7 +40,7 @@ describe('Exchange transactions', () => {
let erc20Balances: ERC20BalancesByOwner;
let signedOrder: SignedOrder;
- let signedTx: SignedTransaction;
+ let signedTx: SignedZeroExTransaction;
let orderWithoutExchangeAddress: OrderWithoutExchangeAddress;
let orderFactory: OrderFactory;
let makerTransactionFactory: TransactionFactory;
diff --git a/contracts/exchange/test/utils/exchange_wrapper.ts b/contracts/exchange/test/utils/exchange_wrapper.ts
index eca535c65..535e3bcf2 100644
--- a/contracts/exchange/test/utils/exchange_wrapper.ts
+++ b/contracts/exchange/test/utils/exchange_wrapper.ts
@@ -1,14 +1,5 @@
-import { artifacts as erc20Artifacts } from '@0x/contracts-erc20';
-import { artifacts as erc721Artifacts } from '@0x/contracts-erc721';
-import {
- FillResults,
- formatters,
- LogDecoder,
- OrderInfo,
- orderUtils,
- SignedTransaction,
-} from '@0x/contracts-test-utils';
-import { SignedOrder } from '@0x/types';
+import { FillResults, formatters, LogDecoder, OrderInfo, orderUtils } 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, Provider, TransactionReceiptWithDecodedLogs } from 'ethereum-types';
@@ -25,7 +16,7 @@ export class ExchangeWrapper {
constructor(exchangeContract: ExchangeContract, provider: Provider) {
this._exchange = exchangeContract;
this._web3Wrapper = new Web3Wrapper(provider);
- this._logDecoder = new LogDecoder(this._web3Wrapper, { ...artifacts, ...erc20Artifacts, ...erc721Artifacts });
+ this._logDecoder = new LogDecoder(this._web3Wrapper, artifacts);
}
public async fillOrderAsync(
signedOrder: SignedOrder,
@@ -206,7 +197,7 @@ export class ExchangeWrapper {
return tx;
}
public async executeTransactionAsync(
- signedTx: SignedTransaction,
+ signedTx: SignedZeroExTransaction,
from: string,
): Promise<TransactionReceiptWithDecodedLogs> {
const txHash = await this._exchange.executeTransaction.sendTransactionAsync(
diff --git a/contracts/exchange/test/utils/fill_order_combinatorial_utils.ts b/contracts/exchange/test/utils/fill_order_combinatorial_utils.ts
index 26b168909..00ca8a9fc 100644
--- a/contracts/exchange/test/utils/fill_order_combinatorial_utils.ts
+++ b/contracts/exchange/test/utils/fill_order_combinatorial_utils.ts
@@ -1,5 +1,4 @@
import { ERC20Wrapper, ERC721Wrapper } from '@0x/contracts-asset-proxy';
-import { artifacts as libsArtifacts, TestLibsContract } from '@0x/contracts-exchange-libs';
import {
AllowanceAmountScenario,
AssetDataScenario,
@@ -33,7 +32,7 @@ import { LogWithDecodedArgs, Provider, TxData } from 'ethereum-types';
import * as _ from 'lodash';
import 'make-promises-safe';
-import { artifacts, ExchangeContract, ExchangeFillEventArgs } from '../../src';
+import { artifacts, ExchangeContract, ExchangeFillEventArgs, TestLibsContract } from '../../src';
import { AssetWrapper } from './asset_wrapper';
import { ExchangeWrapper } from './exchange_wrapper';
@@ -129,11 +128,7 @@ export async function fillOrderCombinatorialUtilsFactoryAsync(
exchangeContract.address,
);
- const testLibsContract = await TestLibsContract.deployFrom0xArtifactAsync(
- libsArtifacts.TestLibs,
- provider,
- txDefaults,
- );
+ const testLibsContract = await TestLibsContract.deployFrom0xArtifactAsync(artifacts.TestLibs, provider, txDefaults);
const fillOrderCombinatorialUtils = new FillOrderCombinatorialUtils(
orderFactory,
diff --git a/contracts/exchange/test/wrapper.ts b/contracts/exchange/test/wrapper.ts
index 62a0d426f..5476ac99d 100644
--- a/contracts/exchange/test/wrapper.ts
+++ b/contracts/exchange/test/wrapper.ts
@@ -1,6 +1,4 @@
-import { ERC20ProxyContract, ERC20Wrapper, ERC721ProxyContract, ERC721Wrapper } from '@0x/contracts-asset-proxy';
-import { artifacts as erc20Artifacts, DummyERC20TokenContract, ReentrantERC20TokenContract } from '@0x/contracts-erc20';
-import { DummyERC721TokenContract } from '@0x/contracts-erc721';
+import { ERC20Wrapper, ERC721Wrapper } from '@0x/contracts-asset-proxy';
import {
chaiSetup,
constants,
@@ -22,7 +20,16 @@ import { Web3Wrapper } from '@0x/web3-wrapper';
import * as chai from 'chai';
import * as _ from 'lodash';
-import { artifacts, ExchangeContract, ExchangeWrapper } from '../src';
+import {
+ artifacts,
+ DummyERC20TokenContract,
+ DummyERC721TokenContract,
+ ERC20ProxyContract,
+ ERC721ProxyContract,
+ ExchangeContract,
+ ExchangeWrapper,
+ ReentrantERC20TokenContract,
+} from '../src';
chaiSetup.configure();
const expect = chai.expect;
@@ -107,7 +114,7 @@ describe('Exchange wrappers', () => {
);
reentrantErc20Token = await ReentrantERC20TokenContract.deployFrom0xArtifactAsync(
- erc20Artifacts.ReentrantERC20Token,
+ artifacts.ReentrantERC20Token,
provider,
txDefaults,
exchange.address,
diff --git a/contracts/exchange/tsconfig.json b/contracts/exchange/tsconfig.json
index b0fcd1771..35ca3d933 100644
--- a/contracts/exchange/tsconfig.json
+++ b/contracts/exchange/tsconfig.json
@@ -1,30 +1,34 @@
{
"extends": "../../tsconfig",
- "compilerOptions": {
- "outDir": "lib",
- "rootDir": ".",
- "resolveJsonModule": true
- },
+ "compilerOptions": { "outDir": "lib", "rootDir": ".", "resolveJsonModule": true },
"include": ["./src/**/*", "./test/**/*", "./generated-wrappers/**/*"],
"files": [
- "./generated-artifacts/IAssetProxyDispatcher.json",
- "./generated-artifacts/IExchange.json",
- "./generated-artifacts/IExchangeCore.json",
- "./generated-artifacts/IMatchOrders.json",
- "./generated-artifacts/ISignatureValidator.json",
- "./generated-artifacts/ITransactions.json",
- "./generated-artifacts/IValidator.json",
- "./generated-artifacts/IWallet.json",
- "./generated-artifacts/IWrapperFunctions.json",
- "./generated-artifacts/Exchange.json",
- "./generated-artifacts/TestAssetProxyDispatcher.json",
- "./generated-artifacts/TestExchangeInternals.json",
- "./generated-artifacts/TestSignatureValidator.json",
- "./generated-artifacts/TestStaticCallReceiver.json",
- "./generated-artifacts/ExchangeWrapper.json",
- "./generated-artifacts/Validator.json",
- "./generated-artifacts/Wallet.json",
- "./generated-artifacts/Whitelist.json"
+ "generated-artifacts/DummyERC20Token.json",
+ "generated-artifacts/DummyERC721Token.json",
+ "generated-artifacts/DummyNoReturnERC20Token.json",
+ "generated-artifacts/ERC20Proxy.json",
+ "generated-artifacts/ERC721Proxy.json",
+ "generated-artifacts/Exchange.json",
+ "generated-artifacts/ExchangeWrapper.json",
+ "generated-artifacts/IAssetProxyDispatcher.json",
+ "generated-artifacts/IExchange.json",
+ "generated-artifacts/IExchangeCore.json",
+ "generated-artifacts/IMatchOrders.json",
+ "generated-artifacts/ISignatureValidator.json",
+ "generated-artifacts/ITransactions.json",
+ "generated-artifacts/IValidator.json",
+ "generated-artifacts/IWallet.json",
+ "generated-artifacts/IWrapperFunctions.json",
+ "generated-artifacts/MultiAssetProxy.json",
+ "generated-artifacts/ReentrantERC20Token.json",
+ "generated-artifacts/TestAssetProxyDispatcher.json",
+ "generated-artifacts/TestExchangeInternals.json",
+ "generated-artifacts/TestLibs.json",
+ "generated-artifacts/TestSignatureValidator.json",
+ "generated-artifacts/TestStaticCallReceiver.json",
+ "generated-artifacts/Validator.json",
+ "generated-artifacts/Wallet.json",
+ "generated-artifacts/Whitelist.json"
],
"exclude": ["./deploy/solc/solc_bin"]
}