diff options
author | Leonid Logvinov <logvinov.leon@gmail.com> | 2018-04-05 19:52:43 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-04-05 19:52:43 +0800 |
commit | 7f7ddee0f95f3ed3e903c230088dbee4648771bd (patch) | |
tree | cbaae6089347793d7b205d696d517cf2e1de38ab /packages/deployer/src | |
parent | 674e56cea69fe96ddd0071d3c4c5b5ea8ae299bf (diff) | |
parent | b99c797945dacae09be1e1e2d58f806423fedffa (diff) | |
download | dexon-0x-contracts-7f7ddee0f95f3ed3e903c230088dbee4648771bd.tar.gz dexon-0x-contracts-7f7ddee0f95f3ed3e903c230088dbee4648771bd.tar.zst dexon-0x-contracts-7f7ddee0f95f3ed3e903c230088dbee4648771bd.zip |
Merge pull request #501 from 0xProject/feature/provider-over-wrapper
Use Provider over web3Wrapper
Diffstat (limited to 'packages/deployer/src')
-rw-r--r-- | packages/deployer/src/deployer.ts | 8 | ||||
-rw-r--r-- | packages/deployer/src/utils/types.ts | 4 |
2 files changed, 6 insertions, 6 deletions
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 { |