CODE:
(success, ) = contract.call(); // low level call
if (success) {
// do something
}
// instead of below check, can I just use require(condition)?
if (!condition) {
revert();
}
Instead of checking the condition and using revert()
, can I use require(condition)
to ensure the whole tx including the low level calls are reverted?