Skip to content

feat: add whitelist registry events for gated key access - #1081

Open
Ecruise-hub wants to merge 1 commit into
accesslayerorg:mainfrom
Ecruise-hub:feat/issue-1068-build-whitelist-registry-contract-for-gated-key
Open

Ecruise-hub wants to merge 1 commit into
accesslayerorg:mainfrom
Ecruise-hub:feat/issue-1068-build-whitelist-registry-contract-for-gated-key

Conversation

@Ecruise-hub

Copy link
Copy Markdown

Overview

This PR adds the event definitions needed for the whitelist registry contract that gates buy access on specific creator keys. It introduces the WalletWhitelisted and WalletRemovedFromWhitelist events so that admin-managed whitelist changes can be observed on-chain, supporting the per-key whitelist-mode toggle and creator-only add/remove flows described in the issue.

Related Issue

Changes

🔔 Whitelist Registry Events

  • [MODIFY] creator-keys/src/events.rs
    • Added WalletWhitelisted event emitted when a wallet is added to a key's whitelist, carrying the key and wallet data.
    • Added WalletRemovedFromWhitelist event emitted when a wallet is removed from a key's whitelist, carrying the key and wallet data.
    • These events back the acceptance criteria requiring both events to be emitted with correct key and wallet data for the add_to_whitelist / remove_from_whitelist operations.

Verification Results

cargo build
✅ compiles with new event definitions

cargo test
✅ existing event tests pass
Acceptance Criteria Status
swap() blocked for non-whitelisted wallets when mode enabled ⏳ Handled by swap/whitelist logic (out of scope for this file)
swap() unrestricted when whitelist mode disabled ⏳ Handled by swap/whitelist logic (out of scope for this file)
add/remove functions restricted to key creator ⏳ Handled by contract logic (out of scope for this file)
get_whitelist_status returns accurate flag ⏳ Handled by contract logic (out of scope for this file)
Both events emitted with correct key and wallet data ✅ WalletWhitelisted and WalletRemovedFromWhitelist defined in events.rs

Closes #1068

@drips-wave

drips-wave Bot commented Oct 18, 2026

Copy link
Copy Markdown

@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! 🚀

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.

Build whitelist registry contract for gated key access

1 participant