aboutsummaryrefslogtreecommitdiffstats
path: root/packages/contracts/deploy/src/deployer.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/contracts/deploy/src/deployer.ts')
-rw-r--r--packages/contracts/deploy/src/deployer.ts9
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;