Labels: contract, enhancement, invite
Problem
Invite codes never expire and can be reused an unlimited number of times, undermining any referral or access-control scheme built on top of them.
Requirements
- Store an optional expiry ledger timestamp per invite code.
- Store a maximum-uses counter and increment on each redemption.
- Reject redemption of expired or exhausted codes.
- Expose a read function returning remaining uses and expiry.
Acceptance Criteria
- Redemption reverts once the code is expired or use cap is reached.
- Remaining uses decrement correctly and never go negative.
- Read function returns accurate remaining uses and expiry.
- Tests cover expiry, exhaustion, and valid redemption.
Files
contracts/open-market/src/invite.rs, contracts/open-market/src/storage_types.rs, contracts/open-market/src/errors.rs
Labels: contract, enhancement, invite
Problem
Invite codes never expire and can be reused an unlimited number of times, undermining any referral or access-control scheme built on top of them.
Requirements
Acceptance Criteria
Files
contracts/open-market/src/invite.rs,contracts/open-market/src/storage_types.rs,contracts/open-market/src/errors.rs