diff options
author | Fabio Berger <me@fabioberger.com> | 2017-06-26 05:50:11 +0800 |
---|---|---|
committer | Fabio Berger <me@fabioberger.com> | 2017-06-26 05:50:11 +0800 |
commit | 60b3f3e6dd39afe12884a17f9d978dd604a138b5 (patch) | |
tree | d19ef9da0fa6a5010806bde6a82d23d8ffe7988e /src/0x.ts | |
parent | 7d001240c1dae380294cf5664abaf5997e61c61c (diff) | |
download | dexon-sol-tools-60b3f3e6dd39afe12884a17f9d978dd604a138b5.tar dexon-sol-tools-60b3f3e6dd39afe12884a17f9d978dd604a138b5.tar.gz dexon-sol-tools-60b3f3e6dd39afe12884a17f9d978dd604a138b5.tar.bz2 dexon-sol-tools-60b3f3e6dd39afe12884a17f9d978dd604a138b5.tar.lz dexon-sol-tools-60b3f3e6dd39afe12884a17f9d978dd604a138b5.tar.xz dexon-sol-tools-60b3f3e6dd39afe12884a17f9d978dd604a138b5.tar.zst dexon-sol-tools-60b3f3e6dd39afe12884a17f9d978dd604a138b5.zip |
Implement EtherTokenWrapper and tests, with deposit and withdraw methods
Diffstat (limited to 'src/0x.ts')
-rw-r--r-- | src/0x.ts | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -12,6 +12,7 @@ import {utils} from './utils/utils'; import {assert} from './utils/assert'; import {ExchangeWrapper} from './contract_wrappers/exchange_wrapper'; import {TokenRegistryWrapper} from './contract_wrappers/token_registry_wrapper'; +import {EtherTokenWrapper} from './contract_wrappers/ether_token_wrapper'; import {ecSignatureSchema} from './schemas/ec_signature_schema'; import {TokenWrapper} from './contract_wrappers/token_wrapper'; import {ECSignature, ZeroExError, Order, SignedOrder, Web3Provider} from './types'; @@ -46,6 +47,11 @@ export class ZeroEx { * An instance of the TokenWrapper class containing methods for interacting with any ERC20 token smart contract. */ public token: TokenWrapper; + /** + * An instance of the EtherTokenWrapper class containing methods for interacting with the + * wrapped ETH ERC20 token smart contract. + */ + public etherToken: EtherTokenWrapper; private _web3Wrapper: Web3Wrapper; /** * Verifies that the elliptic curve signature `signature` was generated @@ -145,6 +151,7 @@ export class ZeroEx { this.token = new TokenWrapper(this._web3Wrapper); this.exchange = new ExchangeWrapper(this._web3Wrapper, this.token); this.tokenRegistry = new TokenRegistryWrapper(this._web3Wrapper); + this.etherToken = new EtherTokenWrapper(this._web3Wrapper, this.token); } /** * Sets a new provider for the web3 instance used by 0x.js. Updating the provider will stop all |