diff options
author | Fabio Berger <me@fabioberger.com> | 2017-12-09 01:21:51 +0800 |
---|---|---|
committer | Fabio Berger <me@fabioberger.com> | 2017-12-09 01:21:51 +0800 |
commit | af8d24d0eb5af781f4731b5559979f2b02579785 (patch) | |
tree | 6f429e6f2b3050de6dd7ce16e42c7f387bd5018a /packages/contracts/deploy/src/deployer.ts | |
parent | ca85a97106ea6d09fbceafac8f9516945ccff399 (diff) | |
parent | 5eea829be9f5e8669c40dac965231051b668ed37 (diff) | |
download | dexon-sol-tools-af8d24d0eb5af781f4731b5559979f2b02579785.tar dexon-sol-tools-af8d24d0eb5af781f4731b5559979f2b02579785.tar.gz dexon-sol-tools-af8d24d0eb5af781f4731b5559979f2b02579785.tar.bz2 dexon-sol-tools-af8d24d0eb5af781f4731b5559979f2b02579785.tar.lz dexon-sol-tools-af8d24d0eb5af781f4731b5559979f2b02579785.tar.xz dexon-sol-tools-af8d24d0eb5af781f4731b5559979f2b02579785.tar.zst dexon-sol-tools-af8d24d0eb5af781f4731b5559979f2b02579785.zip |
Merge branch 'development' into feature/addSubproviders
* development:
Update README.md
Inline network module
Stop supporting different file extensions in abi-gen
Refactor networkId out of web3Wrapper
Update connect types in preperation for publishing
Fix CI command
Address feedback
Refactor web3Wrapper to a separate package
# Conflicts:
# package.json
# packages/website/ts/blockchain.ts
Diffstat (limited to 'packages/contracts/deploy/src/deployer.ts')
-rw-r--r-- | packages/contracts/deploy/src/deployer.ts | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/packages/contracts/deploy/src/deployer.ts b/packages/contracts/deploy/src/deployer.ts index 48d175a42..4c8018ecc 100644 --- a/packages/contracts/deploy/src/deployer.ts +++ b/packages/contracts/deploy/src/deployer.ts @@ -1,4 +1,6 @@ -import promisify = require('es6-promisify'); +import {TxData} from '@0xproject/types'; +import {promisify} from '@0xproject/utils'; +import {Web3Wrapper} from '@0xproject/web3-wrapper'; import * as _ from 'lodash'; import * as Web3 from 'web3'; @@ -11,7 +13,6 @@ import { DeployerOptions, } from './utils/types'; import {utils} from './utils/utils'; -import {Web3Wrapper} from './utils/web3_wrapper'; // Gas added to gas estimate to make sure there is sufficient gas for deployment. const EXTRA_GAS = 200000; @@ -21,7 +22,7 @@ export class Deployer { private artifactsDir: string; private jsonrpcPort: number; private networkId: number; - private defaults: Partial<Web3.TxData>; + private defaults: Partial<TxData>; constructor(opts: DeployerOptions) { this.artifactsDir = opts.artifactsDir; @@ -171,7 +172,7 @@ export class Deployer { const block = await this.web3Wrapper.getBlockAsync('latest'); let gas: number; try { - const gasEstimate: number = await this.web3Wrapper.estimateGasAsync({data}); + const gasEstimate: number = await this.web3Wrapper.estimateGasAsync(data); gas = Math.min(gasEstimate + EXTRA_GAS, block.gasLimit); } catch (err) { gas = block.gasLimit; |