From 89e439c521aed35be72bee1094d8a431e5fc1d68 Mon Sep 17 00:00:00 2001 From: August Skare Date: Fri, 26 Oct 2018 09:59:10 +0200 Subject: update content in tabs --- packages/dev-tools-pages/ts/pages/Compiler.tsx | 12 ++++++++---- packages/dev-tools-pages/ts/pages/Cov.tsx | 21 ++++++++++++++++++--- packages/dev-tools-pages/ts/pages/Profiler.tsx | 23 +++++++++++++++++++---- packages/dev-tools-pages/ts/pages/Trace.tsx | 23 +++++++++++++++++++---- 4 files changed, 64 insertions(+), 15 deletions(-) (limited to 'packages/dev-tools-pages/ts') diff --git a/packages/dev-tools-pages/ts/pages/Compiler.tsx b/packages/dev-tools-pages/ts/pages/Compiler.tsx index 0d9be16bf..d2c14c90c 100644 --- a/packages/dev-tools-pages/ts/pages/Compiler.tsx +++ b/packages/dev-tools-pages/ts/pages/Compiler.tsx @@ -66,7 +66,8 @@ function Compiler() {

- 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 solidity standard JSON output format for the artifacts. This way, you can + define which parts of the artifact you need.

@@ -94,9 +95,12 @@ function Compiler() { }`} -
- -

Sometimes you need to use some debuggers or other dev tools and you’ll need more info in the artifact.

+
+ +

+ Sometimes you need to use some debuggers or other dev tools and you’ll need more info in the + artifact. +

{`{ diff --git a/packages/dev-tools-pages/ts/pages/Cov.tsx b/packages/dev-tools-pages/ts/pages/Cov.tsx index 743b990df..4d8288219 100644 --- a/packages/dev-tools-pages/ts/pages/Cov.tsx +++ b/packages/dev-tools-pages/ts/pages/Cov.tsx @@ -84,8 +84,23 @@ function Cov() { const artifactAdapter = new SolCompilerArtifactAdapter(artifactsDir, contractsDir);`} - Truffle - Custom + + + {`import { TruffleArtifactAdapter } from '@0x/sol-trace'; + +const projectRoot = '.'; +const solcVersion = '0.4.24'; +const artifactAdapter = new TruffleArtifactAdapter(projectRoot, solcVersion);`} + + + + + {`import { AbstractArtifactAdapter } from '@0x/sol-trace'; + +class YourCustomArtifactsAdapter extends AbstractArtifactAdapter {...}; +const artifactAdapter = new YourCustomArtifactsAdapter(...);`} + +

Now that we have an artifactAdapter, we can create a{' '} @@ -93,7 +108,7 @@ const artifactAdapter = new SolCompilerArtifactAdapter(artifactsDir, contractsDi

- + {`import { ProviderEngine, RpcSubprovider } from 'web3-provider-engine'; import { RevertTraceSubprovider } from '@0x/sol-cov'; diff --git a/packages/dev-tools-pages/ts/pages/Profiler.tsx b/packages/dev-tools-pages/ts/pages/Profiler.tsx index b8e78264e..d45721937 100644 --- a/packages/dev-tools-pages/ts/pages/Profiler.tsx +++ b/packages/dev-tools-pages/ts/pages/Profiler.tsx @@ -69,15 +69,30 @@ function Profiler() { - + {`import { SolCompilerArtifactAdapter } from '@0x/sol-trace'; // Both artifactsDir and contractsDir are optional and will be fetched from compiler.json if not passed in const artifactAdapter = new SolCompilerArtifactAdapter(artifactsDir, contractsDir);`} - Truffle - Custom + + + {`import { TruffleArtifactAdapter } from '@0x/sol-trace'; + +const projectRoot = '.'; +const solcVersion = '0.4.24'; +const artifactAdapter = new TruffleArtifactAdapter(projectRoot, solcVersion);`} + + + + + {`import { AbstractArtifactAdapter } from '@0x/sol-trace'; + +class YourCustomArtifactsAdapter extends AbstractArtifactAdapter {...}; +const artifactAdapter = new YourCustomArtifactsAdapter(...);`} + +

Now that we have an artifactAdapter, we can create a{' '} @@ -85,7 +100,7 @@ const artifactAdapter = new SolCompilerArtifactAdapter(artifactsDir, contractsDi

- + {`import { ProviderEngine, RpcSubprovider } from 'web3-provider-engine'; import { RevertTraceSubprovider } from '@0x/sol-cov'; diff --git a/packages/dev-tools-pages/ts/pages/Trace.tsx b/packages/dev-tools-pages/ts/pages/Trace.tsx index 870402df6..609ec8625 100644 --- a/packages/dev-tools-pages/ts/pages/Trace.tsx +++ b/packages/dev-tools-pages/ts/pages/Trace.tsx @@ -44,15 +44,30 @@ function Trace() { - + {`import { SolCompilerArtifactAdapter } from '@0x/sol-trace'; // Both artifactsDir and contractsDir are optional and will be fetched from compiler.json if not passed in const artifactAdapter = new SolCompilerArtifactAdapter(artifactsDir, contractsDir);`} - Truffle - Custom + + + {`import { TruffleArtifactAdapter } from '@0x/sol-trace'; + +const projectRoot = '.'; +const solcVersion = '0.4.24'; +const artifactAdapter = new TruffleArtifactAdapter(projectRoot, solcVersion);`} + + + + + {`import { AbstractArtifactAdapter } from '@0x/sol-trace'; + +class YourCustomArtifactsAdapter extends AbstractArtifactAdapter {...}; +const artifactAdapter = new YourCustomArtifactsAdapter(...);`} + +

Now that we have an artifactAdapter, we can create a{' '} @@ -60,7 +75,7 @@ const artifactAdapter = new SolCompilerArtifactAdapter(artifactsDir, contractsDi

- + {`import { ProviderEngine, RpcSubprovider } from 'web3-provider-engine'; import { RevertTraceSubprovider } from '@0x/sol-cov'; -- cgit