diff options
author | Brandon Millman <brandon.millman@gmail.com> | 2017-08-31 23:09:10 +0800 |
---|---|---|
committer | Brandon Millman <brandon.millman@gmail.com> | 2017-08-31 23:16:28 +0800 |
commit | 0ff6cc19972089143dfc5d9c9a66c196355b0bbc (patch) | |
tree | 4fa0a91e9725a34cc0dd97ade9e484673210b738 | |
parent | 4620c1c818e6d54741b262e2100d2731dae16dda (diff) | |
download | dexon-sol-tools-0ff6cc19972089143dfc5d9c9a66c196355b0bbc.tar dexon-sol-tools-0ff6cc19972089143dfc5d9c9a66c196355b0bbc.tar.gz dexon-sol-tools-0ff6cc19972089143dfc5d9c9a66c196355b0bbc.tar.bz2 dexon-sol-tools-0ff6cc19972089143dfc5d9c9a66c196355b0bbc.tar.lz dexon-sol-tools-0ff6cc19972089143dfc5d9c9a66c196355b0bbc.tar.xz dexon-sol-tools-0ff6cc19972089143dfc5d9c9a66c196355b0bbc.tar.zst dexon-sol-tools-0ff6cc19972089143dfc5d9c9a66c196355b0bbc.zip |
Fix incorrect types related to contract interactions in types.ts
-rw-r--r-- | src/types.ts | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/src/types.ts b/src/types.ts index 7c2f79538..137faee50 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,63 +60,63 @@ 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; @@ -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 { |