diff --git a/lib/ds-auth b/lib/ds-auth
index 434bf46..bd00871 160000
--- a/lib/ds-auth
+++ b/lib/ds-auth
@@ -1 +1 @@
-Subproject commit 434bf463b255ecc2157b9c671139f6c617795ebf
+Subproject commit bd00871dff1f9e6aea76b8c56a7bc28ab9c602b4
diff --git a/lib/ds-note b/lib/ds-note
index c673c9d..4f2ad38 160000
--- a/lib/ds-note
+++ b/lib/ds-note
@@ -1 +1 @@
-Subproject commit c673c9d1a1464e973db4489221e22dc5b9b02319
+Subproject commit 4f2ad380e41e664802c4cb3a34f139ac08700bd8
diff --git a/lib/ds-test b/lib/ds-test
index eb7148d..c0b770c 160000
--- a/lib/ds-test
+++ b/lib/ds-test
@@ -1 +1 @@
-Subproject commit eb7148d43c1ca6f9890361e2e2378364af2430ba
+Subproject commit c0b770c04474db28d43ab4b2fdb891bd21887e9e
diff --git a/src/proxy.sol b/src/proxy.sol
index 4f475bc..12d9edd 100644
--- a/src/proxy.sol
+++ b/src/proxy.sol
@@ -15,7 +15,7 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see .
-pragma solidity >=0.5.0 <0.6.0;
+pragma solidity >=0.6.0;
import "ds-auth/auth.sol";
import "ds-note/note.sol";
@@ -32,9 +32,8 @@ contract DSProxy is DSAuth, DSNote {
setCache(_cacheAddr);
}
- function() external payable {
+ receive() external payable {
}
-
// use the proxy to execute calldata _data on contract _code
function execute(bytes memory _code, bytes memory _data)
public
@@ -61,8 +60,8 @@ contract DSProxy is DSAuth, DSNote {
// call contract in current context
assembly {
- let succeeded := delegatecall(sub(gas, 5000), _target, add(_data, 0x20), mload(_data), 0, 0)
- let size := returndatasize
+ let succeeded := delegatecall(sub(gas(), 5000), _target, add(_data, 0x20), mload(_data), 0, 0)
+ let size := returndatasize()
response := mload(0x40)
mstore(0x40, add(response, and(add(add(size, 0x20), 0x1f), not(0x1f))))
diff --git a/src/proxy.t.sol b/src/proxy.t.sol
index ddf6cbf..eccd11d 100644
--- a/src/proxy.t.sol
+++ b/src/proxy.t.sol
@@ -15,7 +15,7 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see .
-pragma solidity >=0.5.0 <0.6.0;
+pragma solidity >=0.6.0;
import "ds-test/test.sol";
import "./proxy.sol";
@@ -49,7 +49,7 @@ contract TestContract {
}
contract TestFullAssemblyContract {
- function() external {
+ fallback() payable external {
assembly {
let message := mload(0x40)
mstore(message, "Fail test case")
@@ -79,7 +79,7 @@ contract DSProxyTest is DSTest {
///test1 - check that DSProxyFactory creates a cache
function test_DSProxyFactoryCheckCache() public {
- assertTrue(address(factory.cache) != address(0));
+ assertTrue(address(factory.cache()) != address(0));
}
///test 2 - build a proxy from DSProxyFactory and verify logging
@@ -249,9 +249,9 @@ contract DSProxyTest is DSTest {
bytes memory message;
assembly {
- succeeded := call(sub(gas, 5000), target, 0, add(data, 0x20), mload(data), 0, 0)
+ succeeded := call(sub(gas(), 5000), target, 0, add(data, 0x20), mload(data), 0, 0)
- let size := returndatasize
+ let size := returndatasize()
let response := mload(0x40)
mstore(0x40, add(response, and(add(add(size, 0x20), 0x1f), not(0x1f))))
@@ -285,9 +285,9 @@ contract DSProxyTest is DSTest {
bytes memory response;
assembly {
- succeeded := call(sub(gas, 5000), target, 0, add(data, 0x20), mload(data), 0, 0)
+ succeeded := call(sub(gas(), 5000), target, 0, add(data, 0x20), mload(data), 0, 0)
- let size := returndatasize
+ let size := returndatasize()
response := mload(0x40)
mstore(0x40, add(response, and(add(add(size, 0x20), 0x1f), not(0x1f))))
@@ -301,14 +301,14 @@ contract DSProxyTest is DSTest {
///test 12 - deposit ETH to Proxy
function test_DSProxyDepositETH() public {
assertEq(address(proxy).balance, 0);
- (bool success,) = address(proxy).call.value(10)("");
+ (bool success,) = address(proxy).call{value: 10}("");
assertTrue(success);
assertEq(address(proxy).balance, 10);
}
///test 13 - withdraw ETH from Proxy
function test_DSProxyWithdrawETH() public {
- (bool success,) = address(proxy).call.value(10)("");
+ (bool success,) = address(proxy).call{value: 10}("");
assertTrue(success);
assertEq(address(proxy).balance, 10);
uint256 myBalance = address(this).balance;
@@ -319,6 +319,6 @@ contract DSProxyTest is DSTest {
assertEq(address(this).balance, myBalance + 5);
}
- function() external payable {
+ receive() external payable {
}
}