Skip to content

feat(creator-keys): restrict early access toggle to creator and emit … - #935

Merged
Chucks1093 merged 6 commits into
accesslayerorg:mainfrom
sarah-obasi-analytics:mode-toggle-with-whitelist
Oct 1, 2026
Merged

Chucks1093 merged 6 commits into
accesslayerorg:mainfrom
sarah-obasi-analytics:mode-toggle-with-whitelist

Conversation

@sarah-obasi-analytics

Copy link
Copy Markdown
Contributor

…event

set_early_access_mode is now creator-only and emits EarlyAccessModeChangedEvent with the new state. Tests cover the admin rejection and the toggle event.

Summary

closes #918

Testing

  • cargo fmt --all -- --check
  • cargo clippy --workspace --all-targets -- -D warnings
  • cargo test --workspace

Checklist

  • Linked issue or backlog item
  • Added or updated creator-keys unit/integration tests for every changed contract behavior, including failure paths for new or reachable ContractError variants
  • Ran cargo fmt --all -- --check, cargo clippy --workspace --all-targets -- -D warnings, and cargo test --workspace, or explained exactly why a command was not run
  • Reviewed persistent storage changes against docs/storage-key-invariants.md; any storage layout change includes a migration/backward-compatibility note
  • Confirmed event names, topic order, payload field order, and field meanings remain compatible with docs/contract-event-conventions.md, or documented the breaking change and versioning plan
  • Updated docs for any changed public contract interface, read-only method, event schema, storage behavior, fee logic, or deployment workflow
  • Scope stays limited to one contract concern and does not include unrelated formatting, lockfile, generated artifact, or dependency changes

…event

set_early_access_mode is now creator-only and emits
EarlyAccessModeChangedEvent with the new state. Tests cover the
admin rejection and the toggle event.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@drips-wave

drips-wave Bot commented Sep 25, 2026

Copy link
Copy Markdown

@sarah-obasi-analytics 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

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
cargo fmt --check was failing with an unclosed-delimiter parse error.
The if caller != creator block was missing its closing brace, with a
leftover assert_creator_or_admin call bleeding into it from before the
creator-only restriction was added. Tests already assert admin gets
Unauthorized here, so the fix removes that stray call and closes the
brace rather than restoring admin access.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Clippy with -D warnings failed on unused-import errors: the file had
two separate testutils::{...} use blocks left over from a prior merge,
making the second one's Address/Events bindings fully redundant with
the first. Collapsed to a single import.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@Chucks1093
Chucks1093 merged commit b2dd3c3 into accesslayerorg:main Oct 1, 2026
1 check 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.

Add early access mode toggle with whitelist validation in buy function

2 participants