Created
December 8, 2022 12:38
-
-
Save kennethhutw/ceb34d4d122e4a814ede61455d2c59d6 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 mintWithRoyalty(address recipient, string memory uri, address royaltFeeReceiver, uint96 fee) public returns(uint256){ | |
uint256 tokenId = _tokenIdCounter.current(); | |
_tokenIdCounter.increment(); | |
_safeMint(recipient, tokenId); | |
_setTokenURI(tokenId, uri); | |
_setTokenRoyalty(tokenId, royaltFeeReceiver, fee); | |
return tokenId; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment