|
@@ -59,7 +59,7 @@ contract ERC721PresetMinterPauserAutoId is Context, AccessControl, ERC721Burnabl
|
|
*
|
|
*
|
|
* - the caller must have the `MINTER_ROLE`.
|
|
* - the caller must have the `MINTER_ROLE`.
|
|
*/
|
|
*/
|
|
- function mint(address to) public {
|
|
|
|
|
|
+ function mint(address to) public virtual {
|
|
require(hasRole(MINTER_ROLE, _msgSender()), "ERC721PresetMinterPauserAutoId: must have minter role to mint");
|
|
require(hasRole(MINTER_ROLE, _msgSender()), "ERC721PresetMinterPauserAutoId: must have minter role to mint");
|
|
|
|
|
|
// We can just use balanceOf to create the new tokenId because tokens
|
|
// We can just use balanceOf to create the new tokenId because tokens
|
|
@@ -77,7 +77,7 @@ contract ERC721PresetMinterPauserAutoId is Context, AccessControl, ERC721Burnabl
|
|
*
|
|
*
|
|
* - the caller must have the `PAUSER_ROLE`.
|
|
* - the caller must have the `PAUSER_ROLE`.
|
|
*/
|
|
*/
|
|
- function pause() public {
|
|
|
|
|
|
+ function pause() public virtual {
|
|
require(hasRole(PAUSER_ROLE, _msgSender()), "ERC721PresetMinterPauserAutoId: must have pauser role to pause");
|
|
require(hasRole(PAUSER_ROLE, _msgSender()), "ERC721PresetMinterPauserAutoId: must have pauser role to pause");
|
|
_pause();
|
|
_pause();
|
|
}
|
|
}
|
|
@@ -91,12 +91,12 @@ contract ERC721PresetMinterPauserAutoId is Context, AccessControl, ERC721Burnabl
|
|
*
|
|
*
|
|
* - the caller must have the `PAUSER_ROLE`.
|
|
* - the caller must have the `PAUSER_ROLE`.
|
|
*/
|
|
*/
|
|
- function unpause() public {
|
|
|
|
|
|
+ function unpause() public virtual {
|
|
require(hasRole(PAUSER_ROLE, _msgSender()), "ERC721PresetMinterPauserAutoId: must have pauser role to unpause");
|
|
require(hasRole(PAUSER_ROLE, _msgSender()), "ERC721PresetMinterPauserAutoId: must have pauser role to unpause");
|
|
_unpause();
|
|
_unpause();
|
|
}
|
|
}
|
|
|
|
|
|
- function _beforeTokenTransfer(address from, address to, uint256 tokenId) internal override(ERC721, ERC721Pausable) {
|
|
|
|
|
|
+ function _beforeTokenTransfer(address from, address to, uint256 tokenId) internal virtual override(ERC721, ERC721Pausable) {
|
|
super._beforeTokenTransfer(from, to, tokenId);
|
|
super._beforeTokenTransfer(from, to, tokenId);
|
|
}
|
|
}
|
|
}
|
|
}
|