Contract: include token and due date in `InvoiceCreated` events for indexers

Đang mở
#153 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ó
3/5
Thời gian dự kiến
1-2 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ệ
rust
Lĩnh vực
blockchain, documentation

Hướng nghiên cứu

Start with the event structs in contracts/invoice/src/lib.rs and the existing event assertions in contracts/invoice/src/test.rs. Confirm the schema change with a maintainer first, since the issue says it needs a redeploy and affects existing indexers. Done means InvoiceCreated and InvoicePaid carry the new fields, the tests assert them, the README event table in contracts/invoice/README.md notes the change, and cargo fmt --check, clippy and tests pass.

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

Mô tả

contract difficulty: intermediate needs-discussion

Difficulty: Intermediate

Problem

InvoiceCreated carries only the freelancer, client, id and amount. An indexer or notification service must call get_invoice for every event to learn the token and due date.

Why it matters

Event-driven features (notifications, activity feeds) become cheaper and simpler if events are self-contained.

Scope of work

Add token and due_date to InvoiceCreated (and token to InvoicePaid), update tests that assert event contents, and document the event schema change and its compatibility impact.

Expected outcome

Events contain what an indexer needs without extra reads.

Acceptance criteria

  • Event structs updated; tests assert the new fields.
  • The README event table is updated, including a note about the schema change.
  • cargo fmt --check, clippy and tests pass.

Relevant files

  • contracts/invoice/src/lib.rs, contracts/invoice/src/test.rs, contracts/invoice/README.md

Dependencies

Event schema changes need a redeploy and affect any existing indexer.

Maintainer discussion needed?

Yes: confirm the schema change is acceptable.

Ngôn ngữ chính
TypeScript
Star
0
Fork
4
Merge trung bình
54 phút
Pull request đã merge (30 ngày)
6

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

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 Yormee-103/PayLoop

Tất cả issue của Yormee-103/PayLoop

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.