Cannot sign a UserOperation for gasless approve + swap with MetaMask Stateless7702
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 5/5
- 预计耗时
- 一周以上
- 新手友好度
- 30/100
- Issue 类型
- 功能
- 描述清晰度
- 需要澄清
- 活跃度
- 活跃
- 技术栈
- blockchain, typescript
- 领域
- api, blockchain, security
调研方向
审查 core PR 5470 中引用的限制,并追踪 @metamask/smart-accounts-kit 如何为 eth_signTypedData_v4 构造 EIP-712 payload。比较委托 EOA 和 Stateless7702 的实现情况,然后检查 wallet_sendCalls 以及外部 bundler/paymaster 相关的问题。完成标准是记录受支持的集成路径和安全性依据,或确定所需的产品变更。
由索引模型根据 Issue 内容生成。
描述
Hi MetaMask team,
I try to build a gasless atomic approve + swap flow for a MetaMask EOA that has already delegated to the Stateless7702 implementation.
The intended flow is:
User signs a UserOperation
→ External bundler submits it
→ External paymaster sponsors the gas
→ EntryPoint executes approve + swap
Using @metamask/smart-accounts-kit, the canonical EIP-712 payload sets verifyingContract to the delegated user EOA. This appears correct because the Stateless7702 implementation executes in the EOA's context.
However, MetaMask rejects eth_signTypedData_v4 with this error:
"External signature requests cannot use internal accounts as the verifying contract."
Using the Stateless7702 implementation address instead allows signing, but produces an invalid UserOperation signature because it changes the EIP-712 digest.
I found the related restriction here:
https://github.com/MetaMask/core/pull/5470
Could you please clarify:
-
Is raw UserOperation signing for a MetaMask-managed EIP-7702 EOA intentionally unsupported for external dapps?
-
What security risk is this restriction designed to prevent?
-
What is the supported integration route for a dapp to implement gasless approve + swap using its own bundler and paymaster?
-
If wallet_sendCalls is required, how can the dapp specify an external paymaster?
Thanks !
- 主要语言
- TypeScript
- 星标
- 422
- 派生
- 313
- 平均合并
- 1 天 8 小时
- 30 天内合并 PR
- 414
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 没有贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
MetaMask/core 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 62/100
维护者通常 1 天内回复
-
CI: "Validate changelog diffs" job fails on every fork-sourced pull request可能已有人在做 @Roxen-AS 于 20 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 84/100
维护者通常 1 天内回复
-
platform-api-docs: `scan` strategy misses ESM-only packages, which ship `.d.ts` rather than `.d.cts`可能已有人在做 @gaohan1994 于 21 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 76/100
维护者通常 1 天内回复
-
[utils] Replace the `uuid` dependency with `crypto.randomUUID()`可能已有人在做 @avantikonde 于 34 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 82/100
MetaMask/core#10210 · 1 个 reaction ·
维护者通常 1 天内回复
-
[utils] `toWei` accepts fractional wei and returns wrong values可能已有人在做 @Roxen-AS 于 20 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 88/100
维护者通常 1 天内回复
相似的 Issue
-
enhancement module: library-ui
难度 2/5 1-3 小时 新手友好度 65/100
chthollyphile/folia-major#1206 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 74/100
typescript-eslint/typescript-eslint#13189 ·
维护者通常 2 天内回复
-
severity:medium triage:confirmed triage:in-progress triage:reproduced
难度 2/5 1-3 小时 新手友好度 73/100
维护者通常 1 天内回复
-
wrong type
难度 2/5 1-3 小时 新手友好度 70/100
elastic/elasticsearch-specification#6919 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 62/100
维护者通常 1 天内回复