diff options
author | Fabio Berger <me@fabioberger.com> | 2018-08-04 03:27:01 +0800 |
---|---|---|
committer | Fabio Berger <me@fabioberger.com> | 2018-08-04 03:27:01 +0800 |
commit | 343cd05363166a7a93fca361d5547b39f3e83d99 (patch) | |
tree | ae1eafee9070a4f712faa19e10f3ac5894f9d954 /packages/order-utils/src/abstract/abstract_balance_and_proxy_allowance_fetcher.ts | |
parent | d9f09b5e1e7ecc8dc56ac7184cfc0152b3c2ff32 (diff) | |
download | dexon-0x-contracts-343cd05363166a7a93fca361d5547b39f3e83d99.tar dexon-0x-contracts-343cd05363166a7a93fca361d5547b39f3e83d99.tar.gz dexon-0x-contracts-343cd05363166a7a93fca361d5547b39f3e83d99.tar.bz2 dexon-0x-contracts-343cd05363166a7a93fca361d5547b39f3e83d99.tar.lz dexon-0x-contracts-343cd05363166a7a93fca361d5547b39f3e83d99.tar.xz dexon-0x-contracts-343cd05363166a7a93fca361d5547b39f3e83d99.tar.zst dexon-0x-contracts-343cd05363166a7a93fca361d5547b39f3e83d99.zip |
Add missing comments
Diffstat (limited to 'packages/order-utils/src/abstract/abstract_balance_and_proxy_allowance_fetcher.ts')
-rw-r--r-- | packages/order-utils/src/abstract/abstract_balance_and_proxy_allowance_fetcher.ts | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/packages/order-utils/src/abstract/abstract_balance_and_proxy_allowance_fetcher.ts b/packages/order-utils/src/abstract/abstract_balance_and_proxy_allowance_fetcher.ts index b2760d98e..7cb859ca7 100644 --- a/packages/order-utils/src/abstract/abstract_balance_and_proxy_allowance_fetcher.ts +++ b/packages/order-utils/src/abstract/abstract_balance_and_proxy_allowance_fetcher.ts @@ -1,6 +1,23 @@ import { BigNumber } from '@0xproject/utils'; +/**l + * An abstract class to be implemented in order to use OrderStateUtils. The class that + * implements this interface must be capable of fetching the balance and proxyAllowance + * for an Ethereum address and assetData + */ export abstract class AbstractBalanceAndProxyAllowanceFetcher { + /** + * Get balance of assetData for userAddress + * @param assetData AssetData for which to fetch the balance + * @param userAddress Ethereum address for which to fetch the balance + * @return Balance amount in base units + */ public abstract async getBalanceAsync(assetData: string, userAddress: string): Promise<BigNumber>; + /** + * Get the 0x asset proxy allowance of assetData for userAddress + * @param assetData AssetData for which to fetch the allowance + * @param userAddress Ethereum address for which to fetch the allowance + * @return Allowance amount in base units + */ public abstract async getProxyAllowanceAsync(assetData: string, userAddress: string): Promise<BigNumber>; } |