Skip to content

feat(#29): add WrapPeriods tracking and get_wrap_periods query#206

Open
soterika wants to merge 2 commits into
zintarh:mainfrom
soterika:feature/issue-29-get-wrap-periods
Open

feat(#29): add WrapPeriods tracking and get_wrap_periods query#206
soterika wants to merge 2 commits into
zintarh:mainfrom
soterika:feature/issue-29-get-wrap-periods

Conversation

@soterika

@soterika soterika commented Jul 1, 2026

Copy link
Copy Markdown
  • Add WrapPeriods(Address) DataKey variant to store Vec of all periods minted for a user
  • Update persist_wrap_record to append each minted period to the list and extend its TTL (one year)
  • Add get_wrap_periods(user) -> Vec public query function
  • Update revoke_wrap to filter the revoked period out of WrapPeriods
  • Extend extend_ttl() to also renew the WrapPeriods key
  • Add 5 tests covering: empty list, accumulation, per-user isolation, revoke removes period, and claim_wrap also tracks periods

Closes #29

- Add WrapPeriods(Address) DataKey variant to store Vec<u64> of all
  periods minted for a user
- Update persist_wrap_record to append each minted period to the list
  and extend its TTL (one year)
- Add get_wrap_periods(user) -> Vec<u64> public query function
- Update revoke_wrap to filter the revoked period out of WrapPeriods
- Extend extend_ttl() to also renew the WrapPeriods key
- Add 5 tests covering: empty list, accumulation, per-user isolation,
  revoke removes period, and claim_wrap also tracks periods

Closes zintarh#29
@drips-wave

drips-wave Bot commented Jul 1, 2026

Copy link
Copy Markdown

@soterika 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

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.

Add get_all_wraps or get_wrap_periods query for user history

1 participant