MetaMask / MetaMask/smart-accounts-kit
Docs: clarify when ERC-7715 permission requests suffice vs when you need 7710 createDelegation (function-call scopes)
- Dominant language
- TypeScript
- Stars
- 63
- Forks
- 45
- Avg merge
- 4d 15h
- Merged PRs (30d)
- 2
Description
## What happened
Building a governance-delegation demo for the **MetaMask Dev Cook-Off**, we designed our grant flow around ERC-7715 (`wallet_requestExecutionPermissions`) — and discovered late that 7715 permission requests cover the **token-transfer/stream/periodic permission types only**. Authority over an arbitrary contract function (in our case `Governor.castVote(uint256,uint8)`) has to be granted through the Smart Accounts Kit's ERC-7710 path instead:
```ts
createDelegation({ scope: { type: ScopeType.FunctionCall, targets: [...], selectors: ['castVote(uint256,uint8)'] }, ... })
```
Nothing in the Advanced Permissions docs said this out loud where we entered, so we built against 7715 first and pivoted mid-hackathon. (Different issue from #247, which is about the 7702 quickstart wallet path — this one is purely a docs-navigation gap between the two permission systems.)
## Suggestion
A short **"Choosing ERC-7715 vs ERC-7710"** section (or decision table) near the top of the Advanced Permissions docs:
| You need… | Use |
|---|---|
| token spend/stream/periodic allowances, requested via the wallet UI | ERC-7715 `wallet_requestExecutionPermissions` |
| authority over arbitrary function calls (governance, app-specific actions), attenuable + redelegatable | ERC-7710 `createDelegation` (+ caveats) |
One paragraph there would have saved us roughly a day. Happy to PR a draft if that's welcome.
Context: the resulting 7710-based flow (castVote-only scope + `LimitedCalls`/`Timestamp` caveats, 2-hop redelegation, cascade revoke) is open source: https://github.com/beautifulrem/regent (live demo: https://mandate-app-murex.vercel.app)
Contributor guide
Assessment
This issue has not been assessed yet.