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

Abierto
#153 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
35/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
rust

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.

Lenguaje dominante
TypeScript
Estrellas
0
Forks
4
Merge medio
54 min
PR fusionados (30 d)
6

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de Yormee-103/PayLoop

Todos los issues de Yormee-103/PayLoop

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.