Omniscia Stakewise Audit
ERC20Upgradeable Code Style Findings
ERC20Upgradeable Code Style Findings
ERC-01C: Deprecated Maximum Representation Style
| Type | Severity | Location |
|---|---|---|
| Code Style | Informational | ERC20Upgradeable.sol:L146 |
Description:
The uint256(-1) representation style has been deprecated in favor of the new type operator and in particular the type(uint256).max statement.
Example:
contracts/tokens/ERC20Upgradeable.sol
146if (sender != msg.sender && currentAllowance != uint256(-1)) {Recommendation:
We advise the uint256(-1) instance to be replaced by its more standardized format.
Alleviation:
The Stakewise team confirmed this exhibit, however, they will retain the current implementation in place to avoid upgrading the token contract.