aboutsummaryrefslogtreecommitdiffstats
path: root/packages/contracts/src/2.0.0/test
diff options
context:
space:
mode:
authorAmir Bandeali <abandeali1@gmail.com>2018-08-24 15:19:06 +0800
committerAmir Bandeali <abandeali1@gmail.com>2018-08-25 04:19:07 +0800
commit0a1ae2c31139e446b2fb3b7f03caf371c6668ae2 (patch)
tree3408f2db59daf3762dcb4244f52e3389c97849df /packages/contracts/src/2.0.0/test
parentc5f8b9c2d2b1eed5789b40c4df07e98afe0431ab (diff)
downloaddexon-0x-contracts-0a1ae2c31139e446b2fb3b7f03caf371c6668ae2.tar.gz
dexon-0x-contracts-0a1ae2c31139e446b2fb3b7f03caf371c6668ae2.tar.zst
dexon-0x-contracts-0a1ae2c31139e446b2fb3b7f03caf371c6668ae2.zip
Remove pragma experimental v0.5.0 and use staticcall is assembly
Diffstat (limited to 'packages/contracts/src/2.0.0/test')
-rw-r--r--packages/contracts/src/2.0.0/test/TestSignatureValidator/TestSignatureValidator.sol1
-rw-r--r--packages/contracts/src/2.0.0/test/TestStaticCall/TestStaticCall.sol16
2 files changed, 16 insertions, 1 deletions
diff --git a/packages/contracts/src/2.0.0/test/TestSignatureValidator/TestSignatureValidator.sol b/packages/contracts/src/2.0.0/test/TestSignatureValidator/TestSignatureValidator.sol
index 3845b7b9e..e1a610469 100644
--- a/packages/contracts/src/2.0.0/test/TestSignatureValidator/TestSignatureValidator.sol
+++ b/packages/contracts/src/2.0.0/test/TestSignatureValidator/TestSignatureValidator.sol
@@ -17,7 +17,6 @@
*/
pragma solidity 0.4.24;
-pragma experimental "v0.5.0";
import "../../protocol/Exchange/MixinSignatureValidator.sol";
import "../../protocol/Exchange/MixinTransactions.sol";
diff --git a/packages/contracts/src/2.0.0/test/TestStaticCall/TestStaticCall.sol b/packages/contracts/src/2.0.0/test/TestStaticCall/TestStaticCall.sol
index be24e2f37..5a9581f51 100644
--- a/packages/contracts/src/2.0.0/test/TestStaticCall/TestStaticCall.sol
+++ b/packages/contracts/src/2.0.0/test/TestStaticCall/TestStaticCall.sol
@@ -18,6 +18,8 @@
pragma solidity 0.4.24;
+import "../../tokens/ERC20Token/IERC20Token.sol";
+
contract TestStaticCall {
@@ -55,6 +57,20 @@ contract TestStaticCall {
return true;
}
+ /// @dev Approves an ERC20 token to spend tokens from this address.
+ /// @param token Address of ERC20 token.
+ /// @param spender Address that will spend tokens.
+ /// @param value Amount of tokens spender is approved to spend.
+ function approveERC20(
+ address token,
+ address spender,
+ uint256 value
+ )
+ external
+ {
+ IERC20Token(token).approve(spender, value);
+ }
+
/// @dev Increments state variable.
function updateState()
internal