aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--packages/deployer/package.json2
-rw-r--r--packages/deployer/src/compiler.ts2
-rw-r--r--packages/deployer/src/utils/compiler.ts2
-rw-r--r--packages/deployer/test/compiler_utils_test.ts29
-rw-r--r--packages/deployer/test/fixtures/contracts/Exchange.sol2
-rw-r--r--packages/deployer/test/fixtures/contracts/TokenTransferProxy.sol2
-rw-r--r--packages/sol-cov/src/collect_contract_data.ts1
-rw-r--r--packages/sol-resolver/package.json (renamed from packages/resolver/package.json)2
-rw-r--r--packages/sol-resolver/src/index.ts (renamed from packages/resolver/src/index.ts)0
-rw-r--r--packages/sol-resolver/src/resolvers/enumerable_resolver.ts (renamed from packages/resolver/src/resolvers/enumerable_resolver.ts)0
-rw-r--r--packages/sol-resolver/src/resolvers/fallthrough_resolver.ts (renamed from packages/resolver/src/resolvers/fallthrough_resolver.ts)0
-rw-r--r--packages/sol-resolver/src/resolvers/fs_resolver.ts (renamed from packages/resolver/src/resolvers/fs_resolver.ts)0
-rw-r--r--packages/sol-resolver/src/resolvers/name_resolver.ts (renamed from packages/resolver/src/resolvers/name_resolver.ts)0
-rw-r--r--packages/sol-resolver/src/resolvers/npm_resolver.ts (renamed from packages/resolver/src/resolvers/npm_resolver.ts)0
-rw-r--r--packages/sol-resolver/src/resolvers/resolver.ts (renamed from packages/resolver/src/resolvers/resolver.ts)0
-rw-r--r--packages/sol-resolver/src/resolvers/url_resolver.ts (renamed from packages/resolver/src/resolvers/url_resolver.ts)0
-rw-r--r--packages/sol-resolver/src/types.ts (renamed from packages/resolver/src/types.ts)0
-rw-r--r--packages/sol-resolver/tsconfig.json (renamed from packages/resolver/tsconfig.json)0
-rw-r--r--packages/sol-resolver/tslint.json (renamed from packages/resolver/tslint.json)0
-rw-r--r--yarn.lock101
20 files changed, 35 insertions, 108 deletions
diff --git a/packages/deployer/package.json b/packages/deployer/package.json
index d9f2a4a4f..d529382ac 100644
--- a/packages/deployer/package.json
+++ b/packages/deployer/package.json
@@ -68,7 +68,7 @@
"zeppelin-solidity": "1.8.0"
},
"dependencies": {
- "@0xproject/resolver": "^0.0.1",
+ "@0xproject/sol-resolver": "^0.0.1",
"@0xproject/json-schemas": "^0.7.20",
"@0xproject/types": "^0.6.0",
"@0xproject/typescript-typings": "^0.1.0",
diff --git a/packages/deployer/src/compiler.ts b/packages/deployer/src/compiler.ts
index dfbe469a7..a3c8004ec 100644
--- a/packages/deployer/src/compiler.ts
+++ b/packages/deployer/src/compiler.ts
@@ -8,7 +8,7 @@ import {
NPMResolver,
Resolver,
URLResolver,
-} from '@0xproject/resolver';
+} from '@0xproject/sol-resolver';
import { ContractAbi } from '@0xproject/types';
import { logUtils, promisify } from '@0xproject/utils';
import chalk from 'chalk';
diff --git a/packages/deployer/src/utils/compiler.ts b/packages/deployer/src/utils/compiler.ts
index 79dce5d73..c571b2581 100644
--- a/packages/deployer/src/utils/compiler.ts
+++ b/packages/deployer/src/utils/compiler.ts
@@ -1,4 +1,4 @@
-import { ContractSource, ContractSources } from '@0xproject/resolver';
+import { ContractSource, ContractSources } from '@0xproject/sol-resolver';
import { logUtils } from '@0xproject/utils';
import * as _ from 'lodash';
import * as path from 'path';
diff --git a/packages/deployer/test/compiler_utils_test.ts b/packages/deployer/test/compiler_utils_test.ts
index 7e7ae1200..e2b95f289 100644
--- a/packages/deployer/test/compiler_utils_test.ts
+++ b/packages/deployer/test/compiler_utils_test.ts
@@ -47,24 +47,31 @@ describe('Compiler utils', () => {
});
describe('#parseDependencies', () => {
it('correctly parses Exchange dependencies', async () => {
- const exchangeSource = await fsWrapper.readFileAsync(`${__dirname}/fixtures/contracts/Exchange.sol`, {
+ const path = `${__dirname}/fixtures/contracts/Exchange.sol`;
+ const source = await fsWrapper.readFileAsync(path, {
encoding: 'utf8',
});
- expect(parseDependencies(exchangeSource)).to.be.deep.equal(['ERC20', 'TokenTransferProxy', 'SafeMath']);
+ expect(parseDependencies({ source, path })).to.be.deep.equal([
+ 'zeppelin-solidity/contracts/token/ERC20/ERC20.sol',
+ '/home/circleci/repo/packages/deployer/lib/test/fixtures/contracts/TokenTransferProxy.sol',
+ '/home/circleci/repo/packages/deployer/lib/test/fixtures/contracts/base/SafeMath.sol',
+ ]);
});
it('correctly parses TokenTransferProxy dependencies', async () => {
- const exchangeSource = await fsWrapper.readFileAsync(
- `${__dirname}/fixtures/contracts/TokenTransferProxy.sol`,
- {
- encoding: 'utf8',
- },
- );
- expect(parseDependencies(exchangeSource)).to.be.deep.equal(['Ownable', 'ERC20']);
+ const path = `${__dirname}/fixtures/contracts/TokenTransferProxy.sol`;
+ const source = await fsWrapper.readFileAsync(path, {
+ encoding: 'utf8',
+ });
+ expect(parseDependencies({ source, path })).to.be.deep.equal([
+ 'zeppelin-solidity/contracts/ownership/Ownable.sol',
+ 'zeppelin-solidity/contracts/token/ERC20/ERC20.sol',
+ ]);
});
// TODO: For now that doesn't work. This will work after we switch to a grammar-based parser
it.skip('correctly parses commented out dependencies', async () => {
- const contractWithCommentedOutDependencies = `// import "./TokenTransferProxy.sol";`;
- expect(parseDependencies(contractWithCommentedOutDependencies)).to.be.deep.equal([]);
+ const path = '';
+ const source = `// import "./TokenTransferProxy.sol";`;
+ expect(parseDependencies({ path, source })).to.be.deep.equal([]);
});
});
});
diff --git a/packages/deployer/test/fixtures/contracts/Exchange.sol b/packages/deployer/test/fixtures/contracts/Exchange.sol
index 1249d21ed..e3725335b 100644
--- a/packages/deployer/test/fixtures/contracts/Exchange.sol
+++ b/packages/deployer/test/fixtures/contracts/Exchange.sol
@@ -1,6 +1,6 @@
/*
- Copyright 2017 ZeroEx Intl.
+ Copyright 2018 ZeroEx Intl.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
diff --git a/packages/deployer/test/fixtures/contracts/TokenTransferProxy.sol b/packages/deployer/test/fixtures/contracts/TokenTransferProxy.sol
index 1ba8a96de..44570d459 100644
--- a/packages/deployer/test/fixtures/contracts/TokenTransferProxy.sol
+++ b/packages/deployer/test/fixtures/contracts/TokenTransferProxy.sol
@@ -1,6 +1,6 @@
/*
- Copyright 2017 ZeroEx Intl.
+ Copyright 2018 ZeroEx Intl.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
diff --git a/packages/sol-cov/src/collect_contract_data.ts b/packages/sol-cov/src/collect_contract_data.ts
index da56e8d0d..1d8bc7178 100644
--- a/packages/sol-cov/src/collect_contract_data.ts
+++ b/packages/sol-cov/src/collect_contract_data.ts
@@ -12,6 +12,7 @@ export const collectContractsData = (artifactsPath: string, sourcesPath: string,
const artifact = JSON.parse(fs.readFileSync(artifactFileName).toString());
const sources = artifact.networks[networkId].sources;
const contractName = artifact.contract_name;
+ // We don't compute coverage for dependencies
const sourceCodes = _.map(sources, (source: string) => fs.readFileSync(source).toString());
if (_.isUndefined(artifact.networks[networkId])) {
throw new Error(`No ${contractName} artifacts found for networkId ${networkId}`);
diff --git a/packages/resolver/package.json b/packages/sol-resolver/package.json
index 107405cf8..ae1a94f3e 100644
--- a/packages/resolver/package.json
+++ b/packages/sol-resolver/package.json
@@ -1,5 +1,5 @@
{
- "name": "@0xproject/resolver",
+ "name": "@0xproject/sol-resolver",
"version": "0.0.1",
"description": "Import resolver for smart contracts dependencies",
"main": "lib/index.js",
diff --git a/packages/resolver/src/index.ts b/packages/sol-resolver/src/index.ts
index cd6ec42ec..cd6ec42ec 100644
--- a/packages/resolver/src/index.ts
+++ b/packages/sol-resolver/src/index.ts
diff --git a/packages/resolver/src/resolvers/enumerable_resolver.ts b/packages/sol-resolver/src/resolvers/enumerable_resolver.ts
index 0efa43e7c..0efa43e7c 100644
--- a/packages/resolver/src/resolvers/enumerable_resolver.ts
+++ b/packages/sol-resolver/src/resolvers/enumerable_resolver.ts
diff --git a/packages/resolver/src/resolvers/fallthrough_resolver.ts b/packages/sol-resolver/src/resolvers/fallthrough_resolver.ts
index 8f6af9be0..8f6af9be0 100644
--- a/packages/resolver/src/resolvers/fallthrough_resolver.ts
+++ b/packages/sol-resolver/src/resolvers/fallthrough_resolver.ts
diff --git a/packages/resolver/src/resolvers/fs_resolver.ts b/packages/sol-resolver/src/resolvers/fs_resolver.ts
index 4f05fba88..4f05fba88 100644
--- a/packages/resolver/src/resolvers/fs_resolver.ts
+++ b/packages/sol-resolver/src/resolvers/fs_resolver.ts
diff --git a/packages/resolver/src/resolvers/name_resolver.ts b/packages/sol-resolver/src/resolvers/name_resolver.ts
index 6849b7610..6849b7610 100644
--- a/packages/resolver/src/resolvers/name_resolver.ts
+++ b/packages/sol-resolver/src/resolvers/name_resolver.ts
diff --git a/packages/resolver/src/resolvers/npm_resolver.ts b/packages/sol-resolver/src/resolvers/npm_resolver.ts
index 2c0a44aad..2c0a44aad 100644
--- a/packages/resolver/src/resolvers/npm_resolver.ts
+++ b/packages/sol-resolver/src/resolvers/npm_resolver.ts
diff --git a/packages/resolver/src/resolvers/resolver.ts b/packages/sol-resolver/src/resolvers/resolver.ts
index 7edc9a85d..7edc9a85d 100644
--- a/packages/resolver/src/resolvers/resolver.ts
+++ b/packages/sol-resolver/src/resolvers/resolver.ts
diff --git a/packages/resolver/src/resolvers/url_resolver.ts b/packages/sol-resolver/src/resolvers/url_resolver.ts
index 180b0c9f6..180b0c9f6 100644
--- a/packages/resolver/src/resolvers/url_resolver.ts
+++ b/packages/sol-resolver/src/resolvers/url_resolver.ts
diff --git a/packages/resolver/src/types.ts b/packages/sol-resolver/src/types.ts
index 41492622d..41492622d 100644
--- a/packages/resolver/src/types.ts
+++ b/packages/sol-resolver/src/types.ts
diff --git a/packages/resolver/tsconfig.json b/packages/sol-resolver/tsconfig.json
index f5f4b37c2..f5f4b37c2 100644
--- a/packages/resolver/tsconfig.json
+++ b/packages/sol-resolver/tsconfig.json
diff --git a/packages/resolver/tslint.json b/packages/sol-resolver/tslint.json
index ffaefe83a..ffaefe83a 100644
--- a/packages/resolver/tslint.json
+++ b/packages/sol-resolver/tslint.json
diff --git a/yarn.lock b/yarn.lock
index 586f50251..5bb47293f 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -25,41 +25,6 @@
web3-eth-abi "^1.0.0-beta.24"
yargs "^10.0.3"
-"@0xproject/dev-utils@^0.2.1":
- version "0.2.1"
- resolved "https://registry.yarnpkg.com/@0xproject/dev-utils/-/dev-utils-0.2.1.tgz#a54465376fd7c8cf58781b02b1790d74fb51e91b"
- dependencies:
- "@0xproject/subproviders" "^0.7.0"
- "@0xproject/types" "^0.3.1"
- "@0xproject/utils" "^0.4.1"
- ethereumjs-util "^5.1.2"
- lodash "^4.17.4"
- request-promise-native "^1.0.5"
- web3 "^0.20.0"
- web3-provider-engine "^13.0.1"
-
-"@0xproject/subproviders@^0.7.0":
- version "0.7.0"
- resolved "https://registry.yarnpkg.com/@0xproject/subproviders/-/subproviders-0.7.0.tgz#ce3379a85649773e5c08f5fc3239e8ed07f13361"
- dependencies:
- "@0xproject/assert" "^0.2.0"
- "@0xproject/types" "^0.3.1"
- "@0xproject/utils" "^0.4.1"
- "@ledgerhq/hw-app-eth" "^4.3.0"
- "@ledgerhq/hw-transport-u2f" "^4.3.0"
- bn.js "^4.11.8"
- es6-promisify "^5.0.0"
- ethereumjs-tx "^1.3.3"
- ethereumjs-util "^5.1.1"
- hdkey "^0.7.1"
- lodash "^4.17.4"
- semaphore-async-await "^1.5.1"
- web3 "^0.20.0"
- web3-provider-engine "^13.0.1"
- web3-typescript-typings "^0.10.0"
- optionalDependencies:
- "@ledgerhq/hw-transport-node-hid" "^4.3.0"
-
"@0xproject/tslint-config@0.4.13":
version "0.4.13"
resolved "https://registry.yarnpkg.com/@0xproject/tslint-config/-/tslint-config-0.4.13.tgz#98c71c5ae5e80315a23eda0134cc9f6f4438cac2"
@@ -69,33 +34,12 @@
tslint-eslint-rules "^4.1.1"
tslint-react "^3.2.0"
-"@0xproject/types@^0.3.1":
- version "0.3.1"
- resolved "https://registry.yarnpkg.com/@0xproject/types/-/types-0.3.1.tgz#9a75be6d3a2d41b7ecbd9105c3fdc09f3e3ec297"
- dependencies:
- bignumber.js "~4.1.0"
- web3 "^0.20.0"
- web3-typescript-typings "^0.10.0"
-
-"@0xproject/types@^0.4.2":
- version "0.4.2"
- resolved "https://registry.yarnpkg.com/@0xproject/types/-/types-0.4.2.tgz#83d6ebef60f41e6209acb2656b1d68ff79367ca5"
- dependencies:
- bignumber.js "~4.1.0"
-
"@0xproject/types@^0.5.0":
version "0.5.0"
resolved "https://registry.yarnpkg.com/@0xproject/types/-/types-0.5.0.tgz#ba3cfbc11a8c6344b57c9680aa7df2ea84b9bf05"
dependencies:
bignumber.js "~4.1.0"
-"@0xproject/typescript-typings@^0.0.2":
- version "0.0.2"
- resolved "https://registry.yarnpkg.com/@0xproject/typescript-typings/-/typescript-typings-0.0.2.tgz#b549ea3c81ce2d81b99f05583bdf7c411a3ca90c"
- dependencies:
- "@0xproject/types" "^0.4.2"
- bignumber.js "~4.1.0"
-
"@0xproject/typescript-typings@^0.0.3":
version "0.0.3"
resolved "https://registry.yarnpkg.com/@0xproject/typescript-typings/-/typescript-typings-0.0.3.tgz#3272080bde00ade0a970b0d236686b483b08a1d0"
@@ -103,19 +47,6 @@
"@0xproject/types" "^0.5.0"
bignumber.js "~4.1.0"
-"@0xproject/utils@^0.4.1":
- version "0.4.4"
- resolved "https://registry.yarnpkg.com/@0xproject/utils/-/utils-0.4.4.tgz#bce4f7a5a46570a69911f4a4ade5d49016330087"
- dependencies:
- "@0xproject/types" "^0.4.2"
- "@0xproject/typescript-typings" "^0.0.2"
- "@types/node" "^8.0.53"
- bignumber.js "~4.1.0"
- ethers-contracts "^2.2.1"
- js-sha3 "^0.7.0"
- lodash "^4.17.4"
- web3 "^0.20.0"
-
"@0xproject/web3-wrapper@^0.5.0":
version "0.5.0"
resolved "https://registry.yarnpkg.com/@0xproject/web3-wrapper/-/web3-wrapper-0.5.0.tgz#99a1acea60a5c3163ac0be28f4c0577c3d43dec4"
@@ -167,6 +98,12 @@
version "1.0.2"
resolved "https://registry.yarnpkg.com/@types/bintrees/-/bintrees-1.0.2.tgz#0dfdce4eeebdf90427bd35b0e79dc248b3d157a6"
+"@types/bip39@^2.4.0":
+ version "2.4.0"
+ resolved "https://registry.yarnpkg.com/@types/bip39/-/bip39-2.4.0.tgz#eee31a14abc8ebbb41a1ff14575c447b18346cbc"
+ dependencies:
+ "@types/node" "*"
+
"@types/body-parser@*", "@types/body-parser@^1.16.1":
version "1.16.8"
resolved "https://registry.yarnpkg.com/@types/body-parser/-/body-parser-1.16.8.tgz#687ec34140624a3bec2b1a8ea9268478ae8f3be3"
@@ -1514,7 +1451,7 @@ bintrees@^1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/bintrees/-/bintrees-1.0.2.tgz#49f896d6e858a4a499df85c38fb399b9aff840f8"
-bip39@^2.2.0:
+bip39@^2.2.0, bip39@^2.5.0:
version "2.5.0"
resolved "https://registry.yarnpkg.com/bip39/-/bip39-2.5.0.tgz#51cbd5179460504a63ea3c000db3f787ca051235"
dependencies:
@@ -3700,7 +3637,7 @@ ethereumjs-util@^4.0.1, ethereumjs-util@^4.3.0, ethereumjs-util@^4.4.0:
rlp "^2.0.0"
secp256k1 "^3.0.1"
-ethereumjs-util@^5.0.0, ethereumjs-util@^5.0.1, ethereumjs-util@^5.1.1, ethereumjs-util@^5.1.2, ethereumjs-util@^5.1.3, ethereumjs-util@^5.1.5:
+ethereumjs-util@^5.0.0, ethereumjs-util@^5.0.1, ethereumjs-util@^5.1.1, ethereumjs-util@^5.1.3, ethereumjs-util@^5.1.5:
version "5.1.5"
resolved "https://registry.yarnpkg.com/ethereumjs-util/-/ethereumjs-util-5.1.5.tgz#2f02575852627d45622426f25ee4a0b5f377f27a"
dependencies:
@@ -9043,20 +8980,6 @@ request-ip@~1.2.3:
version "1.2.3"
resolved "https://registry.yarnpkg.com/request-ip/-/request-ip-1.2.3.tgz#66988f0e22406ec4af630d19b573fe4b447c3b49"
-request-promise-core@1.1.1:
- version "1.1.1"
- resolved "https://registry.yarnpkg.com/request-promise-core/-/request-promise-core-1.1.1.tgz#3eee00b2c5aa83239cfb04c5700da36f81cd08b6"
- dependencies:
- lodash "^4.13.1"
-
-request-promise-native@^1.0.5:
- version "1.0.5"
- resolved "https://registry.yarnpkg.com/request-promise-native/-/request-promise-native-1.0.5.tgz#5281770f68e0c9719e5163fd3fab482215f4fda5"
- dependencies:
- request-promise-core "1.1.1"
- stealthy-require "^1.1.0"
- tough-cookie ">=2.3.3"
-
request@2.81.0:
version "2.81.0"
resolved "https://registry.yarnpkg.com/request/-/request-2.81.0.tgz#c6928946a0e06c5f8d6f8a9333469ffda46298a0"
@@ -9942,10 +9865,6 @@ static-extend@^0.1.1:
version "1.4.0"
resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.4.0.tgz#bb73d446da2796106efcc1b601a253d6c46bd087"
-stealthy-require@^1.1.0:
- version "1.1.1"
- resolved "https://registry.yarnpkg.com/stealthy-require/-/stealthy-require-1.1.1.tgz#35b09875b4ff49f26a777e509b3090a3226bf24b"
-
stream-browserify@^2.0.1:
version "2.0.1"
resolved "https://registry.yarnpkg.com/stream-browserify/-/stream-browserify-2.0.1.tgz#66266ee5f9bdb9940a4e4514cafb43bb71e5c9db"
@@ -10518,7 +10437,7 @@ touch@^3.1.0:
dependencies:
nopt "~1.0.10"
-tough-cookie@>=2.3.3, tough-cookie@~2.3.0, tough-cookie@~2.3.3:
+tough-cookie@~2.3.0, tough-cookie@~2.3.3:
version "2.3.4"
resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.3.4.tgz#ec60cee38ac675063ffc97a5c18970578ee83655"
dependencies:
@@ -11473,7 +11392,7 @@ web3-shh@1.0.0-beta.33:
web3-core-subscriptions "1.0.0-beta.33"
web3-net "1.0.0-beta.33"
-web3-typescript-typings@^0.10.0, web3-typescript-typings@^0.10.2:
+web3-typescript-typings@^0.10.2:
version "0.10.2"
resolved "https://registry.yarnpkg.com/web3-typescript-typings/-/web3-typescript-typings-0.10.2.tgz#a9903815d2a8a0dbd73fd5db374070de0bd30497"
dependencies: