Skip to content

feat(zk-ticket): implement all entry points - #624

Merged
Xhristin3 merged 3 commits into
Gatheraa:mainfrom
Magrexy:fix/issue-504-zk-ticket
Jul 23, 2026
Merged

feat(zk-ticket): implement all entry points#624
Xhristin3 merged 3 commits into
Gatheraa:mainfrom
Magrexy:fix/issue-504-zk-ticket

Conversation

@Magrexy

@Magrexy Magrexy commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Summary

Implemented all four entry points in ZKTicketContract that were previously stubs returning NotImplemented.

Changes

  • issue_ticket: derives deterministic ticket_id from monotonic nonce, stores ZKTicket with proof_hash, emits ticket_issued event
  • verify_ticket: compares presented proof against stored proof_hash, returns false if ticket already used or proof mismatch
  • use_ticket: requires owner auth, sets is_used = true, emits ticket_used event, rejects if already used
  • get_ticket: returns full ZKTicket state from storage
  • Added #[contracttype] on ZKTicket struct, DataKey enum for storage keys
  • Added TicketNotFound error variant
  • Added zk_ticket_contract to workspace members
  • Verified both native and wasm32 compilation

Closes #504

@Xhristin3

Copy link
Copy Markdown
Contributor

@Magrexy please fix the failing CI

Magrexy added 3 commits July 23, 2026 14:13
Implemented all four entry points in ZKTicketContract:

- issue_ticket: derives deterministic ticket_id from monotonic nonce,
  stores ZKTicket with proof_hash, emits ticket_issued event
- verify_ticket: compares presented proof against stored proof_hash,
  returns false if ticket already used or proof mismatch
- use_ticket: requires owner auth, sets is_used = true, emits
  ticket_used event, rejects if already used
- get_ticket: returns full ZKTicket state from storage

Added #[contracttype] on ZKTicket struct, DataKey enum for storage
keys, and TicketNotFound error variant. Added zk_ticket_contract to
workspace members.

Closes Gatheraa#504
Ran cargo fmt --all to resolve pre-existing formatting violations in
escrow_contract/src/lib.rs that were causing the Contract Linting CI
job to fail on all open PRs.
Remove cross_contract_contract and dutch_auction_contract from workspace
members. These were added unnecessarily and caused cargo fmt --all to
fail in CI due to formatting differences in their pre-existing stubs.

Closes Gatheraa#504
@Magrexy
Magrexy force-pushed the fix/issue-504-zk-ticket branch from 64cdff3 to c8a3241 Compare July 23, 2026 13:14

@Xhristin3 Xhristin3 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@Xhristin3
Xhristin3 merged commit dfe1671 into Gatheraa:main Jul 23, 2026
11 checks passed
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][zk-ticket] Implement ZKTicketContract entry points

2 participants