diff options
author | Fabio Berger <me@fabioberger.com> | 2017-06-02 22:06:26 +0800 |
---|---|---|
committer | Fabio Berger <me@fabioberger.com> | 2017-06-02 22:06:26 +0800 |
commit | 844f138908a30fa6daa904beafab85823c6d47d7 (patch) | |
tree | be2402e849e6c67acd27ccb323cd39a08ea103d8 /src/types.ts | |
parent | b8ff2468776e1c784ff50e5ada1c633ee0d3aeda (diff) | |
download | dexon-0x-contracts-844f138908a30fa6daa904beafab85823c6d47d7.tar.gz dexon-0x-contracts-844f138908a30fa6daa904beafab85823c6d47d7.tar.zst dexon-0x-contracts-844f138908a30fa6daa904beafab85823c6d47d7.zip |
Add setAllowanceAsync, getAllowanceAsync and transferFrom to tokenWrapper
Diffstat (limited to 'src/types.ts')
-rw-r--r-- | src/types.ts | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/types.ts b/src/types.ts index 717257492..d20a0d638 100644 --- a/src/types.ts +++ b/src/types.ts @@ -15,6 +15,8 @@ export const ZeroExError = strEnum([ 'USER_HAS_NO_ASSOCIATED_ADDRESSES', 'INVALID_SIGNATURE', 'CONTRACT_NOT_DEPLOYED_ON_NETWORK', + 'INSUFFICIENT_ALLOWANCE_FOR_TRANSFER', + 'INSUFFICIENT_BALANCE_FOR_TRANSFER', ]); export type ZeroExError = keyof typeof ZeroExError; @@ -38,7 +40,9 @@ export interface TokenContract { allowance: { call: (ownerAddress: string, allowedAddress: string) => Promise<BigNumber.BigNumber>; }; - transfer: (to: 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; } |