What is equivalent of ERC721MetadataMintable in OpenZeppelin Contracts 4?

I want to create a minting function in my contract that allows me to add metadata to the new token. There seems to have been a function in version 2.x that is exactly what I’m looking for(ERC721MetedaMintable). I want to stick to using the newest version of the contracts but I don’t see a similar public function. There is an internal function _safeMint in the newer version but I’m not sure if making it public is a good idea? I’m new to using OpenZeppelin.

ERC721Metadata Mintable

mintWithTokenURI(address to, uint256 tokenId, string tokenURI) → bool

_safeMint

_safeMint(address to, uint256 tokenId, bytes _data)

Hello @Los, welcome to the community :slight_smile: . Feel free to Introduce yourself here!

It is safe to expose _safeMint, just like the Wizard does:

1 Like

THANK YOU!!! Totally makes sense.

1 Like