Skip to content

EvmError: OutOfFunds #2971

Answered by EngrPips
serena0323 asked this question in Q&A
Dec 4, 2024 · 2 comments · 1 reply
Discussion options

You must be logged in to vote

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 codebase

The below is your MinimalAccount _payPreFund internal function. So why are you reverting inside your _payPreFund depending on whether the call to fund the msg.sender succeeds or not?

function _payPrefund(uint256 missingAccountFunds) internal {
    if (missingAccountFunds != 0){
        (bool success,) = payable(msg.sender).call{value: m…

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Answer selected by serena0323
Comment options

You must be logged in to vote
1 reply
@EngrPips
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants