aboutsummaryrefslogtreecommitdiffstats
path: root/src/0x.ts
diff options
context:
space:
mode:
authorFabio Berger <me@fabioberger.com>2017-06-26 05:50:11 +0800
committerFabio Berger <me@fabioberger.com>2017-06-26 05:50:11 +0800
commit60b3f3e6dd39afe12884a17f9d978dd604a138b5 (patch)
treed19ef9da0fa6a5010806bde6a82d23d8ffe7988e /src/0x.ts
parent7d001240c1dae380294cf5664abaf5997e61c61c (diff)
downloaddexon-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.ts7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/0x.ts b/src/0x.ts
index 3a06c7b5a..d7a01ba70 100644
--- a/src/0x.ts
+++ b/src/0x.ts
@@ -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