diff options
author | Alex Browne <stephenalexbrowne@gmail.com> | 2018-06-15 06:46:59 +0800 |
---|---|---|
committer | Alex Browne <stephenalexbrowne@gmail.com> | 2018-06-15 06:46:59 +0800 |
commit | 263bfb1bdad8acdb9b534edf6e79024e8da35721 (patch) | |
tree | 0f0b609ce5ef7b6ca3173efe4f51a2f2ce5f7761 /packages/sol-cov/src/revert_trace_subprovider.ts | |
parent | 7ab921669bf52c1cb2d43350b2cccc8efe91bdbd (diff) | |
download | dexon-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/sol-cov/src/revert_trace_subprovider.ts')
-rw-r--r-- | packages/sol-cov/src/revert_trace_subprovider.ts | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/packages/sol-cov/src/revert_trace_subprovider.ts b/packages/sol-cov/src/revert_trace_subprovider.ts index ea878058c..aef9c7568 100644 --- a/packages/sol-cov/src/revert_trace_subprovider.ts +++ b/packages/sol-cov/src/revert_trace_subprovider.ts @@ -186,6 +186,10 @@ export class RevertTraceSubprovider extends Subprovider { } for (const evmCallStackEntry of evmCallStack) { const isContractCreation = evmCallStackEntry.address === constants.NEW_CONTRACT; + if (isContractCreation) { + this._logger.error('Contract creation not supported'); + continue; + } const bytecode = await this._web3Wrapper.getContractCodeAsync(evmCallStackEntry.address); const contractData = utils.getContractDataIfExists(this._contractsData, bytecode); if (_.isUndefined(contractData)) { @@ -223,7 +227,7 @@ export class RevertTraceSubprovider extends Subprovider { sourceRanges.push(sourceRange); } if (sourceRanges.length > 0) { - this._logger.error('\n\nStack trace:\n'); + this._logger.error('\n\nStack trace for REVERT:\n'); _.forEach(sourceRanges, sourceRange => { this._logger.error( `${sourceRange.fileName}:${sourceRange.location.start.line}:${sourceRange.location.start.column}`, |