Implement EtherTokenWrapper and tests, with deposit and withdraw methods

This commit is contained in:
Fabio Berger
2017-06-25 14:50:11 -07:00
parent 7d001240c1
commit 60b3f3e6dd
5 changed files with 194 additions and 0 deletions

View File

@@ -19,6 +19,8 @@ export const ZeroExError = strEnum([
'ZRX_NOT_IN_TOKEN_REGISTRY',
'INSUFFICIENT_ALLOWANCE_FOR_TRANSFER',
'INSUFFICIENT_BALANCE_FOR_TRANSFER',
'INSUFFICIENT_ETH_BALANCE_FOR_DEPOSIT',
'INSUFFICIENT_WETH_BALANCE_FOR_WITHDRAWL',
'INVALID_JUMP',
'OUT_OF_GAS',
]);
@@ -140,6 +142,11 @@ export interface TokenRegistryContract extends ContractInstance {
};
}
export interface EtherTokenContract extends ContractInstance {
deposit: (txOpts: TxOpts) => Promise<void>;
withdraw: (amount: BigNumber.BigNumber, txOpts: TxOpts) => Promise<void>;
}
export const SolidityTypes = strEnum([
'address',
'uint256',
@@ -255,6 +262,7 @@ export interface Token {
export interface TxOpts {
from: string;
gas?: number;
value?: BigNumber.BigNumber;
}
export interface TokenAddressBySymbol {