Skip to content

Commit

Permalink
review
Browse files Browse the repository at this point in the history
  • Loading branch information
robert-zaremba committed Sep 28, 2023
1 parent ab36573 commit 37aaa74
Showing 1 changed file with 13 additions and 6 deletions.
19 changes: 13 additions & 6 deletions neps/nep-504.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ NEP: 504
Title: SBT Metadata Interface
Authors: Robert Zaremba (@robert-zaremba)
Status: New
DiscussionsTo: https://github.com/nearprotocol/neps/pull/0000
DiscussionsTo: https://github.com/nearprotocol/neps/pull/393
Type: Contract Standard
Version: 1.0.0
Created: 2023-08-21
LastUpdated: 2023-09-06
LastUpdated: 2023-09-29
---

## Summary
Expand Down Expand Up @@ -42,7 +42,9 @@ pub struct ClassMetadata {
pub name: String,
/// If defined, should be used instead of `contract_metadata.symbol`.
pub symbol: Option<String>,
/// Icon content (SVG) or a link to an Icon. If it doesn't start with a scheme (eg: https://)
/// An URL to an Icon. To protect fellow developers from unintentionally triggering any
/// SSRF vulnerabilities with URL parsers, we don't allow to set an image bytes here.
/// If it doesn't start with a scheme (eg: https://)
/// then `contract_metadata.base_uri` should be prepended.
pub icon: Option<String>,
/// JSON or an URL to a JSON file with more info. If it doesn't start with a scheme
Expand All @@ -69,10 +71,15 @@ We define a `ReferenceBase` type. All entries are optional, and don't have to be

```rust
struct ReferenceBase {
// Human readable description.
description: Option<String>,
// URL to a website.
website: Option<String>,
// Information how to get a token.
minting_info: Option<String>,
// Time (as Unixt Time in miliseconds), when the class or issuer was created.
created_at: u64,
// Map of social media kind to the profile link.
social_media: Map<String, String>,
// keys are contact types
contact: Map<String, Vec<String>>,
Expand Down Expand Up @@ -149,17 +156,17 @@ type Nep504Event {
standard: "nep504";
version: "1.0.0";
event: "class" | "contract";
data: Class | Contract ;
data: Class | Contract;
}

/// An event emitted by an SBT Issuer when Class Metadata are updated.
type Class {
type ClassEvent {
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 { }
type ContractEvent { }
```
## Reference Implementation
Expand Down

0 comments on commit 37aaa74

Please sign in to comment.