aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemco Bloemen <remco@wicked.ventures>2018-02-08 05:45:44 +0800
committerAmir Bandeali <abandeali1@gmail.com>2018-04-21 04:56:15 +0800
commitfc1cfcceca37394afe793e2e67ddf56d45c6e483 (patch)
treeccc955c5a4879b99164e1b6e7b8a32fb60d8f8c2
parent6b4d4b9246da0d0336d2158fbd763f1bb16ea0f5 (diff)
downloaddexon-sol-tools-fc1cfcceca37394afe793e2e67ddf56d45c6e483.tar
dexon-sol-tools-fc1cfcceca37394afe793e2e67ddf56d45c6e483.tar.gz
dexon-sol-tools-fc1cfcceca37394afe793e2e67ddf56d45c6e483.tar.bz2
dexon-sol-tools-fc1cfcceca37394afe793e2e67ddf56d45c6e483.tar.lz
dexon-sol-tools-fc1cfcceca37394afe793e2e67ddf56d45c6e483.tar.xz
dexon-sol-tools-fc1cfcceca37394afe793e2e67ddf56d45c6e483.tar.zst
dexon-sol-tools-fc1cfcceca37394afe793e2e67ddf56d45c6e483.zip
Update exchange to use interfaces and current SafeMath
-rw-r--r--packages/contracts/src/contracts/current/protocol/Exchange/Exchange.sol14
1 files changed, 7 insertions, 7 deletions
diff --git a/packages/contracts/src/contracts/current/protocol/Exchange/Exchange.sol b/packages/contracts/src/contracts/current/protocol/Exchange/Exchange.sol
index 8dacf797c..316e87373 100644
--- a/packages/contracts/src/contracts/current/protocol/Exchange/Exchange.sol
+++ b/packages/contracts/src/contracts/current/protocol/Exchange/Exchange.sol
@@ -16,11 +16,11 @@
*/
-pragma solidity ^0.4.14;
+pragma solidity ^0.4.19;
-import { TokenTransferProxy } from "../TokenTransferProxy/TokenTransferProxy.sol";
-import { Token_v1 as Token } from "../../../previous/Token/Token_v1.sol";
-import { SafeMath_v1 as SafeMath } from "../../../previous/SafeMath/SafeMath_v1.sol";
+import { ITokenTransferProxy } from "../TokenTransferProxy/ITokenTransferProxy.sol";
+import { IToken } from "../../tokens/Token/IToken.sol";
+import { SafeMath } from "../../utils/SafeMath/SafeMath.sol";
/// @title Exchange - Facilitates exchange of ERC20 tokens.
/// @author Amir Bandeali - <amir@0xProject.com>, Will Warren - <will@0xProject.com>
@@ -532,7 +532,7 @@ contract Exchange is SafeMath {
internal
returns (bool)
{
- return TokenTransferProxy(TOKEN_TRANSFER_PROXY_CONTRACT).transferFrom(token, from, to, value);
+ return ITokenTransferProxy(TOKEN_TRANSFER_PROXY_CONTRACT).transferFrom(token, from, to, value);
}
/// @dev Checks if any order transfers will fail.
@@ -585,7 +585,7 @@ contract Exchange is SafeMath {
constant // The called token contract may attempt to change state, but will not be able to due to an added gas limit.
returns (uint)
{
- return Token(token).balanceOf.gas(EXTERNAL_QUERY_GAS_LIMIT)(owner); // Limit gas to prevent reentrancy
+ return IToken(token).balanceOf.gas(EXTERNAL_QUERY_GAS_LIMIT)(owner); // Limit gas to prevent reentrancy
}
/// @dev Get allowance of token given to TokenTransferProxy by an address.
@@ -597,6 +597,6 @@ contract Exchange is SafeMath {
constant // The called token contract may attempt to change state, but will not be able to due to an added gas limit.
returns (uint)
{
- return Token(token).allowance.gas(EXTERNAL_QUERY_GAS_LIMIT)(owner, TOKEN_TRANSFER_PROXY_CONTRACT); // Limit gas to prevent reentrancy
+ return IToken(token).allowance.gas(EXTERNAL_QUERY_GAS_LIMIT)(owner, TOKEN_TRANSFER_PROXY_CONTRACT); // Limit gas to prevent reentrancy
}
}