remove matchOrders; must be executed directly through Exchange contract (#2364)
This commit is contained in:
parent
50d5b4fa37
commit
a636e87a4f
@ -389,79 +389,6 @@ export class CoordinatorClient {
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Match two complementary orders that have a profitable spread.
|
||||
* Each order is filled at their respective price point. However, the calculations are
|
||||
* carried out as though the orders are both being filled at the right order's price point.
|
||||
* The profit made by the left order goes to the taker (who matched the two orders).
|
||||
* @param leftOrder First order to match.
|
||||
* @param rightOrder Second order to match.
|
||||
* @param leftSignature Proof that order was created by the left maker.
|
||||
* @param rightSignature Proof that order was created by the right maker.
|
||||
* @param txData Transaction data. The `from` field should be the user Ethereum address who would like
|
||||
* to fill these orders. Must be available via the Provider supplied at instantiation.
|
||||
* @param sendTxOpts Optional arguments for sending the transaction.
|
||||
* @return Transaction hash.
|
||||
*/
|
||||
@decorators.asyncZeroExErrorHandler
|
||||
public async matchOrdersAsync(
|
||||
leftOrder: Order,
|
||||
rightOrder: Order,
|
||||
leftSignature: string,
|
||||
rightSignature: string,
|
||||
txData: TxData,
|
||||
sendTxOpts: SendTransactionOpts = { shouldValidate: true },
|
||||
): Promise<string> {
|
||||
assert.doesConformToSchema('leftOrder', leftOrder, schemas.orderSchema);
|
||||
assert.doesConformToSchema('rightOrder', rightOrder, schemas.orderSchema);
|
||||
return this._executeTxThroughCoordinatorAsync(
|
||||
ExchangeFunctionName.MatchOrders,
|
||||
txData,
|
||||
sendTxOpts,
|
||||
[leftOrder, rightOrder],
|
||||
leftOrder,
|
||||
rightOrder,
|
||||
leftSignature,
|
||||
rightSignature,
|
||||
);
|
||||
}
|
||||
/**
|
||||
* Match complementary orders that have a profitable spread.
|
||||
* Each order is maximally filled at their respective price point, and
|
||||
* the matcher receives a profit denominated in either the left maker asset,
|
||||
* right maker asset, or a combination of both.
|
||||
* @param leftOrders Set of orders with the same maker / taker asset.
|
||||
* @param rightOrders Set of orders to match against `leftOrders`
|
||||
* @param leftSignatures Proof that left orders were created by the left makers.
|
||||
* @param rightSignatures Proof that right orders were created by the right makers.
|
||||
* @param txData Transaction data. The `from` field should be the user Ethereum address who would like
|
||||
* to fill these orders. Must be available via the Provider supplied at instantiation.
|
||||
* @param sendTxOpts Optional arguments for sending the transaction.
|
||||
* @return Transaction hash.
|
||||
*/
|
||||
@decorators.asyncZeroExErrorHandler
|
||||
public async matchOrdersWithMaximalFillAsync(
|
||||
leftOrder: Order,
|
||||
rightOrder: Order,
|
||||
leftSignature: string,
|
||||
rightSignature: string,
|
||||
txData: TxData,
|
||||
sendTxOpts: SendTransactionOpts = { shouldValidate: true },
|
||||
): Promise<string> {
|
||||
assert.doesConformToSchema('leftOrder', leftOrder, schemas.orderSchema);
|
||||
assert.doesConformToSchema('rightOrder', rightOrder, schemas.orderSchema);
|
||||
return this._executeTxThroughCoordinatorAsync(
|
||||
ExchangeFunctionName.MatchOrdersWithMaximalFill,
|
||||
txData,
|
||||
sendTxOpts,
|
||||
[leftOrder, rightOrder],
|
||||
leftOrder,
|
||||
rightOrder,
|
||||
leftSignature,
|
||||
rightSignature,
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Cancels an order on-chain by submitting an Ethereum transaction.
|
||||
* @param order An object that conforms to the Order interface. The order you would like to cancel.
|
||||
|
Loading…
x
Reference in New Issue
Block a user