Either you accept ERC1155 or you don't, but you cannot consider ERC1155 in _depositIntoEscrow()::Escrow.sol & in depositTokens()::Bridge.sol#L125-L127 but before that, early in the function #L96-98, reverting if it is an ERC1155.
_depositIntoEscrow()::Escrow.sol considers ERC1155 but depositTokens()::Bridge.sol that calls it reverts if it's an ERC1155.
Not only that, but depositTokens()::Bridge.sol itself considers ERC1155 :
Here we can see that depositTokens()::Bridge.sol reverts if it's an ERC1155 :
https://github.com/Cyfrin/2024-07-ark-project/blob/main/apps/blockchain/ethereum/src/Bridge.sol#L96
but later on, there is a call to :
_depositIntoEscrow() from Escrow.sol and we can see that this function considers ERC1155 :
Even here, ERC1155 is considered :
The protocol doesn't work like intended. It will always revert if it's an ERC1155, even though all the code to deal with ERC1155 is present in the contract.
The user won't be able to deposit ERC1155.
Github, VisualCode, Foundry.
Remove Bridge.sol#L96-L98:
```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.