NFTBridge
60,000 USDC
View results
Submission Details
Severity: low
Invalid

Unused Custom Error `CollectionMappingError` in `Bridge.sol` should be removed.

Description

The CollectionMappingError in Bridge.sol is a custom error defined as follows:

error CollectionMappingError();

However this custom error is not used in any part of the contract.

Impact

The severity level of this issue can be rated as LOW, as has been the case in some previous audits, e.g.^[https://solodit.xyz/issues/unused-custom-errors-fixed-consensys-none-linea-ens-markdown] or in^[https://solodit.xyz/issues/unused-pausableupgradeablecannotrenouncewhilepaused-error-should-be-removed-cyfrin-none-cyfrin-wormhole-evm-ntt-v2-markdown].

Tools Used

Manual review, vscode, Aderyn

Recommended Mitigation

It is recommended to review the need for the custom CollectionMappingError in Bridge.sol and remove it if not needed.

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "./sn/Cairo.sol";
import "./token/ERC721Bridgeable.sol";
import "./token/TokenUtil.sol";
import "./token/CollectionManager.sol";
import "./Protocol.sol";
import "./State.sol";
import "./Escrow.sol";
import "./Messaging.sol";
import "./UUPSProxied.sol";
import "starknet/IStarknetMessaging.sol";
import "./IStarklaneEvent.sol";
error NotSupportedYetError();
- error CollectionMappingError();
error NotWhiteListedError();
error BridgeNotEnabledError();
error TooManyTokensError();
..............
..............
Updates

Lead Judging Commences

n0kto Lead Judge 10 months ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity
Assigned finding tags:

Informational / Gas

Please, do not suppose impacts, think about the real impact of the bug and check the CodeHawks documentation to confirm: https://docs.codehawks.com/hawks-auditors/how-to-determine-a-finding-validity A PoC always helps to understand the real impact possible.

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.