You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Refuse hookless global session grants at prepare instead of deferring an opaque AA23 #736
PrepareSessionGrant will happily build a grant the chain refuses, and the refusal arrives as an opaque AA23 on the wallet's first operation rather than as an error at grant time.
The shape
A global validation with an empty hooks array. Measured on Sepolia (#734), on one cold wallet, changing one thing at a time:
result
global + no hooks, deferred install
AA23
global + a TimeRange validation hook, deferred install
succeeds
global + no hooks, direct self-call (eth_call from the account)
succeeds
Not gas, not the wallet, not executeUserOp wrapping — each ruled out by experiment on #734.
Why it is small
AllowSelfAdministration, the flag that permits building this shape, is not reachable from the client API — it appears nowhere in api/openapi.yaml or aggregator/rest/. Every setter today is a test helper, an aa unit test, or a spike. Production grants carry hooks. So nothing user-facing is broken, and this is a guard against a future caller, not a live bug.
What to do
Refuse it where grants are built for real, and say why:
PrepareSessionGrant (or aa.SessionGrant.Validate) rejects Global with no hooks at all, with an error that names the deferred install as the reason.
Keep aa.PackSessionSignerInstall able to construct it if a spike wants to, since the direct self-call path genuinely works.
Note the existing check nearby is a different rule and should not be conflated: it refuses Global && !HasExecutionHook() on self-administration grounds. A TimeRange-hooked grant trips that rule and the chain accepts it, so the two conditions are not the same and the new one is not a tightening of the old.
Not in scope
Explaining why the account refuses it. That was left open deliberately on #734 — decoding the revert or reading the MA v2 source is real work whose only beneficiary is a shape nothing can currently reach. A guard does not need the mechanism.
Acceptance
A hookless global grant is refused at prepare with an error that explains the deferred-install constraint.
A unit test pins the refusal, and pins that a hook of any kind is accepted.
The comment does not claim a mechanism that has not been confirmed.
Activity