Modular Account V2 session-key support #25

Open
opened 2026-08-03 16:09:26 +00:00 by scheerenkevin · 0 comments
scheerenkevin commented 2026-08-03 16:09:26 +00:00 (Migrated from github.com)

Summary

evm_automation's treasury moved custody to an Alchemy Modular Account V2 instead of Safe (see its docs/adr/0007-treasury-custody-alchemy-modular-account.md), specifically because Alchemy has native session-key support: a scoped signer that can only perform specific pre-approved actions (e.g. "deposit into Aave for these 4 assets, spend limit X, expires in 30 days") without full account control.

This client already builds UserOperation/Bundler infrastructure (see smart_account.py) but has no session-key creation/configuration support yet — that's this issue.

Scope

  • Create/configure a session key on a Modular Account V2: allowlist (specific contracts/methods), per-token spend limits, expiry
  • Wire session-key-signed UserOperations through the existing Bundler client
  • Tests with mocked HTTP, no live calls (matching this repo's existing test approach)

Consumer

evm_automation's treasury module (treasury/service.py, treasury/snapshot.py) already has the allocation/Aave-deposit-call-building logic; it's waiting on this to actually execute those calls through a session-key-scoped signer rather than a placeholder TransactionSender.

## Summary `evm_automation`'s treasury moved custody to an Alchemy Modular Account V2 instead of Safe (see its `docs/adr/0007-treasury-custody-alchemy-modular-account.md`), specifically because Alchemy has native session-key support: a scoped signer that can only perform specific pre-approved actions (e.g. "deposit into Aave for these 4 assets, spend limit X, expires in 30 days") without full account control. This client already builds UserOperation/Bundler infrastructure (see `smart_account.py`) but has no session-key creation/configuration support yet — that's this issue. ## Scope - Create/configure a session key on a Modular Account V2: allowlist (specific contracts/methods), per-token spend limits, expiry - Wire session-key-signed UserOperations through the existing Bundler client - Tests with mocked HTTP, no live calls (matching this repo's existing test approach) ## Consumer `evm_automation`'s treasury module (`treasury/service.py`, `treasury/snapshot.py`) already has the allocation/Aave-deposit-call-building logic; it's waiting on this to actually execute those calls through a session-key-scoped signer rather than a placeholder `TransactionSender`.
Sign in to join this conversation.
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
kevin/alchemy-wallet-client#25
No description provided.