aboutsummaryrefslogtreecommitdiffstats
path: root/packages/contracts/src/2.0.0/protocol/Exchange/MixinExchangeCore.sol
diff options
context:
space:
mode:
authorAmir Bandeali <abandeali1@gmail.com>2018-08-23 08:58:47 +0800
committerAmir Bandeali <abandeali1@gmail.com>2018-08-25 08:30:56 +0800
commitc75212bef0b3801ecda09a89d5e30e359dcf1b63 (patch)
tree5a4c35d7c6209b9d5903f2c7b974c210eb628241 /packages/contracts/src/2.0.0/protocol/Exchange/MixinExchangeCore.sol
parent6d0dedc62cb1be54dbdd287fd59d7b568a199007 (diff)
downloaddexon-0x-contracts-c75212bef0b3801ecda09a89d5e30e359dcf1b63.tar
dexon-0x-contracts-c75212bef0b3801ecda09a89d5e30e359dcf1b63.tar.gz
dexon-0x-contracts-c75212bef0b3801ecda09a89d5e30e359dcf1b63.tar.bz2
dexon-0x-contracts-c75212bef0b3801ecda09a89d5e30e359dcf1b63.tar.lz
dexon-0x-contracts-c75212bef0b3801ecda09a89d5e30e359dcf1b63.tar.xz
dexon-0x-contracts-c75212bef0b3801ecda09a89d5e30e359dcf1b63.tar.zst
dexon-0x-contracts-c75212bef0b3801ecda09a89d5e30e359dcf1b63.zip
Add nonReentrant modifiers on functions that use getCurrentContextAddress only, add lockMutex modifier on functions that make external calls
Diffstat (limited to 'packages/contracts/src/2.0.0/protocol/Exchange/MixinExchangeCore.sol')
-rw-r--r--packages/contracts/src/2.0.0/protocol/Exchange/MixinExchangeCore.sol4
1 files changed, 3 insertions, 1 deletions
diff --git a/packages/contracts/src/2.0.0/protocol/Exchange/MixinExchangeCore.sol b/packages/contracts/src/2.0.0/protocol/Exchange/MixinExchangeCore.sol
index d00323b15..f02514fc6 100644
--- a/packages/contracts/src/2.0.0/protocol/Exchange/MixinExchangeCore.sol
+++ b/packages/contracts/src/2.0.0/protocol/Exchange/MixinExchangeCore.sol
@@ -56,6 +56,7 @@ contract MixinExchangeCore is
/// @param targetOrderEpoch Orders created with a salt less or equal to this value will be cancelled.
function cancelOrdersUpTo(uint256 targetOrderEpoch)
external
+ nonReentrant
{
address makerAddress = getCurrentContextAddress();
// If this function is called via `executeTransaction`, we only update the orderEpoch for the makerAddress/msg.sender combination.
@@ -88,7 +89,7 @@ contract MixinExchangeCore is
bytes memory signature
)
public
- nonReentrant
+ lockMutex
returns (FillResults memory fillResults)
{
fillResults = fillOrderInternal(
@@ -104,6 +105,7 @@ contract MixinExchangeCore is
/// @param order Order to cancel. Order must be OrderStatus.FILLABLE.
function cancelOrder(Order memory order)
public
+ nonReentrant
{
// Fetch current order status
OrderInfo memory orderInfo = getOrderInfo(order);