Description:
The current implementation only supports ERC721 tokens. There are TODO
comments indicating the intention to add ERC1155 support, but this is not yet implemented.
Location: Throughout the contract, particularly in the withdraw_auto_from_l1
and deposit_tokens
functions in apps/blockchain/starknet/src/bridge.cairo
.
Issue:
The lack of support for ERC1155 could limit the functionality of the bridge, and the partial implementation might introduce bugs if mistakenly assumed to be complete.
Impact:
Without full ERC1155 support, the bridge might fail to handle certain token types correctly, leading to potential losses or operational failures.
Tools used: Manual Review.
Recommendations:
Complete the implementation for ERC1155 support or clearly document that the current version only supports ERC721.
Potential changes:
Extend the functions to handle ERC1155 tokens or explicitly disallow them until support is implemented.
```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.