diff options
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.sol | 21 |
1 files changed, 13 insertions, 8 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 4fd71092c..dc62db448 100644 --- a/packages/contracts/src/2.0.0/protocol/Exchange/MixinExchangeCore.sol +++ b/packages/contracts/src/2.0.0/protocol/Exchange/MixinExchangeCore.sol @@ -95,7 +95,12 @@ contract MixinExchangeCore is address takerAddress = getCurrentContextAddress(); // Assert that the order is fillable by taker - assertFillableOrder(order, orderInfo, taker, signature); + assertFillableOrder( + order, + orderInfo, + takerAddress, + signature + ); // Get amount of takerAsset to fill uint256 remainingTakerAssetAmount = safeSub(order.takerAssetAmount, orderInfo.orderTakerAssetFilledAmount); @@ -107,10 +112,10 @@ contract MixinExchangeCore is // Validate context assertValidFill( order, + orderInfo, takerAssetFillAmount, takerAssetFilledAmount, - fillResults.makerAssetFilledAmount, - signature + fillResults.makerAssetFilledAmount ); // Update exchange internal state @@ -270,7 +275,7 @@ contract MixinExchangeCore is function assertFillableOrder( Order memory order, OrderInfo memory orderInfo, - address taker, + address takerAddress, bytes memory signature ) internal @@ -319,16 +324,16 @@ contract MixinExchangeCore is /// @dev Validates context for fillOrder. Succeeds or throws. /// @param order to be filled. + /// @param orderInfo OrderStatus, orderHash, and amount already filled of order. /// @param takerAssetFillAmount Desired amount of order to fill by taker. /// @param takerAssetFilledAmount Amount of takerAsset that will be filled. /// @param makerAssetFilledAmount Amount of makerAsset that will be transfered. - /// @param signature Proof that the orders was created by its maker. function assertValidFill( Order memory order, - uint256 takerAssetFillAmount, + OrderInfo memory orderInfo, + uint256 takerAssetFillAmount, // TODO: use FillResults uint256 takerAssetFilledAmount, - uint256 makerAssetFilledAmount, - bytes memory signature + uint256 makerAssetFilledAmount ) internal view |