What happened to Minter Role contract?

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 !

:1234: Code to reproduce

contract ERC721Mintable is ERC721, MinterRole {
    function mint(address to, uint256 tokenId) public onlyMinter returns (bool) {
    _mint(to, tokenId);
    return true;
  }
}

:computer: Environment

hardhat

Hello @richardryangarcia

The MinterRole contract was deprecated in favor of the AccessControl pattern. To see how you can use this mechanism to control minting new token, I encourage you to check the Wizard (select the options Mintable and AccessControl:Role).