mirror of
https://github.com/Instadapp/yield-contract.git
synced 2024-07-29 21:47:29 +00:00
revert: can't change flusher owner in any case
This commit is contained in:
parent
51f2867cf1
commit
3582cf30ec
|
@ -116,6 +116,7 @@ contract Flusher {
|
||||||
require(_target != address(0), "target-invalid");
|
require(_target != address(0), "target-invalid");
|
||||||
require(_data.length > 0, "data-invalid");
|
require(_data.length > 0, "data-invalid");
|
||||||
bytes memory _callData = _data;
|
bytes memory _callData = _data;
|
||||||
|
address _owner = owner;
|
||||||
assembly {
|
assembly {
|
||||||
let succeeded := delegatecall(gas(), _target, add(_callData, 0x20), mload(_callData), 0, 0)
|
let succeeded := delegatecall(gas(), _target, add(_callData, 0x20), mload(_callData), 0, 0)
|
||||||
switch iszero(succeeded)
|
switch iszero(succeeded)
|
||||||
|
@ -126,6 +127,7 @@ contract Flusher {
|
||||||
revert(0x00, size)
|
revert(0x00, size)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
require(_owner == owner, "owner-change-denied");
|
||||||
}
|
}
|
||||||
|
|
||||||
receive() external payable {}
|
receive() external payable {}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user