I'm looking through the EIP-4337 account abstract sample repository and am not sure what the purpose of (success);
is in the following function.
function _payPrefund(uint256 missingAccountFunds) internal virtual {
if (missingAccountFunds != 0) {
(bool success, ) = payable(msg.sender).call{
value: missingAccountFunds,
gas: type(uint256).max
}("");
(success);
//ignore failure (its EntryPoint's job to verify, not account.)
}
}
If failures are ignored, why is this value loaded into memory at all?
Does adding (success);
have a gas implication here?
Edit: A lot of comments/answers are stating the code should be checking the value of success
but that is strictly against the responsibilities of the contract, as acknowledged by the comment below the statement. The calling contract (the EIP-4337 EntryPoint) is required to check success and doing it here would duplicate effort without value.