Skip to main content

TokenManager.sol

Functions

create

Creates token for the subject, mints initial supply & transfers it to the creator. Only those who have CREATE_ROLE role have access to this function.

function create(
address _subject,
string memory _name,
string memory _symbol,
uint256 _initialSupply,
address _moxiePassVerifier
) external whenNotPaused onlyRole(CREATE_ROLE) returns (address token_)

Parameters

NameTypeDescription
_subjectaddressAddress of subject for which token is getting deployed.
_namestringName of token getting deployed.
_symbolstringSymbol of token getting deployed.
_initialSupplyuint256Initial supply of token getting deployed.
_moxiePassVerifieraddressAddress of moxie pass verifier contract.

Return Value

NameTypeDescription
token_addressAddress of deployed subject token contract.

mint

Mint for the subject's token.

function mint(
address _subject,
address _beneficiary,
uint256 _amount
) public whenNotPaused onlyRole(MINT_ROLE) returns (bool)

Parameters

NameTypeDescription
_subjectaddressSubject for which shares needs to be minted.
_beneficiaryaddressBeneficiary of minted token.
_amountuint256Amount of tokens to mint.

Return Value

NameTypeDescription
isMintedboolReturn true if the mint is successful. Otherwise, return false.