Open code423n4 opened 2 years ago
[L-01] selfdestruct will be a noop in the future
Understood. selfdestruct
is never required, it's an optional feature and it's fine if it's not available in the future.
[L-02] NFT buyer and NFT mint receiver can be a contract with no onERC721Received method, freezing NFT
Agree will fix - for context see our response here.
QA Report
Table of Contents
selfdestruct
will be a noop in the futureonERC721Received
method, freezing NFTLow Risk
[L-01]
selfdestruct
will be a noop in the futureDescription
selfdestruct
is a native Solidity function used to delete contracts on the blockchain. When a contract executes a self-destruct operation, the remaining ether on the contract account will be sent to a specified target, and its storage and code are erased.After EIP-4758, the
SELFDESTRUCT
op code will no longer be available. According to the EIP, "The only use that breaks is where a contract is re-created at the same address using CREATE2 (after a SELFDESTRUCT)".As the protocol does not necessarily depend on re-deploying contracts to the same address (however, a user an still deploy NFT contracts to the same address via
NFTCollectionFactory
calls), this will not break the protocol. It will simply render theselfDestruct
function useless.Findings
mixins/collections/SequentialMintCollection.sol#L77
Called by NFTCollection.sol#L230
and NFTDropCollection.sol#L210
Recommended mitigation steps
Consider removing the
SequentialMintCollection._selfDestruct
function and the other caller functions.[L-02] NFT buyer and NFT mint receiver can be a contract with no
onERC721Received
method, freezing NFTDescription
If the NFT drop collection buyer or the receiver of a NFT mint is a smart-contract that does not implement the
onERC721Received
method, in the current implementation, by using_mint()
, a minted NFT can get stuck in a recipients contract.Findings
NFTCollection.sol#L271
NFTDropCollection.sol#L182
Recommended mitigation steps
Its is recommended to use
_safeMint
whenever possible.