Omniscia Trustworks Audit
TokenAndPresale Static Analysis Findings
TokenAndPresale Static Analysis Findings
TAP-01S: Ignored Return Value
Type | Severity | Location |
---|---|---|
Standard Conformity | Minor | TokenAndPresale.sol:L321 |
Description:
The statements linked perform an external call that yields a bool
variable signaling whether it succeeded or not whilst in the current codebase it remains unutilized.
Example:
319function recoverbep20(address tokenAddress, uint256 tokenAmount) public onlyOwner {320 require(block.timestamp >= liquidityUnlock);321 Ibep20(tokenAddress).transfer(_owner, tokenAmount);322}
Recommendation:
We advise the return variable to be properly utilized by using a SafeBEP20
wrapper library for the transfer
executed.
Alleviation:
The safeTransfer
wrapper function was properly utilized in the linked segment.
TAP-02S: Unutilized Contract Variables
Type | Severity | Location |
---|---|---|
Indeterminate Code | Minor | TokenAndPresale.sol:L186, L189 |
Description:
The linked contract variables remain unutilized throughout the project.
Example:
184uint256 public ethSent;185uint256 constant tokensPerBNB = 500;186uint256 public lockedLiquidityAmount;187uint256 public refundTime; 188mapping(address => uint) ethSpent;189mapping(address => uint) bought;
Recommendation:
We advise their use to be considered and the codebase to be updated to utilize them if necessary, otherwise we advise them to be removed.
Alleviation:
The linked variables were safely removed from the codebase.
TAP-03S: Variable Mutability Specifier
Type | Severity | Location |
---|---|---|
Indeterminate Code | Informational | TokenAndPresale.sol:L178 |
Description:
The deflect
variable is assigned to only once at its declaration.
Example:
184uint256 public ethSent;185uint256 constant tokensPerBNB = 500;186uint256 public lockedLiquidityAmount;187uint256 public refundTime; 188mapping(address => uint) ethSpent;189mapping(address => uint) bought;
Recommendation:
We advise that the constant
mutability specifier is introduced to significantly reduce the gas cost involved in utilizing the variable.
Alleviation:
The constant
mutability specifier was introduced for the specified variable.