diff options
author | Remco Bloemen <remco@wicked.ventures> | 2018-08-18 05:19:19 +0800 |
---|---|---|
committer | Remco Bloemen <remco@wicked.ventures> | 2018-08-25 07:46:23 +0800 |
commit | b16f5f55fb66aac624dfb82b881026b588f66b79 (patch) | |
tree | f48b7c7109bf34b284268becef8382f65ac45c72 /packages/contracts/src/2.0.0 | |
parent | d92fd437911a5b9c0af15322e39dd4c2a1f4ab60 (diff) | |
download | dexon-sol-tools-b16f5f55fb66aac624dfb82b881026b588f66b79.tar dexon-sol-tools-b16f5f55fb66aac624dfb82b881026b588f66b79.tar.gz dexon-sol-tools-b16f5f55fb66aac624dfb82b881026b588f66b79.tar.bz2 dexon-sol-tools-b16f5f55fb66aac624dfb82b881026b588f66b79.tar.lz dexon-sol-tools-b16f5f55fb66aac624dfb82b881026b588f66b79.tar.xz dexon-sol-tools-b16f5f55fb66aac624dfb82b881026b588f66b79.tar.zst dexon-sol-tools-b16f5f55fb66aac624dfb82b881026b588f66b79.zip |
Check fillable early
Diffstat (limited to 'packages/contracts/src/2.0.0')
-rw-r--r-- | packages/contracts/src/2.0.0/protocol/Exchange/MixinExchangeCore.sol | 6 |
1 files changed, 6 insertions, 0 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 36060a1b6..e281de264 100644 --- a/packages/contracts/src/2.0.0/protocol/Exchange/MixinExchangeCore.sol +++ b/packages/contracts/src/2.0.0/protocol/Exchange/MixinExchangeCore.sol @@ -90,6 +90,12 @@ contract MixinExchangeCore is { // Fetch order info OrderInfo memory orderInfo = getOrderInfo(order); + + // An order can only be filled if its status is FILLABLE. + require( + orderInfo.orderStatus == uint8(OrderStatus.FILLABLE), + "ORDER_UNFILLABLE" + ); // Fetch taker address address takerAddress = getCurrentContextAddress(); |