feat(gateway): index NFTPrizeEscrow PrizeDeposited/PrizeReleased and relay to chain

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

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
35/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
活跃
技术栈
blockchain, typescript

调研方向

Start with the design doc at ui/docs/designs/play-for-nft.md, then find the existing gateway listener that handles the USDC Deposited event and its MsgProcessDeposit submission, since the issue asks to reuse that plumbing. Add handlers for PrizeDeposited and PrizeReleased on NFTPrizeEscrow, with the same confirmation depth and an idempotency guard. Done when both events map to their chain messages and re-observing an event submits nothing new.

由索引模型根据 Issue 内容生成。

描述

enhancement

Part of #196 (Play for NFTs). Design: ui/docs/designs/play-for-nft.md.

Scope

Gateway/indexer: observe the escrow contract's Ethereum events and drive the matching chain messages — the same observe-and-relay role the gateway already plays for USDC Deposited.

Requirements

  • Watch NFTPrizeEscrow for:
    • PrizeDeposited(gameId, nftContract, tokenId, depositor) → submit MsgConfirmNFTPrizeDeposit(gameId, ethTxRef) once the deposit has sufficient confirmations.
    • PrizeReleased(gameId, recipient, kind, nonce) → mark the prize released on-chain (so the UI can reflect WIN/REFUND completion and the chain won't re-authorize).
  • Confirmation depth consistent with the existing USDC deposit path.
  • Idempotent: re-observing the same event must not double-submit.

Notes

  • Reuse the existing event-listener + chain-submit plumbing used for Deposited / MsgProcessDeposit.
主要语言
TypeScript
星标
2
派生
5
平均合并
23 小时 56 分钟
30 天内合并 PR
91

环境准备

我们还没有检查这个项目的环境配置文件。先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

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

block52/ui 的其他 Issue

查看 block52/ui 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

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