aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFabio Berger <me@fabioberger.com>2017-05-30 20:49:29 +0800
committerFabio Berger <me@fabioberger.com>2017-05-30 20:49:29 +0800
commit2f16c5483569b819b292554efc736b415b43ca19 (patch)
tree82d7fb15d2a46cd1368a60dee475c9d422a78d95
parent2c3b718a4fa063277163e72f1be962dab3dfd21a (diff)
downloaddexon-sol-tools-2f16c5483569b819b292554efc736b415b43ca19.tar
dexon-sol-tools-2f16c5483569b819b292554efc736b415b43ca19.tar.gz
dexon-sol-tools-2f16c5483569b819b292554efc736b415b43ca19.tar.bz2
dexon-sol-tools-2f16c5483569b819b292554efc736b415b43ca19.tar.lz
dexon-sol-tools-2f16c5483569b819b292554efc736b415b43ca19.tar.xz
dexon-sol-tools-2f16c5483569b819b292554efc736b415b43ca19.tar.zst
dexon-sol-tools-2f16c5483569b819b292554efc736b415b43ca19.zip
rename ERC20Contract to TokenContract
-rw-r--r--src/contract_wrappers/token_wrapper.ts8
-rw-r--r--src/types.ts2
2 files changed, 5 insertions, 5 deletions
diff --git a/src/contract_wrappers/token_wrapper.ts b/src/contract_wrappers/token_wrapper.ts
index bd815554a..fe1d0c89f 100644
--- a/src/contract_wrappers/token_wrapper.ts
+++ b/src/contract_wrappers/token_wrapper.ts
@@ -4,10 +4,10 @@ import {Web3Wrapper} from '../web3_wrapper';
import {assert} from '../utils/assert';
import {ContractWrapper} from './contract_wrapper';
import * as TokenArtifacts from '../artifacts/Token.json';
-import {ERC20Contract} from '../types';
+import {TokenContract} from '../types';
export class TokenWrapper extends ContractWrapper {
- private tokenContractsByAddress: {[address: string]: ERC20Contract};
+ private tokenContractsByAddress: {[address: string]: TokenContract};
constructor(web3Wrapper: Web3Wrapper) {
super(web3Wrapper);
this.tokenContractsByAddress = {};
@@ -29,13 +29,13 @@ export class TokenWrapper extends ContractWrapper {
balance = _.isUndefined(balance) ? new BigNumber(0) : new BigNumber(balance);
return balance;
}
- private async getTokenContractAsync(tokenAddress: string): Promise<ERC20Contract> {
+ private async getTokenContractAsync(tokenAddress: string): Promise<TokenContract> {
let tokenContract = this.tokenContractsByAddress[tokenAddress];
if (!_.isUndefined(tokenContract)) {
return tokenContract;
}
const contractInstance = await this.instantiateContractIfExistsAsync((TokenArtifacts as any), tokenAddress);
- tokenContract = contractInstance as ERC20Contract;
+ tokenContract = contractInstance as TokenContract;
this.tokenContractsByAddress[tokenAddress] = tokenContract;
return tokenContract;
}
diff --git a/src/types.ts b/src/types.ts
index 9c82c1fa6..e1c68e8ae 100644
--- a/src/types.ts
+++ b/src/types.ts
@@ -30,7 +30,7 @@ export interface ExchangeContract {
isValidSignature: any;
}
-export interface ERC20Contract {
+export interface TokenContract {
balanceOf: {
call: (address: string) => Promise<BigNumber.BigNumber>;
};