aboutsummaryrefslogtreecommitdiffstats
path: root/packages/base-contract/src
diff options
context:
space:
mode:
authorAlex Browne <stephenalexbrowne@gmail.com>2018-05-24 09:13:18 +0800
committerAlex Browne <stephenalexbrowne@gmail.com>2018-06-07 03:39:43 +0800
commit00bf957b53c22f3ccdd6c2e7ad75f0c9e15caa38 (patch)
tree2fc183c1e35a7868bbc75fb5e10ce919e443398a /packages/base-contract/src
parent5b999c2f7d25b5b7982dd5f857bc79881fafc52e (diff)
downloaddexon-sol-tools-00bf957b53c22f3ccdd6c2e7ad75f0c9e15caa38.tar
dexon-sol-tools-00bf957b53c22f3ccdd6c2e7ad75f0c9e15caa38.tar.gz
dexon-sol-tools-00bf957b53c22f3ccdd6c2e7ad75f0c9e15caa38.tar.bz2
dexon-sol-tools-00bf957b53c22f3ccdd6c2e7ad75f0c9e15caa38.tar.lz
dexon-sol-tools-00bf957b53c22f3ccdd6c2e7ad75f0c9e15caa38.tar.xz
dexon-sol-tools-00bf957b53c22f3ccdd6c2e7ad75f0c9e15caa38.tar.zst
dexon-sol-tools-00bf957b53c22f3ccdd6c2e7ad75f0c9e15caa38.zip
Add more transactions to Geth on init. Skip tests that are failing.
Diffstat (limited to 'packages/base-contract/src')
-rw-r--r--packages/base-contract/src/index.ts7
1 files changed, 6 insertions, 1 deletions
diff --git a/packages/base-contract/src/index.ts b/packages/base-contract/src/index.ts
index d9e28f9f2..02a9e29b8 100644
--- a/packages/base-contract/src/index.ts
+++ b/packages/base-contract/src/index.ts
@@ -79,8 +79,13 @@ export class BaseContract {
// Awaiting https://github.com/Microsoft/TypeScript/pull/13288 to be merged
} as any;
if (_.isUndefined(txDataWithDefaults.gas) && !_.isUndefined(estimateGasAsync)) {
+ // TODO(albrow): Move this code into a subprovider which we only
+ // use for Geth.
const estimatedGas = await estimateGasAsync(txData);
- txDataWithDefaults.gas = estimatedGas;
+ // console.log(`original estimate: ${estimatedGas}`);
+ const buffered = Math.ceil(estimatedGas * 1.1);
+ // console.log(`buffered estimate: ${buffered}`);
+ txDataWithDefaults.gas = buffered;
}
return txDataWithDefaults;
}