diff options
author | fragosti <francesco.agosti93@gmail.com> | 2018-10-13 07:11:30 +0800 |
---|---|---|
committer | fragosti <francesco.agosti93@gmail.com> | 2018-10-13 07:11:30 +0800 |
commit | f39541436a5088e928660b61bde7cef5153bc7a1 (patch) | |
tree | 5c6fe7ff4b9621a5cc59fe795b6feb1ad346b479 /packages/instant/src/types.ts | |
parent | ccf021b8bf34aa7c0714f29f9153a5a11ce682a2 (diff) | |
download | dexon-0x-contracts-f39541436a5088e928660b61bde7cef5153bc7a1.tar dexon-0x-contracts-f39541436a5088e928660b61bde7cef5153bc7a1.tar.gz dexon-0x-contracts-f39541436a5088e928660b61bde7cef5153bc7a1.tar.bz2 dexon-0x-contracts-f39541436a5088e928660b61bde7cef5153bc7a1.tar.lz dexon-0x-contracts-f39541436a5088e928660b61bde7cef5153bc7a1.tar.xz dexon-0x-contracts-f39541436a5088e928660b61bde7cef5153bc7a1.tar.zst dexon-0x-contracts-f39541436a5088e928660b61bde7cef5153bc7a1.zip |
feat: model asset meta data and add dynamic assetData state
Diffstat (limited to 'packages/instant/src/types.ts')
-rw-r--r-- | packages/instant/src/types.ts | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/packages/instant/src/types.ts b/packages/instant/src/types.ts index ffa5d679e..bf3ee392f 100644 --- a/packages/instant/src/types.ts +++ b/packages/instant/src/types.ts @@ -1,4 +1,4 @@ -import { ObjectMap } from '@0xproject/types'; +import { AssetProxyId, ObjectMap } from '@0xproject/types'; // Reusable export enum AsyncProcessState { @@ -11,3 +11,23 @@ export enum AsyncProcessState { export type FunctionType = (...args: any[]) => any; export type ActionCreatorsMapObject = ObjectMap<FunctionType>; export type ActionsUnion<A extends ActionCreatorsMapObject> = ReturnType<A[keyof A]>; + +export interface ERC20AssetMetaData { + assetProxyId: AssetProxyId.ERC20; + decimals: number; + primaryColor?: string; + symbol: string; +} + +export interface ERC721AssetMetaData { + assetProxyId: AssetProxyId.ERC721; + name: string; + primaryColor?: string; +} + +export type AssetMetaData = ERC20AssetMetaData | ERC721AssetMetaData; + +export enum Network { + Kovan = 42, + Mainnet = 1, +} |