#
TokenizedVaultFacet
Inherits: Modifiers, ReentrancyGuard
Vault for keeping track of platform tokens
Used for internal platform token transfers
Adaptation of ERC-1155 that uses AppStorage and aligns with Nayms ACL implementation. https://github.com/OpenZeppelin/openzeppelin-contracts/tree/master/contracts/token/ERC1155
#
Functions
#
internalBalanceOf
Gets balance of an account within platform
Internal balance for given account
function internalBalanceOf(bytes32 ownerId, bytes32 tokenId) external view returns (uint256);
Parameters
Returns
#
internalTokenSupply
Current supply for the asset
Total supply of platform asset
function internalTokenSupply(bytes32 tokenId) external view returns (uint256);
Parameters
Returns
#
internalTransferFromEntity
Internal transfer of amount
tokens from the entity associated with the sender
Transfer tokens internally
function internalTransferFromEntity(bytes32 to, bytes32 tokenId, uint256 amount)
external
notLocked(msg.sig)
nonReentrant;
Parameters
#
wrapperInternalTransferFrom
Internal transfer of amount
tokens from
-> to
Transfer tokens internally between two IDs
function wrapperInternalTransferFrom(bytes32 from, bytes32 to, bytes32 tokenId, uint256 amount)
external
notLocked(msg.sig)
nonReentrant
assertERC20Wrapper(tokenId);
Parameters
#
internalBurn
function internalBurn(bytes32 from, bytes32 tokenId, uint256 amount)
external
notLocked(msg.sig)
assertPrivilege(LibAdmin._getSystemId(), LC.GROUP_SYSTEM_ADMINS);
Parameters
#
getWithdrawableDividend
Get withdrawable dividend amount
Dividend available for an entity to withdraw
function getWithdrawableDividend(bytes32 ownerId, bytes32 tokenId, bytes32 dividendTokenId)
external
view
returns (uint256);
Parameters
Returns
#
withdrawDividend
Withdraw available dividend
Transfer dividends to the entity
function withdrawDividend(bytes32 ownerId, bytes32 tokenId, bytes32 dividendTokenId) external notLocked(msg.sig);
Parameters
#
withdrawAllDividends
Withdraws a user's available dividends.
Dividends can be available in more than one dividend denomination. This method will withdraw all available dividends in the different dividend denominations.
function withdrawAllDividends(bytes32 ownerId, bytes32 tokenId) external notLocked(msg.sig);
Parameters
#
payDividendFromEntity
Pay amount
of dividends
Transfer dividends to the entity
function payDividendFromEntity(bytes32 guid, uint256 amount)
external
notLocked(msg.sig)
assertPrivilege(LibObject._getParentFromAddress(msg.sender), LC.GROUP_PAY_DIVIDEND_FROM_ENTITY);
Parameters
#
getLockedBalance
Get the amount of tokens that an entity has for sale in the marketplace.
function getLockedBalance(bytes32 _entityId, bytes32 _tokenId) external view returns (uint256 amount);
Parameters
Returns
#
internalTransferBySystemAdmin
A system admin can transfer funds from an entity to another entity.
function internalTransferBySystemAdmin(bytes32 _fromEntityId, bytes32 _toEntityId, bytes32 _tokenId, uint256 _amount)
external
assertPrivilege(LibAdmin._getSystemId(), LC.GROUP_SYSTEM_ADMINS);
Parameters
#
totalDividends
Get the total amount of dividends paid to a cell.
function totalDividends(bytes32 _tokenId, bytes32 _dividendDenominationId) external view returns (uint256);
Parameters