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

fix: poc for bricked account #13

Merged
merged 6 commits into from
Oct 18, 2024
Merged

fix: poc for bricked account #13

merged 6 commits into from
Oct 18, 2024

Conversation

kopy-kat
Copy link
Member

@kopy-kat kopy-kat commented Oct 3, 2024

No description provided.

@kopy-kat kopy-kat requested a review from zeroknots October 3, 2024 18:24
// @dev No events emitted here. Launchpad is expected to do this.
// at this point, the safeproxy singleton is not yet updated to the SafeSingleton
// calling execTransactionFromModule is not available yet.
if (!$validators.alreadyInitialized({ account: msg.sender })) {
Copy link
Member

Choose a reason for hiding this comment

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

think this is a quite elegant solution tbh.

Copy link
Member

Choose a reason for hiding this comment

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

TODO: we should write some docs for this if we go with this solution

userOp.simulateUserOp(address(entrypoint));
entrypoint.handleOps(userOps, payable(address(0x69)));

assertTrue(true);
Copy link
Member

Choose a reason for hiding this comment

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

we should add a testcase here that verifies that the safe is operational

* account during the execution phase of the first UserOperation in order to comply with ERC-4337.
* This means that if the exection of the first UserOperation fails, the account could be
* permanently bricked. To avoid this, make sure that all the initialization and call data are
* correctly set up and do not cause a revert on any chain that the account should be deployed on.
Copy link
Member

Choose a reason for hiding this comment

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

nice. this looks good

@kopy-kat kopy-kat marked this pull request as ready for review October 18, 2024 16:15
@kopy-kat kopy-kat merged commit a1d3075 into main Oct 18, 2024
5 checks passed
@kopy-kat kopy-kat deleted the fix/bricked-account branch October 18, 2024 16:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants