Ticketing System
Non-fungible tokens (NFTs) are digital assets that represent ownership of unique items or pieces of content. They are commonly used for digital art, collectibles, in-game items, and other unique assets. In this tutorial, we will create a simple ticketing system based on NFT tokens.
Our contract will adhere to the CEP-95 standard, which is the standard for NFTs on the Casper blockchain.
Ticket Office Contract
Our TicketOffice contract will include the following features:
- Compliance with the CEP-95 standard.
- Ownership functionality.
- Only the owner can issue new event tickets.
- Users can purchase tickets for events.
- Tickets are limited to a one-time sale.
- Public access to view the total income of the
TicketOffice.
Setup the project
Creating a new NFT token with Odra is straightforward. Use the cargo odra new command to create a new project with the CEP-95 template:
cargo odra new --name ticket-office --template cep95