Skip to content

feat(contracts): implement redeemable event pass keys with one-time redemption records - #1265

Open
CathyZaks wants to merge 2 commits into
accesslayerorg:mainfrom
CathyZaks:main
Open

CathyZaks wants to merge 2 commits into
accesslayerorg:mainfrom
CathyZaks:main

Conversation

@CathyZaks

Copy link
Copy Markdown
Contributor

Header

feat(contracts): implement redeemable event pass keys with one-time redemption records

Problem

#1257 - creators want to use keys as tickets for events or perks, but nothing stops a holder from redeeming the same entitlement repeatedly. This issue adds redemptions tracked on-chain with one-time use per key and event.

Solution

Adds create_event, redeem_event, redemption_of, redeemed_count, and close_event entrypoints to creator-keys, plus an EventError enum (the ContractError enum is at the Soroban 50-variant cap).

Changes (by file)

  • creator-keys/src/lib.rs: EventConfig storage struct, EventParams input struct, EventError enum, storage helpers (event_config, event_redemption, event_redeemed_count, event_lock_until), new DataKey variants (EventConfig, EventRedeemed, EventRedeemedCount, EventLockUntil), and entrypoints create_event, redeem_event, redemption_of, redeemed_count, close_event.
  • creator-keys/src/events.rs: EventCreatedEvent, RedeemedEvent, EventClosedEvent structs plus event_created_topics, redeemed_topics, event_closed_topics.

Testing (literal output)

  • cargo fmt --all -- --check ? clean
  • cargo clippy --workspace --all-targets -- -D warnings ? clean
  • cargo check --workspace ? clean
  • cargo test --workspace ? all tests pass

Closes #1257

@Chucks1093

Copy link
Copy Markdown
Member

⚠️ Merge Conflict Detected

This PR currently has a merge conflict and cannot be merged until it is resolved.

Please rebase or merge the latest changes from the base branch into your branch and push again.

Resolve merge conflicts in creator-keys/src/lib.rs and creator-keys/src/events.rs
by combining upstream changes (EscalationConfig DataKey variant, etc.) with
issue accesslayerorg#1257 implementation (EventError enum, EventConfig/EventParams structs,
create_event/redeem_event/redemption_of/redeemed_count/close_event entrypoints,
EventCreatedEvent/RedeemedEvent/EventClosedEvent events, storage keys).
CI: cargo fmt --check, clippy -D warnings, cargo check all pass.
@drips-wave

drips-wave Bot commented Nov 23, 2026

Copy link
Copy Markdown

@CathyZaks Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@Chucks1093

Copy link
Copy Markdown
Member

✅ PR Ready for Review

Due to a recent malware incident affecting our repositories, all PRs are required to pass automated security checks before being reviewed for merging.

This PR has passed all automated checks:

  • ✅ Security scan — no malicious code detected
  • ✅ No merge conflicts
  • ✅ CI checks passed

Next step: Please share this PR link in our Telegram group so a maintainer can review and merge it: https://t.me/c/accesslayerorg/8514

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.

Implement redeemable event pass keys with one-time redemption records

2 participants