Omniscia SaucerSwap Audit
ChainId Code Style Findings
ChainId Code Style Findings
CID-01C: Deprecated Chain ID Evaluation
Type | Severity | Location |
---|---|---|
Code Style | ChainId.sol:L9-L11 |
Description:
The ChainId::get
function contains a low-level assembly
block that will utilize the special chainid
function to assess the currently active chain ID.
Example:
contracts/libraries/ChainId.sol
8function get() internal view returns (uint256 chainId) {9 assembly {10 chainId := chainid()11 }12}
Recommendation:
We advise the block.chainid
notation to be utilized instead, greatly enhancing the code's legibility whilst retaining it functionally identical.
Alleviation (d8d187efd1fa23b943c82694aaaccb5b9e427096):
The SaucerSwap team evaluated this exhibit and opted to acknowledge it.