aboutsummaryrefslogtreecommitdiffstats
path: root/packages/contracts/src/2.0.0/forwarder/mixins
diff options
context:
space:
mode:
authorAmir Bandeali <abandeali1@gmail.com>2018-08-10 02:20:06 +0800
committerAmir Bandeali <abandeali1@gmail.com>2018-08-10 02:26:32 +0800
commitb9d8d2d5e3e7aa5f14ae2fd2019460890497bb7e (patch)
tree16c7a6bf3fc0ee332639023eebc5e6dcfd8b09ae /packages/contracts/src/2.0.0/forwarder/mixins
parentb60a74c8bc4de5c897cefc2fbf9a247d8422d560 (diff)
downloaddexon-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.sol4
-rw-r--r--packages/contracts/src/2.0.0/forwarder/mixins/MForwarderCore.sol42
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;
-}