diff options
author | Fabio Berger <me@fabioberger.com> | 2019-02-05 21:55:05 +0800 |
---|---|---|
committer | Fabio Berger <me@fabioberger.com> | 2019-02-05 21:55:05 +0800 |
commit | a8078aa1511f9b6d4a265d5108e0391e78e6e1ed (patch) | |
tree | c3ad6d45657dde9c3348f1b2d4112c4d14b9ee4b /packages/sol-tracing-utils | |
parent | e021460f038b989f1fe78899ba7c2f8e29d416fd (diff) | |
parent | 7b583cecb29c24f561c8befa835ba9ef5a6918f6 (diff) | |
download | dexon-0x-contracts-a8078aa1511f9b6d4a265d5108e0391e78e6e1ed.tar.gz dexon-0x-contracts-a8078aa1511f9b6d4a265d5108e0391e78e6e1ed.tar.zst dexon-0x-contracts-a8078aa1511f9b6d4a265d5108e0391e78e6e1ed.zip |
merge development
Diffstat (limited to 'packages/sol-tracing-utils')
-rw-r--r-- | packages/sol-tracing-utils/CHANGELOG.json | 11 | ||||
-rw-r--r-- | packages/sol-tracing-utils/CHANGELOG.md | 15 | ||||
-rw-r--r-- | packages/sol-tracing-utils/package.json | 23 | ||||
-rw-r--r-- | packages/sol-tracing-utils/src/trace_collection_subprovider.ts | 15 |
4 files changed, 51 insertions, 13 deletions
diff --git a/packages/sol-tracing-utils/CHANGELOG.json b/packages/sol-tracing-utils/CHANGELOG.json index 89a5b6876..6b5db6c8f 100644 --- a/packages/sol-tracing-utils/CHANGELOG.json +++ b/packages/sol-tracing-utils/CHANGELOG.json @@ -25,8 +25,17 @@ { "note": "Improve error messages when unable to find matching bytecode", "pr": 1558 + }, + { + "note": "Fix default gas limit for fake txs in `TraceCollectionSubprovider`", + "pr": 1583 + }, + { + "note": "Fix a big when we were not intercepting `eth_sendRawTransaction`", + "pr": 1584 } - ] + ], + "timestamp": 1549373905 }, { "version": "5.0.0", diff --git a/packages/sol-tracing-utils/CHANGELOG.md b/packages/sol-tracing-utils/CHANGELOG.md index 9bffb2a6d..74d0ca61f 100644 --- a/packages/sol-tracing-utils/CHANGELOG.md +++ b/packages/sol-tracing-utils/CHANGELOG.md @@ -5,6 +5,21 @@ Edit the package's CHANGELOG.json file only. CHANGELOG +## v6.0.0 - _February 5, 2019_ + + * `SolCompilerArtifactAdapter` now uses `SolResolver` under the hood which allows to resolve `NPM` dependencies properly (#1535) + * Cache the `utils.getContractDataIfExists` leading to faster execution (#1535) + * `SolCompilerArtifactAdapter` now doesn't return the `ContractData` for interfaces (#1535) + * Print resasonable error message on bytecode collision (#1535) + * Fix the bug in `ASTVisitor` causing the 'cannot read property `range` of `null`' error (#1557) + * Improve error messages when unable to find matching bytecode (#1558) + * Fix default gas limit for fake txs in `TraceCollectionSubprovider` (#1583) + * Fix a big when we were not intercepting `eth_sendRawTransaction` (#1584) + +## v5.0.0 - _Invalid date_ + + * Upgrade the bignumber.js to v8.0.2 (#1517) + ## v4.0.1 - _January 17, 2019_ * Fix a bug where a custom `Geth` tracer didn't return stack entries for `DELEGATECALL` (#1521) diff --git a/packages/sol-tracing-utils/package.json b/packages/sol-tracing-utils/package.json index df800976c..082894b2c 100644 --- a/packages/sol-tracing-utils/package.json +++ b/packages/sol-tracing-utils/package.json @@ -1,6 +1,6 @@ { "name": "@0x/sol-tracing-utils", - "version": "4.0.1", + "version": "6.0.0", "engines": { "node": ">=6.12" }, @@ -42,18 +42,19 @@ }, "homepage": "https://github.com/0xProject/0x-monorepo/packages/sol-tracing-utils/README.md", "dependencies": { - "@0x/dev-utils": "^1.0.24", - "@0x/sol-compiler": "^2.0.2", - "@0x/sol-resolver": "^1.2.3", - "@0x/subproviders": "^2.1.11", - "@0x/typescript-typings": "^3.0.8", - "@0x/utils": "^3.0.1", - "@0x/web3-wrapper": "^3.2.4", + "@0x/dev-utils": "^2.0.0", + "@0x/sol-compiler": "^3.0.0", + "@0x/sol-resolver": "^2.0.0", + "@0x/subproviders": "^3.0.0", + "@0x/typescript-typings": "^4.0.0", + "@0x/utils": "^4.0.1", + "@0x/web3-wrapper": "^4.0.0", "@types/solidity-parser-antlr": "^0.2.0", - "ethereum-types": "^1.1.6", + "chalk": "^2.3.0", + "ethereum-types": "^2.0.0", "ethereumjs-util": "^5.1.1", + "ethers": "~4.0.4", "glob": "^7.1.2", - "chalk": "^2.3.0", "istanbul": "^0.4.5", "lodash": "^4.17.11", "loglevel": "^1.6.1", @@ -63,7 +64,7 @@ "solidity-parser-antlr": "^0.2.12" }, "devDependencies": { - "@0x/tslint-config": "^2.0.2", + "@0x/tslint-config": "^3.0.0", "@types/istanbul": "^0.4.30", "@types/loglevel": "^1.5.3", "@types/mkdirp": "^0.5.2", diff --git a/packages/sol-tracing-utils/src/trace_collection_subprovider.ts b/packages/sol-tracing-utils/src/trace_collection_subprovider.ts index 8279bda54..7fde1f9b8 100644 --- a/packages/sol-tracing-utils/src/trace_collection_subprovider.ts +++ b/packages/sol-tracing-utils/src/trace_collection_subprovider.ts @@ -3,6 +3,7 @@ import { Callback, ErrorCallback, NextCallback, Subprovider } from '@0x/subprovi import { logUtils } from '@0x/utils'; import { CallDataRPC, marshaller, Web3Wrapper } from '@0x/web3-wrapper'; import { JSONRPCRequestPayload, Provider, TxData } from 'ethereum-types'; +import { utils } from 'ethers'; import * as _ from 'lodash'; import { Lock } from 'semaphore-async-await'; @@ -96,6 +97,18 @@ export abstract class TraceCollectionSubprovider extends Subprovider { } return; + case 'eth_sendRawTransaction': + if (!this._config.shouldCollectTransactionTraces) { + next(); + } else { + const txData = utils.parseTransaction(payload.params[0]); + if (txData.to === null) { + txData.to = constants.NEW_CONTRACT; + } + next(logAsyncErrors(this._onTransactionSentAsync.bind(this, txData))); + } + return; + case 'eth_call': if (!this._config.shouldCollectCallTraces) { next(); @@ -186,7 +199,7 @@ export abstract class TraceCollectionSubprovider extends Subprovider { const blockchainLifecycle = new BlockchainLifecycle(this._web3Wrapper); await blockchainLifecycle.startAsync(); const fakeTxData = { - gas: BLOCK_GAS_LIMIT.toString(16), // tslint:disable-line:custom-no-magic-numbers + gas: `0x${BLOCK_GAS_LIMIT.toString(16)}`, // tslint:disable-line:custom-no-magic-numbers isFakeTransaction: true, // This transaction (and only it) is allowed to come through when the lock is locked ...callData, from: callData.from || this._defaultFromAddress, |