Skip to content

Conversation

@Josetic224
Copy link

PR Description
Description
This PR implements the
TicketNFT
contract as part of the Tokenbound Accounts (TBA) demonstration. The contract manages the lifecycle of event tickets as unique NFTs, enforcing a strict "one ticket per user" policy to ensure fairness and prevent bulk buying.

Additionally, this PR fixes workspace-wide compilation issues by properly initializing the
Cargo.toml
files for all associated contracts in the soroban-contract directory.

Key Features
Core NFT Logic:
mint_ticket_nft
: Mints tickets with auto-incrementing IDs.
owner_of
: Reliable ownership tracking.
balance_of
: Tracks ownership counts (guaranteed to be 0 or 1 per address).
transfer_from
: Enables ticket trading while strictly maintaining the one-per-user constraint for the recipient.
Security & Constraints:
One-per-user rule: Enforced during both initial minting and secondary transfers.
Role-based Authentication: Only the designated Minter (Event Manager) can create new tickets.
Comprehensive Testing:
Verified minting flow and ID generation.
Validated failure modes for double-minting and unauthorized access.
Confirmed transfer logic and balance synchronization.
Workspace Infrastructure:
Resolved build errors by configuring
Cargo.toml
for tba_account, tba_registry, ticket_factory, and event_manager.
Why This Matters
These NFTs are the "anchors" for the TBA system. Each ticket NFT will own a Tokenbound Account, allowing for decentralized refund mechanisms and ownership-linked assets that move seamlessly with the ticket during a sale.

Closes #3

Copy link
Contributor

@manoahLinks manoahLinks left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your contribution ser

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[contract] Event Ticket NFT Contract

2 participants