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

オープン
#153 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
35/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
活発
技術スタック
rust

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

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.

主要言語
TypeScript
スター
0
フォーク
4
平均マージ
54分
マージ済み PR(30日)
6

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

Yormee-103/PayLoop のほかの issue

Yormee-103/PayLoop の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。