aboutsummaryrefslogtreecommitdiffstats
path: root/packages/contracts/deploy
diff options
context:
space:
mode:
Diffstat (limited to 'packages/contracts/deploy')
-rw-r--r--packages/contracts/deploy/src/deployer.ts2
-rw-r--r--packages/contracts/deploy/src/utils/network.ts5
2 files changed, 4 insertions, 3 deletions
diff --git a/packages/contracts/deploy/src/deployer.ts b/packages/contracts/deploy/src/deployer.ts
index 2d4f31949..4c8018ecc 100644
--- a/packages/contracts/deploy/src/deployer.ts
+++ b/packages/contracts/deploy/src/deployer.ts
@@ -31,7 +31,7 @@ export class Deployer {
const jsonrpcUrl = `http://localhost:${this.jsonrpcPort}`;
const web3Provider = new Web3.providers.HttpProvider(jsonrpcUrl);
this.defaults = opts.defaults;
- this.web3Wrapper = new Web3Wrapper(web3Provider, this.networkId, this.defaults);
+ this.web3Wrapper = new Web3Wrapper(web3Provider, this.defaults);
}
/**
* Loads contract artifact and deploys contract with given arguments.
diff --git a/packages/contracts/deploy/src/utils/network.ts b/packages/contracts/deploy/src/utils/network.ts
index fc8709e0f..f9776bb97 100644
--- a/packages/contracts/deploy/src/utils/network.ts
+++ b/packages/contracts/deploy/src/utils/network.ts
@@ -1,4 +1,5 @@
import {promisify} from '@0xproject/utils';
+import {Web3Wrapper} from '@0xproject/web3-wrapper';
import * as _ from 'lodash';
import * as Web3 from 'web3';
@@ -6,8 +7,8 @@ export const network = {
async getNetworkIdIfExistsAsync(port: number): Promise<number> {
const url = `http://localhost:${port}`;
const web3Provider = new Web3.providers.HttpProvider(url);
- const web3 = new Web3(web3Provider);
- const networkId = _.parseInt(await promisify<string>(web3.version.getNetwork)());
+ const web3Wrapper = new Web3Wrapper(web3Provider);
+ const networkId = web3Wrapper.getNetworkIdAsync();
return networkId;
},
};