You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using a try-catch block does not check the exact reason for failure. To be more specific about the expected behavior, we can use a low-level call that returns the return data and a boolean to indicate success/failure directly.
Follow up from #601 (comment)
Using a try-catch block does not check the exact reason for failure. To be more specific about the expected behavior, we can use a low-level call that returns the return data and a boolean to indicate success/failure directly.
(bool success, bytes memory ret) = address(c).call(abi.encodeWithSignature("foo()")); require(!success); require(ret.length == 0, "ret length unexpected length");
The text was updated successfully, but these errors were encountered: