diff options
author | Leonid <logvinov.leon@gmail.com> | 2017-09-01 00:14:36 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-09-01 00:14:36 +0800 |
commit | 134b9dfb23352f33bf8b8a944658b35a7f1cf134 (patch) | |
tree | ab433cbaf7c5888717f52cace06ff026a444e23f | |
parent | 4620c1c818e6d54741b262e2100d2731dae16dda (diff) | |
parent | 18a5f7485cfad5970c675aa239bc7f5136967c7d (diff) | |
download | dexon-sol-tools-134b9dfb23352f33bf8b8a944658b35a7f1cf134.tar dexon-sol-tools-134b9dfb23352f33bf8b8a944658b35a7f1cf134.tar.gz dexon-sol-tools-134b9dfb23352f33bf8b8a944658b35a7f1cf134.tar.bz2 dexon-sol-tools-134b9dfb23352f33bf8b8a944658b35a7f1cf134.tar.lz dexon-sol-tools-134b9dfb23352f33bf8b8a944658b35a7f1cf134.tar.xz dexon-sol-tools-134b9dfb23352f33bf8b8a944658b35a7f1cf134.tar.zst dexon-sol-tools-134b9dfb23352f33bf8b8a944658b35a7f1cf134.zip |
Merge pull request #147 from BMillman19/bmillman_contract_types
Fix incorrect types related to contract calls in types.ts
-rw-r--r-- | src/types.ts | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/src/types.ts b/src/types.ts index 7c2f79538..2400a9a60 100644 --- a/src/types.ts +++ b/src/types.ts @@ -51,7 +51,7 @@ export interface ExchangeContract extends ContractInstance { call: () => Promise<string>; }; getUnavailableTakerTokenAmount: { - call: (orderHash: string) => BigNumber.BigNumber; + call: (orderHash: string) => Promise<BigNumber.BigNumber>; }; isRoundingError: { call: (fillTakerAmount: BigNumber.BigNumber, takerTokenAmount: BigNumber.BigNumber, @@ -60,66 +60,66 @@ export interface ExchangeContract extends ContractInstance { fillOrder: { (orderAddresses: OrderAddresses, orderValues: OrderValues, fillTakerTokenAmount: BigNumber.BigNumber, shouldThrowOnInsufficientBalanceOrAllowance: boolean, - v: number, r: string, s: string, txOpts?: TxOpts): ContractResponse; + v: number, r: string, s: string, txOpts?: TxOpts): Promise<ContractResponse>; estimateGas: (orderAddresses: OrderAddresses, orderValues: OrderValues, fillTakerTokenAmount: BigNumber.BigNumber, shouldThrowOnInsufficientBalanceOrAllowance: boolean, - v: number, r: string, s: string, txOpts?: TxOpts) => number; + v: number, r: string, s: string, txOpts?: TxOpts) => Promise<number>; }; batchFillOrders: { (orderAddresses: OrderAddresses[], orderValues: OrderValues[], fillTakerTokenAmounts: BigNumber.BigNumber[], shouldThrowOnInsufficientBalanceOrAllowance: boolean, - v: number[], r: string[], s: string[], txOpts?: TxOpts): ContractResponse; + v: number[], r: string[], s: string[], txOpts?: TxOpts): Promise<ContractResponse>; estimateGas: (orderAddresses: OrderAddresses[], orderValues: OrderValues[], fillTakerTokenAmounts: BigNumber.BigNumber[], shouldThrowOnInsufficientBalanceOrAllowance: boolean, - v: number[], r: string[], s: string[], txOpts?: TxOpts) => number; + v: number[], r: string[], s: string[], txOpts?: TxOpts) => Promise<number>; }; fillOrdersUpTo: { (orderAddresses: OrderAddresses[], orderValues: OrderValues[], fillTakerTokenAmount: BigNumber.BigNumber, shouldThrowOnInsufficientBalanceOrAllowance: boolean, - v: number[], r: string[], s: string[], txOpts?: TxOpts): ContractResponse; + v: number[], r: string[], s: string[], txOpts?: TxOpts): Promise<ContractResponse>; estimateGas: (orderAddresses: OrderAddresses[], orderValues: OrderValues[], fillTakerTokenAmount: BigNumber.BigNumber, shouldThrowOnInsufficientBalanceOrAllowance: boolean, - v: number[], r: string[], s: string[], txOpts?: TxOpts) => number; + v: number[], r: string[], s: string[], txOpts?: TxOpts) => Promise<number>; }; cancelOrder: { (orderAddresses: OrderAddresses, orderValues: OrderValues, cancelTakerTokenAmount: BigNumber.BigNumber, - txOpts?: TxOpts): ContractResponse; + txOpts?: TxOpts): Promise<ContractResponse>; estimateGas: (orderAddresses: OrderAddresses, orderValues: OrderValues, cancelTakerTokenAmount: BigNumber.BigNumber, - txOpts?: TxOpts) => number; + txOpts?: TxOpts) => Promise<number>; }; batchCancelOrders: { (orderAddresses: OrderAddresses[], orderValues: OrderValues[], cancelTakerTokenAmounts: BigNumber.BigNumber[], - txOpts?: TxOpts): ContractResponse; + txOpts?: TxOpts): Promise<ContractResponse>; estimateGas: (orderAddresses: OrderAddresses[], orderValues: OrderValues[], cancelTakerTokenAmounts: BigNumber.BigNumber[], - txOpts?: TxOpts) => number; + txOpts?: TxOpts) => Promise<number>; }; fillOrKillOrder: { (orderAddresses: OrderAddresses, orderValues: OrderValues, fillTakerTokenAmount: BigNumber.BigNumber, - v: number, r: string, s: string, txOpts?: TxOpts): ContractResponse; + v: number, r: string, s: string, txOpts?: TxOpts): Promise<ContractResponse>; estimateGas: (orderAddresses: OrderAddresses, orderValues: OrderValues, fillTakerTokenAmount: BigNumber.BigNumber, - v: number, r: string, s: string, txOpts?: TxOpts) => number; + v: number, r: string, s: string, txOpts?: TxOpts) => Promise<number>; }; batchFillOrKillOrders: { (orderAddresses: OrderAddresses[], orderValues: OrderValues[], fillTakerTokenAmounts: BigNumber.BigNumber[], - v: number[], r: string[], s: string[], txOpts: TxOpts): ContractResponse; + v: number[], r: string[], s: string[], txOpts: TxOpts): Promise<ContractResponse>; estimateGas: (orderAddresses: OrderAddresses[], orderValues: OrderValues[], fillTakerTokenAmounts: BigNumber.BigNumber[], - v: number[], r: string[], s: string[], txOpts?: TxOpts) => number; + v: number[], r: string[], s: string[], txOpts?: TxOpts) => Promise<number>; }; filled: { - call: (orderHash: string) => BigNumber.BigNumber; + call: (orderHash: string) => Promise<BigNumber.BigNumber>; }; cancelled: { - call: (orderHash: string) => BigNumber.BigNumber; + call: (orderHash: string) => Promise<BigNumber.BigNumber>; }; getOrderHash: { - call: (orderAddresses: OrderAddresses, orderValues: OrderValues) => string; + call: (orderAddresses: OrderAddresses, orderValues: OrderValues) => Promise<string>; }; } @@ -135,7 +135,7 @@ export interface TokenContract extends ContractInstance { transfer: (toAddress: string, amountInBaseUnits: BigNumber.BigNumber, txOpts?: TxOpts) => Promise<boolean>; transferFrom: (fromAddress: string, toAddress: string, amountInBaseUnits: BigNumber.BigNumber, txOpts?: TxOpts) => Promise<boolean>; - approve: (proxyAddress: string, amountInBaseUnits: BigNumber.BigNumber, txOpts?: TxOpts) => void; + approve: (proxyAddress: string, amountInBaseUnits: BigNumber.BigNumber, txOpts?: TxOpts) => Promise<void>; } export interface TokenRegistryContract extends ContractInstance { |