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