diff options
author | Amir Bandeali <abandeali1@gmail.com> | 2018-07-07 04:50:50 +0800 |
---|---|---|
committer | Amir Bandeali <abandeali1@gmail.com> | 2018-07-08 13:11:36 +0800 |
commit | 1c80bba4ddcb01cb8e3694f86d3f81e7164b8991 (patch) | |
tree | 2ffb24ce70f0850113949fca9b1856f85112e324 /packages/contracts/src | |
parent | d22cff09765dd0f886f8933d2f7d3d53515c6beb (diff) | |
download | dexon-sol-tools-1c80bba4ddcb01cb8e3694f86d3f81e7164b8991.tar dexon-sol-tools-1c80bba4ddcb01cb8e3694f86d3f81e7164b8991.tar.gz dexon-sol-tools-1c80bba4ddcb01cb8e3694f86d3f81e7164b8991.tar.bz2 dexon-sol-tools-1c80bba4ddcb01cb8e3694f86d3f81e7164b8991.tar.lz dexon-sol-tools-1c80bba4ddcb01cb8e3694f86d3f81e7164b8991.tar.xz dexon-sol-tools-1c80bba4ddcb01cb8e3694f86d3f81e7164b8991.tar.zst dexon-sol-tools-1c80bba4ddcb01cb8e3694f86d3f81e7164b8991.zip |
Use interfaces instead of full contracts
Diffstat (limited to 'packages/contracts/src')
-rw-r--r-- | packages/contracts/src/2.0.0/forwarder/MixinConstants.sol | 12 | ||||
-rw-r--r-- | packages/contracts/src/2.0.0/forwarder/MixinWethFees.sol | 1 | ||||
-rw-r--r-- | packages/contracts/src/2.0.0/tokens/EtherToken/IEtherToken.sol | 33 | ||||
-rw-r--r-- | packages/contracts/src/2.0.0/tokens/EtherToken/WETH9.sol (renamed from packages/contracts/src/2.0.0/tokens/WETH9/WETH9.sol) | 0 |
4 files changed, 39 insertions, 7 deletions
diff --git a/packages/contracts/src/2.0.0/forwarder/MixinConstants.sol b/packages/contracts/src/2.0.0/forwarder/MixinConstants.sol index ea82e9d64..0735ec40a 100644 --- a/packages/contracts/src/2.0.0/forwarder/MixinConstants.sol +++ b/packages/contracts/src/2.0.0/forwarder/MixinConstants.sol @@ -18,16 +18,16 @@ pragma solidity 0.4.24; -import "../protocol/Exchange/Exchange.sol"; -import { WETH9 as EtherToken } from "../tokens/WETH9/WETH9.sol"; +import "../protocol/Exchange/interfaces/IExchange.sol"; +import "../tokens/EtherToken/IEtherToken.sol"; import "../tokens/ERC20Token/IERC20Token.sol"; contract MixinConstants { // solhint-disable var-name-mixedcase - Exchange internal EXCHANGE; - EtherToken internal ETHER_TOKEN; + IExchange internal EXCHANGE; + IEtherToken internal ETHER_TOKEN; IERC20Token internal ZRX_TOKEN; bytes internal ZRX_ASSET_DATA; bytes internal WETH_ASSET_DATA; @@ -42,8 +42,8 @@ contract MixinConstants { ) public { - EXCHANGE = Exchange(_exchange); - ETHER_TOKEN = EtherToken(_etherToken); + EXCHANGE = IExchange(_exchange); + ETHER_TOKEN = IEtherToken(_etherToken); ZRX_TOKEN = IERC20Token(_zrxToken); ZRX_ASSET_DATA = _zrxAssetData; WETH_ASSET_DATA = _wethAssetData; diff --git a/packages/contracts/src/2.0.0/forwarder/MixinWethFees.sol b/packages/contracts/src/2.0.0/forwarder/MixinWethFees.sol index 12392be79..c8069aa8c 100644 --- a/packages/contracts/src/2.0.0/forwarder/MixinWethFees.sol +++ b/packages/contracts/src/2.0.0/forwarder/MixinWethFees.sol @@ -18,7 +18,6 @@ pragma solidity 0.4.24; -import { WETH9 as EtherToken } from "../tokens/WETH9/WETH9.sol"; import "../protocol/Exchange/libs/LibMath.sol"; import "./MixinConstants.sol"; diff --git a/packages/contracts/src/2.0.0/tokens/EtherToken/IEtherToken.sol b/packages/contracts/src/2.0.0/tokens/EtherToken/IEtherToken.sol new file mode 100644 index 000000000..9e2e68766 --- /dev/null +++ b/packages/contracts/src/2.0.0/tokens/EtherToken/IEtherToken.sol @@ -0,0 +1,33 @@ +/* + + 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; + +import "../ERC20Token/IERC20Token.sol"; + + +contract IEtherToken is + IERC20Token +{ + function deposit() + public + payable; + + function withdraw(uint256 amount) + public; +} diff --git a/packages/contracts/src/2.0.0/tokens/WETH9/WETH9.sol b/packages/contracts/src/2.0.0/tokens/EtherToken/WETH9.sol index 1fdb04de5..1fdb04de5 100644 --- a/packages/contracts/src/2.0.0/tokens/WETH9/WETH9.sol +++ b/packages/contracts/src/2.0.0/tokens/EtherToken/WETH9.sol |