Deprecated in favor of safeIncreaseAllowance() and safeDecreaseAllowance().Whenever possible, use {safeIncreaseAllowance} and {safeDecreaseAllowance} instead.
This is probably an oversight since SafeERC20 was imported and safeTransfer() was used for ERC20 token transfers. Nevertheless, note that approve() will fail for certain token implementations that do not return a boolean value (). Hence it is recommend to use safeApprove().
Update to frxETHToken.safeApprove(spender, msg.value) in the function.
2. Avoid using Floating Pragma:
Description
Contracts should be deployed with the same compiler version and flags that they have been tested with thoroughly. Locking the pragma helps to ensure that contracts do not accidentally get deployed using, for example, an outdated compiler version that might introduce bugs that affect the contract system negatively.
The pragma declared across the solution is ^0.8.0
As the compiler introduces a several interesting upgrades in newer versions of Solidity
consider locking at this version or a more recent one.
1. safeApprove() is deprecated
Description
Deprecated in favor of safeIncreaseAllowance() and safeDecreaseAllowance().Whenever possible, use {safeIncreaseAllowance} and {safeDecreaseAllowance} instead. This is probably an oversight since SafeERC20 was imported and safeTransfer() was used for ERC20 token transfers. Nevertheless, note that approve() will fail for certain token implementations that do not return a boolean value (). Hence it is recommend to use safeApprove().
Proof of concept
Bug
Recommendation
Update to frxETHToken.safeApprove(spender, msg.value) in the function.
2. Avoid using Floating Pragma:
Description
Contracts should be deployed with the same compiler version and flags that they have been tested with thoroughly. Locking the pragma helps to ensure that contracts do not accidentally get deployed using, for example, an outdated compiler version that might introduce bugs that affect the contract system negatively. The pragma declared across the solution is ^0.8.0 As the compiler introduces a several interesting upgrades in newer versions of Solidity consider locking at this version or a more recent one.
Bug
3. _safeMint() should be used rather than _mint() wherever possible
Description
_mint()
is discouraged in favor of_safeMint()
which ensures that the recipient is either an EOA or implementsIERC721Receiver
.Bugs
Recommendations:
Use _safeMint() instead of _mint().
4. Event is missing indexed fields
Description
Each event should use three indexed fields if there are three or more fields
Bugs