Consider the following function:
uint256 mySpecialNumber = 0;
function foo(address callee, uint256 newNumber) public {
mySpecialNumber = newNumber;
// make a low level call to the bar() function on the callee
callee.call{gas: gasleft() - 2000}(
abi.encodeWithSelector(ISomeOtherContract.bar.selector)
);
}
Is it possible for the callee to DOS or prevent execution of foo()? Or is foo() always executable no matter what the callee does (if it reverts, runs out of gas, or some other error)?
If it is possible for the callee to prevent execution of foo(), how would that be done?