aboutsummaryrefslogtreecommitdiffstats
path: root/packages/0x.js/src/types.ts
diff options
context:
space:
mode:
authorLeonid Logvinov <logvinov.leon@gmail.com>2017-11-24 01:14:21 +0800
committerLeonid Logvinov <logvinov.leon@gmail.com>2017-11-28 07:35:55 +0800
commit7a21c6854bec32f9a36e8ca3de14a815e9c9fa7d (patch)
treed86868444bc75f746ebd5d22acdaf853a795629e /packages/0x.js/src/types.ts
parent54ef916b93ba0939dcb8824149c9a9fb74df4f2e (diff)
downloaddexon-sol-tools-7a21c6854bec32f9a36e8ca3de14a815e9c9fa7d.tar
dexon-sol-tools-7a21c6854bec32f9a36e8ca3de14a815e9c9fa7d.tar.gz
dexon-sol-tools-7a21c6854bec32f9a36e8ca3de14a815e9c9fa7d.tar.bz2
dexon-sol-tools-7a21c6854bec32f9a36e8ca3de14a815e9c9fa7d.tar.lz
dexon-sol-tools-7a21c6854bec32f9a36e8ca3de14a815e9c9fa7d.tar.xz
dexon-sol-tools-7a21c6854bec32f9a36e8ca3de14a815e9c9fa7d.tar.zst
dexon-sol-tools-7a21c6854bec32f9a36e8ca3de14a815e9c9fa7d.zip
Add option 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.ts17
1 files changed, 14 insertions, 3 deletions
diff --git a/packages/0x.js/src/types.ts b/packages/0x.js/src/types.ts
index af4f054f0..d187af01a 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 {
@@ -476,17 +477,27 @@ export interface ValidateOrderFillableOpts {
* let's the user query the blockchain's state at an arbitrary point in time. In order for this to work, the
* backing Ethereum node must keep the entire historical state of the chain (e.g setting `--pruning=archive`
* flag when running Parity).
+ * gasPrice: Gas price to use for a transaction in
*/
export interface MethodOpts {
defaultBlock?: Web3.BlockParam;
}
/*
+ * 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;