aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteve Klebanoff <steve.klebanoff@gmail.com>2019-01-18 05:29:46 +0800
committerSteve Klebanoff <steve.klebanoff@gmail.com>2019-01-18 05:29:46 +0800
commit02b7a4390908e74805cc5ae9f97f4ddceaba8fde (patch)
tree9af5c74a19be6b6fba49022388bb529e7e32889c
parent92f5ad4f1518b2aaa3f1754b44a3059ac1610e0c (diff)
parente1e531a2a48cdacd3d8e8b6427e3f0410699ea3d (diff)
downloaddexon-sol-tools-02b7a4390908e74805cc5ae9f97f4ddceaba8fde.tar
dexon-sol-tools-02b7a4390908e74805cc5ae9f97f4ddceaba8fde.tar.gz
dexon-sol-tools-02b7a4390908e74805cc5ae9f97f4ddceaba8fde.tar.bz2
dexon-sol-tools-02b7a4390908e74805cc5ae9f97f4ddceaba8fde.tar.lz
dexon-sol-tools-02b7a4390908e74805cc5ae9f97f4ddceaba8fde.tar.xz
dexon-sol-tools-02b7a4390908e74805cc5ae9f97f4ddceaba8fde.tar.zst
dexon-sol-tools-02b7a4390908e74805cc5ae9f97f4ddceaba8fde.zip
Merge branch 'development' into feature/instant/asset-buyer-check-liquidity
-rw-r--r--contracts/examples/CHANGELOG.json9
-rw-r--r--contracts/examples/CHANGELOG.md4
-rw-r--r--contracts/examples/package.json14
-rw-r--r--contracts/extensions/CHANGELOG.json9
-rw-r--r--contracts/extensions/CHANGELOG.md4
-rw-r--r--contracts/extensions/package.json16
-rw-r--r--contracts/interfaces/CHANGELOG.json9
-rw-r--r--contracts/interfaces/CHANGELOG.md4
-rw-r--r--contracts/interfaces/package.json6
-rw-r--r--contracts/libs/CHANGELOG.json9
-rw-r--r--contracts/libs/CHANGELOG.md4
-rw-r--r--contracts/libs/package.json8
-rw-r--r--contracts/multisig/CHANGELOG.json9
-rw-r--r--contracts/multisig/CHANGELOG.md4
-rw-r--r--contracts/multisig/package.json4
-rw-r--r--contracts/protocol/CHANGELOG.json9
-rw-r--r--contracts/protocol/CHANGELOG.md4
-rw-r--r--contracts/protocol/package.json16
-rw-r--r--contracts/test-utils/CHANGELOG.json9
-rw-r--r--contracts/test-utils/CHANGELOG.md4
-rw-r--r--contracts/test-utils/package.json8
-rw-r--r--contracts/tokens/CHANGELOG.json9
-rw-r--r--contracts/tokens/CHANGELOG.md4
-rw-r--r--contracts/tokens/package.json12
-rw-r--r--contracts/utils/CHANGELOG.json9
-rw-r--r--contracts/utils/CHANGELOG.md4
-rw-r--r--contracts/utils/package.json6
-rw-r--r--packages/0x.js/CHANGELOG.json9
-rw-r--r--packages/0x.js/CHANGELOG.md4
-rw-r--r--packages/0x.js/package.json6
-rw-r--r--packages/asset-buyer/CHANGELOG.json9
-rw-r--r--packages/asset-buyer/CHANGELOG.md4
-rw-r--r--packages/asset-buyer/package.json4
-rw-r--r--packages/contract-wrappers/CHANGELOG.json9
-rw-r--r--packages/contract-wrappers/CHANGELOG.md4
-rw-r--r--packages/contract-wrappers/package.json4
-rw-r--r--packages/dev-tools-pages/.gitignore4
-rw-r--r--packages/dev-tools-pages/assets/crawl.html33
-rw-r--r--packages/dev-tools-pages/assets/fonts/.gitkeep0
-rw-r--r--packages/dev-tools-pages/assets/fonts/MaisonNeue-Bold-subset.woff2bin0 -> 11248 bytes
-rw-r--r--packages/dev-tools-pages/assets/fonts/MaisonNeue-Book-subset.woff2bin0 -> 11232 bytes
-rw-r--r--packages/dev-tools-pages/package.json24
-rw-r--r--packages/dev-tools-pages/pages.js24
-rw-r--r--packages/dev-tools-pages/ts/components/call_to_action.tsx40
-rw-r--r--packages/dev-tools-pages/ts/components/code.tsx3
-rw-r--r--packages/dev-tools-pages/ts/components/compiler.tsx12
-rw-r--r--packages/dev-tools-pages/ts/components/footer.tsx13
-rw-r--r--packages/dev-tools-pages/ts/components/header.tsx2
-rw-r--r--packages/dev-tools-pages/ts/components/hero.tsx6
-rw-r--r--packages/dev-tools-pages/ts/components/trace.tsx13
-rw-r--r--packages/dev-tools-pages/ts/context/compiler.tsx1
-rw-r--r--packages/dev-tools-pages/ts/context/coverage.tsx (renamed from packages/dev-tools-pages/ts/context/cov.tsx)5
-rw-r--r--packages/dev-tools-pages/ts/context/index.tsx1
-rw-r--r--packages/dev-tools-pages/ts/context/profiler.tsx1
-rw-r--r--packages/dev-tools-pages/ts/context/trace.tsx1
-rw-r--r--packages/dev-tools-pages/ts/pages/compiler.tsx30
-rw-r--r--packages/dev-tools-pages/ts/pages/coverage.tsx (renamed from packages/dev-tools-pages/ts/pages/cov.tsx)76
-rw-r--r--packages/dev-tools-pages/ts/pages/profiler.tsx62
-rw-r--r--packages/dev-tools-pages/ts/pages/trace.tsx59
-rw-r--r--packages/dev-tools-pages/webpack.config.js3
-rw-r--r--packages/devnet/genesis.json2
-rw-r--r--packages/instant/package.json4
-rw-r--r--packages/metacoin/package.json8
-rw-r--r--packages/monorepo-scripts/package.json2
-rw-r--r--packages/monorepo-scripts/src/utils/utils.ts2
-rw-r--r--packages/order-watcher/CHANGELOG.json9
-rw-r--r--packages/order-watcher/CHANGELOG.md4
-rw-r--r--packages/order-watcher/package.json4
-rw-r--r--packages/react-shared/package.json2
-rw-r--r--packages/sol-coverage/CHANGELOG.json9
-rw-r--r--packages/sol-coverage/CHANGELOG.md4
-rw-r--r--packages/sol-coverage/package.json4
-rw-r--r--packages/sol-profiler/CHANGELOG.json9
-rw-r--r--packages/sol-profiler/CHANGELOG.md4
-rw-r--r--packages/sol-profiler/package.json4
-rw-r--r--packages/sol-trace/CHANGELOG.json9
-rw-r--r--packages/sol-trace/CHANGELOG.md4
-rw-r--r--packages/sol-trace/package.json4
-rw-r--r--packages/sol-trace/src/revert_trace_subprovider.ts17
-rw-r--r--packages/sol-tracing-utils/CHANGELOG.json18
-rw-r--r--packages/sol-tracing-utils/CHANGELOG.md6
-rw-r--r--packages/sol-tracing-utils/package.json2
-rw-r--r--packages/sol-tracing-utils/src/get_source_range_snippet.ts175
-rw-r--r--packages/sol-tracing-utils/src/trace_collection_subprovider.ts2
-rw-r--r--packages/sol-tracing-utils/src/trace_info_subprovider.ts2
-rw-r--r--packages/sol-tracing-utils/src/types.ts4
-rw-r--r--packages/sol-tracing-utils/src/utils.ts16
-rw-r--r--packages/testnet-faucets/package.json4
-rw-r--r--packages/website/md/docs/sol_coverage/installation.md2
-rw-r--r--packages/website/md/docs/sol_coverage/introduction.md2
-rw-r--r--packages/website/md/docs/sol_coverage/usage.md34
-rw-r--r--packages/website/md/docs/sol_profiler/installation.md2
-rw-r--r--packages/website/md/docs/sol_profiler/usage.md38
-rw-r--r--packages/website/md/docs/sol_trace/installation.md6
-rw-r--r--packages/website/md/docs/sol_trace/introduction.md2
-rw-r--r--packages/website/md/docs/sol_trace/usage.md44
-rw-r--r--packages/website/package.json6
-rw-r--r--packages/website/public/images/team/oshirob.pngbin0 -> 522249 bytes
-rw-r--r--packages/website/ts/pages/about/team.tsx9
-rw-r--r--yarn.lock4
100 files changed, 697 insertions, 459 deletions
diff --git a/contracts/examples/CHANGELOG.json b/contracts/examples/CHANGELOG.json
index ee239b318..6adebc471 100644
--- a/contracts/examples/CHANGELOG.json
+++ b/contracts/examples/CHANGELOG.json
@@ -1,5 +1,14 @@
[
{
+ "timestamp": 1547747677,
+ "version": "1.0.6",
+ "changes": [
+ {
+ "note": "Dependencies updated"
+ }
+ ]
+ },
+ {
"timestamp": 1547561734,
"version": "1.0.5",
"changes": [
diff --git a/contracts/examples/CHANGELOG.md b/contracts/examples/CHANGELOG.md
index 6d53a0b9c..59d0804da 100644
--- a/contracts/examples/CHANGELOG.md
+++ b/contracts/examples/CHANGELOG.md
@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
CHANGELOG
+## v1.0.6 - _January 17, 2019_
+
+ * Dependencies updated
+
## v1.0.5 - _January 15, 2019_
* Dependencies updated
diff --git a/contracts/examples/package.json b/contracts/examples/package.json
index 286d0f508..e95017eb1 100644
--- a/contracts/examples/package.json
+++ b/contracts/examples/package.json
@@ -1,6 +1,6 @@
{
"name": "@0x/contracts-examples",
- "version": "1.0.5",
+ "version": "1.0.6",
"engines": {
"node": ">=6.12"
},
@@ -34,7 +34,7 @@
"homepage": "https://github.com/0xProject/0x-monorepo/contracts/examples/README.md",
"devDependencies": {
"@0x/abi-gen": "^1.0.22",
- "@0x/contracts-test-utils": "^2.0.0",
+ "@0x/contracts-test-utils": "^2.0.1",
"@0x/dev-utils": "^1.0.24",
"@0x/sol-compiler": "^2.0.2",
"@0x/subproviders": "^2.1.11",
@@ -59,11 +59,11 @@
},
"dependencies": {
"@0x/base-contract": "^3.0.13",
- "@0x/contracts-interfaces": "^1.0.5",
- "@0x/contracts-libs": "^1.0.5",
- "@0x/contracts-multisig": "^1.0.5",
- "@0x/contracts-tokens": "^1.0.5",
- "@0x/contracts-utils": "^1.0.5",
+ "@0x/contracts-interfaces": "^1.0.6",
+ "@0x/contracts-libs": "^1.0.6",
+ "@0x/contracts-multisig": "^1.0.6",
+ "@0x/contracts-tokens": "^1.0.6",
+ "@0x/contracts-utils": "^1.0.6",
"@0x/order-utils": "^3.1.2",
"@0x/types": "^1.5.2",
"@0x/typescript-typings": "^3.0.8",
diff --git a/contracts/extensions/CHANGELOG.json b/contracts/extensions/CHANGELOG.json
index 4f087d0b5..0accc3475 100644
--- a/contracts/extensions/CHANGELOG.json
+++ b/contracts/extensions/CHANGELOG.json
@@ -1,5 +1,14 @@
[
{
+ "timestamp": 1547747677,
+ "version": "1.2.3",
+ "changes": [
+ {
+ "note": "Dependencies updated"
+ }
+ ]
+ },
+ {
"timestamp": 1547561734,
"version": "1.2.2",
"changes": [
diff --git a/contracts/extensions/CHANGELOG.md b/contracts/extensions/CHANGELOG.md
index c6d447129..94ffdfb67 100644
--- a/contracts/extensions/CHANGELOG.md
+++ b/contracts/extensions/CHANGELOG.md
@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
CHANGELOG
+## v1.2.3 - _January 17, 2019_
+
+ * Dependencies updated
+
## v1.2.2 - _January 15, 2019_
* Dependencies updated
diff --git a/contracts/extensions/package.json b/contracts/extensions/package.json
index a7a8b1b93..a67b7645b 100644
--- a/contracts/extensions/package.json
+++ b/contracts/extensions/package.json
@@ -1,6 +1,6 @@
{
"name": "@0x/contracts-extensions",
- "version": "1.2.2",
+ "version": "1.2.3",
"engines": {
"node": ">=6.12"
},
@@ -45,8 +45,8 @@
"homepage": "https://github.com/0xProject/0x-monorepo/contracts/extensions/README.md",
"devDependencies": {
"@0x/abi-gen": "^1.0.22",
- "@0x/contract-wrappers": "^5.0.0",
- "@0x/contracts-test-utils": "^2.0.0",
+ "@0x/contract-wrappers": "^5.0.1",
+ "@0x/contracts-test-utils": "^2.0.1",
"@0x/dev-utils": "^1.0.24",
"@0x/sol-compiler": "^2.0.2",
"@0x/subproviders": "^2.1.11",
@@ -71,11 +71,11 @@
},
"dependencies": {
"@0x/base-contract": "^3.0.13",
- "@0x/contracts-interfaces": "^1.0.5",
- "@0x/contracts-libs": "^1.0.5",
- "@0x/contracts-protocol": "^2.2.2",
- "@0x/contracts-tokens": "^1.0.5",
- "@0x/contracts-utils": "^1.0.5",
+ "@0x/contracts-interfaces": "^1.0.6",
+ "@0x/contracts-libs": "^1.0.6",
+ "@0x/contracts-protocol": "^2.2.3",
+ "@0x/contracts-tokens": "^1.0.6",
+ "@0x/contracts-utils": "^1.0.6",
"@0x/order-utils": "^3.1.2",
"@0x/types": "^1.5.2",
"@0x/typescript-typings": "^3.0.8",
diff --git a/contracts/interfaces/CHANGELOG.json b/contracts/interfaces/CHANGELOG.json
index ee239b318..6adebc471 100644
--- a/contracts/interfaces/CHANGELOG.json
+++ b/contracts/interfaces/CHANGELOG.json
@@ -1,5 +1,14 @@
[
{
+ "timestamp": 1547747677,
+ "version": "1.0.6",
+ "changes": [
+ {
+ "note": "Dependencies updated"
+ }
+ ]
+ },
+ {
"timestamp": 1547561734,
"version": "1.0.5",
"changes": [
diff --git a/contracts/interfaces/CHANGELOG.md b/contracts/interfaces/CHANGELOG.md
index 6d53a0b9c..59d0804da 100644
--- a/contracts/interfaces/CHANGELOG.md
+++ b/contracts/interfaces/CHANGELOG.md
@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
CHANGELOG
+## v1.0.6 - _January 17, 2019_
+
+ * Dependencies updated
+
## v1.0.5 - _January 15, 2019_
* Dependencies updated
diff --git a/contracts/interfaces/package.json b/contracts/interfaces/package.json
index 3550487da..c67c25df3 100644
--- a/contracts/interfaces/package.json
+++ b/contracts/interfaces/package.json
@@ -1,6 +1,6 @@
{
"name": "@0x/contracts-interfaces",
- "version": "1.0.5",
+ "version": "1.0.6",
"engines": {
"node": ">=6.12"
},
@@ -42,8 +42,8 @@
},
"dependencies": {
"@0x/base-contract": "^3.0.13",
- "@0x/contracts-libs": "^1.0.5",
- "@0x/contracts-utils": "^1.0.5",
+ "@0x/contracts-libs": "^1.0.6",
+ "@0x/contracts-utils": "^1.0.6",
"@0x/types": "^1.5.2",
"@0x/typescript-typings": "^3.0.8",
"@0x/utils": "^3.0.1",
diff --git a/contracts/libs/CHANGELOG.json b/contracts/libs/CHANGELOG.json
index ee239b318..6adebc471 100644
--- a/contracts/libs/CHANGELOG.json
+++ b/contracts/libs/CHANGELOG.json
@@ -1,5 +1,14 @@
[
{
+ "timestamp": 1547747677,
+ "version": "1.0.6",
+ "changes": [
+ {
+ "note": "Dependencies updated"
+ }
+ ]
+ },
+ {
"timestamp": 1547561734,
"version": "1.0.5",
"changes": [
diff --git a/contracts/libs/CHANGELOG.md b/contracts/libs/CHANGELOG.md
index 6d53a0b9c..59d0804da 100644
--- a/contracts/libs/CHANGELOG.md
+++ b/contracts/libs/CHANGELOG.md
@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
CHANGELOG
+## v1.0.6 - _January 17, 2019_
+
+ * Dependencies updated
+
## v1.0.5 - _January 15, 2019_
* Dependencies updated
diff --git a/contracts/libs/package.json b/contracts/libs/package.json
index abbdfdb97..2429c8aed 100644
--- a/contracts/libs/package.json
+++ b/contracts/libs/package.json
@@ -1,6 +1,6 @@
{
"name": "@0x/contracts-libs",
- "version": "1.0.5",
+ "version": "1.0.6",
"engines": {
"node": ">=6.12"
},
@@ -45,7 +45,7 @@
"homepage": "https://github.com/0xProject/0x-monorepo/contracts/libs/README.md",
"devDependencies": {
"@0x/abi-gen": "^1.0.22",
- "@0x/contracts-test-utils": "^2.0.0",
+ "@0x/contracts-test-utils": "^2.0.1",
"@0x/dev-utils": "^1.0.24",
"@0x/sol-compiler": "^2.0.2",
"@0x/subproviders": "^2.1.11",
@@ -70,8 +70,8 @@
},
"dependencies": {
"@0x/base-contract": "^3.0.13",
- "@0x/contracts-multisig": "^1.0.5",
- "@0x/contracts-utils": "^1.0.5",
+ "@0x/contracts-multisig": "^1.0.6",
+ "@0x/contracts-utils": "^1.0.6",
"@0x/order-utils": "^3.1.2",
"@0x/types": "^1.5.2",
"@0x/typescript-typings": "^3.0.8",
diff --git a/contracts/multisig/CHANGELOG.json b/contracts/multisig/CHANGELOG.json
index ee239b318..6adebc471 100644
--- a/contracts/multisig/CHANGELOG.json
+++ b/contracts/multisig/CHANGELOG.json
@@ -1,5 +1,14 @@
[
{
+ "timestamp": 1547747677,
+ "version": "1.0.6",
+ "changes": [
+ {
+ "note": "Dependencies updated"
+ }
+ ]
+ },
+ {
"timestamp": 1547561734,
"version": "1.0.5",
"changes": [
diff --git a/contracts/multisig/CHANGELOG.md b/contracts/multisig/CHANGELOG.md
index 6d53a0b9c..59d0804da 100644
--- a/contracts/multisig/CHANGELOG.md
+++ b/contracts/multisig/CHANGELOG.md
@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
CHANGELOG
+## v1.0.6 - _January 17, 2019_
+
+ * Dependencies updated
+
## v1.0.5 - _January 15, 2019_
* Dependencies updated
diff --git a/contracts/multisig/package.json b/contracts/multisig/package.json
index f819c59f8..683bb85d4 100644
--- a/contracts/multisig/package.json
+++ b/contracts/multisig/package.json
@@ -1,6 +1,6 @@
{
"name": "@0x/contracts-multisig",
- "version": "1.0.5",
+ "version": "1.0.6",
"engines": {
"node": ">=6.12"
},
@@ -45,7 +45,7 @@
"homepage": "https://github.com/0xProject/0x-monorepo/contracts/multisig/README.md",
"devDependencies": {
"@0x/abi-gen": "^1.0.22",
- "@0x/contracts-test-utils": "^2.0.0",
+ "@0x/contracts-test-utils": "^2.0.1",
"@0x/dev-utils": "^1.0.24",
"@0x/sol-compiler": "^2.0.2",
"@0x/subproviders": "^2.1.11",
diff --git a/contracts/protocol/CHANGELOG.json b/contracts/protocol/CHANGELOG.json
index 96e2f8b70..f7401039a 100644
--- a/contracts/protocol/CHANGELOG.json
+++ b/contracts/protocol/CHANGELOG.json
@@ -1,5 +1,14 @@
[
{
+ "timestamp": 1547747677,
+ "version": "2.2.3",
+ "changes": [
+ {
+ "note": "Dependencies updated"
+ }
+ ]
+ },
+ {
"timestamp": 1547561734,
"version": "2.2.2",
"changes": [
diff --git a/contracts/protocol/CHANGELOG.md b/contracts/protocol/CHANGELOG.md
index 05d2ae6e2..779eb68a7 100644
--- a/contracts/protocol/CHANGELOG.md
+++ b/contracts/protocol/CHANGELOG.md
@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
CHANGELOG
+## v2.2.3 - _January 17, 2019_
+
+ * Dependencies updated
+
## v2.2.2 - _January 15, 2019_
* Dependencies updated
diff --git a/contracts/protocol/package.json b/contracts/protocol/package.json
index 420ca4e3d..87ee10e92 100644
--- a/contracts/protocol/package.json
+++ b/contracts/protocol/package.json
@@ -1,6 +1,6 @@
{
"name": "@0x/contracts-protocol",
- "version": "2.2.2",
+ "version": "2.2.3",
"engines": {
"node": ">=6.12"
},
@@ -69,13 +69,13 @@
},
"dependencies": {
"@0x/base-contract": "^3.0.13",
- "@0x/contracts-examples": "^1.0.5",
- "@0x/contracts-interfaces": "^1.0.5",
- "@0x/contracts-libs": "^1.0.5",
- "@0x/contracts-multisig": "^1.0.5",
- "@0x/contracts-test-utils": "^2.0.0",
- "@0x/contracts-tokens": "^1.0.5",
- "@0x/contracts-utils": "^1.0.5",
+ "@0x/contracts-examples": "^1.0.6",
+ "@0x/contracts-interfaces": "^1.0.6",
+ "@0x/contracts-libs": "^1.0.6",
+ "@0x/contracts-multisig": "^1.0.6",
+ "@0x/contracts-test-utils": "^2.0.1",
+ "@0x/contracts-tokens": "^1.0.6",
+ "@0x/contracts-utils": "^1.0.6",
"@0x/order-utils": "^3.1.2",
"@0x/types": "^1.5.2",
"@0x/typescript-typings": "^3.0.8",
diff --git a/contracts/test-utils/CHANGELOG.json b/contracts/test-utils/CHANGELOG.json
index 53fc1fc3a..91485313a 100644
--- a/contracts/test-utils/CHANGELOG.json
+++ b/contracts/test-utils/CHANGELOG.json
@@ -1,5 +1,14 @@
[
{
+ "timestamp": 1547747677,
+ "version": "2.0.1",
+ "changes": [
+ {
+ "note": "Dependencies updated"
+ }
+ ]
+ },
+ {
"version": "2.0.0",
"changes": [
{
diff --git a/contracts/test-utils/CHANGELOG.md b/contracts/test-utils/CHANGELOG.md
index 63baf7faf..2ed0524a6 100644
--- a/contracts/test-utils/CHANGELOG.md
+++ b/contracts/test-utils/CHANGELOG.md
@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
CHANGELOG
+## v2.0.1 - _January 17, 2019_
+
+ * Dependencies updated
+
## v2.0.0 - _January 15, 2019_
* Renamed OrderStatus enum members to PascalCase to conform with tslint enum-naming rule (#1474)
diff --git a/contracts/test-utils/package.json b/contracts/test-utils/package.json
index 92fd6a7ca..b7cfcb5b6 100644
--- a/contracts/test-utils/package.json
+++ b/contracts/test-utils/package.json
@@ -1,6 +1,6 @@
{
"name": "@0x/contracts-test-utils",
- "version": "2.0.0",
+ "version": "2.0.1",
"engines": {
"node": ">=6.12"
},
@@ -44,9 +44,9 @@
"@0x/dev-utils": "^1.0.24",
"@0x/order-utils": "^3.1.2",
"@0x/sol-compiler": "^2.0.2",
- "@0x/sol-coverage": "^1.0.2",
- "@0x/sol-profiler": "^1.0.2",
- "@0x/sol-trace": "^1.0.2",
+ "@0x/sol-coverage": "^1.0.3",
+ "@0x/sol-profiler": "^1.0.3",
+ "@0x/sol-trace": "^1.0.3",
"@0x/subproviders": "^2.1.11",
"@0x/tslint-config": "^2.0.2",
"@0x/types": "^1.5.2",
diff --git a/contracts/tokens/CHANGELOG.json b/contracts/tokens/CHANGELOG.json
index ee239b318..6adebc471 100644
--- a/contracts/tokens/CHANGELOG.json
+++ b/contracts/tokens/CHANGELOG.json
@@ -1,5 +1,14 @@
[
{
+ "timestamp": 1547747677,
+ "version": "1.0.6",
+ "changes": [
+ {
+ "note": "Dependencies updated"
+ }
+ ]
+ },
+ {
"timestamp": 1547561734,
"version": "1.0.5",
"changes": [
diff --git a/contracts/tokens/CHANGELOG.md b/contracts/tokens/CHANGELOG.md
index 6d53a0b9c..59d0804da 100644
--- a/contracts/tokens/CHANGELOG.md
+++ b/contracts/tokens/CHANGELOG.md
@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
CHANGELOG
+## v1.0.6 - _January 17, 2019_
+
+ * Dependencies updated
+
## v1.0.5 - _January 15, 2019_
* Dependencies updated
diff --git a/contracts/tokens/package.json b/contracts/tokens/package.json
index c896d122d..ce680ab09 100644
--- a/contracts/tokens/package.json
+++ b/contracts/tokens/package.json
@@ -1,6 +1,6 @@
{
"name": "@0x/contracts-tokens",
- "version": "1.0.5",
+ "version": "1.0.6",
"engines": {
"node": ">=6.12"
},
@@ -45,7 +45,7 @@
"homepage": "https://github.com/0xProject/0x-monorepo/contracts/tokens/README.md",
"devDependencies": {
"@0x/abi-gen": "^1.0.22",
- "@0x/contracts-test-utils": "^2.0.0",
+ "@0x/contracts-test-utils": "^2.0.1",
"@0x/dev-utils": "^1.0.24",
"@0x/sol-compiler": "^2.0.2",
"@0x/subproviders": "^2.1.11",
@@ -70,10 +70,10 @@
},
"dependencies": {
"@0x/base-contract": "^3.0.13",
- "@0x/contracts-interfaces": "^1.0.5",
- "@0x/contracts-libs": "^1.0.5",
- "@0x/contracts-multisig": "^1.0.5",
- "@0x/contracts-utils": "^1.0.5",
+ "@0x/contracts-interfaces": "^1.0.6",
+ "@0x/contracts-libs": "^1.0.6",
+ "@0x/contracts-multisig": "^1.0.6",
+ "@0x/contracts-utils": "^1.0.6",
"@0x/order-utils": "^3.1.2",
"@0x/types": "^1.5.2",
"@0x/typescript-typings": "^3.0.8",
diff --git a/contracts/utils/CHANGELOG.json b/contracts/utils/CHANGELOG.json
index ee239b318..6adebc471 100644
--- a/contracts/utils/CHANGELOG.json
+++ b/contracts/utils/CHANGELOG.json
@@ -1,5 +1,14 @@
[
{
+ "timestamp": 1547747677,
+ "version": "1.0.6",
+ "changes": [
+ {
+ "note": "Dependencies updated"
+ }
+ ]
+ },
+ {
"timestamp": 1547561734,
"version": "1.0.5",
"changes": [
diff --git a/contracts/utils/CHANGELOG.md b/contracts/utils/CHANGELOG.md
index 6d53a0b9c..59d0804da 100644
--- a/contracts/utils/CHANGELOG.md
+++ b/contracts/utils/CHANGELOG.md
@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
CHANGELOG
+## v1.0.6 - _January 17, 2019_
+
+ * Dependencies updated
+
## v1.0.5 - _January 15, 2019_
* Dependencies updated
diff --git a/contracts/utils/package.json b/contracts/utils/package.json
index a19519897..a6d38d0d8 100644
--- a/contracts/utils/package.json
+++ b/contracts/utils/package.json
@@ -1,6 +1,6 @@
{
"name": "@0x/contracts-utils",
- "version": "1.0.5",
+ "version": "1.0.6",
"engines": {
"node": ">=6.12"
},
@@ -45,7 +45,7 @@
"homepage": "https://github.com/0xProject/0x-monorepo/contracts/utils/README.md",
"devDependencies": {
"@0x/abi-gen": "^1.0.22",
- "@0x/contracts-test-utils": "^2.0.0",
+ "@0x/contracts-test-utils": "^2.0.1",
"@0x/dev-utils": "^1.0.24",
"@0x/sol-compiler": "^2.0.2",
"@0x/subproviders": "^2.1.11",
@@ -71,7 +71,7 @@
},
"dependencies": {
"@0x/base-contract": "^3.0.13",
- "@0x/contracts-multisig": "^1.0.5",
+ "@0x/contracts-multisig": "^1.0.6",
"@0x/order-utils": "^3.1.2",
"@0x/types": "^1.5.2",
"@0x/typescript-typings": "^3.0.8",
diff --git a/packages/0x.js/CHANGELOG.json b/packages/0x.js/CHANGELOG.json
index a849a35a2..276bdd479 100644
--- a/packages/0x.js/CHANGELOG.json
+++ b/packages/0x.js/CHANGELOG.json
@@ -1,5 +1,14 @@
[
{
+ "timestamp": 1547747677,
+ "version": "3.0.3",
+ "changes": [
+ {
+ "note": "Dependencies updated"
+ }
+ ]
+ },
+ {
"timestamp": 1547561734,
"version": "3.0.2",
"changes": [
diff --git a/packages/0x.js/CHANGELOG.md b/packages/0x.js/CHANGELOG.md
index c389c0e00..b0279f097 100644
--- a/packages/0x.js/CHANGELOG.md
+++ b/packages/0x.js/CHANGELOG.md
@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
CHANGELOG
+## v3.0.3 - _January 17, 2019_
+
+ * Dependencies updated
+
## v3.0.2 - _January 15, 2019_
* Dependencies updated
diff --git a/packages/0x.js/package.json b/packages/0x.js/package.json
index ca990c0a7..f4f1c82e0 100644
--- a/packages/0x.js/package.json
+++ b/packages/0x.js/package.json
@@ -1,6 +1,6 @@
{
"name": "0x.js",
- "version": "3.0.2",
+ "version": "3.0.3",
"engines": {
"node": ">=6.12"
},
@@ -74,9 +74,9 @@
"dependencies": {
"@0x/assert": "^1.0.23",
"@0x/base-contract": "^3.0.13",
- "@0x/contract-wrappers": "^5.0.0",
+ "@0x/contract-wrappers": "^5.0.1",
"@0x/order-utils": "^3.1.2",
- "@0x/order-watcher": "^2.4.2",
+ "@0x/order-watcher": "^2.4.3",
"@0x/subproviders": "^2.1.11",
"@0x/types": "^1.5.2",
"@0x/typescript-typings": "^3.0.8",
diff --git a/packages/asset-buyer/CHANGELOG.json b/packages/asset-buyer/CHANGELOG.json
index 8a9dc333a..3bb95fdba 100644
--- a/packages/asset-buyer/CHANGELOG.json
+++ b/packages/asset-buyer/CHANGELOG.json
@@ -9,6 +9,15 @@
]
},
{
+ "timestamp": 1547747677,
+ "version": "4.0.2",
+ "changes": [
+ {
+ "note": "Dependencies updated"
+ }
+ ]
+ },
+ {
"timestamp": 1547561734,
"version": "4.0.1",
"changes": [
diff --git a/packages/asset-buyer/CHANGELOG.md b/packages/asset-buyer/CHANGELOG.md
index 85c02479a..f2a3d2236 100644
--- a/packages/asset-buyer/CHANGELOG.md
+++ b/packages/asset-buyer/CHANGELOG.md
@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
CHANGELOG
+## v4.0.2 - _January 17, 2019_
+
+ * Dependencies updated
+
## v4.0.1 - _January 15, 2019_
* Dependencies updated
diff --git a/packages/asset-buyer/package.json b/packages/asset-buyer/package.json
index 45cd8954d..454e9cc1c 100644
--- a/packages/asset-buyer/package.json
+++ b/packages/asset-buyer/package.json
@@ -1,6 +1,6 @@
{
"name": "@0x/asset-buyer",
- "version": "4.0.1",
+ "version": "4.0.2",
"engines": {
"node": ">=6.12"
},
@@ -38,7 +38,7 @@
"dependencies": {
"@0x/assert": "^1.0.23",
"@0x/connect": "^3.0.13",
- "@0x/contract-wrappers": "^5.0.0",
+ "@0x/contract-wrappers": "^5.0.1",
"@0x/json-schemas": "^2.1.7",
"@0x/order-utils": "^3.1.2",
"@0x/subproviders": "^2.1.11",
diff --git a/packages/contract-wrappers/CHANGELOG.json b/packages/contract-wrappers/CHANGELOG.json
index bfba8454c..b9b910165 100644
--- a/packages/contract-wrappers/CHANGELOG.json
+++ b/packages/contract-wrappers/CHANGELOG.json
@@ -1,5 +1,14 @@
[
{
+ "timestamp": 1547747677,
+ "version": "5.0.1",
+ "changes": [
+ {
+ "note": "Dependencies updated"
+ }
+ ]
+ },
+ {
"version": "5.0.0",
"changes": [
{
diff --git a/packages/contract-wrappers/CHANGELOG.md b/packages/contract-wrappers/CHANGELOG.md
index 8281f5050..28cbf2ec6 100644
--- a/packages/contract-wrappers/CHANGELOG.md
+++ b/packages/contract-wrappers/CHANGELOG.md
@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
CHANGELOG
+## v5.0.1 - _January 17, 2019_
+
+ * Dependencies updated
+
## v5.0.0 - _January 15, 2019_
* Renamed OrderStatus enum members to PascalCase to conform with tslint enum-naming rule (#1474)
diff --git a/packages/contract-wrappers/package.json b/packages/contract-wrappers/package.json
index c4f75a5a4..8cee730fe 100644
--- a/packages/contract-wrappers/package.json
+++ b/packages/contract-wrappers/package.json
@@ -1,6 +1,6 @@
{
"name": "@0x/contract-wrappers",
- "version": "5.0.0",
+ "version": "5.0.1",
"description": "Smart TS wrappers for 0x smart contracts",
"keywords": [
"0xproject",
@@ -69,7 +69,7 @@
"@0x/assert": "^1.0.23",
"@0x/contract-addresses": "^2.2.0",
"@0x/contract-artifacts": "^1.3.0",
- "@0x/contracts-test-utils": "^2.0.0",
+ "@0x/contracts-test-utils": "^2.0.1",
"@0x/fill-scenarios": "^1.1.2",
"@0x/json-schemas": "^2.1.7",
"@0x/order-utils": "^3.1.2",
diff --git a/packages/dev-tools-pages/.gitignore b/packages/dev-tools-pages/.gitignore
index 557b82311..d70ebaa1d 100644
--- a/packages/dev-tools-pages/.gitignore
+++ b/packages/dev-tools-pages/.gitignore
@@ -1,3 +1 @@
-public
-assets/fonts/*.woff
-assets/fonts/*.woff2 \ No newline at end of file
+public \ No newline at end of file
diff --git a/packages/dev-tools-pages/assets/crawl.html b/packages/dev-tools-pages/assets/crawl.html
index 9135c3ede..352300d73 100644
--- a/packages/dev-tools-pages/assets/crawl.html
+++ b/packages/dev-tools-pages/assets/crawl.html
@@ -1,20 +1,17 @@
<!DOCTYPE html>
<html lang="en">
-<head>
- <meta charset="UTF-8">
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <meta http-equiv="X-UA-Compatible" content="ie=edge">
- <title>Document</title>
-</head>
-<body>
-
-<ul>
-<li><a href="/compiler">Compiler</a></li>
-<li><a href="/cov">Cov</a></li>
-<li><a href="/profiler">Profiler</a></li>
-<li><a href="/trace">Trace</a></li>
-
-</ul>
-
-</body>
-</html> \ No newline at end of file
+ <head>
+ <meta charset="UTF-8" />
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+ <meta http-equiv="X-UA-Compatible" content="ie=edge" />
+ <title>Test</title>
+ </head>
+ <body>
+ <ul>
+ <li><a href="/compiler">Compiler</a></li>
+ <li><a href="/coverage">Coverage</a></li>
+ <li><a href="/profiler">Profiler</a></li>
+ <li><a href="/trace">Trace</a></li>
+ </ul>
+ </body>
+</html>
diff --git a/packages/dev-tools-pages/assets/fonts/.gitkeep b/packages/dev-tools-pages/assets/fonts/.gitkeep
deleted file mode 100644
index e69de29bb..000000000
--- a/packages/dev-tools-pages/assets/fonts/.gitkeep
+++ /dev/null
diff --git a/packages/dev-tools-pages/assets/fonts/MaisonNeue-Bold-subset.woff2 b/packages/dev-tools-pages/assets/fonts/MaisonNeue-Bold-subset.woff2
new file mode 100644
index 000000000..54424f6fc
--- /dev/null
+++ b/packages/dev-tools-pages/assets/fonts/MaisonNeue-Bold-subset.woff2
Binary files differ
diff --git a/packages/dev-tools-pages/assets/fonts/MaisonNeue-Book-subset.woff2 b/packages/dev-tools-pages/assets/fonts/MaisonNeue-Book-subset.woff2
new file mode 100644
index 000000000..8c2dea7ef
--- /dev/null
+++ b/packages/dev-tools-pages/assets/fonts/MaisonNeue-Book-subset.woff2
Binary files differ
diff --git a/packages/dev-tools-pages/package.json b/packages/dev-tools-pages/package.json
index 79d4a840f..4af58fbb1 100644
--- a/packages/dev-tools-pages/package.json
+++ b/packages/dev-tools-pages/package.json
@@ -1,18 +1,28 @@
{
"name": "@0x/dev-tools-pages",
- "version": "0.0.13",
+ "version": "0.0.14",
"engines": {
"node": ">=6.12"
},
"private": true,
"description": "0x Dev tools pages",
"scripts": {
- "build": "node --max_old_space_size=8192 ../../node_modules/.bin/webpack --mode production && react-snap",
+ "build": "node --max_old_space_size=8192 ../../node_modules/.bin/webpack --mode production",
"build:ci": "yarn build",
"build:dev": "../../node_modules/.bin/webpack --mode development",
"clean": "shx rm -f public/bundle*",
"lint": "tslint --format stylish --project . 'ts/**/*.ts' 'ts/**/*.tsx'",
- "dev": "webpack-dev-server --mode development --content-base public"
+ "dev": "webpack-dev-server --mode development --content-base public",
+ "deploy:all": "npm run build; npm run deploy:compiler; npm run deploy:compiler:index; npm run deploy:coverage; npm run deploy:coverage:index; npm run deploy:profiler; npm run deploy:profiler:index; npm run deploy:trace; npm run deploy:trace:index;",
+ "deploy:compiler": "DIR_NAME=./public/. BUCKET=s3://sol-compiler.com yarn s3:sync --exclude 'bundle-cov*' --exclude 'bundle-trace*' --exclude 'bundle-profiler*'",
+ "deploy:coverage": "DIR_NAME=./public/. BUCKET=s3://sol-coverage.com yarn s3:sync --exclude 'bundle-compiler*' --exclude 'bundle-trace*' --exclude 'bundle-profiler*'",
+ "deploy:profiler": "DIR_NAME=./public/. BUCKET=s3://sol-profiler.com yarn s3:sync --exclude 'bundle-cov*' --exclude 'bundle-trace*' --exclude 'bundle-compiler*'",
+ "deploy:trace": "DIR_NAME=./public/. BUCKET=s3://sol-trace.com yarn s3:sync --exclude 'bundle-cov*' --exclude 'bundle-compiler*' --exclude 'bundle-profiler*'",
+ "deploy:compiler:index": "DIR_NAME=./public/compiler/. BUCKET=s3://sol-compiler.com yarn s3:sync",
+ "deploy:coverage:index": "DIR_NAME=./public/coverage/. BUCKET=s3://sol-coverage.com yarn s3:sync",
+ "deploy:profiler:index": "DIR_NAME=./public/profiler/. BUCKET=s3://sol-profiler.com yarn s3:sync",
+ "deploy:trace:index": "DIR_NAME=./public/trace/. BUCKET=s3://sol-trace.com yarn s3:sync",
+ "s3:sync": "aws s3 sync $DIR_NAME $BUCKET --profile 0xproject --region us-east-1 --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers --exclude *.map.js --exclude 'profiler/*' --exclude 'trace/*' --exclude 'coverage/*' --exclude 'compiler/*'"
},
"license": "Apache-2.0",
"dependencies": {
@@ -51,7 +61,6 @@
"less-loader": "^4.1.0",
"make-promises-safe": "^1.1.0",
"raw-loader": "^0.5.1",
- "react-snap": "^1.19.0",
"react-svg-loader": "^2.1.0",
"shx": "^0.2.2",
"source-map-loader": "^0.2.4",
@@ -66,11 +75,4 @@
"webpack-cli": "3.1.2",
"webpack-dev-server": "^3.1.9"
},
- "reactSnap": {
- "source": "public",
- "puppeteerArgs": [
- "--no-sandbox",
- "--disable-setuid-sandbox"
- ]
- }
}
diff --git a/packages/dev-tools-pages/pages.js b/packages/dev-tools-pages/pages.js
index 7609a07e9..488c2ecd7 100644
--- a/packages/dev-tools-pages/pages.js
+++ b/packages/dev-tools-pages/pages.js
@@ -11,26 +11,26 @@ const pages = [
'og-title': { property: 'og:title', content: 'sol-compiler' },
'og-description': { property: 'og:description', content: 'Solidity compilation that just works' },
'og-type': { property: 'og:type', content: 'website' },
- 'og-image': { property: 'og:image', content: '/images/og-compiler' },
+ 'og-image': { property: 'og:image', content: '/images/og-compiler.png' },
'twitter:site': '@0xproject',
- 'twitter:image': '/images/og-compiler',
+ 'twitter:image': '/images/og-compiler.png',
},
},
{
- title: 'sol-cov',
- filename: 'cov/index.html',
+ title: 'sol-coverage',
+ filename: 'coverage/index.html',
template: 'assets/index.html',
- chunks: ['cov'],
+ chunks: ['coverage'],
favicon: 'assets/favicons/cov.ico',
minify: true,
meta: {
description: 'Solidity code coverage',
- 'og-title': { property: 'og:title', content: 'sol-cov' },
+ 'og-title': { property: 'og:title', content: 'sol-coverage' },
'og-description': { property: 'og:description', content: 'Solidity code coverage' },
'og-type': { property: 'og:type', content: 'website' },
- 'og-image': { property: 'og:image', content: '/images/og-cov' },
+ 'og-image': { property: 'og:image', content: '/images/og-cov.png' },
'twitter:site': '@0xproject',
- 'twitter:image': '/images/og-cov',
+ 'twitter:image': '/images/og-cov.png',
},
},
{
@@ -45,9 +45,9 @@ const pages = [
'og-title': { property: 'og:title', content: 'sol-profiler' },
'og-description': { property: 'og:description', content: 'Gas profiling for Solidity' },
'og-type': { property: 'og:type', content: 'website' },
- 'og-image': { property: 'og:image', content: '/images/og-profiler' },
+ 'og-image': { property: 'og:image', content: '/images/og-profiler.png' },
'twitter:site': '@0xproject',
- 'twitter:image': '/images/og-profiler',
+ 'twitter:image': '/images/og-profiler.png',
},
},
{
@@ -62,9 +62,9 @@ const pages = [
'og-title': { property: 'og:title', content: 'sol-trace' },
'og-description': { property: 'og:description', content: 'Human-readable stack traces' },
'og-type': { property: 'og:type', content: 'website' },
- 'og-image': { property: 'og:image', content: '/images/og-trace' },
+ 'og-image': { property: 'og:image', content: '/images/og-trace.png' },
'twitter:site': '@0xproject',
- 'twitter:image': '/images/og-trace',
+ 'twitter:image': '/images/og-trace.png',
},
},
];
diff --git a/packages/dev-tools-pages/ts/components/call_to_action.tsx b/packages/dev-tools-pages/ts/components/call_to_action.tsx
new file mode 100644
index 000000000..3805a7c8c
--- /dev/null
+++ b/packages/dev-tools-pages/ts/components/call_to_action.tsx
@@ -0,0 +1,40 @@
+import * as React from 'react';
+import styled from 'styled-components';
+
+import { ContextInterface, ThemeContext } from 'ts/context';
+
+import { Button } from './button';
+
+const CallToAction: React.StatelessComponent<ContextInterface> = ({ children }) => (
+ <ThemeContext.Consumer>
+ {({ docLink }: ContextInterface) => (
+ <StyledCallToAction>
+ <CallToActionContainer>
+ <Button as="a" href={docLink} target="_blank" large={true}>
+ Read the Docs
+ </Button>
+ </CallToActionContainer>
+ {children}
+ </StyledCallToAction>
+ )}
+ </ThemeContext.Consumer>
+);
+
+const StyledCallToAction = styled.section`
+ text-align: center;
+ padding-top: 0;
+ padding-bottom: 1rem;
+ padding-left: 2.5rem;
+ padding-right: 2.5rem;
+ min-height: min-content;
+ max-height: 37.5rem;
+ height: 20vh;
+ position: relative;
+`;
+
+const CallToActionContainer = styled.div`
+ margin: 0 auto;
+ max-width: 590px;
+`;
+
+export { CallToAction };
diff --git a/packages/dev-tools-pages/ts/components/code.tsx b/packages/dev-tools-pages/ts/components/code.tsx
index c4f9cee24..0f7d6a0cd 100644
--- a/packages/dev-tools-pages/ts/components/code.tsx
+++ b/packages/dev-tools-pages/ts/components/code.tsx
@@ -139,7 +139,6 @@ class Code extends React.Component<CodeProps, CodeState> {
public render(): React.ReactNode {
const { language, isLight, isDiff, children, gutterLength, canCopy } = this.props;
const { hlCode } = this.state;
-
return (
<Container>
<Base language={language} isDiff={isDiff} isLight={isLight}>
@@ -157,7 +156,7 @@ class Code extends React.Component<CodeProps, CodeState> {
<StyledCopyInput readOnly={true} aria-hidden="true" ref={this._code} value={children} />
) : null}
</Base>
- {navigator.userAgent !== 'ReactSnap' && canCopy ? (
+ {canCopy ? (
<Button onClick={this._handleCopyAsync.bind(this)}>{this.state.didCopy ? 'Copied' : 'Copy'}</Button>
) : null}
</Container>
diff --git a/packages/dev-tools-pages/ts/components/compiler.tsx b/packages/dev-tools-pages/ts/components/compiler.tsx
index 694a535dd..c00e3a2b9 100644
--- a/packages/dev-tools-pages/ts/components/compiler.tsx
+++ b/packages/dev-tools-pages/ts/components/compiler.tsx
@@ -45,7 +45,7 @@ const Dd = styled.dd`
const cards = [
{
- title: 'A Project-centric',
+ title: 'Project-centric',
body: (
<React.Fragment>
Compiles an entire project instead of only individual <InlineCode isAlt={true}>.sol</InlineCode> files.
@@ -54,7 +54,7 @@ const cards = [
},
{
title: 'Incremental builds',
- body: 'Recompiles your smart contracts after they have changed',
+ body: 'Only recompiles smart contracts that have been modified.',
},
{
title: 'Customizable artifacts',
@@ -63,12 +63,16 @@ const cards = [
},
{
title: 'Seamless',
- body: 'Fetches and caches the required compiler binaries.',
+ body: 'Fetches and caches the required compiler binaries for the Solidity versions you use.',
},
{
title: 'Versioning',
body:
- 'Compiles each contract with the version specified at the top of its file (sol-compiler even supports version ranges!).',
+ 'Compiles each contract with the Solidity version specified at the top of its file (it even supports version ranges!).',
+ },
+ {
+ title: 'Watch mode',
+ body: 'Have your contracts instantly recompile on file save.',
},
];
diff --git a/packages/dev-tools-pages/ts/components/footer.tsx b/packages/dev-tools-pages/ts/components/footer.tsx
index 04fd9b88e..e6229b4b1 100644
--- a/packages/dev-tools-pages/ts/components/footer.tsx
+++ b/packages/dev-tools-pages/ts/components/footer.tsx
@@ -3,7 +3,7 @@ import * as React from 'react';
import styled from 'styled-components';
import { context as compiler } from 'ts/context/compiler';
-import { context as cov } from 'ts/context/cov';
+import { context as coverage } from 'ts/context/coverage';
import { context as profiler } from 'ts/context/profiler';
import { context as trace } from 'ts/context/trace';
import MainIcon from 'ts/icons/logos/0x.svg';
@@ -12,7 +12,7 @@ import { media } from 'ts/variables';
import { Container } from './container';
import { Alpha, Beta } from './typography';
-const tools = [trace, cov, compiler, profiler];
+const tools = [trace, coverage, compiler, profiler];
const Footer: React.StatelessComponent<{}> = () => (
<StyledFooter>
@@ -20,9 +20,9 @@ const Footer: React.StatelessComponent<{}> = () => (
<Top>
<Alpha>Other tools by 0x</Alpha>
<List>
- {_.map(tools, ({ title, subtitle, icon }) => (
+ {_.map(tools, ({ title, subtitle, icon, name }) => (
<ListItem key={title}>
- <ListLink href="#">
+ <ListLink href={`https://sol-${name}.com`}>
<Icon as={icon as 'svg'} />
<div>
<Beta>{title}</Beta>
@@ -37,6 +37,11 @@ const Footer: React.StatelessComponent<{}> = () => (
<Icon as={MainIcon} />
<Small>
0x is an open, permissionless protocol allowing for tokens to be traded on the Ethereum blockchain.
+ Interested in building tools like this with the 0x core team? Apply directly at{' '}
+ <a href="https://0x.org/careers" target="_blank">
+ 0x.org/careers
+ </a>{' '}
+ — we'd be excited to hear from you!
</Small>
</Media>
</Container>
diff --git a/packages/dev-tools-pages/ts/components/header.tsx b/packages/dev-tools-pages/ts/components/header.tsx
index 2787692c1..4d3a8685c 100644
--- a/packages/dev-tools-pages/ts/components/header.tsx
+++ b/packages/dev-tools-pages/ts/components/header.tsx
@@ -17,7 +17,7 @@ const Header: React.StatelessComponent<{}> = () => (
<Title>{title}</Title>
</LogoMark>
- <Link as="a" href="https://0xproject.com/">
+ <Link as="a" href="https://0x.org/" target="_blank">
Built by 0x
</Link>
</Container>
diff --git a/packages/dev-tools-pages/ts/components/hero.tsx b/packages/dev-tools-pages/ts/components/hero.tsx
index cdcad6982..e2977f3f2 100644
--- a/packages/dev-tools-pages/ts/components/hero.tsx
+++ b/packages/dev-tools-pages/ts/components/hero.tsx
@@ -9,16 +9,16 @@ import { Beta } from './typography';
const Hero: React.StatelessComponent<ContextInterface> = ({ children }) => (
<ThemeContext.Consumer>
- {({ subtitle, tagline }: ContextInterface) => (
+ {({ subtitle, tagline, docLink }: ContextInterface) => (
<StyledHero>
<HeroContainer>
<Subtitle>{subtitle}</Subtitle>
<Tagline as="p">{tagline}</Tagline>
- <Button as="a" href="#" large={true}>
+ <Button as="a" href={docLink} target="_blank" large={true}>
Read the Docs
</Button>
</HeroContainer>
- {navigator.userAgent !== 'ReactSnap' ? children : null}
+ {children}
</StyledHero>
)}
</ThemeContext.Consumer>
diff --git a/packages/dev-tools-pages/ts/components/trace.tsx b/packages/dev-tools-pages/ts/components/trace.tsx
index f41dac9b7..81f6db0ab 100644
--- a/packages/dev-tools-pages/ts/components/trace.tsx
+++ b/packages/dev-tools-pages/ts/components/trace.tsx
@@ -25,7 +25,7 @@ const Trace: React.StatelessComponent<{}> = () => (
troublemaking line of code. The only hint you'll get is a generic error.
</MainCopy>
<Breakout>
- <Code isLight={true}>Error: VM Exception while processing transaction: rever</Code>
+ <Code isLight={true}>Error: VM Exception while processing transaction: revert</Code>
</Breakout>
<List>
@@ -44,8 +44,8 @@ const Trace: React.StatelessComponent<{}> = () => (
<Copy dark={true}>
<Gamma as="h3">Time-consuming</Gamma>
<p>
- Working with a large code-base that contains hundreds of smart contracts,
- finding the failing line of code quickly becomes a daunting task.
+ Working within a large code-base that contains many smart contracts, finding the
+ failing line of code quickly becomes a daunting task.
</p>
</Copy>
<Icon as={TimeConsuming} />
@@ -78,8 +78,8 @@ const Trace: React.StatelessComponent<{}> = () => (
<Copy>
<Gamma as="h3">Exact location</Gamma>
<p>
- It shows you the exact location of the specific code linen and where it was
- called from.
+ It shows you the exact location of the offending line and where it was called
+ from.
</p>
</Copy>
<Icon as={ExactLocation} />
@@ -90,8 +90,7 @@ const Trace: React.StatelessComponent<{}> = () => (
<Gamma as="h3">Time-saving</Gamma>
<p>
Turning "Your code failed somewhere, good luck debugging it" into "Your code
- failed on line X of contract Y", it drastically improves the developer
- experience.
+ failed on line X of contract Y", drastically improves the developer experience.
</p>
</Copy>
<Icon as={TimeSaving} />
diff --git a/packages/dev-tools-pages/ts/context/compiler.tsx b/packages/dev-tools-pages/ts/context/compiler.tsx
index 177e265e5..e4642c826 100644
--- a/packages/dev-tools-pages/ts/context/compiler.tsx
+++ b/packages/dev-tools-pages/ts/context/compiler.tsx
@@ -5,6 +5,7 @@ import { ContextInterface } from './index';
export const context: ContextInterface = {
title: 'sol-compiler',
name: 'compiler',
+ docLink: 'https://0x.org/docs/sol-compiler',
subtitle: 'Solidity compilation that just works',
tagline: 'Seamlessly compile an entire solidity project and generate customisable artifacts',
icon: Icon,
diff --git a/packages/dev-tools-pages/ts/context/cov.tsx b/packages/dev-tools-pages/ts/context/coverage.tsx
index 1ade45e9d..3e44b6ec2 100644
--- a/packages/dev-tools-pages/ts/context/cov.tsx
+++ b/packages/dev-tools-pages/ts/context/coverage.tsx
@@ -3,9 +3,10 @@ import Icon from 'ts/icons/logos/cov.svg';
import { ContextInterface } from './index';
export const context: ContextInterface = {
- title: 'sol-cov',
- name: 'cov',
+ title: 'sol-coverage',
+ name: 'coverage',
subtitle: 'Solidity code coverage',
+ docLink: 'https://0x.org/docs/sol-coverage',
tagline: 'Measure Solidity code coverage',
icon: Icon,
colors: {
diff --git a/packages/dev-tools-pages/ts/context/index.tsx b/packages/dev-tools-pages/ts/context/index.tsx
index 35c647ad6..97ccf5c16 100644
--- a/packages/dev-tools-pages/ts/context/index.tsx
+++ b/packages/dev-tools-pages/ts/context/index.tsx
@@ -3,6 +3,7 @@ import { createContext } from 'react';
interface ContextInterface {
title?: string;
name?: string;
+ docLink?: string;
subtitle?: string;
tagline?: string;
icon?: React.ReactNode;
diff --git a/packages/dev-tools-pages/ts/context/profiler.tsx b/packages/dev-tools-pages/ts/context/profiler.tsx
index 5ccfa5b4c..e2ddcb230 100644
--- a/packages/dev-tools-pages/ts/context/profiler.tsx
+++ b/packages/dev-tools-pages/ts/context/profiler.tsx
@@ -5,6 +5,7 @@ import { ContextInterface } from './index';
export const context: ContextInterface = {
title: 'sol-profiler',
name: 'profiler',
+ docLink: 'https://0x.org/docs/sol-profiler',
subtitle: 'Gas profiling for Solidity',
tagline: "Implement data-guided optimizations by profiling your contract's gas usage",
icon: Icon,
diff --git a/packages/dev-tools-pages/ts/context/trace.tsx b/packages/dev-tools-pages/ts/context/trace.tsx
index 9627cc0a4..3c19661f2 100644
--- a/packages/dev-tools-pages/ts/context/trace.tsx
+++ b/packages/dev-tools-pages/ts/context/trace.tsx
@@ -6,6 +6,7 @@ export const context: ContextInterface = {
title: 'sol-trace',
name: 'trace',
subtitle: 'Human-readable stack traces',
+ docLink: 'https://0x.org/docs/sol-trace',
tagline: 'Immediately locate Solidity errors and rapidly debug failed transactions',
icon: Icon,
colors: {
diff --git a/packages/dev-tools-pages/ts/pages/compiler.tsx b/packages/dev-tools-pages/ts/pages/compiler.tsx
index 93a667562..407646add 100644
--- a/packages/dev-tools-pages/ts/pages/compiler.tsx
+++ b/packages/dev-tools-pages/ts/pages/compiler.tsx
@@ -6,6 +6,7 @@ import { context } from 'ts/context/compiler';
import { Base } from 'ts/components/base';
import { Breakout } from 'ts/components/breakout';
+import { CallToAction } from 'ts/components/call_to_action';
import { Code } from 'ts/components/code';
import { Compiler as CompilerComponent } from 'ts/components/compiler';
import { Content } from 'ts/components/content';
@@ -24,6 +25,9 @@ const Animation = Loadable({
},
});
+const SOLIDITY_INPUT_FORMAT_DOCS =
+ 'https://solidity.readthedocs.io/en/v0.4.24/using-the-compiler.html#compiler-input-and-output-json-description';
+
const Compiler: React.StatelessComponent<{}> = () => (
<Base context={context}>
<Hero>
@@ -40,7 +44,7 @@ const Compiler: React.StatelessComponent<{}> = () => (
<ContentBlock title="Run">
<Breakout>
- <Code>cd /your_project_dir && sol-compiler</Code>
+ <Code canCopy={true}>cd /your_project_dir && sol-compiler</Code>
</Breakout>
</ContentBlock>
@@ -49,11 +53,11 @@ const Compiler: React.StatelessComponent<{}> = () => (
Configure via a <InlineCode>compiler.json</InlineCode> file.
</p>
<Breakout>
- <Code>mkdir compiler.json</Code>
+ <Code canCopy={true}>mkdir compiler.json</Code>
</Breakout>
<p>Example of settings:</p>
<Breakout>
- <Code language="json">
+ <Code language="json" canCopy={true}>
{`{
"contractsDir": "contracts",
"artifactsDir": "artifacts",
@@ -74,15 +78,19 @@ const Compiler: React.StatelessComponent<{}> = () => (
<Content dark={true}>
<ContentBlock main={true} title="Artifacts">
<Lead>
- Sol compiler uses solidity standard JSON output format for the artifacts. This way, you can define
- which parts of the artifact you need.
+ Sol compiler uses{' '}
+ <a href={SOLIDITY_INPUT_FORMAT_DOCS} target="_blank">
+ Solidity standard JSON input format
+ </a>{' '}
+ to specify what to include in the generated artifacts. This way, you have complete flexibility on
+ what is included.
</Lead>
</ContentBlock>
<ContentBlock title="Production">
<p>
- Sol compiler uses solidity standard JSON output format for the artifacts. This way, you can define
- which parts of the artifact you need.
+ In production, you want to optimize for a small bundle size, so your compiler.json config would
+ instruct sol-compiler to only output the contract ABI.
</p>
<Breakout>
<Code isLight={true} language="json" isEtc={true}>
@@ -109,8 +117,9 @@ const Compiler: React.StatelessComponent<{}> = () => (
</ContentBlock>
<ContentBlock title="Development">
<p>
- Sometimes you need to use some debuggers or other dev tools and you’ll need more info in the
- artifact.
+ In development, you need to use profiler and other dev tools that require more information from the
+ artifact. To do this, you can specify that the artifact also contain the bytecode, deployed bytecode
+ and source maps.
</p>
<Breakout>
<Code isLight={true} language="json" isEtc={true}>
@@ -158,6 +167,9 @@ const Compiler: React.StatelessComponent<{}> = () => (
</Breakout>
</ContentBlock>
</Content>
+ <div style={{ paddingTop: '5rem' }}>
+ <CallToAction />
+ </div>
</Base>
);
diff --git a/packages/dev-tools-pages/ts/pages/cov.tsx b/packages/dev-tools-pages/ts/pages/coverage.tsx
index 85487248a..575891f3b 100644
--- a/packages/dev-tools-pages/ts/pages/cov.tsx
+++ b/packages/dev-tools-pages/ts/pages/coverage.tsx
@@ -2,10 +2,11 @@ import * as React from 'react';
import { hydrate, render } from 'react-dom';
import * as Loadable from 'react-loadable';
-import { context } from 'ts/context/cov';
+import { context } from 'ts/context/coverage';
import { Base } from 'ts/components/base';
import { Breakout } from 'ts/components/breakout';
+import { CallToAction } from 'ts/components/call_to_action';
import { Code } from 'ts/components/code';
import { Content } from 'ts/components/content';
import { ContentBlock } from 'ts/components/content-block';
@@ -25,7 +26,7 @@ const Animation = Loadable({
},
});
-const Cov: React.StatelessComponent<{}> = () => (
+const Coverage: React.StatelessComponent<{}> = () => (
<Base context={context}>
<Hero>
<Animation />
@@ -33,9 +34,9 @@ const Cov: React.StatelessComponent<{}> = () => (
<Intro>
<IntroLead title="Measure your tests">
<p>
- When it comes to writing smart contracts, testing is one of the most important steps of the process.
- In order to quantify the robustness of your Solidity testing suite, you need to measure its code
- coverage.
+ When it comes to writing secure smart contracts, testing is one of the most important steps in the
+ process. In order to quantify the robustness of your Solidity testing suite, you need to measure its
+ code coverage.
</p>
</IntroLead>
<IntroAside>
@@ -69,29 +70,57 @@ const Cov: React.StatelessComponent<{}> = () => (
<ContentBlock title="Prerequisites">
<List>
<ListItem>
- Use <a href="#">ganache-cli</a> as a backing node.
+ Use{' '}
+ <a href="https://github.com/ethereum/go-ethereum" target="_blank">
+ Geth
+ </a>{' '}
+ as a backing node. We recommend using our{' '}
+ <a href="https://hub.docker.com/r/0xorg/devnet" target="_blank">
+ Devnet Docker container
+ </a>{' '}
+ which sets up a Geth node for testing purposes.{' '}
+ <a href="https://github.com/0xProject/0x-monorepo/issues/1520" target="_blank">
+ Ganache support is a work in progress.
+ </a>
</ListItem>
<ListItem>
- Understand and use <a href="#">web3-provider-engine</a>.
+ Understand and use{' '}
+ <a href="https://github.com/MetaMask/provider-engine" target="_blank">
+ web3-provider-engine
+ </a>
+ .
</ListItem>
</List>
</ContentBlock>
<ContentBlock title="Installation">
<Breakout>
- <Code>npm install @0x/sol-coverage --save</Code>
+ <Code canCopy={true}>npm install @0x/sol-coverage --save</Code>
</Breakout>
<p>
- Sol-cov is a subprovider that needs to be prepended to your <a href="#">provider engine</a>.
- Depending on your project setup, you will need to use a specific ArtifactAdapter. Sol-cov ships with
- the <InlineCode>SolCompilerArtifactAdapter</InlineCode> for use with <a href="#">Sol-compiler</a>{' '}
+ Sol-coverage is a subprovider that needs to be prepended to your{' '}
+ <a href="https://github.com/MetaMask/provider-engine" target="_blank">
+ provider engine
+ </a>
+ . Depending on your project setup, you will need to use a specific ArtifactAdapter. Sol-coverage
+ ships with the <InlineCode>SolCompilerArtifactAdapter</InlineCode> for use with{' '}
+ <a href="https://sol-compiler.com" target="_blank">
+ Sol-compiler
+ </a>{' '}
and <InlineCode>TruffleArtifactAdapter</InlineCode> for use with the{' '}
- <a href="#">Truffle framework</a>. You can also write your own and support any artifact format.
+ <a href="https://truffleframework.com/truffle" target="_blank">
+ Truffle framework
+ </a>{' '}
+ (Also see our{' '}
+ <a href="https://github.com/0xProject/dev-tools-truffle-example" target="_blank">
+ Truffle example project
+ </a>{' '}
+ for a complete walk-through). You can also write your own and support any artifact format.
</p>
<Tabs>
<TabBlock title="Sol-compiler">
- <Code language="javascript">
+ <Code language="javascript" canCopy={true}>
{`import { SolCompilerArtifactAdapter } from '@0x/sol-trace';
// Both artifactsDir and contractsDir are optional and will be fetched from compiler.json if not passed in
@@ -99,16 +128,16 @@ const artifactAdapter = new SolCompilerArtifactAdapter(artifactsDir, contractsDi
</Code>
</TabBlock>
<TabBlock title="Truffle">
- <Code language="javascript">
+ <Code language="javascript" canCopy={true}>
{`import { TruffleArtifactAdapter } from '@0x/sol-trace';
const projectRoot = '.';
-const solcVersion = '0.4.24';
+const solcVersion = '0.5.0';
const artifactAdapter = new TruffleArtifactAdapter(projectRoot, solcVersion);`}
</Code>
</TabBlock>
<TabBlock title="Custom">
- <Code language="javascript">
+ <Code language="javascript" canCopy={true}>
{`import { AbstractArtifactAdapter } from '@0x/sol-trace';
class YourCustomArtifactsAdapter extends AbstractArtifactAdapter {...};
@@ -118,32 +147,33 @@ const artifactAdapter = new YourCustomArtifactsAdapter(...);`}
</Tabs>
<p>
Now that we have an <InlineCode>artifactAdapter</InlineCode>, we can create a{' '}
- <InlineCode>RevertTraceSubprovider</InlineCode> and append it to our provider engine.
+ <InlineCode>CoverageSubprovider</InlineCode> and append it to our provider engine.
</p>
<Breakout>
- <Code language="javascript">
+ <Code language="javascript" canCopy={true}>
{`import { ProviderEngine, RpcSubprovider } from 'web3-provider-engine';
-import { RevertTraceSubprovider } from '@0x/sol-coverage';
+import { CoverageSubprovider } from '@0x/sol-coverage';
const defaultFromAddress = "..."; // Some ethereum address with test funds
-const revertTraceSubprovider = new RevertTraceSubprovider(artifactAdapter, defaultFromAddress);
+const coverageSubprovider = new CoverageSubprovider(artifactAdapter, defaultFromAddress);
const providerEngine = new ProviderEngine();
-providerEngine.addProvider(revertTraceSubprovider);
+providerEngine.addProvider(coverageSubprovider);
providerEngine.addProvider(new RpcSubprovider({rpcUrl: 'http://localhost:8545'}));
providerEngine.start();`}
</Code>
</Breakout>
</ContentBlock>
</Content>
+ <CallToAction />
</Base>
);
const root = document.getElementById('app');
if (root.hasChildNodes()) {
- hydrate(<Cov />, root);
+ hydrate(<Coverage />, root);
} else {
- render(<Cov />, root);
+ render(<Coverage />, root);
}
diff --git a/packages/dev-tools-pages/ts/pages/profiler.tsx b/packages/dev-tools-pages/ts/pages/profiler.tsx
index 16ac9088e..0bc4efa45 100644
--- a/packages/dev-tools-pages/ts/pages/profiler.tsx
+++ b/packages/dev-tools-pages/ts/pages/profiler.tsx
@@ -6,6 +6,7 @@ import { context } from 'ts/context/profiler';
import { Base } from 'ts/components/base';
import { Breakout } from 'ts/components/breakout';
+import { CallToAction } from 'ts/components/call_to_action';
import { Code } from 'ts/components/code';
import { Content } from 'ts/components/content';
import { ContentBlock } from 'ts/components/content-block';
@@ -66,29 +67,57 @@ const Profiler: React.StatelessComponent<{}> = () => (
<ContentBlock title="Prerequisites">
<List>
<ListItem>
- Use <a href="#">ganache-cli</a> as a backing node.
+ Use{' '}
+ <a href="https://github.com/ethereum/go-ethereum" target="_blank">
+ Geth
+ </a>{' '}
+ as a backing node. We recommend using our{' '}
+ <a href="https://hub.docker.com/r/0xorg/devnet" target="_blank">
+ Devnet Docker container
+ </a>{' '}
+ which sets up a Geth node for testing purposes.{' '}
+ <a href="https://github.com/0xProject/0x-monorepo/issues/1520" target="_blank">
+ Ganache support is a work in progress.
+ </a>
</ListItem>
<ListItem>
- Understand and use <a href="#">web3-provider-engine</a>.
+ Understand and use{' '}
+ <a href="https://github.com/MetaMask/provider-engine" target="_blank">
+ web3-provider-engine
+ </a>
+ .
</ListItem>
</List>
</ContentBlock>
<ContentBlock title="Installation">
<Breakout>
- <Code>npm install @0x/sol-trace --save</Code>
+ <Code canCopy={true}>npm install @0x/sol-trace --save</Code>
</Breakout>
<p>
- Sol-trace is a subprovider that needs to be prepended to your <a href="#">provider engine</a>.
- Depending on your project setup, you will need to use a specific ArtifactAdapter. Sol-trace ships
+ Sol-trace is a subprovider that needs to be prepended to your{' '}
+ <a href="https://github.com/MetaMask/provider-engine" target="_blank">
+ provider engine
+ </a>
+ . Depending on your project setup, you will need to use a specific ArtifactAdapter. Sol-trace ships
with the <InlineCode>SolCompilerArtifactAdapter</InlineCode> for use with{' '}
- <a href="#">Sol-compiler</a> and <InlineCode>TruffleArtifactAdapter</InlineCode> for use with the{' '}
- <a href="#">Truffle framework</a>. You can also write your own and support any artifact format.
+ <a href="https://sol-compiler.com" target="_blank">
+ Sol-compiler
+ </a>{' '}
+ and <InlineCode>TruffleArtifactAdapter</InlineCode> for use with the{' '}
+ <a href="https://truffleframework.com/truffle" target="_blank">
+ Truffle framework
+ </a>{' '}
+ (Also see our{' '}
+ <a href="https://github.com/0xProject/dev-tools-truffle-example" target="_blank">
+ Truffle example project
+ </a>{' '}
+ for a complete walk-through). You can also write your own and support any artifact format.
</p>
<Tabs>
<TabBlock title="Sol-compiler">
- <Code language="javascript">
+ <Code language="javascript" canCopy={true}>
{`import { SolCompilerArtifactAdapter } from '@0x/sol-trace';
// Both artifactsDir and contractsDir are optional and will be fetched from compiler.json if not passed in
@@ -96,16 +125,16 @@ const artifactAdapter = new SolCompilerArtifactAdapter(artifactsDir, contractsDi
</Code>
</TabBlock>
<TabBlock title="Truffle">
- <Code language="javascript">
+ <Code language="javascript" canCopy={true}>
{`import { TruffleArtifactAdapter } from '@0x/sol-trace';
const projectRoot = '.';
-const solcVersion = '0.4.24';
+const solcVersion = '0.5.0';
const artifactAdapter = new TruffleArtifactAdapter(projectRoot, solcVersion);`}
</Code>
</TabBlock>
<TabBlock title="Custom">
- <Code language="javascript">
+ <Code language="javascript" canCopy={true}>
{`import { AbstractArtifactAdapter } from '@0x/sol-trace';
class YourCustomArtifactsAdapter extends AbstractArtifactAdapter {...};
@@ -115,25 +144,26 @@ const artifactAdapter = new YourCustomArtifactsAdapter(...);`}
</Tabs>
<p>
Now that we have an <InlineCode>artifactAdapter</InlineCode>, we can create a{' '}
- <InlineCode>RevertTraceSubprovider</InlineCode> and append it to our provider engine.
+ <InlineCode>ProfilerSubprovider</InlineCode> and append it to our provider engine.
</p>
<Breakout>
- <Code language="javascript">
+ <Code language="javascript" canCopy={true}>
{`import { ProviderEngine, RpcSubprovider } from 'web3-provider-engine';
-import { RevertTraceSubprovider } from '@0x/sol-coverage';
+import { ProfilerSubprovider } from '@0x/sol-profiler';
const defaultFromAddress = "..."; // Some ethereum address with test funds
-const revertTraceSubprovider = new RevertTraceSubprovider(artifactAdapter, defaultFromAddress);
+const profilerSubprovider = new ProfilerSubprovider(artifactAdapter, defaultFromAddress);
const providerEngine = new ProviderEngine();
-providerEngine.addProvider(revertTraceSubprovider);
+providerEngine.addProvider(profilerSubprovider);
providerEngine.addProvider(new RpcSubprovider({rpcUrl: 'http://localhost:8545'}));
providerEngine.start();`}
</Code>
</Breakout>
</ContentBlock>
</Content>
+ <CallToAction />
</Base>
);
diff --git a/packages/dev-tools-pages/ts/pages/trace.tsx b/packages/dev-tools-pages/ts/pages/trace.tsx
index cc34e0fbe..cd6180fb9 100644
--- a/packages/dev-tools-pages/ts/pages/trace.tsx
+++ b/packages/dev-tools-pages/ts/pages/trace.tsx
@@ -6,6 +6,7 @@ import { context } from 'ts/context/trace';
import { Base } from 'ts/components/base';
import { Breakout } from 'ts/components/breakout';
+import { CallToAction } from 'ts/components/call_to_action';
import { Code } from 'ts/components/code';
import { Content } from 'ts/components/content';
import { ContentBlock } from 'ts/components/content-block';
@@ -36,29 +37,57 @@ const Trace: React.StatelessComponent<{}> = () => (
<ContentBlock title="Prerequisites">
<List>
<ListItem>
- Use <a href="#">ganache-cli</a> as a backing node.
+ Use{' '}
+ <a href="https://github.com/ethereum/go-ethereum" target="_blank">
+ Geth
+ </a>{' '}
+ as a backing node. We recommend using our{' '}
+ <a href="https://hub.docker.com/r/0xorg/devnet" target="_blank">
+ Devnet Docker container
+ </a>{' '}
+ which sets up a Geth node for testing purposes.{' '}
+ <a href="https://github.com/0xProject/0x-monorepo/issues/1520" target="_blank">
+ Ganache support is a work in progress.
+ </a>
</ListItem>
<ListItem>
- Understand and use <a href="#">web3-provider-engine</a>.
+ Understand and use{' '}
+ <a href="https://github.com/MetaMask/provider-engine" target="_blank">
+ web3-provider-engine
+ </a>
+ .
</ListItem>
</List>
</ContentBlock>
<ContentBlock title="Installation">
<Breakout>
- <Code>npm install @0x/sol-trace --save</Code>
+ <Code canCopy={true}>npm install @0x/sol-trace --save</Code>
</Breakout>
<p>
- Sol-trace is a subprovider that needs to be prepended to your <a href="#">provider engine</a>.
- Depending on your project setup, you will need to use a specific ArtifactAdapter. Sol-trace ships
+ Sol-trace is a subprovider that needs to be prepended to your{' '}
+ <a href="https://github.com/MetaMask/provider-engine" target="_blank">
+ provider engine
+ </a>
+ . Depending on your project setup, you will need to use a specific ArtifactAdapter. Sol-trace ships
with the <InlineCode>SolCompilerArtifactAdapter</InlineCode> for use with{' '}
- <a href="#">Sol-compiler</a> and <InlineCode>TruffleArtifactAdapter</InlineCode> for use with the{' '}
- <a href="#">Truffle framework</a>. You can also write your own and support any artifact format.
+ <a href="https://sol-compiler.com" target="_blank">
+ Sol-compiler
+ </a>{' '}
+ and <InlineCode>TruffleArtifactAdapter</InlineCode> for use with the{' '}
+ <a href="https://truffleframework.com/truffle" target="_blank">
+ Truffle framework
+ </a>{' '}
+ (Also see our{' '}
+ <a href="https://github.com/0xProject/dev-tools-truffle-example" target="_blank">
+ Truffle example project
+ </a>{' '}
+ for a complete walk-through). You can also write your own and support any artifact format.
</p>
<Tabs>
<TabBlock title="Sol-compiler">
- <Code language="javascript">
+ <Code language="javascript" canCopy={true}>
{`import { SolCompilerArtifactAdapter } from '@0x/sol-trace';
// Both artifactsDir and contractsDir are optional and will be fetched from compiler.json if not passed in
@@ -66,16 +95,16 @@ const artifactAdapter = new SolCompilerArtifactAdapter(artifactsDir, contractsDi
</Code>
</TabBlock>
<TabBlock title="Truffle">
- <Code language="javascript">
+ <Code language="javascript" canCopy={true}>
{`import { TruffleArtifactAdapter } from '@0x/sol-trace';
const projectRoot = '.';
-const solcVersion = '0.4.24';
+const solcVersion = '0.5.0';
const artifactAdapter = new TruffleArtifactAdapter(projectRoot, solcVersion);`}
</Code>
</TabBlock>
<TabBlock title="Custom">
- <Code language="javascript">
+ <Code language="javascript" canCopy={true}>
{`import { AbstractArtifactAdapter } from '@0x/sol-trace';
class YourCustomArtifactsAdapter extends AbstractArtifactAdapter {...};
@@ -85,13 +114,13 @@ const artifactAdapter = new YourCustomArtifactsAdapter(...);`}
</Tabs>
<p>
Now that we have an <InlineCode>artifactAdapter</InlineCode>, we can create a{' '}
- <InlineCode>RevertTraceSubprovider</InlineCode> and append it to our provider engine.
+ <InlineCode>revertTraceSubprovider</InlineCode> and append it to our provider engine.
</p>
<Breakout>
- <Code language="javascript">
+ <Code language="javascript" canCopy={true}>
{`import { ProviderEngine, RpcSubprovider } from 'web3-provider-engine';
-import { RevertTraceSubprovider } from '@0x/sol-coverage';
+import { RevertTraceSubprovider } from '@0x/sol-trace';
const defaultFromAddress = "..."; // Some ethereum address with test funds
const revertTraceSubprovider = new RevertTraceSubprovider(artifactAdapter, defaultFromAddress);
@@ -102,8 +131,10 @@ providerEngine.addProvider(new RpcSubprovider({rpcUrl: 'http://localhost:8545'})
providerEngine.start();`}
</Code>
</Breakout>
+ <p>Stack traces will now be printed whenever your contracts revert!</p>
</ContentBlock>
</Content>
+ <CallToAction />
</Base>
);
diff --git a/packages/dev-tools-pages/webpack.config.js b/packages/dev-tools-pages/webpack.config.js
index 640297770..ef2f98cf2 100644
--- a/packages/dev-tools-pages/webpack.config.js
+++ b/packages/dev-tools-pages/webpack.config.js
@@ -3,7 +3,6 @@ const webpack = require('webpack');
const TerserPlugin = require('terser-webpack-plugin');
const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin;
const HtmlWebpackPlugin = require('html-webpack-plugin');
-const childProcess = require('child_process');
const CopyWebpackPlugin = require('copy-webpack-plugin');
const CleanWebpackPlugin = require('clean-webpack-plugin');
@@ -12,7 +11,7 @@ const pages = require('./pages');
const config = {
entry: {
compiler: './ts/pages/compiler.tsx',
- cov: './ts/pages/cov.tsx',
+ coverage: './ts/pages/coverage.tsx',
profiler: './ts/pages/profiler.tsx',
trace: './ts/pages/trace.tsx',
},
diff --git a/packages/devnet/genesis.json b/packages/devnet/genesis.json
index 03dc5d623..073672dd9 100644
--- a/packages/devnet/genesis.json
+++ b/packages/devnet/genesis.json
@@ -8,7 +8,7 @@
"eip158Block": 3,
"byzantiumBlock": 4,
"clique": {
- "period": 1,
+ "period": 0,
"epoch": 30000
}
},
diff --git a/packages/instant/package.json b/packages/instant/package.json
index 36409ef3d..86fac9afe 100644
--- a/packages/instant/package.json
+++ b/packages/instant/package.json
@@ -1,6 +1,6 @@
{
"name": "@0x/instant",
- "version": "1.0.7",
+ "version": "1.0.8",
"engines": {
"node": ">=6.12"
},
@@ -42,7 +42,7 @@
"homepage": "https://github.com/0xProject/0x-monorepo/packages/instant/README.md",
"dependencies": {
"@0x/assert": "^1.0.23",
- "@0x/asset-buyer": "^4.0.1",
+ "@0x/asset-buyer": "^4.0.2",
"@0x/json-schemas": "^2.1.7",
"@0x/order-utils": "^3.1.2",
"@0x/subproviders": "^2.1.11",
diff --git a/packages/metacoin/package.json b/packages/metacoin/package.json
index accdd2949..4bd2bc66f 100644
--- a/packages/metacoin/package.json
+++ b/packages/metacoin/package.json
@@ -1,6 +1,6 @@
{
"name": "@0x/metacoin",
- "version": "0.0.35",
+ "version": "0.0.36",
"engines": {
"node": ">=6.12"
},
@@ -32,9 +32,9 @@
"@0x/abi-gen": "^1.0.22",
"@0x/abi-gen-templates": "^1.0.2",
"@0x/base-contract": "^3.0.13",
- "@0x/sol-coverage": "^1.0.2",
- "@0x/sol-profiler": "^1.0.2",
- "@0x/sol-trace": "^1.0.2",
+ "@0x/sol-coverage": "^1.0.3",
+ "@0x/sol-profiler": "^1.0.3",
+ "@0x/sol-trace": "^1.0.3",
"@0x/subproviders": "^2.1.11",
"@0x/tslint-config": "^2.0.2",
"@0x/types": "^1.5.2",
diff --git a/packages/monorepo-scripts/package.json b/packages/monorepo-scripts/package.json
index e18aa1d2f..187a80c93 100644
--- a/packages/monorepo-scripts/package.json
+++ b/packages/monorepo-scripts/package.json
@@ -1,7 +1,7 @@
{
"private": true,
"name": "@0x/monorepo-scripts",
- "version": "1.0.18",
+ "version": "1.0.19",
"engines": {
"node": ">=6.12"
},
diff --git a/packages/monorepo-scripts/src/utils/utils.ts b/packages/monorepo-scripts/src/utils/utils.ts
index 95b187cc2..28c5658f3 100644
--- a/packages/monorepo-scripts/src/utils/utils.ts
+++ b/packages/monorepo-scripts/src/utils/utils.ts
@@ -106,8 +106,10 @@ export const utils = {
return nextVersionIfValid;
},
async getRemoteGitTagsAsync(): Promise<string[]> {
+ const TEN_MEGA_BYTES = 1024 * 1024 * 10; // tslint:disable-line custom-no-magic-numbers
const result = await execAsync(`git ls-remote --tags`, {
cwd: constants.monorepoRootPath,
+ maxBuffer: TEN_MEGA_BYTES,
});
const tagsString = result.stdout;
const tagOutputs: string[] = tagsString.split('\n');
diff --git a/packages/order-watcher/CHANGELOG.json b/packages/order-watcher/CHANGELOG.json
index bb77feee0..29fe4e723 100644
--- a/packages/order-watcher/CHANGELOG.json
+++ b/packages/order-watcher/CHANGELOG.json
@@ -1,5 +1,14 @@
[
{
+ "timestamp": 1547747677,
+ "version": "2.4.3",
+ "changes": [
+ {
+ "note": "Dependencies updated"
+ }
+ ]
+ },
+ {
"timestamp": 1547561734,
"version": "2.4.2",
"changes": [
diff --git a/packages/order-watcher/CHANGELOG.md b/packages/order-watcher/CHANGELOG.md
index e5f4833cd..df065866c 100644
--- a/packages/order-watcher/CHANGELOG.md
+++ b/packages/order-watcher/CHANGELOG.md
@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
CHANGELOG
+## v2.4.3 - _January 17, 2019_
+
+ * Dependencies updated
+
## v2.4.2 - _January 15, 2019_
* Dependencies updated
diff --git a/packages/order-watcher/package.json b/packages/order-watcher/package.json
index dd9c59640..0f2464eae 100644
--- a/packages/order-watcher/package.json
+++ b/packages/order-watcher/package.json
@@ -1,6 +1,6 @@
{
"name": "@0x/order-watcher",
- "version": "2.4.2",
+ "version": "2.4.3",
"description": "An order watcher daemon that watches for order validity",
"keywords": [
"0x",
@@ -68,7 +68,7 @@
"@0x/base-contract": "^3.0.13",
"@0x/contract-addresses": "^2.2.0",
"@0x/contract-artifacts": "^1.3.0",
- "@0x/contract-wrappers": "^5.0.0",
+ "@0x/contract-wrappers": "^5.0.1",
"@0x/fill-scenarios": "^1.1.2",
"@0x/json-schemas": "^2.1.7",
"@0x/order-utils": "^3.1.2",
diff --git a/packages/react-shared/package.json b/packages/react-shared/package.json
index 47d36ca66..4be4742b0 100644
--- a/packages/react-shared/package.json
+++ b/packages/react-shared/package.json
@@ -52,7 +52,7 @@
"material-ui": "^0.20.0",
"react": "^16.5.2",
"react-dom": "^16.5.2",
- "react-highlight": "0xproject/react-highlight#699ac4d9529e33520bff4b9bd9c624d21efbba75",
+ "react-highlight": "0xproject/react-highlight#fix/react-version",
"react-markdown": "^3.2.2",
"react-router-dom": "^4.1.1",
"react-scroll": "0xproject/react-scroll#pr-330-and-replace-state",
diff --git a/packages/sol-coverage/CHANGELOG.json b/packages/sol-coverage/CHANGELOG.json
index 8157d441e..d2ad03030 100644
--- a/packages/sol-coverage/CHANGELOG.json
+++ b/packages/sol-coverage/CHANGELOG.json
@@ -1,5 +1,14 @@
[
{
+ "timestamp": 1547747677,
+ "version": "1.0.3",
+ "changes": [
+ {
+ "note": "Dependencies updated"
+ }
+ ]
+ },
+ {
"timestamp": 1547561734,
"version": "1.0.2",
"changes": [
diff --git a/packages/sol-coverage/CHANGELOG.md b/packages/sol-coverage/CHANGELOG.md
index ac09a1bbf..18c1719bf 100644
--- a/packages/sol-coverage/CHANGELOG.md
+++ b/packages/sol-coverage/CHANGELOG.md
@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
CHANGELOG
+## v1.0.3 - _January 17, 2019_
+
+ * Dependencies updated
+
## v1.0.2 - _January 15, 2019_
* Dependencies updated
diff --git a/packages/sol-coverage/package.json b/packages/sol-coverage/package.json
index efe91cf2b..805e2e670 100644
--- a/packages/sol-coverage/package.json
+++ b/packages/sol-coverage/package.json
@@ -1,6 +1,6 @@
{
"name": "@0x/sol-coverage",
- "version": "1.0.2",
+ "version": "1.0.3",
"engines": {
"node": ">=6.12"
},
@@ -29,7 +29,7 @@
},
"homepage": "https://github.com/0xProject/0x-monorepo/packages/sol-coverage/README.md",
"dependencies": {
- "@0x/sol-tracing-utils": "^4.0.0",
+ "@0x/sol-tracing-utils": "^4.0.1",
"@0x/subproviders": "^2.1.11",
"@0x/typescript-typings": "^3.0.8",
"ethereum-types": "^1.1.6",
diff --git a/packages/sol-profiler/CHANGELOG.json b/packages/sol-profiler/CHANGELOG.json
index 8157d441e..d2ad03030 100644
--- a/packages/sol-profiler/CHANGELOG.json
+++ b/packages/sol-profiler/CHANGELOG.json
@@ -1,5 +1,14 @@
[
{
+ "timestamp": 1547747677,
+ "version": "1.0.3",
+ "changes": [
+ {
+ "note": "Dependencies updated"
+ }
+ ]
+ },
+ {
"timestamp": 1547561734,
"version": "1.0.2",
"changes": [
diff --git a/packages/sol-profiler/CHANGELOG.md b/packages/sol-profiler/CHANGELOG.md
index ac09a1bbf..18c1719bf 100644
--- a/packages/sol-profiler/CHANGELOG.md
+++ b/packages/sol-profiler/CHANGELOG.md
@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
CHANGELOG
+## v1.0.3 - _January 17, 2019_
+
+ * Dependencies updated
+
## v1.0.2 - _January 15, 2019_
* Dependencies updated
diff --git a/packages/sol-profiler/package.json b/packages/sol-profiler/package.json
index 1a89e0a6b..4fe2928c7 100644
--- a/packages/sol-profiler/package.json
+++ b/packages/sol-profiler/package.json
@@ -1,6 +1,6 @@
{
"name": "@0x/sol-profiler",
- "version": "1.0.2",
+ "version": "1.0.3",
"engines": {
"node": ">=6.12"
},
@@ -29,7 +29,7 @@
},
"homepage": "https://github.com/0xProject/0x-monorepo/packages/sol-profiler/README.md",
"dependencies": {
- "@0x/sol-tracing-utils": "^4.0.0",
+ "@0x/sol-tracing-utils": "^4.0.1",
"@0x/subproviders": "^2.1.11",
"@0x/typescript-typings": "^3.0.8",
"ethereum-types": "^1.1.6",
diff --git a/packages/sol-trace/CHANGELOG.json b/packages/sol-trace/CHANGELOG.json
index 8157d441e..d2ad03030 100644
--- a/packages/sol-trace/CHANGELOG.json
+++ b/packages/sol-trace/CHANGELOG.json
@@ -1,5 +1,14 @@
[
{
+ "timestamp": 1547747677,
+ "version": "1.0.3",
+ "changes": [
+ {
+ "note": "Dependencies updated"
+ }
+ ]
+ },
+ {
"timestamp": 1547561734,
"version": "1.0.2",
"changes": [
diff --git a/packages/sol-trace/CHANGELOG.md b/packages/sol-trace/CHANGELOG.md
index ac09a1bbf..18c1719bf 100644
--- a/packages/sol-trace/CHANGELOG.md
+++ b/packages/sol-trace/CHANGELOG.md
@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
CHANGELOG
+## v1.0.3 - _January 17, 2019_
+
+ * Dependencies updated
+
## v1.0.2 - _January 15, 2019_
* Dependencies updated
diff --git a/packages/sol-trace/package.json b/packages/sol-trace/package.json
index acae60303..2aedf7ebc 100644
--- a/packages/sol-trace/package.json
+++ b/packages/sol-trace/package.json
@@ -1,6 +1,6 @@
{
"name": "@0x/sol-trace",
- "version": "1.0.2",
+ "version": "1.0.3",
"engines": {
"node": ">=6.12"
},
@@ -29,7 +29,7 @@
},
"homepage": "https://github.com/0xProject/0x-monorepo/packages/sol-trace/README.md",
"dependencies": {
- "@0x/sol-tracing-utils": "^4.0.0",
+ "@0x/sol-tracing-utils": "^4.0.1",
"@0x/subproviders": "^2.1.11",
"@0x/typescript-typings": "^3.0.8",
"ethereum-types": "^1.1.6",
diff --git a/packages/sol-trace/src/revert_trace_subprovider.ts b/packages/sol-trace/src/revert_trace_subprovider.ts
index fa065cfcb..046dad812 100644
--- a/packages/sol-trace/src/revert_trace_subprovider.ts
+++ b/packages/sol-trace/src/revert_trace_subprovider.ts
@@ -109,9 +109,7 @@ export class RevertTraceSubprovider extends TraceCollectionSubprovider {
const fileNameToFileIndex = _.invert(contractData.sources);
const fileIndex = _.parseInt(fileNameToFileIndex[sourceRange.fileName]);
const sourceSnippet = getSourceRangeSnippet(sourceRange, contractData.sourceCodes[fileIndex]);
- if (sourceSnippet !== null) {
- sourceSnippets.push(sourceSnippet);
- }
+ sourceSnippets.push(sourceSnippet);
}
const filteredSnippets = filterSnippets(sourceSnippets);
if (filteredSnippets.length > 0) {
@@ -135,9 +133,7 @@ function filterSnippets(sourceSnippets: SourceSnippet[]): SourceSnippet[] {
const results: SourceSnippet[] = [sourceSnippets[0]];
let prev = sourceSnippets[0];
for (const sourceSnippet of sourceSnippets) {
- if (sourceSnippet.type === 'IfStatement') {
- continue;
- } else if (sourceSnippet.source === prev.source) {
+ if (sourceSnippet.source === prev.source) {
prev = sourceSnippet;
continue;
}
@@ -157,12 +153,5 @@ function getStackTraceString(sourceSnippet: SourceSnippet): string {
}
function getSourceSnippetString(sourceSnippet: SourceSnippet): string {
- switch (sourceSnippet.type) {
- case 'ContractDefinition':
- return `contract ${sourceSnippet.name}`;
- case 'FunctionDefinition':
- return `function ${sourceSnippet.name}`;
- default:
- return `${sourceSnippet.source}`;
- }
+ return `${sourceSnippet.source}`;
}
diff --git a/packages/sol-tracing-utils/CHANGELOG.json b/packages/sol-tracing-utils/CHANGELOG.json
index b470d3e87..7e98003f7 100644
--- a/packages/sol-tracing-utils/CHANGELOG.json
+++ b/packages/sol-tracing-utils/CHANGELOG.json
@@ -1,5 +1,23 @@
[
{
+ "version": "4.0.1",
+ "changes": [
+ {
+ "note": "Fix a bug where a custom `Geth` tracer didn't return stack entries for `DELEGATECALL`",
+ "pr": 1521
+ },
+ {
+ "note": "Fix a bug where `TraceCollectionSubprovider` was hanging on the fake `Geth` snapshot transaction",
+ "pr": 1521
+ },
+ {
+ "note": "Fix/simplify handling of revert trace snippets",
+ "pr": 1521
+ }
+ ],
+ "timestamp": 1547747677
+ },
+ {
"version": "4.0.0",
"changes": [
{
diff --git a/packages/sol-tracing-utils/CHANGELOG.md b/packages/sol-tracing-utils/CHANGELOG.md
index 00d36844c..9bffb2a6d 100644
--- a/packages/sol-tracing-utils/CHANGELOG.md
+++ b/packages/sol-tracing-utils/CHANGELOG.md
@@ -5,6 +5,12 @@ Edit the package's CHANGELOG.json file only.
CHANGELOG
+## v4.0.1 - _January 17, 2019_
+
+ * Fix a bug where a custom `Geth` tracer didn't return stack entries for `DELEGATECALL` (#1521)
+ * Fix a bug where `TraceCollectionSubprovider` was hanging on the fake `Geth` snapshot transaction (#1521)
+ * Fix/simplify handling of revert trace snippets (#1521)
+
## v4.0.0 - _January 15, 2019_
* Fix a bug with incorrect parsing of `sourceMaps` due to sources being in an array instead of a map (#1498)
diff --git a/packages/sol-tracing-utils/package.json b/packages/sol-tracing-utils/package.json
index e3e52f42c..cabb752d2 100644
--- a/packages/sol-tracing-utils/package.json
+++ b/packages/sol-tracing-utils/package.json
@@ -1,6 +1,6 @@
{
"name": "@0x/sol-tracing-utils",
- "version": "4.0.0",
+ "version": "4.0.1",
"engines": {
"node": ">=6.12"
},
diff --git a/packages/sol-tracing-utils/src/get_source_range_snippet.ts b/packages/sol-tracing-utils/src/get_source_range_snippet.ts
index 7aef00fee..c1f6e3a4e 100644
--- a/packages/sol-tracing-utils/src/get_source_range_snippet.ts
+++ b/packages/sol-tracing-utils/src/get_source_range_snippet.ts
@@ -1,185 +1,16 @@
-import * as ethUtil from 'ethereumjs-util';
-import * as _ from 'lodash';
-import * as Parser from 'solidity-parser-antlr';
-
-import { SingleFileSourceRange, SourceRange, SourceSnippet } from './types';
+import { SourceRange, SourceSnippet } from './types';
import { utils } from './utils';
-interface ASTInfo {
- type: string;
- node: Parser.ASTNode;
- name: string | null;
- range?: SingleFileSourceRange;
-}
-
-// Parsing source code for each transaction/code is slow and therefore we cache it
-const hashToParsedSource: { [sourceHash: string]: Parser.ASTNode } = {};
-
/**
* Gets the source range snippet by source range to be used by revert trace.
* @param sourceRange source range
* @param sourceCode source code
*/
-export function getSourceRangeSnippet(sourceRange: SourceRange, sourceCode: string): SourceSnippet | null {
- const sourceHash = ethUtil.sha3(sourceCode).toString('hex');
- if (_.isUndefined(hashToParsedSource[sourceHash])) {
- hashToParsedSource[sourceHash] = Parser.parse(sourceCode, { loc: true });
- }
- const astNode = hashToParsedSource[sourceHash];
- const visitor = new ASTInfoVisitor();
- Parser.visit(astNode, visitor);
- const astInfo = visitor.getASTInfoForRange(sourceRange);
- if (astInfo === null) {
- return null;
- }
+export function getSourceRangeSnippet(sourceRange: SourceRange, sourceCode: string): SourceSnippet {
const sourceCodeInRange = utils.getRange(sourceCode, sourceRange.location);
return {
- ...astInfo,
- range: astInfo.range as SingleFileSourceRange,
+ range: sourceRange.location,
source: sourceCodeInRange,
fileName: sourceRange.fileName,
};
}
-
-// A visitor which collects ASTInfo for most nodes in the AST.
-class ASTInfoVisitor {
- private readonly _astInfos: ASTInfo[] = [];
- public getASTInfoForRange(sourceRange: SourceRange): ASTInfo | null {
- // HACK(albrow): Sometimes the source range doesn't exactly match that
- // of astInfo. To work around that we try with a +/-1 offset on
- // end.column. If nothing matches even with the offset, we return null.
- const offset = {
- start: {
- line: 0,
- column: 0,
- },
- end: {
- line: 0,
- column: 0,
- },
- };
- let astInfo = this._getASTInfoForRange(sourceRange, offset);
- if (astInfo !== null) {
- return astInfo;
- }
- offset.end.column += 1;
- astInfo = this._getASTInfoForRange(sourceRange, offset);
- if (astInfo !== null) {
- return astInfo;
- }
- offset.end.column -= 2;
- astInfo = this._getASTInfoForRange(sourceRange, offset);
- if (astInfo !== null) {
- return astInfo;
- }
- return null;
- }
- public ContractDefinition(ast: Parser.ContractDefinition): void {
- this._visitContractDefinition(ast);
- }
- public IfStatement(ast: Parser.IfStatement): void {
- this._visitStatement(ast);
- }
- public FunctionDefinition(ast: Parser.FunctionDefinition): void {
- this._visitFunctionLikeDefinition(ast);
- }
- public ModifierDefinition(ast: Parser.ModifierDefinition): void {
- this._visitFunctionLikeDefinition(ast);
- }
- public ForStatement(ast: Parser.ForStatement): void {
- this._visitStatement(ast);
- }
- public ReturnStatement(ast: Parser.ReturnStatement): void {
- this._visitStatement(ast);
- }
- public BreakStatement(ast: Parser.BreakStatement): void {
- this._visitStatement(ast);
- }
- public ContinueStatement(ast: Parser.ContinueStatement): void {
- this._visitStatement(ast);
- }
- public EmitStatement(ast: any /* TODO: Parser.EmitStatement */): void {
- this._visitStatement(ast);
- }
- public VariableDeclarationStatement(ast: Parser.VariableDeclarationStatement): void {
- this._visitStatement(ast);
- }
- public Statement(ast: Parser.Statement): void {
- this._visitStatement(ast);
- }
- public WhileStatement(ast: Parser.WhileStatement): void {
- this._visitStatement(ast);
- }
- public SimpleStatement(ast: Parser.SimpleStatement): void {
- this._visitStatement(ast);
- }
- public ThrowStatement(ast: Parser.ThrowStatement): void {
- this._visitStatement(ast);
- }
- public DoWhileStatement(ast: Parser.DoWhileStatement): void {
- this._visitStatement(ast);
- }
- public ExpressionStatement(ast: Parser.ExpressionStatement): void {
- this._visitStatement(ast.expression);
- }
- public InlineAssemblyStatement(ast: Parser.InlineAssemblyStatement): void {
- this._visitStatement(ast);
- }
- public ModifierInvocation(ast: Parser.ModifierInvocation): void {
- const BUILTIN_MODIFIERS = ['public', 'view', 'payable', 'external', 'internal', 'pure', 'constant'];
- if (!_.includes(BUILTIN_MODIFIERS, ast.name)) {
- this._visitStatement(ast);
- }
- }
- private _visitStatement(ast: Parser.ASTNode): void {
- this._astInfos.push({
- type: ast.type,
- node: ast,
- name: null,
- range: ast.loc,
- });
- }
- private _visitFunctionLikeDefinition(ast: Parser.ModifierDefinition | Parser.FunctionDefinition): void {
- this._astInfos.push({
- type: ast.type,
- node: ast,
- name: ast.name,
- range: ast.loc,
- });
- }
- private _visitContractDefinition(ast: Parser.ContractDefinition): void {
- this._astInfos.push({
- type: ast.type,
- node: ast,
- name: ast.name,
- range: ast.loc,
- });
- }
- private _getASTInfoForRange(sourceRange: SourceRange, offset: SingleFileSourceRange): ASTInfo | null {
- const offsetSourceRange = {
- ...sourceRange,
- location: {
- start: {
- line: sourceRange.location.start.line + offset.start.line,
- column: sourceRange.location.start.column + offset.start.column,
- },
- end: {
- line: sourceRange.location.end.line + offset.end.line,
- column: sourceRange.location.end.column + offset.end.column,
- },
- },
- };
- for (const astInfo of this._astInfos) {
- const astInfoRange = astInfo.range as SingleFileSourceRange;
- if (
- astInfoRange.start.column === offsetSourceRange.location.start.column &&
- astInfoRange.start.line === offsetSourceRange.location.start.line &&
- astInfoRange.end.column === offsetSourceRange.location.end.column &&
- astInfoRange.end.line === offsetSourceRange.location.end.line
- ) {
- return astInfo;
- }
- }
- return null;
- }
-}
diff --git a/packages/sol-tracing-utils/src/trace_collection_subprovider.ts b/packages/sol-tracing-utils/src/trace_collection_subprovider.ts
index 323e1523c..5118921fa 100644
--- a/packages/sol-tracing-utils/src/trace_collection_subprovider.ts
+++ b/packages/sol-tracing-utils/src/trace_collection_subprovider.ts
@@ -144,7 +144,7 @@ export abstract class TraceCollectionSubprovider extends Subprovider {
txHash: string | undefined,
cb: Callback,
): Promise<void> {
- if (!txData.isFakeTransaction) {
+ if (!(txData.isFakeTransaction || txData.from === txData.to)) {
// This transaction is a usual transaction. Not a call executed as one.
// And we don't want it to be executed within a snapshotting period
await this._lock.acquire();
diff --git a/packages/sol-tracing-utils/src/trace_info_subprovider.ts b/packages/sol-tracing-utils/src/trace_info_subprovider.ts
index b75fc7bf7..de42e1862 100644
--- a/packages/sol-tracing-utils/src/trace_info_subprovider.ts
+++ b/packages/sol-tracing-utils/src/trace_info_subprovider.ts
@@ -31,7 +31,7 @@ export abstract class TraceInfoSubprovider extends TraceCollectionSubprovider {
const depth = 0 | log.getDepth();
const gasCost = 0 | log.getCost();
const gas = 0 | log.getGas();
- const isCall = opn == 0xf1 || opn == 0xf2 || opn == 0xf4 || opn == 0xf5;
+ const isCall = opn == 0xf1 || opn == 0xf2 || opn == 0xf4 || opn == 0xf5 || opn == 0xfa;
const stack = isCall ? ['0x'+log.stack.peek(1).toString(16), null] : null;
this.data.push({ pc, gasCost, depth, op, stack, gas });
},
diff --git a/packages/sol-tracing-utils/src/types.ts b/packages/sol-tracing-utils/src/types.ts
index 27568ae03..97b5e6b37 100644
--- a/packages/sol-tracing-utils/src/types.ts
+++ b/packages/sol-tracing-utils/src/types.ts
@@ -1,5 +1,4 @@
import { StructLog } from 'ethereum-types';
-import * as Parser from 'solidity-parser-antlr';
export interface LineColumn {
line: number;
@@ -126,8 +125,5 @@ export type EvmCallStack = EvmCallStackEntry[];
export interface SourceSnippet {
source: string;
fileName: string;
- type: string;
- node: Parser.ASTNode;
- name: string | null;
range: SingleFileSourceRange;
}
diff --git a/packages/sol-tracing-utils/src/utils.ts b/packages/sol-tracing-utils/src/utils.ts
index 644321f32..89c158ee7 100644
--- a/packages/sol-tracing-utils/src/utils.ts
+++ b/packages/sol-tracing-utils/src/utils.ts
@@ -8,6 +8,7 @@ import { ContractData, LineColumn, SingleFileSourceRange } from './types';
// This is the minimum length of valid contract bytecode. The Solidity compiler
// metadata is 86 bytes. If you add the '0x' prefix, we get 88.
const MIN_CONTRACT_BYTECODE_LENGTH = 88;
+const STATICCALL_GAS_COST = 40;
export const utils = {
compareLineColumn(lhs: LineColumn, rhs: LineColumn): number {
@@ -76,10 +77,17 @@ export const utils = {
normalizeStructLogs(structLogs: StructLog[]): StructLog[] {
if (structLogs[0].depth === 1) {
// Geth uses 1-indexed depth counter whilst ganache starts from 0
- const newStructLogs = _.map(structLogs, structLog => ({
- ...structLog,
- depth: structLog.depth - 1,
- }));
+ const newStructLogs = _.map(structLogs, structLog => {
+ const newStructLog = {
+ ...structLog,
+ depth: structLog.depth - 1,
+ };
+ if (newStructLog.op === 'STATICCALL') {
+ // HACK(leo): Geth traces sometimes returns those gas costs incorrectly as very big numbers so we manually fix them.
+ newStructLog.gasCost = STATICCALL_GAS_COST;
+ }
+ return newStructLog;
+ });
return newStructLogs;
}
return structLogs;
diff --git a/packages/testnet-faucets/package.json b/packages/testnet-faucets/package.json
index b6e84698d..da7477be4 100644
--- a/packages/testnet-faucets/package.json
+++ b/packages/testnet-faucets/package.json
@@ -1,7 +1,7 @@
{
"private": true,
"name": "@0x/testnet-faucets",
- "version": "1.0.63",
+ "version": "1.0.64",
"engines": {
"node": ">=6.12"
},
@@ -18,7 +18,7 @@
"author": "Fabio Berger",
"license": "Apache-2.0",
"dependencies": {
- "0x.js": "^3.0.2",
+ "0x.js": "^3.0.3",
"@0x/subproviders": "^2.1.11",
"@0x/typescript-typings": "^3.0.8",
"@0x/utils": "^3.0.1",
diff --git a/packages/website/md/docs/sol_coverage/installation.md b/packages/website/md/docs/sol_coverage/installation.md
index c7aaf07e9..7c9840ab8 100644
--- a/packages/website/md/docs/sol_coverage/installation.md
+++ b/packages/website/md/docs/sol_coverage/installation.md
@@ -1,7 +1,7 @@
**Install**
```bash
-yarn add @0x/sol-coverage
+yarn add -D @0x/sol-coverage
```
**Import**
diff --git a/packages/website/md/docs/sol_coverage/introduction.md b/packages/website/md/docs/sol_coverage/introduction.md
index 3214e93a9..f21f8ecbe 100644
--- a/packages/website/md/docs/sol_coverage/introduction.md
+++ b/packages/website/md/docs/sol_coverage/introduction.md
@@ -1 +1 @@
-Welcome to the [sol-coverage](https://github.com/0xProject/0x-monorepo/tree/development/packages/sol-coverage) documentation! Sol-coverage is a Solidity coverage tool for your smart contract tests.
+Welcome to the [sol-coverage](https://github.com/0xProject/0x-monorepo/tree/development/packages/sol-coverage) documentation! Sol-coverage is a Solidity coverage tool.
diff --git a/packages/website/md/docs/sol_coverage/usage.md b/packages/website/md/docs/sol_coverage/usage.md
index dd3cdf597..d194f8abd 100644
--- a/packages/website/md/docs/sol_coverage/usage.md
+++ b/packages/website/md/docs/sol_coverage/usage.md
@@ -1,4 +1,4 @@
-Sol-coverage uses transaction traces in order to figure out which lines of Solidity source code have been covered by your tests. In order for it to gather these traces, you must add the `CoverageSubprovider` to the [ProviderEngine](https://github.com/MetaMask/provider-engine) instance you use when running your Solidity tests. If you're unfamiliar with ProviderEngine, please read the [Web3 Provider explained](https://0x.org/wiki#Web3-Provider-Explained) wiki article.
+Sol-coverage uses transaction traces in order to figure out which lines of Solidity source code have been covered by your tests. In order for it to gather these traces, you must add the `CoverageSubprovider` to the [ProviderEngine](https://github.com/MetaMask/provider-engine) instance you use when running your Solidity tests. If you're unfamiliar with `ProviderEngine`, please read the [Web3 Provider explained](https://0x.org/wiki#Web3-Provider-Explained) wiki article.
The CoverageSubprovider eavesdrops on the `eth_sendTransaction` and `eth_call` RPC calls and collects traces after each call using `debug_traceTransaction`. `eth_call`'s' don't generate traces - so we take a snapshot, re-submit it as a transaction, get the trace and then revert the snapshot.
@@ -12,9 +12,8 @@ If you are generating your artifacts with [@0x/sol-compiler](https://0x.org/docs
```typescript
import { SolCompilerArtifactsAdapter } from '@0x/sol-coverage';
-const artifactsPath = 'src/artifacts';
-const contractsPath = 'src/contracts';
-const artifactsAdapter = new SolCompilerArtifactsAdapter(artifactsPath, contractsPath);
+// Both artifactsDir and contractsDir are optional and will be fetched from compiler.json if not passed in
+const artifactAdapter = new SolCompilerArtifactAdapter(artifactsDir, contractsDir);
```
### Truffle
@@ -23,8 +22,9 @@ If your project is using [Truffle](https://truffleframework.com/), we've written
```typescript
import { TruffleArtifactAdapter } from '@0x/sol-coverage';
-const contractsPath = 'src/contracts';
-const artifactAdapter = new TruffleArtifactAdapter(contractsDir);
+const projectRoot = '.';
+const solcVersion = '0.5.0';
+const artifactAdapter = new TruffleArtifactAdapter(projectRoot, solcVersion);
```
Because truffle artifacts don't have all the data we need - we actually will recompile your contracts under the hood. That's why you don't need to pass an `artifactsPath`.
@@ -32,7 +32,13 @@ Because truffle artifacts don't have all the data we need - we actually will rec
### Other framework/toolset
You'll need to write your own artifacts adapter. It should extend `AbstractArtifactsAdapter`.
-Look at the code of the two adapters above for examples.
+
+```typescript
+import { AbstractArtifactAdapter } from '@0x/sol-trace';
+
+class YourCustomArtifactsAdapter extends AbstractArtifactAdapter {...};
+const artifactAdapter = new YourCustomArtifactsAdapter(...);
+```
### Usage
@@ -41,16 +47,14 @@ import { CoverageSubprovider } from '@0x/sol-coverage';
import ProviderEngine = require('web3-provider-engine');
const provider = new ProviderEngine();
-
-const artifactsPath = 'src/artifacts';
-const contractsPath = 'src/contracts';
-const networkId = 50;
// Some calls might not have `from` address specified. Nevertheless - transactions need to be submitted from an address with at least some funds. defaultFromAddress is the address that will be used to submit those calls as transactions from.
const defaultFromAddress = '0x5409ed021d9299bf6814279a6a1411a7e866a631';
const isVerbose = true;
const coverageSubprovider = new CoverageSubprovider(artifactsAdapter, defaultFromAddress, isVerbose);
provider.addProvider(coverageSubprovider);
+// Add all your other providers
+provider.start();
```
After your test suite is complete (e.g in the Mocha global `after` hook), you'll need to call:
@@ -60,3 +64,11 @@ await coverageSubprovider.writeCoverageAsync();
```
This will create a `coverage.json` file in a `coverage` directory. This file has an [Istanbul format](https://github.com/gotwarlost/istanbul/blob/master/coverage.json.md) - so you can use it with any of the existing Istanbul reporters.
+
+```bash
+yarn add -D istanbul
+istanbul report html
+open coverage/index.html
+```
+
+Use [Geth](https://github.com/ethereum/go-ethereum) as a backing node. We recommend using our [Devnet Docker container](https://hub.docker.com/r/0xorg/devnet) which sets up a Geth node for testing purposes. Ganache support is a [work in progress](https://github.com/0xProject/0x-monorepo/issues/1520).
diff --git a/packages/website/md/docs/sol_profiler/installation.md b/packages/website/md/docs/sol_profiler/installation.md
index be9a365f5..e29ac5ae7 100644
--- a/packages/website/md/docs/sol_profiler/installation.md
+++ b/packages/website/md/docs/sol_profiler/installation.md
@@ -1,7 +1,7 @@
**Install**
```bash
-yarn add @0x/sol-profiler
+yarn add -D @0x/sol-profiler
```
**Import**
diff --git a/packages/website/md/docs/sol_profiler/usage.md b/packages/website/md/docs/sol_profiler/usage.md
index 35ea140da..0fbc31bc1 100644
--- a/packages/website/md/docs/sol_profiler/usage.md
+++ b/packages/website/md/docs/sol_profiler/usage.md
@@ -1,4 +1,4 @@
-Sol-profiler uses transaction traces in order to figure out which lines of Solidity source code have been covered by your tests. In order for it to gather these traces, you must add the `ProfilerSubprovider` to the [ProviderEngine](https://github.com/MetaMask/provider-engine) instance you use when running your Solidity tests. If you're unfamiliar with ProviderEngine, please read the [Web3 Provider explained](https://0x.org/wiki#Web3-Provider-Explained) wiki article.
+Sol-profiler uses transaction traces in order to figure out which lines of Solidity source code have been covered by your tests. In order for it to gather these traces, you must add the `ProfilerSubprovider` to the [ProviderEngine](https://github.com/MetaMask/provider-engine) instance you use when running your Solidity tests. If you're unfamiliar with `ProviderEngine`, please read the [Web3 Provider explained](https://0x.org/wiki#Web3-Provider-Explained) wiki article.
The ProfilerSubprovider eavesdrops on the `eth_sendTransaction` and `eth_call` RPC calls and collects traces after each call using `debug_traceTransaction`. `eth_call`'s' don't generate traces - so we take a snapshot, re-submit it as a transaction, get the trace and then revert the snapshot.
@@ -12,9 +12,8 @@ If you are generating your artifacts with [@0x/sol-compiler](https://0x.org/docs
```typescript
import { SolCompilerArtifactsAdapter } from '@0x/sol-profiler';
-const artifactsPath = 'src/artifacts';
-const contractsPath = 'src/contracts';
-const artifactsAdapter = new SolCompilerArtifactsAdapter(artifactsPath, contractsPath);
+// Both artifactsDir and contractsDir are optional and will be fetched from compiler.json if not passed in
+const artifactAdapter = new SolCompilerArtifactAdapter(artifactsDir, contractsDir);
```
### Truffle
@@ -23,8 +22,9 @@ If your project is using [Truffle](https://truffleframework.com/), we've written
```typescript
import { TruffleArtifactAdapter } from '@0x/sol-profiler';
-const contractsPath = 'src/contracts';
-const artifactAdapter = new TruffleArtifactAdapter(contractsDir);
+const projectRoot = '.';
+const solcVersion = '0.5.0';
+const artifactAdapter = new TruffleArtifactAdapter(projectRoot, solcVersion);
```
Because truffle artifacts don't have all the data we need - we actually will recompile your contracts under the hood. That's why you don't need to pass an `artifactsPath`.
@@ -32,7 +32,13 @@ Because truffle artifacts don't have all the data we need - we actually will rec
### Other framework/toolset
You'll need to write your own artifacts adapter. It should extend `AbstractArtifactsAdapter`.
-Look at the code of the two adapters above for examples.
+
+```typescript
+import { AbstractArtifactAdapter } from '@0x/sol-trace';
+
+class YourCustomArtifactsAdapter extends AbstractArtifactAdapter {...};
+const artifactAdapter = new YourCustomArtifactsAdapter(...);
+```
### Usage
@@ -41,22 +47,28 @@ import { ProfilerSubprovider } from '@0x/sol-profiler';
import ProviderEngine = require('web3-provider-engine');
const provider = new ProviderEngine();
-
-const artifactsPath = 'src/artifacts';
-const contractsPath = 'src/contracts';
-const networkId = 50;
// Some calls might not have `from` address specified. Nevertheless - transactions need to be submitted from an address with at least some funds. defaultFromAddress is the address that will be used to submit those calls as transactions from.
const defaultFromAddress = '0x5409ed021d9299bf6814279a6a1411a7e866a631';
const isVerbose = true;
const profilerSubprovider = new ProfilerSubprovider(artifactsAdapter, defaultFromAddress, isVerbose);
provider.addProvider(profilerSubprovider);
+// Add all your other providers
+provider.start();
```
After your test suite is complete (e.g in the Mocha global `after` hook), you'll need to call:
```typescript
-await profilerSubprovider.writeProfilerAsync();
+await profilerSubprovider.writeProfilerOutputAsync();
+```
+
+This will create a `coverage.json` file in a `coverage` directory. This file has an [Istanbul format](https://github.com/gotwarlost/istanbul/blob/master/profiler.json.md) - so you can use it with any of the existing Istanbul reporters.
+
+```bash
+yarn add -D istanbul
+istanbul report html
+open coverage/index.html
```
-This will create a `profiler.json` file in a `profiler` directory. This file has an [Istanbul format](https://github.com/gotwarlost/istanbul/blob/master/profiler.json.md) - so you can use it with any of the existing Istanbul reporters.
+Use [Geth](https://github.com/ethereum/go-ethereum) as a backing node. We recommend using our [Devnet Docker container](https://hub.docker.com/r/0xorg/devnet) which sets up a Geth node for testing purposes. Ganache support is a [work in progress](https://github.com/0xProject/0x-monorepo/issues/1520).
diff --git a/packages/website/md/docs/sol_trace/installation.md b/packages/website/md/docs/sol_trace/installation.md
index 2f794b2f8..eb7bf08b8 100644
--- a/packages/website/md/docs/sol_trace/installation.md
+++ b/packages/website/md/docs/sol_trace/installation.md
@@ -1,17 +1,17 @@
**Install**
```bash
-yarn add @0x/sol-trace
+yarn add -D @0x/sol-trace
```
**Import**
```javascript
-import { TraceSubprovider } from '@0x/sol-trace';
+import { RevertTraceSubprovider } from '@0x/sol-trace';
```
or
```javascript
-var TraceSubprovider = require('@0x/sol-trace').TraceSubprovider;
+var RevertTraceSubprovider = require('@0x/sol-trace').RevertTraceSubprovider;
```
diff --git a/packages/website/md/docs/sol_trace/introduction.md b/packages/website/md/docs/sol_trace/introduction.md
index 21fea764e..73f5c2bcd 100644
--- a/packages/website/md/docs/sol_trace/introduction.md
+++ b/packages/website/md/docs/sol_trace/introduction.md
@@ -1 +1 @@
-Welcome to the [sol-trace](https://github.com/0xProject/0x-monorepo/tree/development/packages/sol-trace) documentation! Sol-trace is a Solidity trace tool for your smart contract tests.
+Welcome to the [sol-trace](https://github.com/0xProject/0x-monorepo/tree/development/packages/sol-trace) documentation! Sol-trace gives you a human-readable error stack trace when a revert happens in your Solidity code.
diff --git a/packages/website/md/docs/sol_trace/usage.md b/packages/website/md/docs/sol_trace/usage.md
index f3aa6fc35..d117a0faf 100644
--- a/packages/website/md/docs/sol_trace/usage.md
+++ b/packages/website/md/docs/sol_trace/usage.md
@@ -1,10 +1,10 @@
-Sol-trace uses transaction traces in order to figure out which lines of Solidity source code have been covered by your tests. In order for it to gather these traces, you must add the `TraceSubprovider` to the [ProviderEngine](https://github.com/MetaMask/provider-engine) instance you use when running your Solidity tests. If you're unfamiliar with ProviderEngine, please read the [Web3 Provider explained](https://0x.org/wiki#Web3-Provider-Explained) wiki article.
+Sol-trace uses transaction traces to reconstruct the stack trace when reverts happen in Solidity. In order for it to gather these traces, you must add the `RevertTraceSubprovider` to the [ProviderEngine](https://github.com/MetaMask/provider-engine) instance you use when running your Solidity tests. If you're unfamiliar with `ProviderEngine`, please read the [Web3 Provider explained](https://0x.org/wiki#Web3-Provider-Explained) wiki article.
-The TraceSubprovider eavesdrops on the `eth_sendTransaction` and `eth_call` RPC calls and collects traces after each call using `debug_traceTransaction`. `eth_call`'s' don't generate traces - so we take a snapshot, re-submit it as a transaction, get the trace and then revert the snapshot.
+The `RevertTraceSubprovider` eavesdrops on the `eth_sendTransaction` and `eth_call` RPC calls and collects traces after each call using `debug_traceTransaction`. `eth_call`'s' don't generate traces - so we take a snapshot, re-submit it as a transaction, get the trace and then revert the snapshot.
Trace subprovider needs some info about your contracts (`srcMap`, `bytecode`). It gets that info from your project's artifacts. Some frameworks have their own artifact format. Some artifact formats don't actually contain all the neccessary data.
-In order to use `TraceSubprovider` with your favorite framework you need to pass an `artifactsAdapter` to it.
+In order to use `RevertTraceSubprovider` with your favorite framework you need to pass an `artifactsAdapter` to it.
### Sol-compiler
@@ -12,9 +12,8 @@ If you are generating your artifacts with [@0x/sol-compiler](https://0x.org/docs
```typescript
import { SolCompilerArtifactsAdapter } from '@0x/sol-trace';
-const artifactsPath = 'src/artifacts';
-const contractsPath = 'src/contracts';
-const artifactsAdapter = new SolCompilerArtifactsAdapter(artifactsPath, contractsPath);
+// Both artifactsDir and contractsDir are optional and will be fetched from compiler.json if not passed in
+const artifactAdapter = new SolCompilerArtifactAdapter(artifactsDir, contractsDir);
```
### Truffle
@@ -23,8 +22,9 @@ If your project is using [Truffle](https://truffleframework.com/), we've written
```typescript
import { TruffleArtifactAdapter } from '@0x/sol-trace';
-const contractsPath = 'src/contracts';
-const artifactAdapter = new TruffleArtifactAdapter(contractsDir);
+const projectRoot = '.';
+const solcVersion = '0.5.0';
+const artifactAdapter = new TruffleArtifactAdapter(projectRoot, solcVersion);
```
Because truffle artifacts don't have all the data we need - we actually will recompile your contracts under the hood. That's why you don't need to pass an `artifactsPath`.
@@ -32,31 +32,31 @@ Because truffle artifacts don't have all the data we need - we actually will rec
### Other framework/toolset
You'll need to write your own artifacts adapter. It should extend `AbstractArtifactsAdapter`.
-Look at the code of the two adapters above for examples.
+
+```typescript
+import { AbstractArtifactAdapter } from '@0x/sol-trace';
+
+class YourCustomArtifactsAdapter extends AbstractArtifactAdapter {...};
+const artifactAdapter = new YourCustomArtifactsAdapter(...);
+```
### Usage
```typescript
-import { TraceSubprovider } from '@0x/sol-trace';
+import { RevertTraceSubprovider } from '@0x/sol-trace';
import ProviderEngine = require('web3-provider-engine');
const provider = new ProviderEngine();
-
-const artifactsPath = 'src/artifacts';
-const contractsPath = 'src/contracts';
-const networkId = 50;
// Some calls might not have `from` address specified. Nevertheless - transactions need to be submitted from an address with at least some funds. defaultFromAddress is the address that will be used to submit those calls as transactions from.
const defaultFromAddress = '0x5409ed021d9299bf6814279a6a1411a7e866a631';
const isVerbose = true;
-const traceSubprovider = new TraceSubprovider(artifactsAdapter, defaultFromAddress, isVerbose);
+const revertTraceSubprovider = new RevertTraceSubprovider(artifactsAdapter, defaultFromAddress, isVerbose);
-provider.addProvider(traceSubprovider);
+provider.addProvider(revertTraceSubprovider);
+// Add all your other providers
+provider.start();
```
-After your test suite is complete (e.g in the Mocha global `after` hook), you'll need to call:
-
-```typescript
-await traceSubprovider.writeTraceAsync();
-```
+Now when you run your tests, it should print out stack traces when encountering an error.
-This will create a `trace.json` file in a `trace` directory. This file has an [Istanbul format](https://github.com/gotwarlost/istanbul/blob/master/trace.json.md) - so you can use it with any of the existing Istanbul reporters.
+Use [Geth](https://github.com/ethereum/go-ethereum) as a backing node. We recommend using our [Devnet Docker container](https://hub.docker.com/r/0xorg/devnet) which sets up a Geth node for testing purposes. Ganache support is a [work in progress](https://github.com/0xProject/0x-monorepo/issues/1520).
diff --git a/packages/website/package.json b/packages/website/package.json
index 0d2773a2c..ce7ed395f 100644
--- a/packages/website/package.json
+++ b/packages/website/package.json
@@ -1,6 +1,6 @@
{
"name": "@0x/website",
- "version": "0.0.66",
+ "version": "0.0.67",
"engines": {
"node": ">=6.12"
},
@@ -20,9 +20,9 @@
"author": "Fabio Berger",
"license": "Apache-2.0",
"dependencies": {
- "@0x/asset-buyer": "^4.0.1",
+ "@0x/asset-buyer": "^4.0.2",
"@0x/contract-addresses": "^2.2.0",
- "@0x/contract-wrappers": "^5.0.0",
+ "@0x/contract-wrappers": "^5.0.1",
"@0x/json-schemas": "^2.1.7",
"@0x/order-utils": "^3.1.2",
"@0x/react-docs": "^1.0.25",
diff --git a/packages/website/public/images/team/oshirob.png b/packages/website/public/images/team/oshirob.png
new file mode 100644
index 000000000..094bab79b
--- /dev/null
+++ b/packages/website/public/images/team/oshirob.png
Binary files differ
diff --git a/packages/website/ts/pages/about/team.tsx b/packages/website/ts/pages/about/team.tsx
index 41d6c2cf8..466ba9f43 100644
--- a/packages/website/ts/pages/about/team.tsx
+++ b/packages/website/ts/pages/about/team.tsx
@@ -30,7 +30,7 @@ const team: TeamMember[] = [
{
imageUrl: '/images/team/fabiob.jpg',
name: 'Fabio Berger',
- title: 'senior engineer',
+ title: 'engineering manager',
},
{
imageUrl: '/images/team/alexv.jpg',
@@ -55,7 +55,7 @@ const team: TeamMember[] = [
{
imageUrl: '/images/team/toms.jpg',
name: 'Tom Schmidt',
- title: 'product manager',
+ title: 'product lead',
},
{
imageUrl: '/images/team/jacobe.jpg',
@@ -147,6 +147,11 @@ const team: TeamMember[] = [
name: 'Xianny Ng',
title: 'engineer',
},
+ {
+ imageUrl: '/images/team/oshirob.png',
+ name: 'Brent Oshiro',
+ title: 'community engagement lead',
+ },
];
const advisors: TeamMember[] = [
diff --git a/yarn.lock b/yarn.lock
index 307d8c54b..7e0046213 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -7953,7 +7953,7 @@ got@^6.7.1:
graceful-fs@4.1.15, graceful-fs@^3.0.0, graceful-fs@^4.0.0, graceful-fs@^4.1.10, graceful-fs@^4.1.11, graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.1.9, graceful-fs@~1.2.0:
version "4.1.15"
- resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.15.tgz#ffb703e1066e8a0eeaa4c8b80ba9253eeefbfb00"
+ resolved "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.15.tgz#ffb703e1066e8a0eeaa4c8b80ba9253eeefbfb00"
"graceful-readlink@>= 1.0.0":
version "1.0.1"
@@ -13604,7 +13604,7 @@ react-helmet@^5.2.0:
prop-types "^15.5.4"
react-side-effect "^1.1.0"
-react-highlight@0xproject/react-highlight#699ac4d9529e33520bff4b9bd9c624d21efbba75:
+react-highlight@0xproject/react-highlight#fix/react-version:
version "1.0.0"
resolved "https://codeload.github.com/0xproject/react-highlight/tar.gz/699ac4d9529e33520bff4b9bd9c624d21efbba75"
dependencies: