Omniscia Evergon Labs Audit
OmnichainIdentifiers Code Style Findings
OmnichainIdentifiers Code Style Findings
OIS-01C: Repetitive Value Literal
| Type | Severity | Location |
|---|---|---|
| Code Style | ![]() | OmnichainIdentifiers.sol:L40, L52 |
Description:
The linked value literal is repeated across the codebase multiple times.
Example:
contracts/utils/OmnichainIdentifiers.sol
40return OmnichainIdentifier.wrap((uint256(chainid) << 224) | identifier);Recommendation:
We advise it to be set to a constant variable instead, optimizing the legibility of the codebase.
In case the constant has already been declared, we advise it to be properly re-used across the code.
Alleviation (c6b23c23d8bcd8cce85049ad959cbd711a37126b):
The referenced value literal 224 has been properly relocated to a contract-level constant declaration labelled CHAINID_BIT_OFFSET, optimizing the code's legibility.
