`@0x/contracts-exchange`: Introduce new `marketSellOrdersFillOrKill` and `marketBuyOrdersFillOrKill` functions. `@0x/contracts-exchange`: Add new rich error types: `IncompleteMarketBuyError` and `IncompleteMarketSellError`. `@0x/contracts-exchange`: Use `abi.decode()` in `LibExchangeRichErrorDecoder` over `LibBytes`.
48 lines
1.4 KiB
TypeScript
48 lines
1.4 KiB
TypeScript
import { ExchangeFunctionName } from './types';
|
|
|
|
export const constants = {
|
|
// These are functions not secured by the `nonReentrant`, directly or
|
|
// indirectly (by calling a function that has the modifier).
|
|
REENTRANT_FUNCTIONS: [
|
|
ExchangeFunctionName.BatchExecuteTransactions,
|
|
ExchangeFunctionName.ExecuteTransaction,
|
|
ExchangeFunctionName.RegisterAssetProxy,
|
|
ExchangeFunctionName.SimulateDispatchTransferFromCalls,
|
|
ExchangeFunctionName.TransferOwnership,
|
|
],
|
|
SINGLE_FILL_FN_NAMES: [
|
|
ExchangeFunctionName.FillOrder,
|
|
ExchangeFunctionName.FillOrKillOrder,
|
|
ExchangeFunctionName.FillOrderNoThrow,
|
|
],
|
|
BATCH_FILL_FN_NAMES: [
|
|
ExchangeFunctionName.BatchFillOrders,
|
|
ExchangeFunctionName.BatchFillOrKillOrders,
|
|
ExchangeFunctionName.BatchFillOrdersNoThrow,
|
|
],
|
|
MARKET_FILL_FN_NAMES: [
|
|
ExchangeFunctionName.MarketBuyOrdersFillOrKill,
|
|
ExchangeFunctionName.MarketSellOrdersFillOrKill,
|
|
ExchangeFunctionName.MarketBuyOrdersNoThrow,
|
|
ExchangeFunctionName.MarketSellOrdersNoThrow,
|
|
],
|
|
};
|
|
|
|
export enum ValidatorWalletAction {
|
|
Reject = 0,
|
|
Accept = 1,
|
|
Revert = 2,
|
|
UpdateState = 3,
|
|
MatchSignatureHash = 4,
|
|
ReturnTrue = 5,
|
|
ReturnNothing = 6,
|
|
NTypes = 7,
|
|
}
|
|
|
|
export enum ValidatorWalletDataType {
|
|
None = 0,
|
|
Order = 1,
|
|
ZeroExTransaction = 2,
|
|
NTypes = 3,
|
|
}
|