Correct way for passing parameter in constructor of UUPS ERC721

Hello all,

I need to initialize a variable in the constructor of my UUPS ERC721

Is following the correct way to do it ALSO for UUPS implementations?

Parameter is "contractUri".

Thanks in advance.

function initialize(string memory contractUri) public initializer {
        __ERC721_init("MyContract", "MY");

        _grantRole(DEFAULT_ADMIN_ROLE, msg.sender);
        _grantRole(PAUSER_ROLE, msg.sender);
        _grantRole(MINTER_ROLE, msg.sender);


In Hardhat tests called via:

    let myc = await upgrades.deployProxy(MyContract,['https://myurl'],{kind: 'uups'});

This looks correct. For UUPS, you may also want to add _grantRole(UPGRADER_ROLE, msg.sender);

To be clear on the terminology, this calls the initializer rather than the constructor.

Thanks a lot for you advise.