Cannot sign a UserOperation for gasless approve + swap with MetaMask Stateless7702

未关闭
#9,970 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
5/5
预计耗时
一周以上
新手友好度
30/100
Issue 类型
功能
描述清晰度
需要澄清
活跃度
活跃
技术栈
blockchain, typescript

调研方向

审查 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:

  1. Is raw UserOperation signing for a MetaMask-managed EIP-7702 EOA intentionally unsupported for external dapps?

  2. What security risk is this restriction designed to prevent?

  3. What is the supported integration route for a dapp to implement gasless approve + swap using its own bundler and paymaster?

  4. 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 模板
  • 没有贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

MetaMask/core 的其他 Issue

查看 MetaMask/core 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。