diff options
author | Leonid Logvinov <logvinov.leon@gmail.com> | 2017-08-25 18:00:02 +0800 |
---|---|---|
committer | Leonid Logvinov <logvinov.leon@gmail.com> | 2017-08-29 16:01:13 +0800 |
commit | a6a16017997fbe53ac709f2f0d874e348da35621 (patch) | |
tree | 9c0bf98ddef5e9f073c7e5c795fc79eb2b9d3e35 /src/contract_wrappers/contract_wrapper.ts | |
parent | a8fd3f30cf87660f08fa7b1c249606b7f8872ba1 (diff) | |
download | dexon-0x-contracts-a6a16017997fbe53ac709f2f0d874e348da35621.tar.gz dexon-0x-contracts-a6a16017997fbe53ac709f2f0d874e348da35621.tar.zst dexon-0x-contracts-a6a16017997fbe53ac709f2f0d874e348da35621.zip |
Allow user to specify the gas price
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..015ed275a 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); |