#
LibEntity
#
Functions
#
_validateSimplePolicyCreation
If an entity passes their checks to create a policy, ensure that the entity's capacity is appropriately decreased by the amount of capital that will be tied to the new policy being created.
function _validateSimplePolicyCreation(
bytes32 _entityId,
SimplePolicy memory simplePolicy,
Stakeholders calldata _stakeholders
) internal view;
#
_createSimplePolicy
function _createSimplePolicy(
bytes32 _policyId,
bytes32 _entityId,
Stakeholders calldata _stakeholders,
SimplePolicy calldata _simplePolicy,
bytes32 _offchainDataHash
) internal;
#
getSigner
function getSigner(bytes32 signingHash, bytes memory signature) private pure returns (address);
#
_startTokenSale
function _startTokenSale(bytes32 _entityId, uint256 _amount, uint256 _totalPrice) internal;
Parameters
#
_createEntity
function _createEntity(bytes32 _entityId, bytes32 _accountAdmin, Entity memory _entity, bytes32 _dataHash) internal;
#
_updateEntity
This currently updates a non cell type entity and a cell type entity, but we should consider splitting the functionality
function _updateEntity(bytes32 _entityId, Entity calldata _updateEntityStruct) internal;
#
validateEntity
function validateEntity(Entity memory _entity) internal view;
#
_getEntityInfo
function _getEntityInfo(bytes32 _entityId) internal view returns (Entity memory entity);
#
_isEntity
function _isEntity(bytes32 _entityId) internal view returns (bool);
#
Events
#
EntityCreated
New entity has been created
Emitted when entity is created
event EntityCreated(bytes32 indexed entityId, bytes32 entityAdmin);
Parameters
#
EntityUpdated
An entity has been updated
Emitted when entity is updated
event EntityUpdated(bytes32 indexed entityId);
Parameters
#
SimplePolicyCreated
New policy has been created
Emitted when policy is created
event SimplePolicyCreated(bytes32 indexed id, bytes32 entityId);
Parameters
#
TokenSaleStarted
New token sale has been started
Emitted when token sale is started
event TokenSaleStarted(bytes32 indexed entityId, uint256 offerId, string tokenSymbol, string tokenName);
Parameters
#
CollateralRatioUpdated
Collateral ratio has been updated
Emitted when collateral ratio is updated
event CollateralRatioUpdated(bytes32 indexed entityId, uint256 collateralRatio, uint256 utilizedCapacity);
Parameters