diff options
author | Amir Bandeali <abandeali1@gmail.com> | 2018-04-22 06:42:09 +0800 |
---|---|---|
committer | Amir Bandeali <abandeali1@gmail.com> | 2018-04-22 06:42:09 +0800 |
commit | fe6c77cafb3bc1b5e19e9a9b5eb9f995244d625c (patch) | |
tree | 622d120f6b8ecd309b31d74bd4b698648b244548 /packages/contracts/src | |
parent | 67117913ddd492d5e8a6ccec57d8c5ced238040a (diff) | |
download | dexon-0x-contracts-fe6c77cafb3bc1b5e19e9a9b5eb9f995244d625c.tar dexon-0x-contracts-fe6c77cafb3bc1b5e19e9a9b5eb9f995244d625c.tar.gz dexon-0x-contracts-fe6c77cafb3bc1b5e19e9a9b5eb9f995244d625c.tar.bz2 dexon-0x-contracts-fe6c77cafb3bc1b5e19e9a9b5eb9f995244d625c.tar.lz dexon-0x-contracts-fe6c77cafb3bc1b5e19e9a9b5eb9f995244d625c.tar.xz dexon-0x-contracts-fe6c77cafb3bc1b5e19e9a9b5eb9f995244d625c.tar.zst dexon-0x-contracts-fe6c77cafb3bc1b5e19e9a9b5eb9f995244d625c.zip |
Remove unused constructor arguments
Diffstat (limited to 'packages/contracts/src')
-rw-r--r-- | packages/contracts/src/contracts/current/protocol/Exchange/Exchange.sol | 8 | ||||
-rw-r--r-- | packages/contracts/src/contracts/current/protocol/Exchange/MixinSettlementProxy.sol | 35 |
2 files changed, 15 insertions, 28 deletions
diff --git a/packages/contracts/src/contracts/current/protocol/Exchange/Exchange.sol b/packages/contracts/src/contracts/current/protocol/Exchange/Exchange.sol index 91136b29f..995cbcf76 100644 --- a/packages/contracts/src/contracts/current/protocol/Exchange/Exchange.sol +++ b/packages/contracts/src/contracts/current/protocol/Exchange/Exchange.sol @@ -23,7 +23,6 @@ import "./MixinExchangeCore.sol"; import "./MixinSignatureValidator.sol"; import "./MixinSettlementProxy.sol"; import "./MixinWrapperFunctions.sol"; -import "../AssetProxyDispatcher/IAssetProxyDispatcher.sol"; contract Exchange is MixinExchangeCore, @@ -34,13 +33,12 @@ contract Exchange is string constant public VERSION = "2.0.1-alpha"; function Exchange( - IToken _zrxToken, - bytes _zrxProxyData, - IAssetProxy _assetProxyDispatcher) + address _assetProxyDispatcher, + bytes memory _zrxProxyData) public MixinExchangeCore() MixinSignatureValidator() - MixinSettlementProxy(_assetProxyDispatcher, _zrxToken, _zrxProxyData) + MixinSettlementProxy(_assetProxyDispatcher, _zrxProxyData) MixinWrapperFunctions() {} } diff --git a/packages/contracts/src/contracts/current/protocol/Exchange/MixinSettlementProxy.sol b/packages/contracts/src/contracts/current/protocol/Exchange/MixinSettlementProxy.sol index e8a7a148f..0d1d13ede 100644 --- a/packages/contracts/src/contracts/current/protocol/Exchange/MixinSettlementProxy.sol +++ b/packages/contracts/src/contracts/current/protocol/Exchange/MixinSettlementProxy.sol @@ -20,7 +20,6 @@ pragma solidity ^0.4.21; pragma experimental ABIEncoderV2; import "./mixins/MSettlement.sol"; -import "../../tokens/Token/IToken.sol"; import "./LibPartialAmount.sol"; import "../AssetProxyDispatcher/IAssetProxy.sol"; @@ -29,40 +28,30 @@ contract MixinSettlementProxy is MSettlement, LibPartialAmount { - IAssetProxy TRANSFER_PROXY; + IAssetProxy ASSET_PROXY_DISPATCHER; bytes ZRX_PROXY_DATA; - IToken ZRX_TOKEN; - function transferProxy() + function assetProxyDispatcher() public view returns (IAssetProxy) { - return TRANSFER_PROXY; - } - - function zrxToken() - external view - returns (IToken) - { - return ZRX_TOKEN; + return ASSET_PROXY_DISPATCHER; } function zrxProxyData() external view - returns (bytes) + returns (bytes memory) { return ZRX_PROXY_DATA; } function MixinSettlementProxy( - IAssetProxy assetProxyDispatcherContract, - IToken zrxToken, - bytes zrxProxyData) + address _assetProxyDispatcher, + bytes memory _zrxProxyData) public { - ZRX_TOKEN = zrxToken; - TRANSFER_PROXY = assetProxyDispatcherContract; - ZRX_PROXY_DATA = zrxProxyData; + ASSET_PROXY_DISPATCHER = IAssetProxy(_assetProxyDispatcher); + ZRX_PROXY_DATA = _zrxProxyData; } function settleOrder( @@ -77,13 +66,13 @@ contract MixinSettlementProxy is ) { makerTokenFilledAmount = getPartialAmount(takerTokenFilledAmount, order.takerTokenAmount, order.makerTokenAmount); - TRANSFER_PROXY.transferFrom( + ASSET_PROXY_DISPATCHER.transferFrom( order.makerAssetData, order.makerAddress, takerAddress, makerTokenFilledAmount ); - TRANSFER_PROXY.transferFrom( + ASSET_PROXY_DISPATCHER.transferFrom( order.takerAssetData, takerAddress, order.makerAddress, @@ -92,7 +81,7 @@ contract MixinSettlementProxy is if (order.feeRecipientAddress != address(0)) { if (order.makerFee > 0) { makerFeePaid = getPartialAmount(takerTokenFilledAmount, order.takerTokenAmount, order.makerFee); - TRANSFER_PROXY.transferFrom( + ASSET_PROXY_DISPATCHER.transferFrom( ZRX_PROXY_DATA, order.makerAddress, order.feeRecipientAddress, @@ -101,7 +90,7 @@ contract MixinSettlementProxy is } if (order.takerFee > 0) { takerFeePaid = getPartialAmount(takerTokenFilledAmount, order.takerTokenAmount, order.takerFee); - TRANSFER_PROXY.transferFrom( + ASSET_PROXY_DISPATCHER.transferFrom( ZRX_PROXY_DATA, takerAddress, order.feeRecipientAddress, |