EvmError: OutOfFunds #2971
-
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Hello @serena0323, The image below shows Patrick's codebase for the The below is your function _payPrefund(uint256 missingAccountFunds) internal {
if (missingAccountFunds != 0){
(bool success,) = payable(msg.sender).call{value: missingAccountFunds, gas: type(uint256).max}("");
require(success, "Pay prefund failed");
}
} |
Beta Was this translation helpful? Give feedback.
-
Thanks @EngrPips so much! You have a sharp eye! I notice the different, but I thought it should be correct. I changed it the same as Patrick's code, it works now. so seems this call not really succeed, right? |
Beta Was this translation helpful? Give feedback.
Hello @serena0323, The image below shows Patrick's codebase for the
MinimalAccount
contract. I want to draw your attention specifically to the_payPreFund
internal function. You will see that Patrick didn't revert in the function. Here is the link https://github.com/Cyfrin/minimal-account-abstraction/blob/main/src/ethereum/MinimalAccount.sol to the codebaseThe below is your
MinimalAccount
_payPreFund
internal function. So why are you reverting inside your_payPreFund
depending on whether the call to fund themsg.sender
succeeds or not?