diff options
Diffstat (limited to 'packages/sol-trace')
-rw-r--r-- | packages/sol-trace/CHANGELOG.json | 9 | ||||
-rw-r--r-- | packages/sol-trace/CHANGELOG.md | 14 | ||||
-rw-r--r-- | packages/sol-trace/package.json | 12 | ||||
-rw-r--r-- | packages/sol-trace/src/index.ts | 2 | ||||
-rw-r--r-- | packages/sol-trace/src/revert_trace_subprovider.ts | 3 |
5 files changed, 33 insertions, 7 deletions
diff --git a/packages/sol-trace/CHANGELOG.json b/packages/sol-trace/CHANGELOG.json index 223400eae..858ec8227 100644 --- a/packages/sol-trace/CHANGELOG.json +++ b/packages/sol-trace/CHANGELOG.json @@ -1,5 +1,14 @@ [ { + "timestamp": 1547225310, + "version": "1.0.1", + "changes": [ + { + "note": "Dependencies updated" + } + ] + }, + { "version": "1.0.0", "changes": [ { diff --git a/packages/sol-trace/CHANGELOG.md b/packages/sol-trace/CHANGELOG.md new file mode 100644 index 000000000..f2c34622d --- /dev/null +++ b/packages/sol-trace/CHANGELOG.md @@ -0,0 +1,14 @@ +<!-- +changelogUtils.file is auto-generated using the monorepo-scripts package. Don't edit directly. +Edit the package's CHANGELOG.json file only. +--> + +CHANGELOG + +## v1.0.1 - _January 11, 2019_ + + * Dependencies updated + +## v1.0.0 - _Invalid date_ + + * Initial release as a separate package. For historical entries see @0x/sol-tracing-utils (#1492) diff --git a/packages/sol-trace/package.json b/packages/sol-trace/package.json index 3013be6f9..cfe2bc953 100644 --- a/packages/sol-trace/package.json +++ b/packages/sol-trace/package.json @@ -1,6 +1,6 @@ { "name": "@0x/sol-trace", - "version": "1.0.0", + "version": "1.0.1", "engines": { "node": ">=6.12" }, @@ -29,16 +29,16 @@ }, "homepage": "https://github.com/0xProject/0x-monorepo/packages/sol-trace/README.md", "dependencies": { - "@0x/subproviders": "^2.1.8", - "@0x/typescript-typings": "^3.0.6", - "@0x/sol-tracing-utils": "^2.1.16", - "ethereum-types": "^1.1.4", + "@0x/sol-tracing-utils": "^3.0.0", + "@0x/subproviders": "^2.1.10", + "@0x/typescript-typings": "^3.0.7", + "ethereum-types": "^1.1.5", "ethereumjs-util": "^5.1.1", "lodash": "^4.17.5", "loglevel": "^1.6.1" }, "devDependencies": { - "@0x/tslint-config": "^2.0.0", + "@0x/tslint-config": "^2.0.1", "@types/loglevel": "^1.5.3", "@types/node": "*", "npm-run-all": "^4.1.2", diff --git a/packages/sol-trace/src/index.ts b/packages/sol-trace/src/index.ts index 120c0d0a9..61b5d8cb7 100644 --- a/packages/sol-trace/src/index.ts +++ b/packages/sol-trace/src/index.ts @@ -3,6 +3,8 @@ export { TruffleArtifactAdapter, SolCompilerArtifactAdapter, ContractData, + SourceCodes, + Sources, } from '@0x/sol-tracing-utils'; export { RevertTraceSubprovider } from './revert_trace_subprovider'; diff --git a/packages/sol-trace/src/revert_trace_subprovider.ts b/packages/sol-trace/src/revert_trace_subprovider.ts index 31067a402..fa065cfcb 100644 --- a/packages/sol-trace/src/revert_trace_subprovider.ts +++ b/packages/sol-trace/src/revert_trace_subprovider.ts @@ -106,7 +106,8 @@ export class RevertTraceSubprovider extends TraceCollectionSubprovider { continue; } - const fileIndex = contractData.sources.indexOf(sourceRange.fileName); + const fileNameToFileIndex = _.invert(contractData.sources); + const fileIndex = _.parseInt(fileNameToFileIndex[sourceRange.fileName]); const sourceSnippet = getSourceRangeSnippet(sourceRange, contractData.sourceCodes[fileIndex]); if (sourceSnippet !== null) { sourceSnippets.push(sourceSnippet); |