Skip to content
This repository has been archived by the owner on Oct 20, 2024. It is now read-only.

Incompatibility between UserOperation struct & PackedUserOperation due to EntryPoint v0.7 changes #372

Open
neavra opened this issue Jan 27, 2024 · 0 comments

Comments

@neavra
Copy link

neavra commented Jan 27, 2024

Changes in the recent UserOperation structure to PackedUserOperation causes transaction to revert in new Accounts. (refer to AA's PR)

One Example would be SimpleAccount.sol, which inherits from BaseAccount:
Old version

function validateUserOp(UserOperation calldata userOp, bytes32 userOpHash, uint256 missingAccountFunds)
    external override virtual returns (uint256 validationData) {
        _requireFromEntryPoint();
        validationData = _validateSignature(userOp, userOpHash);
        _validateNonce(userOp.nonce);
        _payPrefund(missingAccountFunds);
    }

New Version

function validateUserOp(
        PackedUserOperation calldata userOp,
        bytes32 userOpHash,
        uint256 missingAccountFunds
    ) external virtual override returns (uint256 validationData) {
        _requireFromEntryPoint();
        validationData = _validateSignature(userOp, userOpHash);
        _validateNonce(userOp.nonce);
        _payPrefund(missingAccountFunds);
    }

I use stackups pkg to obtain the OpHash and Signature for UserOp, which is incompatible with the newer version of validateUserOp, so the transaction would always revert.

Would it be possible to add support for EntryPoint v0.7 changes?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant