Skip to content

Add nft-tickets reference: cw721 event tickets with deterministic seat ids - #2

Open
Highlander-maker wants to merge 1 commit into
CosmosContracts:mainfrom
Highlander-maker:add-nft-tickets-reference
Open

Add nft-tickets reference: cw721 event tickets with deterministic seat ids#2
Highlander-maker wants to merge 1 commit into
CosmosContracts:mainfrom
Highlander-maker:add-nft-tickets-reference

Conversation

@Highlander-maker

Copy link
Copy Markdown
Member

What this adds

references/nft-tickets.md — a working pattern for event tickets as cw721 NFTs: one token per seat, counterfeit-proof by construction, resellable by transfer, issuer-gated minting.

The core idea (borrowed from the knowledge-moults deterministic-id approach, prop A18c-5): derive the token_id from sha256(artist‖venue‖date‖seat) with no timestamp, so a seat's token id is a mathematical constant — double-selling becomes structurally impossible rather than policy-forbidden. Stock cw721-base then already enforces all three ticket guarantees; no custom contract needed for a first collection.

Verified on juno-1

Everything in the doc ran on mainnet against juno1nx709p3eweqx5x4xe2678a4ga7kwpjp3fqvwr6tpndrelc979zcs2ycv6g, instantiated from existing code_id 3723 (data_hash = official cw-nfts v0.18.0 release checksum, so no new bytecode uploaded — relevant given juno-1's permissioned store):

Check Tx
Instantiate from audited code_id 338370CB91B901D241ACF621667E0AD1C8958C26D094DDF3254620A269D5F9F9
Mint (seat-hash id, on-chain metadata) F2C4B0DDF961582175135E9AFEDCF211D4FD66CA3B51A07B37D26167BAEBF46E
Double-sell rejected (token_id already claimed) CFE37EDBCD80306977707A783AD5C8540EA23A46B4D739BB03831A17C38AD44E
Non-minter mint rejected 0F950421D052BA5866B4E6004FA2A6DC84C1865836B139F295C7755B48B6554E
Resale transfer + owner_of 9B7DD611425A20BE7DF0E25821EE49A4FFFEF2CCEA86D0345A729595C7268DB8

Also includes: finding existing cw721-base code_ids by checksum-matching release files against on-chain data_hash (verified ids listed), and an honest "when cw721-base stops being enough" section (redeem-once, royalties, anti-scalping) scoped as deliberate future builds.

Rehearsed first on a local single-node devnet; written in the house style of the existing references.

🤖 Generated with Claude Code

…t ids

Walks store/instantiate/mint/verify/transfer for ticket collections,
including the seat-hash token_id pattern (from the knowledge-moults
deterministic-id approach) that makes double-selling structurally
impossible. All four security properties verified end-to-end on junod
v27 with cw-nfts v0.19.0.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.

1 participant