-
Notifications
You must be signed in to change notification settings - Fork 73
Open
Description
To my understanding from what I've read in the documentation is the virtual keyword in the function header of _baseURI not needed.
It's only
Base functions can be overridden by inheriting contracts to change their behavior if they are marked as virtual
and
he overriding function must then use the override keyword in the function header.
However, if we were to inherit CryptoDevs once more, we would would need virtual.
If you do not mark a function that overrides as virtual, derived contracts can no longer change the behaviour of that function.
To my feeling, we should only focus on the syntax that is needed, as many beginners are not aware of such nuances, they copy paste this code for other projects as well and sets up not best practice.
/**
* @dev _baseURI overides the Openzeppelin's ERC721 implementation which by default
* returned an empty string for the baseURI
*/
function _baseURI() internal view virtual override returns (string memory) {
return _baseTokenURI;
}Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels