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

ERC6909ContentURI

Inherits: ERC6909, IERC6909ContentURI

Implementation of the Content URI extension defined in ERC6909.

State Variables

_contractURI

string private _contractURI;

_tokenURIs

mapping(uint256 id => string) private _tokenURIs;

Functions

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);