aboutsummaryrefslogtreecommitdiffstats
path: root/packages/deployer
diff options
context:
space:
mode:
authorFabio Berger <me@fabioberger.com>2018-04-05 20:06:58 +0800
committerFabio Berger <me@fabioberger.com>2018-04-05 20:06:58 +0800
commit89a72ebf0dbff606d511ae51bfee7ffc0a5df18f (patch)
tree65c935c4c372d2c497bec08164b314866050192b /packages/deployer
parent20aaab0847d0ec8b2a44f392ddd467f0c475cfb5 (diff)
parent7f7ddee0f95f3ed3e903c230088dbee4648771bd (diff)
downloaddexon-0x-contracts-89a72ebf0dbff606d511ae51bfee7ffc0a5df18f.tar
dexon-0x-contracts-89a72ebf0dbff606d511ae51bfee7ffc0a5df18f.tar.gz
dexon-0x-contracts-89a72ebf0dbff606d511ae51bfee7ffc0a5df18f.tar.bz2
dexon-0x-contracts-89a72ebf0dbff606d511ae51bfee7ffc0a5df18f.tar.lz
dexon-0x-contracts-89a72ebf0dbff606d511ae51bfee7ffc0a5df18f.tar.xz
dexon-0x-contracts-89a72ebf0dbff606d511ae51bfee7ffc0a5df18f.tar.zst
dexon-0x-contracts-89a72ebf0dbff606d511ae51bfee7ffc0a5df18f.zip
Merge branch 'development' into removeMigrateStep
* development: Fix tests Call static functions as static Address feedback Move our contract templates to accept Provider instead of Web3Wrapper
Diffstat (limited to 'packages/deployer')
-rw-r--r--packages/deployer/CHANGELOG.json9
-rw-r--r--packages/deployer/src/deployer.ts8
-rw-r--r--packages/deployer/src/utils/types.ts4
3 files changed, 15 insertions, 6 deletions
diff --git a/packages/deployer/CHANGELOG.json b/packages/deployer/CHANGELOG.json
index 72f35a93d..f9691466b 100644
--- a/packages/deployer/CHANGELOG.json
+++ b/packages/deployer/CHANGELOG.json
@@ -1,5 +1,14 @@
[
{
+ "version": "0.4.0",
+ "changes": [
+ {
+ "note": "Changed the config key `web3Provider` to `provider` to be consistent with other tools",
+ "pr": 501
+ }
+ ]
+ },
+ {
"version": "0.3.5",
"changes": [
{
diff --git a/packages/deployer/src/deployer.ts b/packages/deployer/src/deployer.ts
index 7ee45fed5..84392997c 100644
--- a/packages/deployer/src/deployer.ts
+++ b/packages/deployer/src/deployer.ts
@@ -1,4 +1,4 @@
-import { AbiType, ConstructorAbi, ContractAbi, TxData } from '@0xproject/types';
+import { AbiType, ConstructorAbi, ContractAbi, Provider, TxData } from '@0xproject/types';
import { logUtils } from '@0xproject/utils';
import { Web3Wrapper } from '@0xproject/web3-wrapper';
import * as _ from 'lodash';
@@ -38,15 +38,15 @@ export class Deployer {
this._artifactsDir = opts.artifactsDir;
this._networkId = opts.networkId;
this._defaults = opts.defaults;
- let web3Provider: Web3.Provider;
- if (_.isUndefined((opts as ProviderDeployerOptions).web3Provider)) {
+ let web3Provider: Provider;
+ if (_.isUndefined((opts as ProviderDeployerOptions).provider)) {
const jsonrpcUrl = (opts as UrlDeployerOptions).jsonrpcUrl;
if (_.isUndefined(jsonrpcUrl)) {
throw new Error(`Deployer options don't contain web3Provider nor jsonrpcUrl. Please pass one of them`);
}
web3Provider = new Web3.providers.HttpProvider(jsonrpcUrl);
} else {
- web3Provider = (opts as ProviderDeployerOptions).web3Provider;
+ web3Provider = (opts as ProviderDeployerOptions).provider;
}
this.web3Wrapper = new Web3Wrapper(web3Provider, this._defaults);
}
diff --git a/packages/deployer/src/utils/types.ts b/packages/deployer/src/utils/types.ts
index 7cb3958cb..7d131f5ce 100644
--- a/packages/deployer/src/utils/types.ts
+++ b/packages/deployer/src/utils/types.ts
@@ -1,4 +1,4 @@
-import { ContractAbi, TxData } from '@0xproject/types';
+import { ContractAbi, Provider, TxData } from '@0xproject/types';
import * as Web3 from 'web3';
import * as yargs from 'yargs';
@@ -65,7 +65,7 @@ export interface BaseDeployerOptions {
}
export interface ProviderDeployerOptions extends BaseDeployerOptions {
- web3Provider: Web3.Provider;
+ provider: Provider;
}
export interface UrlDeployerOptions extends BaseDeployerOptions {