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

WIP: EIP-4337 Support through hooks #178

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

WIP: EIP-4337 Support through hooks #178

wants to merge 5 commits into from

Conversation

ScreamingHawk
Copy link
Collaborator

Here's an implementation of EIP-4337 that can be added as a hook.

Support is only valid (due to opcode restrictions) when the tx signature doesn't validate against nested Sequence wallets (due to accessing imageHash on the nested wallet and potentially GAS op code usage).
This means signatures including the guard will fail. A temporary solution could be adding an EOA based guard or increasing the threshold of the session key.

@Agusx1211
Copy link
Member

We should be moving in the direction of an EOA guard anyway, that's what WaaS uses and it would also be good for the universal wallet (more secure).

*/
function eip4337SelfExecute(IModuleCalls.Transaction[] calldata txs) external payable onlyEntrypoint {
// Self execute
(bool success, ) = payable(address(this)).call{value: msg.value}(
Copy link
Member

Choose a reason for hiding this comment

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

FYI native .call copies return data into memory even if you don't define it. Either use LibOptim.call or use the returned data directly.

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