Repository navigation
feat: add key subscription tiers with on-chain access gating - #1199
Open
Ecruise-hub wants to merge 3 commits into
Open
Ecruise-hub wants to merge 3 commits into
Ecruise-hub wants to merge 3 commits into
Conversation
|
@Ecruise-hub 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! 🚀 |
Member
|
1 similar comment
Member
|
Ecruise-hub
added a commit
to Ecruise-hub/accesslayer-contracts
that referenced
this pull request
Oct 24, 2026
Ecruise-hub
added a commit
to Ecruise-hub/accesslayer-contracts
that referenced
this pull request
Oct 24, 2026
Ecruise-hub
force-pushed
the
feat/issue-1179-add-key-subscription-tier-management-with
branch
from
October 24, 2026 10:12
f4d8782 to
0c1172d
Compare
Ecruise-hub
added a commit
to Ecruise-hub/accesslayer-contracts
that referenced
this pull request
Oct 24, 2026
Ecruise-hub
force-pushed
the
feat/issue-1179-add-key-subscription-tier-management-with
branch
from
October 24, 2026 10:13
0c1172d to
fcc6afd
Compare
Ecruise-hub
force-pushed
the
feat/issue-1179-add-key-subscription-tier-management-with
branch
from
October 24, 2026 11:28
fcc6afd to
55bfeaf
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
This PR adds subscription tier management to the key contract, letting creators define access tiers with per-tier fees and expiry periods, and exposing an on-chain subscription check that external contracts can query. Subscription fees are credited to the creator earnings ledger, and renewals extend from the current expiry rather than from now.
Related Issue
Changes
📈 Subscription Tier Management
[MODIFY]
creator-keys/src/events.rs[MODIFY]
creator-keys/src/curve_subscriptions_swaps.rscreate_tier(key_id, tier_id, fee_per_period, period_seconds, label)to store tier configuration.subscribe(key_id, tier_id)to transfer the tier fee and record a subscription with an expiry timestamp.is_subscribed(key_id, wallet, tier_id)to return whether a wallet is within an active subscription window.max(now, current_expiry) + period_seconds.Verification Results
create_tierpersists fee, period, and labelmax(now, current_expiry)Closes #1179