The erc1155Metadata
function within the TokenUtil
library is currently unimplemented, returning an empty string instead of providing meaningful metadata for ERC1155 tokens.
Code:
The issue is located in the erc1155Metadata
function of the TokenUtil
library:
Description:
The function is supposed to retrieve metadata from ERC1155 tokens. However, it is currently unimplemented and simply returns an empty string. This missing implementation means that any contract or application relying on this function will not be able to access the metadata of ERC1155 tokens.
The absence of metadata retrieval impacts the ability of applications to display token details. This can affect user experience and limit certain functionalities, such as viewing detailed information about ERC1155 tokens in user interfaces.
Manual Code Review
To properly implement the erc1155Metadata
function, the following steps should be taken:
Use ERC165Checker
to determine if the provided contract supports the IERC1155MetadataURI
interface.
If the contract supports metadata, retrieve and return the base URI.
If the contract does not support the IERC1155MetadataURI
interface, return an empty string or handle accordingly.
Corrected Code:
```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.