Description
The ticket_nft contract has no metadata support. Ticket NFTs need a name, symbol, and per-token URI (e.g., for QR codes or event artwork) to be useful in wallets and marketplaces.
Missing Fields
- Contract-level:
name, symbol, base_uri
- Per-token:
token_uri(token_id) -> String mapping
Expected Implementation
- Store
name and symbol in constructor
- Add
DataKey::TokenUri(u128) for per-token metadata
- Add
set_token_uri(token_id, uri) (minter-only)
- Add
name(), symbol(), token_uri(token_id) view functions
Files
soroban-contract/contracts/ticket_nft/src/lib.rs
Acceptance Criteria
Description
The
ticket_nftcontract has no metadata support. Ticket NFTs need a name, symbol, and per-token URI (e.g., for QR codes or event artwork) to be useful in wallets and marketplaces.Missing Fields
name,symbol,base_uritoken_uri(token_id) -> StringmappingExpected Implementation
nameandsymbolin constructorDataKey::TokenUri(u128)for per-token metadataset_token_uri(token_id, uri)(minter-only)name(),symbol(),token_uri(token_id)view functionsFiles
soroban-contract/contracts/ticket_nft/src/lib.rsAcceptance Criteria
name()andsymbol()getters