Skip to content

feat(contracts): implement address blocklist module (#395) - #405

Closed
nuvoraxis wants to merge 1 commit into
MindFlowInteractive:mainfrom
nuvoraxis:feat/395-address-blocklist-module
Closed

nuvoraxis wants to merge 1 commit into
MindFlowInteractive:mainfrom
nuvoraxis:feat/395-address-blocklist-module

Conversation

@nuvoraxis

Copy link
Copy Markdown
Contributor

Summary of Changes

This pull request implements the Address Blocklist Module for the Quest Contract ecosystem as requested in #395.

Key Features & Architecture

  • Location: contracts/blocklist
  • Admin Access Control: Admin-gated block_address and unblock_address methods requiring cryptographic authorization.
  • Keyed Set Storage: Blocklist records are persistently stored under (Symbol("BLIST"), Address) mapped to BlocklistEntry (containing the target address, reason symbol, and block timestamp).
  • Inter-Contract Read API: Exposes is_blocked(address: Address) -> bool as a zero-cost lookup for game and quest contracts before executing participant actions.
  • Detailed Query: Exposes get_block_entry(address: Address) -> Option<BlocklistEntry> for querying block metadata.
  • Batch Processing: Implements batch_block and batch_unblock for bulk administration.
  • Audit Events: Emits standard Soroban events on every block (topic: (block, address), data: reason) and unblock (topic: (unblock, address), data: ()).
  • Admin Governance: Allows transferring the admin role via two-way authorized transfer_admin.
  • Unit Test Suite: Comprehensive unit tests in contracts/blocklist/src/test.rs covering initial setup, access control, duplicate rejection, non-blocked rejection, batch operations, and admin transfers.
  • Documentation: Detailed README.md detailing storage schema, errors, events, and integration examples.

Verification

  • cargo check --package blocklist passes with 0 errors.
  • Added to root Cargo.toml workspace members.

Closes #395

…ive#395)

- Add reusable Soroban smart contract in contracts/blocklist
- Implement admin-only block_address and unblock_address functions
- Store entries as keyed set under (BLIST, address) with BlocklistEntry metadata
- Expose is_blocked read method for seamless integration with other contracts
- Expose get_block_entry returning Address, reason, and blocked_at timestamp
- Implement batch_block and batch_unblock for administrative convenience
- Emit Soroban events on block and unblock operations
- Support secure admin transfer via transfer_admin
- Add comprehensive unit test suite in src/test.rs
- Add detailed README.md documentation and workspace entry in Cargo.toml

Closes MindFlowInteractive#395
@Mkalbani Mkalbani closed this Nov 21, 2026
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.

Address Blocklist Module

2 participants