setBaseURI

This function allows the contract owner to set the base URI for token metadata.

  • newuri: The new base URI to be set.

```remix-solidity
/**
     * @dev Sets the base URI for token metadata.
     * @param newuri The new base URI to be set.
     * @notice This function can only be called by the owner of the contract.
     * @notice The base URI is used as the starting point for constructing token URI.
     * @notice This function allows the contract owner to dynamically update the base URI for all token metadata.
     */
     function setBaseURI(string memory newuri) public onlyOwner {
             _setURI(newuri);
     }
```

Last updated