Function: swapToken(uint256 amount)
This function receives SWAPPABLE_TOKEN and mints this contract token to the caller.
Inputs
amountControl: Fully controlled by the caller.
Impact: Amount of swap.
Branches and code coverage
Intended branches
Check if
SWAPPABLE_TOKENis not zero address.Receive an amount of
SWAPPABLE_TOKEN.Mint an amount of the contract token to the caller.
Negative behavior
If
SWAPPABLE_TOKENis zero address, revert transaction withSwapToken__TokenDoesNotExist.