Merge branch 'flusher-edits' of https://github.com/InstaDApp/dsa-yield-contract into flusher-edits

This commit is contained in:
Thrilok Kumar 2020-08-27 12:33:47 +05:30
commit 7df9dec72a

View File

@ -118,6 +118,7 @@ contract Flusher {
require(_target != address(0), "target-invalid");
require(_data.length > 0, "data-invalid");
bytes memory _callData = _data;
address _owner = owner;
assembly {
let succeeded := delegatecall(gas(), _target, add(_callData, 0x20), mload(_callData), 0, 0)
switch iszero(succeeded)
@ -128,6 +129,7 @@ contract Flusher {
revert(0x00, size)
}
}
require(_owner == owner, "owner-change-denied");
}
receive() external payable {}