Say I implement a transferETH
function in contract A:
function transferETH(address _to, uint256 _value) public returns (bool) {
(bool success, ) = _to.call{value: _value}("");
return success;
}
and I implemented a fallback function in contract B like so:
fallback() payable external {
assembly {
stop()
}
}
or
fallback() payable external {
assembly {
invalid()
}
}
which of the two fallback functions would cause a call
to them to return false but keep any ETH sent in the call?
Thanks!