-
-
Save kaymomin/7daf2175496bdaefcd3924c3d7657e14 to your computer and use it in GitHub Desktop.
Code Snippet to make NFTs Soulbound aka Non-transferable
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function _beforeTokenTransfer( | |
address from, | |
address to, | |
uint256 tokenId | |
) internal override virtual { | |
require(from == address(0), "Err: token transfer is BLOCKED"); | |
super._beforeTokenTransfer(from, to, tokenId); | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment