aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLeonid Logvinov <logvinov.leon@gmail.com>2017-08-25 18:10:56 +0800
committerLeonid Logvinov <logvinov.leon@gmail.com>2017-08-29 16:01:13 +0800
commit5b60d9f0f487719510e8d3463faf2fbad9d95d61 (patch)
tree68de0b3438be8b9d672d499d0cc0ce8b41ae1af8
parentdcfc0ecac6fe1b4f88ca81c91070b585ba00ac1e (diff)
downloaddexon-sol-tools-5b60d9f0f487719510e8d3463faf2fbad9d95d61.tar
dexon-sol-tools-5b60d9f0f487719510e8d3463faf2fbad9d95d61.tar.gz
dexon-sol-tools-5b60d9f0f487719510e8d3463faf2fbad9d95d61.tar.bz2
dexon-sol-tools-5b60d9f0f487719510e8d3463faf2fbad9d95d61.tar.lz
dexon-sol-tools-5b60d9f0f487719510e8d3463faf2fbad9d95d61.tar.xz
dexon-sol-tools-5b60d9f0f487719510e8d3463faf2fbad9d95d61.tar.zst
dexon-sol-tools-5b60d9f0f487719510e8d3463faf2fbad9d95d61.zip
Remove default value for gasPrice
-rw-r--r--src/0x.ts3
-rw-r--r--src/contract_wrappers/contract_wrapper.ts4
-rw-r--r--src/contract_wrappers/ether_token_wrapper.ts2
-rw-r--r--src/contract_wrappers/exchange_wrapper.ts2
-rw-r--r--src/contract_wrappers/token_registry_wrapper.ts2
-rw-r--r--src/contract_wrappers/token_wrapper.ts2
6 files changed, 6 insertions, 9 deletions
diff --git a/src/0x.ts b/src/0x.ts
index 36ebb8ec2..904765633 100644
--- a/src/0x.ts
+++ b/src/0x.ts
@@ -164,9 +164,6 @@ export class ZeroEx {
*/
constructor(provider: Web3Provider, gasPrice?: BigNumber.BigNumber) {
this._web3Wrapper = new Web3Wrapper(provider);
- if (_.isUndefined(gasPrice)) {
- gasPrice = this._web3Wrapper.toWei(new BigNumber(21), 'gwei');
- }
this.token = new TokenWrapper(this._web3Wrapper, gasPrice);
this.proxy = new TokenTransferProxyWrapper(this._web3Wrapper, gasPrice);
this.exchange = new ExchangeWrapper(this._web3Wrapper, this.token, gasPrice);
diff --git a/src/contract_wrappers/contract_wrapper.ts b/src/contract_wrappers/contract_wrapper.ts
index 015ed275a..28df82cee 100644
--- a/src/contract_wrappers/contract_wrapper.ts
+++ b/src/contract_wrappers/contract_wrapper.ts
@@ -6,8 +6,8 @@ import {utils} from '../utils/utils';
export class ContractWrapper {
protected _web3Wrapper: Web3Wrapper;
- private _gasPrice: BigNumber.BigNumber;
- constructor(web3Wrapper: Web3Wrapper, gasPrice: BigNumber.BigNumber) {
+ private _gasPrice?: BigNumber.BigNumber;
+ constructor(web3Wrapper: Web3Wrapper, gasPrice?: BigNumber.BigNumber) {
this._web3Wrapper = web3Wrapper;
this._gasPrice = gasPrice;
}
diff --git a/src/contract_wrappers/ether_token_wrapper.ts b/src/contract_wrappers/ether_token_wrapper.ts
index eae84feec..3c282510f 100644
--- a/src/contract_wrappers/ether_token_wrapper.ts
+++ b/src/contract_wrappers/ether_token_wrapper.ts
@@ -13,7 +13,7 @@ import * as EtherTokenArtifacts from '../artifacts/EtherToken.json';
export class EtherTokenWrapper extends ContractWrapper {
private _etherTokenContractIfExists?: EtherTokenContract;
private _tokenWrapper: TokenWrapper;
- constructor(web3Wrapper: Web3Wrapper, tokenWrapper: TokenWrapper, gasPrice: BigNumber.BigNumber) {
+ constructor(web3Wrapper: Web3Wrapper, tokenWrapper: TokenWrapper, gasPrice?: BigNumber.BigNumber) {
super(web3Wrapper, gasPrice);
this._tokenWrapper = tokenWrapper;
}
diff --git a/src/contract_wrappers/exchange_wrapper.ts b/src/contract_wrappers/exchange_wrapper.ts
index 8ae51da43..d09df236b 100644
--- a/src/contract_wrappers/exchange_wrapper.ts
+++ b/src/contract_wrappers/exchange_wrapper.ts
@@ -73,7 +73,7 @@ export class ExchangeWrapper extends ContractWrapper {
];
return [orderAddresses, orderValues];
}
- constructor(web3Wrapper: Web3Wrapper, tokenWrapper: TokenWrapper, gasPrice: BigNumber.BigNumber) {
+ constructor(web3Wrapper: Web3Wrapper, tokenWrapper: TokenWrapper, gasPrice?: BigNumber.BigNumber) {
super(web3Wrapper, gasPrice);
this._tokenWrapper = tokenWrapper;
this._orderValidationUtils = new OrderValidationUtils(tokenWrapper, this);
diff --git a/src/contract_wrappers/token_registry_wrapper.ts b/src/contract_wrappers/token_registry_wrapper.ts
index 5469b4a95..822e69460 100644
--- a/src/contract_wrappers/token_registry_wrapper.ts
+++ b/src/contract_wrappers/token_registry_wrapper.ts
@@ -11,7 +11,7 @@ import * as TokenRegistryArtifacts from '../artifacts/TokenRegistry.json';
*/
export class TokenRegistryWrapper extends ContractWrapper {
private _tokenRegistryContractIfExists?: TokenRegistryContract;
- constructor(web3Wrapper: Web3Wrapper, gasPrice: BigNumber.BigNumber) {
+ constructor(web3Wrapper: Web3Wrapper, gasPrice?: BigNumber.BigNumber) {
super(web3Wrapper, gasPrice);
}
/**
diff --git a/src/contract_wrappers/token_wrapper.ts b/src/contract_wrappers/token_wrapper.ts
index 24f56a24a..f7070f1f4 100644
--- a/src/contract_wrappers/token_wrapper.ts
+++ b/src/contract_wrappers/token_wrapper.ts
@@ -31,7 +31,7 @@ export class TokenWrapper extends ContractWrapper {
public UNLIMITED_ALLOWANCE_IN_BASE_UNITS = constants.UNLIMITED_ALLOWANCE_IN_BASE_UNITS;
private _tokenContractsByAddress: {[address: string]: TokenContract};
private _tokenLogEventEmitters: ContractEventEmitter[];
- constructor(web3Wrapper: Web3Wrapper, gasPrice: BigNumber.BigNumber) {
+ constructor(web3Wrapper: Web3Wrapper, gasPrice?: BigNumber.BigNumber) {
super(web3Wrapper, gasPrice);
this._tokenContractsByAddress = {};
this._tokenLogEventEmitters = [];