Skip to content

feat: add DefaultSecurityHook for ERC-7579 accounts#57

Open
leekt wants to merge 7 commits intodev/0.2.0from
feat/default-security-hook
Open

feat: add DefaultSecurityHook for ERC-7579 accounts#57
leekt wants to merge 7 commits intodev/0.2.0from
feat/default-security-hook

Conversation

@leekt
Copy link
Copy Markdown
Contributor

@leekt leekt commented Apr 9, 2026

Summary

  • Adds DefaultSecurityHook, a default security hook for ERC-7579 smart accounts that blocks dangerous operations by default
  • Blocks: DELEGATECALL, self-calls, module calls, ETH transfers, ERC-20/721/1155 transfer and approval selectors (including increaseAllowance/decreaseAllowance)
  • Per-account (target, selector[]) allowlist mechanism — empty selectors = allow all calls to target, specific selectors = only those bypass checks
  • Supports both single and batch execution mode inspection
  • Reverts on unknown call types (defense-in-depth)

Test plan

  • 49 BTT tests covering all deny-list checks, allowlist logic, batch execution, lifecycle, and view functions
  • 100% branch coverage

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.

1 participant