Do not use _mint of OZ but rather safeMint #348
Labels
bug
Something isn't working
duplicate
This issue or pull request already exists
QA (Quality Assurance)
Assets are not at risk. State handling, function incorrect as to spec, issues with clarity, syntax
Lines of code
https://github.com/code-423n4/2022-10-holograph/blob/main/contracts/enforcer/HolographERC721.sol#L406
https://github.com/code-423n4/2022-10-holograph/blob/main/contracts/enforcer/HolographERC721.sol#L514
Vulnerability details
Impact
When calling the "sourceMint" or "bridgeIn" function for minting an NFT of a NFT collection, the OpenZeppelin’s ERC721 contract’s _mint function is used to mint the NFT to a receiver. If such receiver is a contract that does not support the ERC721 protocol, the NFT will be locked and cannot be retrieved.
Proof of Concept
see links to affected code.
Tools Used
Manual audit
Recommended Mitigation Steps
Use safeMint from OZ
The text was updated successfully, but these errors were encountered: