diff options
Diffstat (limited to 'packages/contracts/src/utils/simple_filled_cancelled_fetcher.ts')
-rw-r--r-- | packages/contracts/src/utils/simple_filled_cancelled_fetcher.ts | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/packages/contracts/src/utils/simple_filled_cancelled_fetcher.ts b/packages/contracts/src/utils/simple_filled_cancelled_fetcher.ts deleted file mode 100644 index 0a80637cc..000000000 --- a/packages/contracts/src/utils/simple_filled_cancelled_fetcher.ts +++ /dev/null @@ -1,32 +0,0 @@ -import { AbstractOrderFilledCancelledFetcher } from '@0xproject/order-utils'; -import { BigNumber } from '@0xproject/utils'; -import { BlockParamLiteral } from 'ethereum-types'; - -import { - CancelContractEventArgs, - ExchangeContract, - FillContractEventArgs, -} from '../contract_wrappers/generated/exchange'; - -export class SimpleOrderFilledCancelledFetcher implements AbstractOrderFilledCancelledFetcher { - private _exchangeContract: ExchangeContract; - private _zrxAddress: string; - constructor(exchange: ExchangeContract, zrxAddress: string) { - this._exchangeContract = exchange; - this._zrxAddress = zrxAddress; - } - public async getFilledTakerAmountAsync(orderHash: string): Promise<BigNumber> { - const filledTakerAmount = new BigNumber(await this._exchangeContract.filled.callAsync(orderHash)); - return filledTakerAmount; - } - public async isOrderCancelledAsync(orderHash: string): Promise<boolean> { - const methodOpts = { - defaultBlock: BlockParamLiteral.Latest, - }; - const isCancelled = await this._exchangeContract.cancelled.callAsync(orderHash); - return isCancelled; - } - public getZRXTokenAddress(): string { - return this._zrxAddress; - } -} |