Do not return ethFeePaid

This commit is contained in:
Amir Bandeali
2019-11-30 15:38:15 -08:00
parent ca34c865af
commit a54624b697
3 changed files with 7 additions and 16 deletions

View File

@@ -67,7 +67,6 @@ contract MixinForwarderCore is
/// @param feeRecipient Address that will receive ETH when orders are filled.
/// @return wethSpentAmount Amount of WETH spent on the given set of orders.
/// @return makerAssetAcquiredAmount Amount of maker asset acquired from the given set of orders.
/// @return ethFeePaid Amount of ETH spent on the given forwarder fee.
function marketSellOrdersWithEth(
LibOrder.Order[] memory orders,
bytes[] memory signatures,
@@ -78,8 +77,7 @@ contract MixinForwarderCore is
payable
returns (
uint256 wethSpentAmount,
uint256 makerAssetAcquiredAmount,
uint256 ethFeePaid
uint256 makerAssetAcquiredAmount
)
{
// Convert ETH to WETH.
@@ -101,7 +99,7 @@ contract MixinForwarderCore is
// Transfer ethFeeAmount to feeRecipient.
// Refund remaining ETH to msg.sender.
ethFeePaid = _transferEthFeeAndRefund(
_transferEthFeeAndRefund(
wethSpentAmount,
ethFeeAmount,
feeRecipient
@@ -119,7 +117,6 @@ contract MixinForwarderCore is
/// @param feeRecipient Address that will receive ETH when orders are filled.
/// @return wethSpentAmount Amount of WETH spent on the given set of orders.
/// @return makerAssetAcquiredAmount Amount of maker asset acquired from the given set of orders.
/// @return ethFeePaid Amount of ETH spent on the given forwarder fee.
function marketBuyOrdersWithEth(
LibOrder.Order[] memory orders,
uint256 makerAssetBuyAmount,
@@ -131,8 +128,7 @@ contract MixinForwarderCore is
payable
returns (
uint256 wethSpentAmount,
uint256 makerAssetAcquiredAmount,
uint256 ethFeePaid
uint256 makerAssetAcquiredAmount
)
{
// Convert ETH to WETH.
@@ -150,7 +146,7 @@ contract MixinForwarderCore is
// Transfer ethFeeAmount to feeRecipient.
// Refund remaining ETH to msg.sender.
ethFeePaid = _transferEthFeeAndRefund(
_transferEthFeeAndRefund(
wethSpentAmount,
ethFeeAmount,
feeRecipient

View File

@@ -63,7 +63,6 @@ contract MixinWeth is
address payable feeRecipient
)
internal
returns (uint256 ethFee)
{
// Ensure that no extra WETH owned by this contract has been spent.
if (wethSpent > msg.value) {
@@ -79,7 +78,7 @@ contract MixinWeth is
// Ensure fee is less than amount of WETH remaining.
if (ethFeeAmount > wethRemaining) {
LibRichErrors.rrevert(LibForwarderRichErrors.InsufficientEthForFeeError(
ethFee,
ethFeeAmount,
wethRemaining
));
}

View File

@@ -33,7 +33,6 @@ contract IForwarderCore {
/// @param feeRecipient Address that will receive ETH when orders are filled.
/// @return wethSpentAmount Amount of WETH spent on the given set of orders.
/// @return makerAssetAcquiredAmount Amount of maker asset acquired from the given set of orders.
/// @return ethFeePaid Amount of ETH spent on the given forwarder fee.
function marketSellOrdersWithEth(
LibOrder.Order[] memory orders,
bytes[] memory signatures,
@@ -44,8 +43,7 @@ contract IForwarderCore {
payable
returns (
uint256 wethSpentAmount,
uint256 makerAssetAcquiredAmount,
uint256 ethFeePaid
uint256 makerAssetAcquiredAmount
);
/// @dev Attempt to buy makerAssetBuyAmount of makerAsset by selling ETH provided with transaction.
@@ -59,7 +57,6 @@ contract IForwarderCore {
/// @param feeRecipient Address that will receive ETH when orders are filled.
/// @return wethSpentAmount Amount of WETH spent on the given set of orders.
/// @return makerAssetAcquiredAmount Amount of maker asset acquired from the given set of orders.
/// @return ethFeePaid Amount of ETH spent on the given forwarder fee.
function marketBuyOrdersWithEth(
LibOrder.Order[] memory orders,
uint256 makerAssetBuyAmount,
@@ -71,7 +68,6 @@ contract IForwarderCore {
payable
returns (
uint256 wethSpentAmount,
uint256 makerAssetAcquiredAmount,
uint256 ethFeePaid
uint256 makerAssetAcquiredAmount
);
}