LAU-02C: Redundant Representation of Literal Constant
Description:
The LzAppStorageLocation variable is declared as a bytes32 literal instead of utilizing its commented-out representation.
Example:
// keccak256(abi.encode(uint256(keccak256("layerzero.storage.LzApp")) - 1)) & ~bytes32(uint256(0xff))
bytes32 private constant LzAppStorageLocation = 0x111388274dd962a0529050efb131321f60015c2ab1a99387d94540f430037b00;
Recommendation:
We advise the commented-out representation to replace the value literal, ensuring that the value can be easily maintained while ensuring that no external verification of equivalence must be performed.
To note, it is possible to perform literal-based calculations in constant declarations and keccak256 evaluations of string values are correctly evaluated during compile-time.
LAU-02C: Redundant Representation of Literal Constant
Description:
The
LzAppStorageLocationvariable is declared as abytes32literal instead of utilizing its commented-out representation.Example:
Recommendation:
We advise the commented-out representation to replace the value literal, ensuring that the value can be easily maintained while ensuring that no external verification of equivalence must be performed.
To note, it is possible to perform literal-based calculations in
constantdeclarations andkeccak256evaluations ofstringvalues are correctly evaluated during compile-time.