Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

ERC6909ContentURIUpgradeable

Inherits: Initializable, ERC6909Upgradeable, IERC6909ContentURI

Implementation of the Content URI extension defined in ERC6909.

State Variables

ERC6909ContentURIStorageLocation

bytes32 private constant ERC6909ContentURIStorageLocation =
    0x2ada2772a8c4d40c4be8741992e423a9f97d5f4ef76852e5c17a40aa7fb9e500;

Functions

_getERC6909ContentURIStorage

function _getERC6909ContentURIStorage() private pure returns (ERC6909ContentURIStorage storage $);

__ERC6909ContentURI_init

function __ERC6909ContentURI_init() internal onlyInitializing;

__ERC6909ContentURI_init_unchained

function __ERC6909ContentURI_init_unchained() internal onlyInitializing;

contractURI

Returns URI for the contract.

function contractURI() public view virtual override returns (string memory);

tokenURI

Returns the URI for the token of type id.

function tokenURI(uint256 id) public view virtual override returns (string memory);

_setContractURI

Sets the contractURI for the contract. Emits a {ContractURIUpdated} event.

function _setContractURI(string memory newContractURI) internal virtual;

_setTokenURI

Sets the tokenURI for a given token of type id. Emits a {URI} event.

function _setTokenURI(uint256 id, string memory newTokenURI) internal virtual;

Events

ContractURIUpdated

Event emitted when the contract URI is changed. See https://eips.ethereum.org/EIPS/eip-7572[ERC-7572] for details.

event ContractURIUpdated();

URI

See IERC1155-URI

event URI(string value, uint256 indexed id);

Structs

ERC6909ContentURIStorage

Note: storage-location: erc7201:openzeppelin.storage.ERC6909ContentURI

struct ERC6909ContentURIStorage {
    string _contractURI;
    mapping(uint256 id => string) _tokenURIs;
}