You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
contracts/assetsup/src/transfer_restrictions.rs references a whitelist concept but has no functions to add, remove, or query addresses on the whitelist. Transfer restriction checks cannot function without the underlying whitelist management API.
Proposed Solution
Create contracts/opsce/src/whitelist.rs. Implement add_to_whitelist(), remove_from_whitelist(), is_whitelisted(), and a toggle to enable/disable whitelist enforcement per asset.
Acceptance Criteria
add_to_whitelist(env, asset_id, address) adds an address (admin only)
remove_from_whitelist(env, asset_id, address) removes an address (admin only)
is_whitelisted(env, asset_id, address) returns a bool
Problem
contracts/assetsup/src/transfer_restrictions.rsreferences a whitelist concept but has no functions to add, remove, or query addresses on the whitelist. Transfer restriction checks cannot function without the underlying whitelist management API.Proposed Solution
Create
contracts/opsce/src/whitelist.rs. Implementadd_to_whitelist(),remove_from_whitelist(),is_whitelisted(), and a toggle to enable/disable whitelist enforcement per asset.Acceptance Criteria
add_to_whitelist(env, asset_id, address)adds an address (admin only)remove_from_whitelist(env, asset_id, address)removes an address (admin only)is_whitelisted(env, asset_id, address)returns aboolset_whitelist_enabled(env, asset_id, enabled)toggles enforcement (admin only)transfer_tokens()must callis_whitelisted()on both sender and recipientget_whitelist(env, asset_id)returns the full list of whitelisted addresses as aVec