Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ERC7821 to Account.sol #49

Merged
merged 12 commits into from
Dec 24, 2024
Merged

Add ERC7821 to Account.sol #49

merged 12 commits into from
Dec 24, 2024

Conversation

Amxx
Copy link
Collaborator

@Amxx Amxx commented Dec 20, 2024

Fixes #52 by implementing ERC7821 (without the optional opData) for batch tx processing

@Amxx Amxx marked this pull request as ready for review December 20, 2024 14:28
@Amxx Amxx requested a review from a team as a code owner December 20, 2024 14:28
@Amxx Amxx requested review from ernestognw and arr00 December 20, 2024 14:29
contracts/account/Account.sol Outdated Show resolved Hide resolved
contracts/account/Account.sol Outdated Show resolved Hide resolved
@Amxx Amxx force-pushed the aa/executeUserOp-delegate branch from 88e7eb0 to 113f9c9 Compare December 20, 2024 17:09
@Amxx Amxx mentioned this pull request Dec 20, 2024
@Amxx Amxx marked this pull request as draft December 20, 2024 17:11
@Amxx Amxx force-pushed the aa/executeUserOp-delegate branch from 113f9c9 to 42906dc Compare December 20, 2024 17:17
@Amxx Amxx changed the title Refactor account execution model Add batch execution capability to Account.sol Dec 20, 2024
@Amxx Amxx changed the title Add batch execution capability to Account.sol Add ERC7821 to Account.sol Dec 21, 2024
@Amxx Amxx marked this pull request as ready for review December 21, 2024 20:55
// we cannot use `Address.functionCallWithValue` here as it would revert on EOA targets
(bool success, bytes memory returndata) = target.call{value: value}(data);
Address.verifyCallResult(success, returndata);
Address.functionDelegateCall(address(this), userOp.callData[4:]);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the best option right now is to get rid of this function. The Account.sol won't be able to send individual calls anyway and the IAccountExecute interface is optional.

I understand someone may want to use this function to validate userOp fields, but I don't see that as common. At this point I'd just remove it and leave ERC7821

ernestognw
ernestognw previously approved these changes Dec 23, 2024
Copy link
Member

@ernestognw ernestognw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I removed IAccountExecute. The current implementation does not add any specific functionality. Although it may be used to check userOp fields, this is only a specific use case we've seen and not a behavior that we must consider "default".

ernestognw
ernestognw previously approved these changes Dec 24, 2024
ernestognw
ernestognw previously approved these changes Dec 24, 2024
@ernestognw ernestognw merged commit e19d51c into master Dec 24, 2024
10 checks passed
@Amxx Amxx deleted the aa/executeUserOp-delegate branch January 6, 2025 10:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Misuse of IAccountExecute.executeUserOp
3 participants