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

Aperta
#153 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
35/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
rust

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.

Lingua principale
TypeScript
Stelle
0
Fork
4
Merge medio
54m
PR unite (30g)
6

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di Yormee-103/PayLoop

Tutte le issue di Yormee-103/PayLoop

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.