aboutsummaryrefslogtreecommitdiffstats
path: root/packages/deployer/src
diff options
context:
space:
mode:
authorFabio Berger <me@fabioberger.com>2018-04-06 14:04:17 +0800
committerFabio Berger <me@fabioberger.com>2018-04-06 14:04:17 +0800
commit75a51af00603236e0b80fe04336494944a32739c (patch)
treeb5e605911321cfc148f5eedec842fbe2c6bd0672 /packages/deployer/src
parent24454938e51e40ae74809f15bd1f612c69c218ec (diff)
downloaddexon-sol-tools-75a51af00603236e0b80fe04336494944a32739c.tar
dexon-sol-tools-75a51af00603236e0b80fe04336494944a32739c.tar.gz
dexon-sol-tools-75a51af00603236e0b80fe04336494944a32739c.tar.bz2
dexon-sol-tools-75a51af00603236e0b80fe04336494944a32739c.tar.lz
dexon-sol-tools-75a51af00603236e0b80fe04336494944a32739c.tar.xz
dexon-sol-tools-75a51af00603236e0b80fe04336494944a32739c.tar.zst
dexon-sol-tools-75a51af00603236e0b80fe04336494944a32739c.zip
Use provider over web3 in deployer, dev-utils and subprovider tests, rename subprovider to ganacheSubprovider in test util
Diffstat (limited to 'packages/deployer/src')
-rw-r--r--packages/deployer/src/cli.ts4
-rw-r--r--packages/deployer/src/deployer.ts10
2 files changed, 7 insertions, 7 deletions
diff --git a/packages/deployer/src/cli.ts b/packages/deployer/src/cli.ts
index d1bd645b3..f1cf56416 100644
--- a/packages/deployer/src/cli.ts
+++ b/packages/deployer/src/cli.ts
@@ -41,8 +41,8 @@ async function onCompileCommandAsync(argv: CliOptions): Promise<void> {
*/
async function onDeployCommandAsync(argv: CliOptions): Promise<void> {
const url = argv.jsonrpcUrl;
- const web3Provider = new Web3.providers.HttpProvider(url);
- const web3Wrapper = new Web3Wrapper(web3Provider);
+ const provider = new Web3.providers.HttpProvider(url);
+ const web3Wrapper = new Web3Wrapper(provider);
const networkId = await web3Wrapper.getNetworkIdAsync();
const compilerOpts: CompilerOptions = {
contractsDir: argv.contractsDir,
diff --git a/packages/deployer/src/deployer.ts b/packages/deployer/src/deployer.ts
index 84392997c..e4208e7a1 100644
--- a/packages/deployer/src/deployer.ts
+++ b/packages/deployer/src/deployer.ts
@@ -38,17 +38,17 @@ export class Deployer {
this._artifactsDir = opts.artifactsDir;
this._networkId = opts.networkId;
this._defaults = opts.defaults;
- let web3Provider: Provider;
+ let provider: 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`);
+ throw new Error(`Deployer options don't contain provider nor jsonrpcUrl. Please pass one of them`);
}
- web3Provider = new Web3.providers.HttpProvider(jsonrpcUrl);
+ provider = new Web3.providers.HttpProvider(jsonrpcUrl);
} else {
- web3Provider = (opts as ProviderDeployerOptions).provider;
+ provider = (opts as ProviderDeployerOptions).provider;
}
- this.web3Wrapper = new Web3Wrapper(web3Provider, this._defaults);
+ this.web3Wrapper = new Web3Wrapper(provider, this._defaults);
}
/**
* Loads a contract's corresponding artifacts and deploys it with the supplied constructor arguments.