Im currently trying to use some older smart contracts that are using open zeppelin and I noticed that from "openzeppelin-solidity" -> "@openzeppelin" the MinterRole contract was dropped and Im just wondering if there was a direct replacement for this contract or was that logic completely reworked?
The contract Im using is defining a ERC721Mintable contract that extends ERC721 and MinterRole. It looks like its just adding the onlyMinter guard to the mint function. Is there a way to recreate this functionality using the @openzeppelin package contracts?
Thanks for yalls help !
Code to reproduce
contract ERC721Mintable is ERC721, MinterRole {
function mint(address to, uint256 tokenId) public onlyMinter returns (bool) {
_mint(to, tokenId);
return true;
}
}
Environment
hardhat