aboutsummaryrefslogtreecommitdiffstats
path: root/packages/contracts/src
diff options
context:
space:
mode:
authorAlex Browne <stephenalexbrowne@gmail.com>2018-06-15 06:46:59 +0800
committerAlex Browne <stephenalexbrowne@gmail.com>2018-06-15 06:46:59 +0800
commit263bfb1bdad8acdb9b534edf6e79024e8da35721 (patch)
tree0f0b609ce5ef7b6ca3173efe4f51a2f2ce5f7761 /packages/contracts/src
parent7ab921669bf52c1cb2d43350b2cccc8efe91bdbd (diff)
downloaddexon-0x-contracts-263bfb1bdad8acdb9b534edf6e79024e8da35721.tar.gz
dexon-0x-contracts-263bfb1bdad8acdb9b534edf6e79024e8da35721.tar.zst
dexon-0x-contracts-263bfb1bdad8acdb9b534edf6e79024e8da35721.zip
Fix a bug in revert_trace.ts
Diffstat (limited to 'packages/contracts/src')
-rw-r--r--packages/contracts/src/utils/web3_wrapper.ts46
1 files changed, 23 insertions, 23 deletions
diff --git a/packages/contracts/src/utils/web3_wrapper.ts b/packages/contracts/src/utils/web3_wrapper.ts
index b8e8ed8ce..f51ad435b 100644
--- a/packages/contracts/src/utils/web3_wrapper.ts
+++ b/packages/contracts/src/utils/web3_wrapper.ts
@@ -51,29 +51,29 @@ const isCoverageEnabled = env.parseBoolean(EnvVars.SolidityCoverage);
const isProfilerEnabled = env.parseBoolean(EnvVars.SolidityProfiler);
const isRevertTraceEnabled = env.parseBoolean(EnvVars.SolidityRevertTrace);
// TODO(albrow): Include revertTrace checks in the warnings below.
-// if (isCoverageEnabled && isProfilerEnabled) {
-// throw new Error(
-// `Unfortunately for now you can't enable both coverage and profiler at the same time. They both use coverage.json file and there is no way to configure that.`,
-// );
-// }
-// if (isCoverageEnabled) {
-// const coverageSubprovider = coverage.getCoverageSubproviderSingleton();
-// prependSubprovider(provider, coverageSubprovider);
-// }
-// if (isProfilerEnabled) {
-// if (testProvider === ProviderType.Ganache) {
-// logUtils.warn(
-// "Gas costs in Ganache traces are incorrect and we don't recommend using it for profiling. Please switch to Geth",
-// );
-// process.exit(1);
-// }
-// const profilerSubprovider = profiler.getProfilerSubproviderSingleton();
-// logUtils.log(
-// "By default profilerSubprovider is stopped so that you don't get noise from setup code. Don't forget to start it before the code you want to profile and stop it afterwards",
-// );
-// profilerSubprovider.stop();
-// prependSubprovider(provider, profilerSubprovider);
-// }
+if (isCoverageEnabled && isProfilerEnabled) {
+ throw new Error(
+ `Unfortunately for now you can't enable both coverage and profiler at the same time. They both use coverage.json file and there is no way to configure that.`,
+ );
+}
+if (isCoverageEnabled) {
+ const coverageSubprovider = coverage.getCoverageSubproviderSingleton();
+ prependSubprovider(provider, coverageSubprovider);
+}
+if (isProfilerEnabled) {
+ if (testProvider === ProviderType.Ganache) {
+ logUtils.warn(
+ "Gas costs in Ganache traces are incorrect and we don't recommend using it for profiling. Please switch to Geth",
+ );
+ process.exit(1);
+ }
+ const profilerSubprovider = profiler.getProfilerSubproviderSingleton();
+ logUtils.log(
+ "By default profilerSubprovider is stopped so that you don't get noise from setup code. Don't forget to start it before the code you want to profile and stop it afterwards",
+ );
+ profilerSubprovider.stop();
+ prependSubprovider(provider, profilerSubprovider);
+}
if (isRevertTraceEnabled) {
const revertTraceSubprovider = revertTrace.getRevertTraceSubproviderSingleton();
prependSubprovider(provider, revertTraceSubprovider);