From 3582cf30ec5dd566fe6772b4473b94382905edb7 Mon Sep 17 00:00:00 2001 From: Sowmay Jain Date: Thu, 27 Aug 2020 17:00:02 +1000 Subject: [PATCH] revert: can't change flusher owner in any case --- contracts/flusher.sol | 2 ++ 1 file changed, 2 insertions(+) diff --git a/contracts/flusher.sol b/contracts/flusher.sol index e0b1a91..73ce97e 100644 --- a/contracts/flusher.sol +++ b/contracts/flusher.sol @@ -116,6 +116,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) @@ -126,6 +127,7 @@ contract Flusher { revert(0x00, size) } } + require(_owner == owner, "owner-change-denied"); } receive() external payable {}