In the depositTokens
function, the code that handles ERC1155 collections is unreachable due to a prior check that reverts if the collection type is ERC1155.
The else branch that attempts to handle ERC1155 collections will never be executed because the function reverts if the collection type is ERC1155. This dead code should be removed or adjusted to reflect the actual supported functionality.
This is a minor issue but indicates potential misunderstanding or outdated code, which can lead to confusion or errors in future code changes.
Manual code review.
Remove the unreachable code or refactor it to handle any future extensions where ERC1155 might be supported.
```compatibilities: Blockchains: - Ethereum/Starknet Tokens: - [ERC721](www.tokenstandard.com) ``` ``` function depositTokens( uint256 salt, address collectionL1, snaddress ownerL2, uint256[] calldata ids, bool useAutoBurn ) external payable { if (!Cairo.isFelt252(snaddress.unwrap(ownerL2))) { revert CairoWrapError(); } if (!_enabled) { revert BridgeNotEnabledError(); } CollectionType ctype = TokenUtil.detectInterface(collectionL1); if (ctype == CollectionType.ERC1155) { @> revert NotSupportedYetError(); } … } ```
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.