Skip to content

Instantly share code, notes, and snippets.

@kaymomin
Created July 12, 2022 08:24
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
Code Snippet to make NFTs Soulbound aka Non-transferable
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