diff options
author | Fabio Berger <me@fabioberger.com> | 2017-06-07 18:48:26 +0800 |
---|---|---|
committer | Fabio Berger <me@fabioberger.com> | 2017-06-07 18:48:26 +0800 |
commit | 4eee0b52f13cb382329cc7061d4377561ac1cbd3 (patch) | |
tree | c560b5b90b0ec8bee67094711b17f0c16e53e23f /src/types.ts | |
parent | 918315e89f3408124d2e78bbd1acb58ed42d1766 (diff) | |
parent | 28d3528e42563f95255cee3bd7f85cc03141522e (diff) | |
download | dexon-0x-contracts-4eee0b52f13cb382329cc7061d4377561ac1cbd3.tar.gz dexon-0x-contracts-4eee0b52f13cb382329cc7061d4377561ac1cbd3.tar.zst dexon-0x-contracts-4eee0b52f13cb382329cc7061d4377561ac1cbd3.zip |
merge master
Diffstat (limited to 'src/types.ts')
-rw-r--r-- | src/types.ts | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/src/types.ts b/src/types.ts index 49d8365d1..1ee8a5bd6 100644 --- a/src/types.ts +++ b/src/types.ts @@ -65,9 +65,15 @@ export interface ExchangeContract extends ContractInstance { }; fill: { (orderAddresses: OrderAddresses, orderValues: OrderValues, fillAmount: BigNumber.BigNumber, - shouldCheckTransfer: boolean, v: number, r: string, s: string, txOpts: TxOpts): ContractResponse; + shouldCheckTransfer: boolean, v: number, r: string, s: string, txOpts?: TxOpts): ContractResponse; estimateGas: (orderAddresses: OrderAddresses, orderValues: OrderValues, fillAmount: BigNumber.BigNumber, - shouldCheckTransfer: boolean, v: number, r: string, s: string, txOpts: TxOpts) => number; + shouldCheckTransfer: boolean, v: number, r: string, s: string, txOpts?: TxOpts) => number; + }; + cancel: { + (orderAddresses: OrderAddresses, orderValues: OrderValues, cancelAmount: BigNumber.BigNumber, + txOpts?: TxOpts): ContractResponse; + estimateGas: (orderAddresses: OrderAddresses, orderValues: OrderValues, cancelAmount: BigNumber.BigNumber, + txOpts?: TxOpts) => number; }; fillOrKill: { (orderAddresses: OrderAddresses, orderValues: OrderValues, fillAmount: BigNumber.BigNumber, @@ -81,6 +87,9 @@ export interface ExchangeContract extends ContractInstance { cancelled: { call: (orderHash: string) => BigNumber.BigNumber; }; + getOrderHash: { + call: (orderAddresses: OrderAddresses, orderValues: OrderValues) => string; + }; } export interface TokenContract extends ContractInstance { @@ -90,10 +99,10 @@ export interface TokenContract extends ContractInstance { allowance: { call: (ownerAddress: string, allowedAddress: string) => Promise<BigNumber.BigNumber>; }; - transfer: (toAddress: string, amountInBaseUnits: BigNumber.BigNumber, txOpts: TxOpts) => Promise<boolean>; + 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; + txOpts?: TxOpts) => Promise<boolean>; + approve: (proxyAddress: string, amountInBaseUnits: BigNumber.BigNumber, txOpts?: TxOpts) => void; } export interface TokenRegistryContract extends ContractInstance { @@ -122,6 +131,9 @@ export enum ExchangeContractErrCodes { export const ExchangeContractErrs = strEnum([ 'ORDER_FILL_EXPIRED', + 'ORDER_CANCEL_EXPIRED', + 'ORDER_CANCEL_AMOUNT_ZERO', + 'ORDER_ALREADY_CANCELLED_OR_FILLED', 'ORDER_REMAINING_FILL_AMOUNT_ZERO', 'ORDER_FILL_ROUNDING_ERROR', 'FILL_BALANCE_ALLOWANCE_ERROR', |