@0x/contracts-dev-utils: Prettier.
				
					
				
			`@0x/contracts-exchange`: Update reentrancy tests. `@0x/contracts-exchange`: Add all mutator functions to `ExchangeFunctions` type. `@0x/contracts-tes-utils`: Remove unused import.
This commit is contained in:
		| @@ -97,7 +97,7 @@ describe('LibTransactionDecoder', () => { | ||||
|         }); | ||||
|     } | ||||
|  | ||||
|     for (const func of ['marketBuyOrders', 'marketSellOrders', ]) { | ||||
|     for (const func of ['marketBuyOrders', 'marketSellOrders']) { | ||||
|         const input = (exchangeInterface as any)[func].getABIEncodedTransactionData( | ||||
|             [order, order], | ||||
|             takerAssetFillAmount, | ||||
|   | ||||
| @@ -19,7 +19,7 @@ blockchainTests.resets('Reentrancy Tests', env => { | ||||
|                 !method.constant && | ||||
|                 !_.includes(['view', 'pure'], method.stateMutability) | ||||
|             ) { | ||||
|                 if (_.includes(TestConstants.REENTRANT_FUNCTIONS, method.name)) { | ||||
|                 if (_.includes(TestConstants.REENTRANT_FUNCTIONS as string[], method.name)) { | ||||
|                     reentrantFunctions.push(method); | ||||
|                 } else { | ||||
|                     nonReentrantFunctions.push(method); | ||||
|   | ||||
| @@ -4,11 +4,11 @@ export const constants = { | ||||
|     // These are functions not secured by the `nonReentrant`, directly or | ||||
|     // indirectly (by calling a function that has the modifier). | ||||
|     REENTRANT_FUNCTIONS: [ | ||||
|         'batchExecuteTransactions', | ||||
|         'executeTransaction', | ||||
|         'registerAssetProxy', | ||||
|         'simulateDispatchTransferFromCalls', | ||||
|         'transferOwnership', | ||||
|         ExchangeFunctionName.BatchExecuteTransactions, | ||||
|         ExchangeFunctionName.ExecuteTransaction, | ||||
|         ExchangeFunctionName.RegisterAssetProxy, | ||||
|         ExchangeFunctionName.SimulateDispatchTransferFromCalls, | ||||
|         ExchangeFunctionName.TransferOwnership, | ||||
|     ], | ||||
|     SINGLE_FILL_FN_NAMES: [ | ||||
|         ExchangeFunctionName.FillOrder, | ||||
|   | ||||
| @@ -8,18 +8,26 @@ export interface AbiDecodedFillOrderData { | ||||
| } | ||||
|  | ||||
| export enum ExchangeFunctionName { | ||||
|     FillOrder = 'fillOrder', | ||||
|     FillOrKillOrder = 'fillOrKillOrder', | ||||
|     FillOrderNoThrow = 'fillOrderNoThrow', | ||||
|     BatchFillOrders = 'batchFillOrders', | ||||
|     BatchCancelOrders = 'batchCancelOrders', | ||||
|     BatchExecuteTransactions = 'batchExecuteTransactions', | ||||
|     BatchFillOrKillOrders = 'batchFillOrKillOrders', | ||||
|     BatchFillOrders = 'batchFillOrders', | ||||
|     BatchFillOrdersNoThrow = 'batchFillOrdersNoThrow', | ||||
|     BatchMatchOrders = 'batchMatchOrders', | ||||
|     BatchMatchordersWithMaximalFill = 'batchMatchOrdersWithMaximalFill', | ||||
|     CancelOrder = 'cancelOrder', | ||||
|     CancelOrdersUpTo = 'cancelOrdersUpTo', | ||||
|     ExecuteTransaction = 'executeTransaction', | ||||
|     FillOrKillOrder = 'fillOrKillOrder', | ||||
|     FillOrder = 'fillOrder', | ||||
|     FillOrderNoThrow = 'fillOrderNoThrow', | ||||
|     MarketBuyOrders = 'marketBuyOrders', | ||||
|     MarketSellOrders = 'marketSellOrders', | ||||
|     MatchOrders = 'matchOrders', | ||||
|     CancelOrder = 'cancelOrder', | ||||
|     BatchCancelOrders = 'batchCancelOrders', | ||||
|     CancelOrdersUpTo = 'cancelOrdersUpTo', | ||||
|     MatchOrdersWithMaximalfill = 'matchOrdersWithMaximalFill', | ||||
|     PreSign = 'preSign', | ||||
|     RegisterAssetProxy = 'registerAssetProxy', | ||||
|     SetSignatureValidatorApproval = 'setSignatureValidatorApproval', | ||||
|     SimulateDispatchTransferFromCalls = 'simulateDispatchTransferFromCalls', | ||||
|     TransferOwnership = 'transferOwnership', | ||||
| } | ||||
|   | ||||
| @@ -12,8 +12,6 @@ import { | ||||
| } from 'ethereum-types'; | ||||
| import * as _ from 'lodash'; | ||||
|  | ||||
| import { constants } from './constants'; | ||||
|  | ||||
| export class LogDecoder { | ||||
|     private readonly _web3Wrapper: Web3Wrapper; | ||||
|     private readonly _abiDecoder: AbiDecoder; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user