Repository navigation
Conversation
…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
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.
Summary of Changes
This pull request implements the Address Blocklist Module for the Quest Contract ecosystem as requested in #395.
Key Features & Architecture
contracts/blocklistblock_addressandunblock_addressmethods requiring cryptographic authorization.(Symbol("BLIST"), Address)mapped toBlocklistEntry(containing the target address, reason symbol, and block timestamp).is_blocked(address: Address) -> boolas a zero-cost lookup for game and quest contracts before executing participant actions.get_block_entry(address: Address) -> Option<BlocklistEntry>for querying block metadata.batch_blockandbatch_unblockfor bulk administration.topic: (block, address), data: reason) and unblock (topic: (unblock, address), data: ()).transfer_admin.contracts/blocklist/src/test.rscovering initial setup, access control, duplicate rejection, non-blocked rejection, batch operations, and admin transfers.README.mddetailing storage schema, errors, events, and integration examples.Verification
cargo check --package blocklistpasses with 0 errors.Cargo.tomlworkspace members.Closes #395