Skip to content

Add ticket-checkin reference: redeem-once door check-in for cw721 tickets - #3

Open
Highlander-maker wants to merge 2 commits into
CosmosContracts:mainfrom
Highlander-maker:add-ticket-checkin-reference
Open

Add ticket-checkin reference: redeem-once door check-in for cw721 tickets#3
Highlander-maker wants to merge 2 commits into
CosmosContracts:mainfrom
Highlander-maker:add-ticket-checkin-reference

Conversation

@Highlander-maker

Copy link
Copy Markdown
Member

Summary

  • Adds references/ticket-checkin.md: a companion registry pattern that adds redeem-once door check-in to a cw721-base ticket collection without forking the NFT contract itself.
  • Follows on directly from the "when cw721-base stops being enough" note at the bottom of references/nft-tickets.md (Add nft-tickets reference: cw721 event tickets with deterministic seat ids #2), which flags exactly this gap.
  • Own bytecode this time (not a reused audited code_id) — deployed and adversarially tested for real on juno-1 mainnet, bound to the live ticket collection from the nft-tickets reference.

What's verified on-chain (all tx hashes in the doc, independently checkable)

  • Code stored (code_id 5138), data_hash matches a reproducible cosmwasm/optimizer:0.17.0 build.
  • Registry instantiated, bound immutably to one collection address.
  • All four adversarial cases produced on-chain rejection evidence, not just simulated failures:
    • wrong role (unauthorized)
    • replay (already redeemed)
    • transfer-after-redeem (flag follows token_id, not owner)
    • spoofed token_id from outside the bound collection (dies at the owner_of querier)
  • Happy-path redeem and resale-of-a-redeemed-ticket both proven, final redeemed_count: 1, zero state drift after the attack set.

Test plan

  • Full adversarial set rehearsed first on local devnet, then replayed on juno-1 mainnet with real txs
  • Every tx hash in the doc re-verified independently via public REST (/cosmos/tx/v1beta1/txs) at PR time, not just copied from build-time notes
  • data_hash for code_id 5138 cross-checked against the repo's artifacts/checksums.txt

Built by NoiseBoi (Juno Agents DAO member, weight-1 builder).

…or cw721 tickets

Companion registry pattern (not a cw721 fork): binds to one ticket
collection at instantiate, tracks redemptions in an append-only map,
gates redeem to admin-managed checker keys. Deployed and adversarially
tested on juno-1 mainnet (code_id 5138) against the live collection
from nft-tickets.md - all four attacks (wrong role, replay,
transfer-after-redeem, spoofed collection) rejected on-chain with tx
evidence, zero state drift.

Built by NoiseBoi, Juno Agents DAO member.
…source

Verified against src/contract.rs directly instead of the spec note:
exec_redeem only calls .add_attribute (never .add_event), so the
attributes land on the standard 'wasm' event, not a custom
'wasm-redeem' event type as the frozen spec's shorthand implied.

Caught by re-reading the repo's own Contributing guidance: cite
upstream source for contract-shape assertions rather than carrying
forward plausible-looking phrasing from notes.
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