diff options
author | Amir Bandeali <abandeali1@gmail.com> | 2018-08-10 02:20:06 +0800 |
---|---|---|
committer | Amir Bandeali <abandeali1@gmail.com> | 2018-08-10 02:26:32 +0800 |
commit | b9d8d2d5e3e7aa5f14ae2fd2019460890497bb7e (patch) | |
tree | 16c7a6bf3fc0ee332639023eebc5e6dcfd8b09ae /packages/contracts/src/2.0.0/forwarder/mixins | |
parent | b60a74c8bc4de5c897cefc2fbf9a247d8422d560 (diff) | |
download | dexon-sol-tools-b9d8d2d5e3e7aa5f14ae2fd2019460890497bb7e.tar dexon-sol-tools-b9d8d2d5e3e7aa5f14ae2fd2019460890497bb7e.tar.gz dexon-sol-tools-b9d8d2d5e3e7aa5f14ae2fd2019460890497bb7e.tar.bz2 dexon-sol-tools-b9d8d2d5e3e7aa5f14ae2fd2019460890497bb7e.tar.lz dexon-sol-tools-b9d8d2d5e3e7aa5f14ae2fd2019460890497bb7e.tar.xz dexon-sol-tools-b9d8d2d5e3e7aa5f14ae2fd2019460890497bb7e.tar.zst dexon-sol-tools-b9d8d2d5e3e7aa5f14ae2fd2019460890497bb7e.zip |
Make marketBuy functions revert if entire amount not filled
Diffstat (limited to 'packages/contracts/src/2.0.0/forwarder/mixins')
-rw-r--r-- | packages/contracts/src/2.0.0/forwarder/mixins/MExchangeWrapper.sol | 4 | ||||
-rw-r--r-- | packages/contracts/src/2.0.0/forwarder/mixins/MForwarderCore.sol | 42 |
2 files changed, 2 insertions, 44 deletions
diff --git a/packages/contracts/src/2.0.0/forwarder/mixins/MExchangeWrapper.sol b/packages/contracts/src/2.0.0/forwarder/mixins/MExchangeWrapper.sol index 5a2def7e5..360dea0e4 100644 --- a/packages/contracts/src/2.0.0/forwarder/mixins/MExchangeWrapper.sol +++ b/packages/contracts/src/2.0.0/forwarder/mixins/MExchangeWrapper.sol @@ -60,7 +60,7 @@ contract MExchangeWrapper { /// @param makerAssetFillAmount Desired amount of makerAsset to buy. /// @param signatures Proofs that orders have been signed by makers. /// @return Amounts filled and fees paid by makers and taker. - function marketBuyWithWeth( + function marketBuyExactAmountWithWeth( LibOrder.Order[] memory orders, uint256 makerAssetFillAmount, bytes[] memory signatures @@ -77,7 +77,7 @@ contract MExchangeWrapper { /// @param zrxBuyAmount Desired amount of ZRX to buy. /// @param signatures Proofs that orders have been created by makers. /// @return totalFillResults Amounts filled and fees paid by maker and taker. - function marketBuyZrxWithWeth( + function marketBuyExactZrxWithWeth( LibOrder.Order[] memory orders, uint256 zrxBuyAmount, bytes[] memory signatures diff --git a/packages/contracts/src/2.0.0/forwarder/mixins/MForwarderCore.sol b/packages/contracts/src/2.0.0/forwarder/mixins/MForwarderCore.sol deleted file mode 100644 index 0f5cd9c66..000000000 --- a/packages/contracts/src/2.0.0/forwarder/mixins/MForwarderCore.sol +++ /dev/null @@ -1,42 +0,0 @@ -/* - - Copyright 2018 ZeroEx Intl. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - -*/ - -pragma solidity 0.4.24; -pragma experimental ABIEncoderV2; - -import "../../protocol/Exchange/libs/LibOrder.sol"; -import "../../protocol/Exchange/libs/LibFillResults.sol"; -import "../interfaces/IForwarderCore.sol"; - - -contract MForwarderCore is - IForwarderCore -{ - - /// @dev Ensures that all ZRX fees have been repurchased and no extra WETH owned by this contract has been sold. - /// @param orderFillResults Amounts filled and fees paid for primary orders. - /// @param feeOrderFillResults Amounts filled and fees paid for fee orders. - /// @param zrxBuyAmount The amount of ZRX that needed to be repurchased after filling primary orders. - function assertValidFillResults( - LibFillResults.FillResults memory orderFillResults, - LibFillResults.FillResults memory feeOrderFillResults, - uint256 zrxBuyAmount - ) - internal - view; -} |