Omniscia Hot Cross Audit
CrossMint Static Analysis Findings
CrossMint Static Analysis Findings
CMT-01S: Redundant Low-Level Call
Type | Severity | Location |
---|---|---|
Gas Optimization | Informational | CrossMint.sol:L54-L63, L65-L74 |
Description:
The withMintFee
and withCollectionFee
modifiers perform a low-level call to a known function signature with raw inputs.
Example:
contracts/CrossMint.sol
54modifier withMintFee() {55 (bool success, ) =56 address(feeManager).call{ value: msg.value }(57 abi.encodeWithSignature("distributeMintFee(address)", msg.sender)58 );59
60 require(success, "CrossMint: Failed to send mint fees");61
62 _;63}
Recommendation:
We advise the distributeMintFee
and distributeCollectionFee
functions to be directly invoked on the feeManager
and the `{ value
Alleviation:
The low level calls were replaced by direct function invocations ensuring a more standardized method of invocation.