How to blacklist addresses
Introduction
The Free Transfers Pallet on the TRAIT blockchain includes functionality to blacklist certain addresses. Blacklisting allows you to restrict specific accounts from accessing free transfer capabilities. This feature can be used by privileged users or app agents to manage the behavior of players, preventing misuse or abuse of the free transfer system. Below are the steps and guidelines for blacklisting and unblacklisting addresses.
Blacklisting by App Agents
App agents have the ability to manage blacklists within their scope, allowing them to control which players can perform free transfers associated with their application:
Step-by-Step Process for App Agents:
Ensure App Agent Admin Status: Only the admin of an app agent can blacklist addresses on behalf of the app agent.
Prepare the Call: Use the
app_agent_blacklist_address
function to blacklist addresses for a specific app agent.Call the Function:
Call
app_agent_blacklist_address
with the app agent ID and a list of addresses.
Unblacklisting by App Agents
App agents can also remove addresses from their blacklist:
Step-by-Step Process for App Agents:
Ensure App Agent Admin Status: Only app agent admins can unblacklist addresses.
Prepare the Call: Use the
app_agent_unblacklist_address
function.Call the Function:
Call
app_agent_unblacklist_address
with the app agent ID and the list of addresses.
What Happens When an Address is Blacklisted?
Restricted Access: A blacklisted address is unable to perform any free transfers. This includes transfers of native balances, fungible assets, and NFTs through the Free Transfers Pallet.
Expiry: The blacklisting can remain in effect until it is manually removed through the unblacklist process. There is no automatic expiration of a blacklist status.
Logging and Events: Each action—whether blacklisting or unblacklisting—is logged as an event, making it easier to audit the changes and monitor which addresses are currently restricted.
Last updated