#
UserFacet
Inherits: Modifiers
Utility functions for managing a user's entity.
This contract includes functions to set and get user-entity relationships, and to convert wallet addresses to platform IDs and vice versa.
#
Functions
#
getUserIdFromAddress
Get the platform ID of addr
account
Convert address to platform ID
function getUserIdFromAddress(address addr) external pure returns (bytes32 userId);
Parameters
Returns
#
getAddressFromExternalTokenId
Get the token address from ID of the external token
Convert the bytes32 external token ID to its respective ERC20 contract address
function getAddressFromExternalTokenId(bytes32 _externalTokenId) external pure returns (address tokenAddress);
Parameters
Returns
#
setEntity
Set the entity for the user
Assign the user an entity. The entity must exist in order to associate it with a user.
function setEntity(bytes32 _userId, bytes32 _entityId)
external
assertPrivilege(LibAdmin._getSystemId(), LC.GROUP_SYSTEM_MANAGERS);
Parameters
#
getEntity
Get the entity for the user
Gets the entity related to the user
function getEntity(bytes32 _userId) external view returns (bytes32 entityId);
Parameters
Returns