diff options
author | Amir Bandeali <abandeali1@gmail.com> | 2018-07-06 05:31:55 +0800 |
---|---|---|
committer | Amir Bandeali <abandeali1@gmail.com> | 2018-07-07 04:23:09 +0800 |
commit | 07c111d1f589bab6ee573cfcbab891bd7b81dfc5 (patch) | |
tree | 82cbf0cc85486f773dd19c1279a795ac06ea7572 /packages/contracts/src | |
parent | a2024da955ca63d3084a75927f4f1999e16bc849 (diff) | |
download | dexon-sol-tools-07c111d1f589bab6ee573cfcbab891bd7b81dfc5.tar dexon-sol-tools-07c111d1f589bab6ee573cfcbab891bd7b81dfc5.tar.gz dexon-sol-tools-07c111d1f589bab6ee573cfcbab891bd7b81dfc5.tar.bz2 dexon-sol-tools-07c111d1f589bab6ee573cfcbab891bd7b81dfc5.tar.lz dexon-sol-tools-07c111d1f589bab6ee573cfcbab891bd7b81dfc5.tar.xz dexon-sol-tools-07c111d1f589bab6ee573cfcbab891bd7b81dfc5.tar.zst dexon-sol-tools-07c111d1f589bab6ee573cfcbab891bd7b81dfc5.zip |
Remove TODOs that won't be addressed
Diffstat (limited to 'packages/contracts/src')
4 files changed, 3 insertions, 10 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 cf53c3176..ec84b1e19 100644 --- a/packages/contracts/src/2.0.0/protocol/Exchange/MixinExchangeCore.sol +++ b/packages/contracts/src/2.0.0/protocol/Exchange/MixinExchangeCore.sol @@ -374,21 +374,19 @@ contract MixinExchangeCore is returns (FillResults memory fillResults) { // Compute proportional transfer amounts - // TODO: All three are multiplied by the same fraction. This can - // potentially be optimized. fillResults.takerAssetFilledAmount = takerAssetFilledAmount; fillResults.makerAssetFilledAmount = getPartialAmount( - fillResults.takerAssetFilledAmount, + takerAssetFilledAmount, order.takerAssetAmount, order.makerAssetAmount ); fillResults.makerFeePaid = getPartialAmount( - fillResults.takerAssetFilledAmount, + takerAssetFilledAmount, order.takerAssetAmount, order.makerFee ); fillResults.takerFeePaid = getPartialAmount( - fillResults.takerAssetFilledAmount, + takerAssetFilledAmount, order.takerAssetAmount, order.takerFee ); diff --git a/packages/contracts/src/2.0.0/protocol/Exchange/MixinMatchOrders.sol b/packages/contracts/src/2.0.0/protocol/Exchange/MixinMatchOrders.sol index ba687543a..56b309a1b 100644 --- a/packages/contracts/src/2.0.0/protocol/Exchange/MixinMatchOrders.sol +++ b/packages/contracts/src/2.0.0/protocol/Exchange/MixinMatchOrders.sol @@ -41,7 +41,6 @@ contract MixinMatchOrders is /// @param leftSignature Proof that order was created by the left maker. /// @param rightSignature Proof that order was created by the right maker. /// @return matchedFillResults Amounts filled and fees paid by maker and taker of matched orders. - /// TODO: Make this function external once supported by Solidity (See Solidity Issues #3199, #1603) function matchOrders( LibOrder.Order memory leftOrder, LibOrder.Order memory rightOrder, @@ -184,7 +183,6 @@ contract MixinMatchOrders is leftTakerAssetFilledAmount = leftTakerAssetAmountRemaining; // The right order receives an amount proportional to how much was spent. - // TODO: Can we ensure rounding error is in the correct direction? rightTakerAssetFilledAmount = getPartialAmount( rightOrder.takerAssetAmount, rightOrder.makerAssetAmount, @@ -195,7 +193,6 @@ contract MixinMatchOrders is rightTakerAssetFilledAmount = rightTakerAssetAmountRemaining; // The left order receives an amount proportional to how much was spent. - // TODO: Can we ensure rounding error is in the correct direction? leftTakerAssetFilledAmount = getPartialAmount( rightOrder.makerAssetAmount, rightOrder.takerAssetAmount, diff --git a/packages/contracts/src/2.0.0/protocol/Exchange/MixinSignatureValidator.sol b/packages/contracts/src/2.0.0/protocol/Exchange/MixinSignatureValidator.sol index 822701459..ac7382715 100644 --- a/packages/contracts/src/2.0.0/protocol/Exchange/MixinSignatureValidator.sol +++ b/packages/contracts/src/2.0.0/protocol/Exchange/MixinSignatureValidator.sol @@ -91,7 +91,6 @@ contract MixinSignatureValidator is view returns (bool isValid) { - // TODO: Domain separation: make hash depend on role. (Taker sig should not be valid as maker sig, etc.) require( signature.length > 0, "LENGTH_GREATER_THAN_0_REQUIRED" diff --git a/packages/contracts/src/2.0.0/protocol/Exchange/interfaces/IMatchOrders.sol b/packages/contracts/src/2.0.0/protocol/Exchange/interfaces/IMatchOrders.sol index cea5adbbb..73447f3ae 100644 --- a/packages/contracts/src/2.0.0/protocol/Exchange/interfaces/IMatchOrders.sol +++ b/packages/contracts/src/2.0.0/protocol/Exchange/interfaces/IMatchOrders.sol @@ -33,7 +33,6 @@ contract IMatchOrders { /// @param leftSignature Proof that order was created by the left maker. /// @param rightSignature Proof that order was created by the right maker. /// @return matchedFillResults Amounts filled and fees paid by maker and taker of matched orders. - /// TODO: Make this function external once supported by Solidity (See Solidity Issues #3199, #1603) function matchOrders( LibOrder.Order memory leftOrder, LibOrder.Order memory rightOrder, |