# What is equivalent of ERC721MetadataMintable in OpenZeppelin Contracts 4?

**URL:** <https://forum.openzeppelin.com/t/what-is-equivalent-of-erc721metadatamintable-in-openzeppelin-contracts-4/6860>\
**Category:** Contracts\
**Tags:** erc721\
**Created:** [April 9, 2021, 2:25am UTC](https://forum.openzeppelin.com/t/what-is-equivalent-of-erc721metadatamintable-in-openzeppelin-contracts-4/6860 "2021-04-09T02:25:42Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Los](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/los/32/3961_2.png) [@Los](https://forum.openzeppelin.com/u/Los)\
**Post date:** [April 9, 2021, 2:25am UTC](https://forum.openzeppelin.com/t/what-is-equivalent-of-erc721metadatamintable-in-openzeppelin-contracts-4/6860/1 "2021-04-09T02:25:42Z")

</div>

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](https://docs.openzeppelin.com/contracts/2.x/api/token/erc721#ERC721MetadataMintable-mintWithTokenURI-address-uint256-string-)

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

```

[\_safeMint](https://docs.openzeppelin.com/contracts/4.x/api/token/erc721#ERC721-_safeMint-address-uint256-bytes-)

```
_safeMint(address to, uint256 tokenId, bytes _data)
```

---

<div class="post-metadata">

**Author:** ![martriay](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/martriay/32/20_2.png) [@martriay](https://forum.openzeppelin.com/u/martriay)\
**Post date:** [April 13, 2021, 2:33am UTC](https://forum.openzeppelin.com/t/what-is-equivalent-of-erc721metadatamintable-in-openzeppelin-contracts-4/6860/2 "2021-04-13T02:33:22Z")

</div>

Hello @Los, welcome to the community 🙂 . Feel free to [Introduce yourself here!](https://forum.openzeppelin.com/t/introduce-yourself-here/88/)

It is safe to expose `_safeMint`, just like [the Wizard](https://docs.openzeppelin.com/contracts/4.x/wizard) does:

 ![image](https://us1.discourse-cdn.com/flex022/uploads/zeppelin/original/2X/9/9e8ad0d921f0528ab1265c36b6a79585e23619ea.png)

---

<div class="post-metadata">

**Author:** ![Los](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/los/32/3961_2.png) [@Los](https://forum.openzeppelin.com/u/Los)\
**Post date:** [April 13, 2021, 2:11pm UTC](https://forum.openzeppelin.com/t/what-is-equivalent-of-erc721metadatamintable-in-openzeppelin-contracts-4/6860/3 "2021-04-13T14:11:18Z")

</div>

THANK YOU!!! Totally makes sense.
