#
EntityFacet
Inherits: Modifiers, ReentrancyGuard
Used to handle policies and token sales
Mainly used for token sale and policies
#
Functions
#
assertSimplePolicyEnabled
modifier assertSimplePolicyEnabled(bytes32 _entityId);
#
domainSeparatorV4
Returns the domain separator for the current chain.
function domainSeparatorV4() external view returns (bytes32);
#
hashTypedDataV4
function hashTypedDataV4(bytes32 structHash) external view returns (bytes32);
#
createSimplePolicy
Create a Simple Policy
function createSimplePolicy(
bytes32 _policyId,
bytes32 _entityId,
Stakeholders calldata _stakeholders,
SimplePolicy calldata _simplePolicy,
bytes32 _dataHash
)
external
assertPrivilege(LibAdmin._getSystemId(), LC.GROUP_SYSTEM_UNDERWRITERS)
assertSimplePolicyEnabled(_entityId);
Parameters
#
enableEntityTokenization
Enable an entity to be tokenized
function enableEntityTokenization(bytes32 _objectId, string memory _symbol, string memory _name, uint256 _minimumSell)
external
assertPrivilege(LibAdmin._getSystemId(), LC.GROUP_SYSTEM_MANAGERS);
Parameters
#
updateEntityTokenInfo
Update entity token name and symbol
function updateEntityTokenInfo(bytes32 _entityId, string memory _symbol, string memory _name)
external
assertPrivilege(LibAdmin._getSystemId(), LC.GROUP_SYSTEM_MANAGERS);
Parameters
#
startTokenSale
Start token sale of _amount
tokens for total price of _totalPrice
Entity tokens are minted when the sale is started
function startTokenSale(bytes32 _entityId, uint256 _amount, uint256 _totalPrice)
external
notLocked(msg.sig)
nonReentrant
assertPrivilege(_entityId, LC.GROUP_START_TOKEN_SALE);
Parameters
#
isTokenWrapped
Check if an entity token is wrapped as ERC20
function isTokenWrapped(bytes32 _entityId) external view returns (bool);
Parameters
Returns
#
updateEntity
Update entity metadata
function updateEntity(bytes32 _entityId, Entity calldata _updateEntity)
external
assertPrivilege(LibAdmin._getSystemId(), LC.GROUP_SYSTEM_MANAGERS);
Parameters
#
getEntityInfo
Get the data for entity with ID: _entityId
Get the Entity data for a given entityId
function getEntityInfo(bytes32 _entityId) external view returns (Entity memory);
Parameters
#
getFeeSchedule
Get the fee schedule
function getFeeSchedule(bytes32 _entityId, uint256 _feeScheduleType) external view returns (FeeSchedule memory);
Parameters
Returns
#
getObjectTokenSymbol
Get the object's token symbol
function getObjectTokenSymbol(bytes32 _objectId) external view returns (string memory);
Parameters