Skip to content

Commit

Permalink
add event info
Browse files Browse the repository at this point in the history
  • Loading branch information
robert-zaremba committed Sep 6, 2023
1 parent ca6b0a7 commit 2540920
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions neps/nep-504.md
Original file line number Diff line number Diff line change
Expand Up @@ -142,14 +142,24 @@ Whenever a metadata is updated, an event should be emitted. We propose to follow
- Events must include fields necessary to identify subject matters related to use case.
- When possible, events should contain aggregated data, with respect to the standard function related to the event.
The Contract and Class Metadata are stored and managed by the Issuer contract. This NEP covers only the Issuer contract. `TokenMetadata` is stored in the SBT registry, consequently Token Metadata updates and events are defined in NEP-393.
```typescript
type Nep504Event {
standard: "nep504";
version: "1.0.0";
event: "token" | "class" | "issuer";
data: Token | Class | Issuer ;
event: "class" | "contract";
data: Class | Contract ;
}

/// An event emitted by an SBT Issuer when Class Metadata are updated.
type Class {
classes: ClassId[]; // list of class IDs whose metadata has been updated
}

/// An event emitted by an SBT Issuer when Contract Metadata is updated.
/// Note: it's an empty object
type Class { }
```
## Reference Implementation
Expand Down

0 comments on commit 2540920

Please sign in to comment.