aboutsummaryrefslogtreecommitdiffstats
path: root/packages/order-utils/src/abstract/abstract_order_filled_cancelled_fetcher.ts
blob: de096b7d9e7098b1b3cead80492170ae9ea87ecd (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import { BigNumber } from '@0x/utils';

/**
 * An abstract class to be implemented in order to use OrderStateUtils. The class that
 * implements this interface must be capable of fetching the amount filled of an order
 * and whether it's been cancelled.
 */
export abstract class AbstractOrderFilledCancelledFetcher {
    /**
     * Get the amount of the order's takerToken amount already filled
     * @param orderHash OrderHash of order we are interested in
     * @return FilledTakerAmount
     */
    public abstract async getFilledTakerAmountAsync(orderHash: string): Promise<BigNumber>;
    /**
     * Whether an order is cancelled
     * @param orderHash OrderHash of order we are interested in
     * @return Whether or not the order is cancelled
     */
    public abstract async isOrderCancelledAsync(orderHash: string): Promise<boolean>;
    public abstract getZRXAssetData(): string;
}