ContractMetadata
Contract Metadata
Thirdweb's ContractMetadata
is a contract extension for any base contracts. It lets you set a metadata URI for you contract. Additionally, ContractMetadata
is necessary for NFT contracts that want royalties to get distributed on OpenSea.
Methods
contractURI
Returns the contract metadata URI.
Returns
Name
Type
Description
_0
string
undefined
setContractURI
Lets a contract admin set the URI for contract-level metadata.
Caller should be authorized to setup contractURI, e.g. contract admin. See {_canSetContractURI}. Emits {ContractURIUpdated Event}.
Parameters
Name
Type
Description
_uri
string
keccak256 hash of the role. e.g. keccak256("TRANSFER_ROLE")
Events
ContractURIUpdated
Parameters
Name
Type
Description
prevURI
string
undefined
newURI
string
undefined
Last updated