diff options
Diffstat (limited to 'packages/contracts/src/utils/exchange_wrapper.ts')
-rw-r--r-- | packages/contracts/src/utils/exchange_wrapper.ts | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/packages/contracts/src/utils/exchange_wrapper.ts b/packages/contracts/src/utils/exchange_wrapper.ts index 5996867cb..d4206adc3 100644 --- a/packages/contracts/src/utils/exchange_wrapper.ts +++ b/packages/contracts/src/utils/exchange_wrapper.ts @@ -167,6 +167,18 @@ export class ExchangeWrapper { const tx = await this._getTxWithDecodedExchangeLogsAsync(txHash); return tx; } + public async cancelOrdersBeforeAsync( + timestamp: BigNumber, + from: string, + ): Promise<TransactionReceiptWithDecodedLogs> { + const txHash = await this._exchange.cancelOrdersBefore.sendTransactionAsync( + timestamp, + { from }, + ); + const tx = await this._getTxWithDecodedExchangeLogsAsync(txHash); + return tx; + } + public async getOrderHashAsync(signedOrder: SignedOrder): Promise<string> { const order = orderUtils.getOrderStruct(signedOrder); const orderHash = await this._exchange.getOrderHash.callAsync(order); |