/BaseAccount.sol Secret
Created
December 6, 2023 10:55
account-abstraction/develop/contracts/core/BaseAccount.sol
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
abstract contract BaseAccount is IAccount { | |
// ... | |
/** | |
* Sends to the entrypoint (msg.sender) the missing funds for this transaction. | |
* SubClass MAY override this method for better funds management | |
* (e.g. send to the entryPoint more than the minimum required, so that in future transactions | |
* it will not be required to send again). | |
* @param missingAccountFunds - The minimum value this method should send the entrypoint. | |
* This value MAY be zero, in case there is enough deposit, | |
* or the userOp has a paymaster. | |
*/ | |
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.) | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment