Concordium / concordium-dapp-examples

Place to put small dApp examples
Mozilla Public License 2.0
8 stars 15 forks source link

Track-and-trace standard (CIS6) #82

Closed DOBEN closed 6 months ago

DOBEN commented 6 months ago

Task description

The standard defines the two events to enable tracking of items by external tools (e.g. block explorers).

pub struct ItemCreatedEvent {
    /// The item's id.
    pub item_id:      String,
    /// The item's metadata_url.
    pub metadata_url: Option<MetadataUrl>,
    /// Status when item was created.
    pub initial_status:      Status,
}

pub struct ItemStatusChangedEvent<A: Serial> {
    /// The item's id.
    pub item_id:         String,
    /// The item's new status.
    pub new_status:      Status,
    /// Any additional data encoded as generic bytes. Usecase-specific data can
    /// be included here such as temperature, longitude, latitude, ... .
    pub additional_data: A,
}

In preparation for the standard, the following changes were discussed: