code-423n4 / 2021-05-nftx-findings

1 stars 0 forks source link

The `supportsInterface` function is not implemented in the `ERC1155HolderUpgradeable` #104

Closed code423n4 closed 3 years ago

code423n4 commented 3 years ago

Handle

shw

Vulnerability details

Impact

In the contract ERC1155HolderUpgradeable, the function supportsInterface is not fully implemented, leading to errors for other contracts/Dapps that call this function. See the ERC165 specification for details.

Proof of Concept

Referenced code: ERC1155HolderUpgradeable.sol#L29-L34

Tools Used

None

Recommended Mitigation Steps

Implement the function by using a mapping to store the supported interfaces, as shown in the ERC165Storage.sol implementation from OpenZeppelin.

0xKiwi commented 3 years ago

Added