diff options
author | Leonid <logvinov.leon@gmail.com> | 2017-11-29 04:37:33 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-11-29 04:37:33 +0800 |
commit | a98d6bf496ae8d1698fd63a3a7a4db756e743cb1 (patch) | |
tree | 3018bdd100d8280056c459b8ac41ff08b7115dc7 /packages/0x.js/src/types.ts | |
parent | bbcf669bd9bc73924436e9ea41fe393b8d23a863 (diff) | |
parent | 353abffba9afd73d70fce47fee2f2d6067c6c8ae (diff) | |
download | dexon-sol-tools-a98d6bf496ae8d1698fd63a3a7a4db756e743cb1.tar dexon-sol-tools-a98d6bf496ae8d1698fd63a3a7a4db756e743cb1.tar.gz dexon-sol-tools-a98d6bf496ae8d1698fd63a3a7a4db756e743cb1.tar.bz2 dexon-sol-tools-a98d6bf496ae8d1698fd63a3a7a4db756e743cb1.tar.lz dexon-sol-tools-a98d6bf496ae8d1698fd63a3a7a4db756e743cb1.tar.xz dexon-sol-tools-a98d6bf496ae8d1698fd63a3a7a4db756e743cb1.tar.zst dexon-sol-tools-a98d6bf496ae8d1698fd63a3a7a4db756e743cb1.zip |
Merge pull request #235 from 0xProject/feature/gasPriceGasLimit
Add optional config for gasPrice and gasLimit for every transaction sending method
Diffstat (limited to 'packages/0x.js/src/types.ts')
-rw-r--r-- | packages/0x.js/src/types.ts | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/packages/0x.js/src/types.ts b/packages/0x.js/src/types.ts index 91a5978ea..5363b02ff 100644 --- a/packages/0x.js/src/types.ts +++ b/packages/0x.js/src/types.ts @@ -332,6 +332,7 @@ export interface TxOpts { from: string; gas?: number; value?: BigNumber; + gasPrice?: BigNumber; } export interface TokenAddressBySymbol { @@ -484,11 +485,20 @@ export interface MethodOpts { } /* + * gasPrice: Gas price in Wei to use for a transaction + * gasLimit: The amount of gas to send with a transaction + */ +export interface TransactionOpts { + gasPrice?: BigNumber; + gasLimit?: number; +} + +/* * shouldValidate: Flag indicating whether the library should make attempts to validate a transaction before - * broadcasting it. For example, order has a valid signature, maker has sufficient funds, etc. + * broadcasting it. For example, order has a valid signature, maker has sufficient funds, etc. Default: true */ -export interface OrderTransactionOpts { - shouldValidate: boolean; +export interface OrderTransactionOpts extends TransactionOpts { + shouldValidate?: boolean; } export type FilterObject = Web3.FilterObject; |