Function mintToken(address to,uint256 tokenId_,uint256 amount_) internal
INTERNAL FUNCTION
Intended behavior.
The internal function, which allows minting
amount_of BondtokenId_tokens fortoaddress and increasesupplyvalue for thistokenId_.
Negative behavior.
Users should not have unrestricted access to this function. the calling function must control the all parameters, not allowing unlimited minting of any tokens.
Preconditions.
User should send the corresponding amount of
underlyingtokens to contract before themint
Postconditions.
the user’s
bondTokensbalance should increase byamountthe issued token’s supply within the
metadatamapping should increase by the value that was mintedtokenMetadata[tokenId_].supply += amount_;
Inputs.
user should have possibility to mint
amount_of tokens only in exchange for a correspondingamount_ofunderlyingtokenstokenId_value should be connected withunderlyingtoken address. Users shouldn't be able to deposit one type ofunderlyingtoken and get other Bond tokens in return.
Examine all function calls the function makes.
a. Call to
mint(to, tokenId_, amount_, bytes(""))andERC1155TokenReceiver(to).onERC1155Received()see_handlePayout._mintTokendescription