Inherit from ERC721 preset and StorageUpgradeable?

I'm currently using the below code to get all the functionality of the preset and the _setTokenURI function from ERC721URIStorageUpgradeable, but am being asked to override multiple functions (due to conflicts I guess)

:1234: Code to reproduce

contract MyNFT is ERC721PresetMinterPauserAutoIdUpgradeable, OwnableUpgradeable, ERC721URIStorageUpgradeable {
....
}

:laptop: Environment

Using contracts v4.2 and hardhat v2.4.3

Is there a suggested way to override these functions?

1 Like

Also, how does one set the _baseURI? I know how to set it, but what is that actually for? What’s best practice to set that value?

Would also be interested in an answer on this.

Hello

Preset are being deprecated, and I would encourage you to use the wizard instead. It should produce the code you need, with all the modules you select AND the override already resolved.