Skip to content

Commit

Permalink
Improvement:Add onERC721Received to fix warrning when inherit IERC721…
Browse files Browse the repository at this point in the history
…Receiver
  • Loading branch information
imsoso committed Oct 16, 2024
1 parent a034a48 commit 3899b43
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/NFTMarket.sol
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,14 @@ contract NFTMarket is IERC721Receiver {
nftToken.transfer(aNFT.seller, amount);
delete NFTList[tokenId];
}

function onERC721Received(
address operator,
address from,
uint256 tokenId,
bytes calldata data
) external pure override returns (bytes4) {
// do nothing here
return IERC721Receiver.onERC721Received.selector;
}
}

0 comments on commit 3899b43

Please sign in to comment.