You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/// If defined, should be used instead of `contract_metadata.symbol`.
297
+
pubsymbol:Option<String>,
298
+
/// An URL to an Icon. To protect fellow developers from unintentionally triggering any
299
+
/// SSRF vulnerabilities with URL parsers, we don't allow to set an image bytes here.
300
+
/// If it doesn't start with a scheme (eg: https://)
301
+
/// then `contract_metadata.base_uri` should be prepended.
302
+
pubicon:Option<String>,
303
+
/// JSON or an URL to a JSON file with more info. If it doesn't start with a scheme
304
+
/// (eg: https://) then base_uri should be prepended.
305
+
pubreference:Option<String>,
306
+
/// Base64-encoded sha256 hash of JSON from reference field. Required if `reference` is included.
307
+
pubreference_hash:Option<Base64VecU8>,
308
+
}
309
+
293
310
/// TokenMetadata defines attributes for each SBT token.
294
311
pubstructTokenMetadata {
295
312
pubclass:ClassId, // token class. Required. Must be non zero.
@@ -448,12 +465,18 @@ Example **Soul Transfer** interface:
448
465
449
466
### SBT Issuer interface
450
467
451
-
SBTContract is the minimum required interface to be implemented by issuer. Other methods, such as a mint function, which requests the registry to proceed with token minting, is specific to an Issuer implementation (similarly, mint is not part of the FT standard).
468
+
SBTIssuer is the minimum required interface to be implemented by issuer. Other methods, such as a mint function, which requests the registry to proceed with token minting, is specific to an Issuer implementation (similarly, mint is not part of the FT standard).
469
+
470
+
The issuer must provide metadata object of the Issuer. Optionally, Issuer can also provide metadata object for each token class.
471
+
Issuer level (contract) metadata, must provide information common to all tokens and all classes defined by the issuer. Class level metadata, must provide information common to all tokens of a given class. Information should be deduplicated and denormalized whenever possible.
472
+
Example: if all tokens of a give class share the same symbol and icon, then both icon and symbol must be defined in the `ClassMetadata` and left empty (`None`) in the token metadata level. If a particular SBT (token) has to have unique icon, but we would like to keep a default icon for all tokens of a given issuer, then we can have default icon defined in the `ContractMetadata.icon` and each SBT, that has to have different icon, can have it specified in `TokenMetadata.icon`.
452
473
453
474
```rust
454
-
pubtraitSBTContract {
475
+
pubtraitSBTIssuer {
455
476
/// returns contract metadata
456
477
fnsbt_metadata(&self) ->ContractMetadata;
478
+
/// returns sbt class metadata, or None if class is not found.
0 commit comments