Skip to content

Commit

Permalink
Added a non-reentrancy modifier to cancelOrders
Browse files Browse the repository at this point in the history
  • Loading branch information
jalextowle committed Dec 17, 2024
1 parent 9b3ec1c commit 50cb181
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion contracts/src/matching/HyperdriveMatchingEngine.sol
Original file line number Diff line number Diff line change
@@ -76,7 +76,9 @@ contract HyperdriveMatchingEngine is

/// @notice Allows a trader to cancel a list of their orders.
/// @param _orders The orders to cancel.
function cancelOrders(OrderIntent[] calldata _orders) external {
function cancelOrders(
OrderIntent[] calldata _orders
) external nonReentrant {
// Cancel all of the orders in the batch.
bytes32[] memory orderHashes = new bytes32[](_orders.length);
for (uint256 i = 0; i < _orders.length; i++) {

0 comments on commit 50cb181

Please sign in to comment.