depositTokens
will not work with ERC1155 tokens due to a revert in _depositIntoEscrow
that will occur 100% of the time
The StarklaneEscrow contract (Inherited by Bridge) attempts to use safeTransferFrom to transfer an ERC1155 token from a user to itself. The issue is that it does not implement the IERC1155Receiver-onERC1155Received
function required, leading to a revert.
Depositing ERC1155 tokens into escrow won't work
Reading code
In StarklaneEscrow
, consider inheriting the following contract from OpenZeppelin: ERC1155Holder
```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.