diff options
author | Leonid <logvinov.leon@gmail.com> | 2017-08-29 16:03:00 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-08-29 16:03:00 +0800 |
commit | 07a872f80213a71d17d61a47e7faeee0e87d1822 (patch) | |
tree | 8d29f3f7c180400f48b2b0f150ed603729cc061f /src/contract_wrappers/contract_wrapper.ts | |
parent | 05ce9733dadd1f83afa2d96ff55a23cd1477216d (diff) | |
parent | 9516a50f645587bcc79ec5e17b8a353221f1d7e2 (diff) | |
download | dexon-sol-tools-07a872f80213a71d17d61a47e7faeee0e87d1822.tar dexon-sol-tools-07a872f80213a71d17d61a47e7faeee0e87d1822.tar.gz dexon-sol-tools-07a872f80213a71d17d61a47e7faeee0e87d1822.tar.bz2 dexon-sol-tools-07a872f80213a71d17d61a47e7faeee0e87d1822.tar.lz dexon-sol-tools-07a872f80213a71d17d61a47e7faeee0e87d1822.tar.xz dexon-sol-tools-07a872f80213a71d17d61a47e7faeee0e87d1822.tar.zst dexon-sol-tools-07a872f80213a71d17d61a47e7faeee0e87d1822.zip |
Merge pull request #139 from 0xProject/feature/gas-price-config
Gas price config
Diffstat (limited to 'src/contract_wrappers/contract_wrapper.ts')
-rw-r--r-- | src/contract_wrappers/contract_wrapper.ts | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/contract_wrappers/contract_wrapper.ts b/src/contract_wrappers/contract_wrapper.ts index 7efa229a5..28df82cee 100644 --- a/src/contract_wrappers/contract_wrapper.ts +++ b/src/contract_wrappers/contract_wrapper.ts @@ -6,11 +6,16 @@ import {utils} from '../utils/utils'; export class ContractWrapper { protected _web3Wrapper: Web3Wrapper; - constructor(web3Wrapper: Web3Wrapper) { + private _gasPrice?: BigNumber.BigNumber; + constructor(web3Wrapper: Web3Wrapper, gasPrice?: BigNumber.BigNumber) { this._web3Wrapper = web3Wrapper; + this._gasPrice = gasPrice; } protected async _instantiateContractIfExistsAsync(artifact: Artifact, address?: string): Promise<ContractInstance> { const c = await contract(artifact); + c.defaults({ + gasPrice: this._gasPrice, + }); const providerObj = this._web3Wrapper.getCurrentProvider(); c.setProvider(providerObj); |