aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeremy Schlatter <jeremy.schlatter@gmail.com>2019-02-05 05:06:34 +0800
committerJeremy Schlatter <jeremy.schlatter@gmail.com>2019-02-05 05:22:36 +0800
commitd0b0c4a917601f6ca02dda6336f256850ab3941b (patch)
treec6ea63ee2f464946b11c34e2f4a6e60540d9aa49
parent74293d5bc844035781d65aa85051ef3bbb7b8b1a (diff)
downloaddexon-0x-contracts-d0b0c4a917601f6ca02dda6336f256850ab3941b.tar.gz
dexon-0x-contracts-d0b0c4a917601f6ca02dda6336f256850ab3941b.tar.zst
dexon-0x-contracts-d0b0c4a917601f6ca02dda6336f256850ab3941b.zip
Fix default gas limit for fake txs in TraceCollectionSubprovider
This hex string is required to be prefixed with '0x'. If it does not have that prefix, then the call to unmarshalTxData below will fail with: BigNumber Error: new BigNumber() not a number: 5b8d80 This default value is overridden if the incoming call already has a gas estimate, in which case the parse error above does not happen. This is probably why the error wasn't previously noticed.
-rw-r--r--packages/sol-tracing-utils/src/trace_collection_subprovider.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/packages/sol-tracing-utils/src/trace_collection_subprovider.ts b/packages/sol-tracing-utils/src/trace_collection_subprovider.ts
index 8279bda54..6f833b0fc 100644
--- a/packages/sol-tracing-utils/src/trace_collection_subprovider.ts
+++ b/packages/sol-tracing-utils/src/trace_collection_subprovider.ts
@@ -186,7 +186,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,