diff options
author | Steve Klebanoff <steve.klebanoff@gmail.com> | 2019-01-16 02:43:55 +0800 |
---|---|---|
committer | Steve Klebanoff <steve.klebanoff@gmail.com> | 2019-01-16 02:43:55 +0800 |
commit | 600b44c9620494c976b5aac6e8a1912543cda81c (patch) | |
tree | fd78c65dd2fdd7b1cbee1b5eff97a95a984a9186 /packages/sol-trace | |
parent | 8a8a5332d76ae8429d1c6449e0ea693a2e8c8a8a (diff) | |
parent | f570f80674c22f69712c45e8e3c48e948b51f357 (diff) | |
download | dexon-sol-tools-600b44c9620494c976b5aac6e8a1912543cda81c.tar dexon-sol-tools-600b44c9620494c976b5aac6e8a1912543cda81c.tar.gz dexon-sol-tools-600b44c9620494c976b5aac6e8a1912543cda81c.tar.bz2 dexon-sol-tools-600b44c9620494c976b5aac6e8a1912543cda81c.tar.lz dexon-sol-tools-600b44c9620494c976b5aac6e8a1912543cda81c.tar.xz dexon-sol-tools-600b44c9620494c976b5aac6e8a1912543cda81c.tar.zst dexon-sol-tools-600b44c9620494c976b5aac6e8a1912543cda81c.zip |
Merge branch 'development' into feature/instant/asset-buyer-check-liquidity
Diffstat (limited to 'packages/sol-trace')
-rw-r--r-- | packages/sol-trace/CHANGELOG.json | 18 | ||||
-rw-r--r-- | packages/sol-trace/CHANGELOG.md | 18 | ||||
-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, 46 insertions, 7 deletions
diff --git a/packages/sol-trace/CHANGELOG.json b/packages/sol-trace/CHANGELOG.json index 223400eae..8157d441e 100644 --- a/packages/sol-trace/CHANGELOG.json +++ b/packages/sol-trace/CHANGELOG.json @@ -1,5 +1,23 @@ [ { + "timestamp": 1547561734, + "version": "1.0.2", + "changes": [ + { + "note": "Dependencies updated" + } + ] + }, + { + "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..ac09a1bbf --- /dev/null +++ b/packages/sol-trace/CHANGELOG.md @@ -0,0 +1,18 @@ +<!-- +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.2 - _January 15, 2019_ + + * Dependencies updated + +## 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..acae60303 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.2", "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": "^4.0.0", + "@0x/subproviders": "^2.1.11", + "@0x/typescript-typings": "^3.0.8", + "ethereum-types": "^1.1.6", "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.2", "@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); |