BlockListRegistry
Inherits: IBlockListRegistry, OwnableAccessControlUpgradeable, ERC165Upgradeable
Author: transientlabs.xyz
Registry that can be used to block approvals from non-royalty paying marketplaces
State Variables
BLOCK_LIST_ADMIN_ROLE
bytes32 public constant BLOCK_LIST_ADMIN_ROLE = keccak256("BLOCK_LIST_ADMIN_ROLE");
_c
uint256 private _c;
_blockList
mapping(uint256 => mapping(address => bool)) private _blockList;
Functions
constructor
constructor(bool disable);
Parameters
Name | Type | Description |
---|---|---|
disable | bool | Disable the initalizer on deployment |
initialize
Function that can be called once to initialize the registry
function initialize(address newOwner, address[] memory initBlockList) external initializer;
Parameters
Name | Type | Description |
---|---|---|
newOwner | address | The initial owner of this contract |
initBlockList | address[] | Initial list of addresses to add to the blocklist |
clearBlockList
Function to clear the block list status
Must be called by the blockList owner or blocklist admin
function clearBlockList() external onlyRoleOrOwner(BLOCK_LIST_ADMIN_ROLE);
getBlockListStatus
Function to get blocklist status with True meaning that the operator is blocked
function getBlockListStatus(address operator) public view returns (bool);
Parameters
Name | Type | Description |
---|---|---|
operator | address | The operator in question to check against the blocklist |
supportsInterface
function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool);
setBlockListStatus
Function to set the block list status for multiple operators
Must be called by the blockList owner
function setBlockListStatus(address[] calldata operators, bool status)
external
onlyRoleOrOwner(BLOCK_LIST_ADMIN_ROLE);
Parameters
Name | Type | Description |
---|---|---|
operators | address[] | An address array of operators to set a status for |
status | bool | The status to set for all operators |
_getBlockListStatus
Internal function to get blockList status
function _getBlockListStatus(address operator) internal view returns (bool);
Parameters
Name | Type | Description |
---|---|---|
operator | address | The address for which to get the BlockList status |
_setBlockListStatus
Internal function to set blockList status for one operator
function _setBlockListStatus(address operator, bool status) internal;
Parameters
Name | Type | Description |
---|---|---|
operator | address | Address to set the status for |
status | bool | True means add to the BlockList |