Function _burnToken(address from,uint256 tokenId_,uint256 amount_) internal
INTERNAL FUNCTION
Intended behavior.
The internal function, which allows burning
amount_of BondtokenId_tokens fromfromaddress and decreasessupplyvalue for thistokenId_.
Negative behavior.
users should not have unrestricted access to this function. The caller function should control from parameter, not allowing users to burn other user's tokens.
shouldn’t allow burning tokens if the user does not have enough tokens, partial burn should be impossible. should reject in this case
Preconditions.
user
fromshould have ≥amountoftokenId_tokens.the caller function should not allow to user pass any
fromaddress.
Postconditions.
the supply pf the
bondTokenshould decrease byamountthe balance of the user in terms of
bondTokensshould decrease byamount.
Inputs.
Examine all function calls the function makes.
a. Call to
burn(from, tokenId_, amount_)What is controllable? (callee, params, return value): the calling function should not allow the user to control the
fromvalueIf return value controllable, how is it used and how can it go wrong? there is no return value
What happens if it reverts or tries to reenter? N/A