OperatorLib
Functions
grantOperatorPermissions
Grants permission to a given operator for a character.
function grantOperatorPermissions(uint256 characterId, address operator, uint256 permissionBitMap) external;
Parameters
Name | Type | Description |
---|---|---|
characterId | uint256 | The ID of the character to set operator for. |
operator | address | The operator address to set. |
permissionBitMap | uint256 | The permission bitmap for the operator. |
grantOperators4Note
Sets blocklist and allowlist for a specific note. Blocklist and allowlist are overwritten every time.
function grantOperators4Note(
uint256 characterId,
uint256 noteId,
address[] calldata blocklist,
address[] calldata allowlist
) external;
Parameters
Name | Type | Description |
---|---|---|
characterId | uint256 | The character ID of the note owner. |
noteId | uint256 | The note ID to grant. |
blocklist | address[] | The addresses list of blocked operators. |
allowlist | address[] | The addresses list of allowed operators. |
clearOperators
function clearOperators(uint256 characterId) external;
_clearOperators4Note
function _clearOperators4Note(DataTypes.Operators4Note storage operators4Note) internal;
_updateOperators4Note
function _updateOperators4Note(
DataTypes.Operators4Note storage operators4Note,
address[] calldata blocklist,
address[] calldata allowlist
) internal;
_bitmapFilter
_bitmapFilter unsets bits of non-existent permission IDs to zero.
These unset permission IDs are meaningless now, but they are reserved for future use,
so it's best to leave them blank and avoid messing up with future methods.
function _bitmapFilter(uint256 bitmap) internal pure returns (uint256);