aboutsummaryrefslogtreecommitdiffstats
path: root/src/types.ts
diff options
context:
space:
mode:
authorFabio Berger <me@fabioberger.com>2017-05-30 18:37:25 +0800
committerGitHub <noreply@github.com>2017-05-30 18:37:25 +0800
commit911ab437b8f9371f70e835f680d799b7c62fb140 (patch)
tree658094383e06e2b4df944486f7caeb54550007ea /src/types.ts
parent73ae3df172b1fdb7e6a3f5cbb866b09fb5f9d032 (diff)
parent02d7f808ab0a38e145c619b360738dc976898d54 (diff)
downloaddexon-sol-tools-911ab437b8f9371f70e835f680d799b7c62fb140.tar
dexon-sol-tools-911ab437b8f9371f70e835f680d799b7c62fb140.tar.gz
dexon-sol-tools-911ab437b8f9371f70e835f680d799b7c62fb140.tar.bz2
dexon-sol-tools-911ab437b8f9371f70e835f680d799b7c62fb140.tar.lz
dexon-sol-tools-911ab437b8f9371f70e835f680d799b7c62fb140.tar.xz
dexon-sol-tools-911ab437b8f9371f70e835f680d799b7c62fb140.tar.zst
dexon-sol-tools-911ab437b8f9371f70e835f680d799b7c62fb140.zip
Merge pull request #24 from 0xProject/tokenRegistry
TokenRegistryWrapper
Diffstat (limited to 'src/types.ts')
-rw-r--r--src/types.ts20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/types.ts b/src/types.ts
index 3bed01547..6fce95706 100644
--- a/src/types.ts
+++ b/src/types.ts
@@ -30,8 +30,28 @@ export interface ExchangeContract {
isValidSignature: any;
}
+export interface TokenRegistryContract {
+ getTokenMetaData: {
+ call: (address: string) => Promise<TokenMetadata>;
+ };
+ getTokenAddresses: {
+ call: () => Promise<string[]>;
+ };
+}
+
export const SolidityTypes = strEnum([
'address',
'uint256',
]);
export type SolidityTypes = keyof typeof SolidityTypes;
+
+// [address, name, symbol, projectUrl, decimals, ipfsHash, swarmHash]
+export type TokenMetadata = [string, string, string, string, BigNumber.BigNumber, string, string];
+
+export interface Token {
+ name: string;
+ address: string;
+ symbol: string;
+ decimals: number;
+ url: string;
+};