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

Đang mở
#757 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
35/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
blockchain, typescript
Lĩnh vực
backend, blockchain

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.
Ngôn ngữ chính
TypeScript
Star
2
Fork
5
Merge trung bình
23 giờ 37 phút
Pull request đã merge (30 ngày)
96

Chuẩn bị môi trường

Chúng tôi chưa kiểm tra các tệp thiết lập môi trường của dự án này. Hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của block52/ui

Tất cả issue của block52/ui

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.