Core
Modular
Token Attributes
Token Attributes Repository

RMRKTokenAttributesRepository

RMRK team

RMRKTokenAttributesRepository

Smart contract of the RMRK Token property repository module.

Methods

DOMAIN_SEPARATOR

function DOMAIN_SEPARATOR() external view returns (bytes32)

Returns

NameTypeDescription
_0bytes32undefined

SET_ADDRESS_ATTRIBUTE_TYPEHASH

function SET_ADDRESS_ATTRIBUTE_TYPEHASH() external view returns (bytes32)

Returns

NameTypeDescription
_0bytes32undefined

SET_BOOL_ATTRIBUTE_TYPEHASH

function SET_BOOL_ATTRIBUTE_TYPEHASH() external view returns (bytes32)

Returns

NameTypeDescription
_0bytes32undefined

SET_BYTES_ATTRIBUTE_TYPEHASH

function SET_BYTES_ATTRIBUTE_TYPEHASH() external view returns (bytes32)

Returns

NameTypeDescription
_0bytes32undefined

SET_INT_ATTRIBUTE_TYPEHASH

function SET_INT_ATTRIBUTE_TYPEHASH() external view returns (bytes32)

Returns

NameTypeDescription
_0bytes32undefined

SET_STRING_ATTRIBUTE_TYPEHASH

function SET_STRING_ATTRIBUTE_TYPEHASH() external view returns (bytes32)

Returns

NameTypeDescription
_0bytes32undefined

SET_UINT_ATTRIBUTE_TYPEHASH

function SET_UINT_ATTRIBUTE_TYPEHASH() external view returns (bytes32)

Returns

NameTypeDescription
_0bytes32undefined

getAddressAttribute

function getAddressAttribute(address collection, uint256 tokenId, string key) external view returns (address attribute)

Used to retrieve the address type token attributes.

Parameters

NameTypeDescription
collectionaddressThe collection address
tokenIduint256The token ID
keystringThe key of the attribute

Returns

NameTypeDescription
attributeaddressThe value of the address attribute

getAddressAttributes

function getAddressAttributes(address[] collections, uint256[] tokenIds, string[] attributeKeys) external view returns (address[] attributes)

Used to get multiple address parameter values for a token.

The AddressAttribute struct contains the following fields: [ string key, address value ]

Parameters

NameTypeDescription
collectionsaddress[]Addresses of the collections, in the same order as the attribute keys. If all tokens are from the same collection the array can contain a single element with the collection address.
tokenIdsuint256[]IDs of the tokens, in the same order as the attribute keys. If all attributes are for the same token the array can contain a single element with the token ID.
attributeKeysstring[]An array of address keys to retrieve

Returns

NameTypeDescription
attributesaddress[]An array of addresses, in the same order as the attribute keys

getAttributes

function getAttributes(address collection, uint256 tokenId, string[] addressKeys, string[] boolKeys, string[] bytesKeys, string[] intKeys, string[] stringKeys, string[] uintKeys) external view returns (address[] addressAttributes, bool[] boolAttributes, bytes[] bytesAttributes, int256[] intAttributes, string[] stringAttributes, uint256[] uintAttributes)

Used to retrieve multiple token attributes of any type at once.

The StringAttribute, UintAttribute, IntAttribute, BoolAttribute, AddressAttribute and BytesAttribute structs consists to the following fields (where value is of the appropriate type): [ key, value, ]

Parameters

NameTypeDescription
collectionaddressThe collection address
tokenIduint256The token ID
addressKeysstring[]An array of address type attribute keys to retrieve
boolKeysstring[]An array of bool type attribute keys to retrieve
bytesKeysstring[]An array of bytes type attribute keys to retrieve
intKeysstring[]An array of int type attribute keys to retrieve
stringKeysstring[]An array of string type attribute keys to retrieve
uintKeysstring[]An array of uint type attribute keys to retrieve

Returns

NameTypeDescription
addressAttributesaddress[]An array of addresses, in the same order as the addressKeys
boolAttributesbool[]An array of bools, in the same order as the boolKeys
bytesAttributesbytes[]An array of bytes, in the same order as the bytesKeys
intAttributesint256[]An array of ints, in the same order as the intKeys
stringAttributesstring[]An array of strings, in the same order as the stringKeys
uintAttributesuint256[]An array of uints, in the same order as the uintKeys

getAttributesMetadataURIForCollection

function getAttributesMetadataURIForCollection(address collection) external view returns (string attributesMetadataURI)

Used to retrieve the attributes metadata URI for a collection, which contains all the information about the collection attributes.

Parameters

NameTypeDescription
collectionaddressAddress of the collection

Returns

NameTypeDescription
attributesMetadataURIstringThe URI of the attributes metadata

getBoolAttribute

function getBoolAttribute(address collection, uint256 tokenId, string key) external view returns (bool attribute)

Used to retrieve the bool type token attributes.

Parameters

NameTypeDescription
collectionaddressThe collection address
tokenIduint256The token ID
keystringThe key of the attribute

Returns

NameTypeDescription
attributeboolThe value of the bool attribute

getBoolAttributes

function getBoolAttributes(address[] collections, uint256[] tokenIds, string[] attributeKeys) external view returns (bool[] attributes)

Used to get multiple bool parameter values for a token.

The BoolAttribute struct contains the following fields: [ string key, bool value ]

Parameters

NameTypeDescription
collectionsaddress[]Addresses of the collections, in the same order as the attribute keys. If all tokens are from the same collection the array can contain a single element with the collection address.
tokenIdsuint256[]IDs of the tokens, in the same order as the attribute keys. If all attributes are for the same token the array can contain a single element with the token ID.
attributeKeysstring[]An array of bool keys to retrieve

Returns

NameTypeDescription
attributesbool[]An array of bools, in the same order as the attribute keys

getBytesAttribute

function getBytesAttribute(address collection, uint256 tokenId, string key) external view returns (bytes attribute)

Used to retrieve the bytes type token attributes.

Parameters

NameTypeDescription
collectionaddressThe collection address
tokenIduint256The token ID
keystringThe key of the attribute

Returns

NameTypeDescription
attributebytesThe value of the bytes attribute

getBytesAttributes

function getBytesAttributes(address[] collections, uint256[] tokenIds, string[] attributeKeys) external view returns (bytes[] attributes)

Used to get multiple bytes parameter values for a token.

The BytesAttribute struct contains the following fields: [ string key, bytes value ]

Parameters

NameTypeDescription
collectionsaddress[]Addresses of the collections, in the same order as the attribute keys. If all tokens are from the same collection the array can contain a single element with the collection address.
tokenIdsuint256[]IDs of the tokens, in the same order as the attribute keys. If all attributes are for the same token the array can contain a single element with the token ID.
attributeKeysstring[]An array of bytes keys to retrieve

Returns

NameTypeDescription
attributesbytes[]An array of bytes, in the same order as the attribute keys

getIntAttribute

function getIntAttribute(address collection, uint256 tokenId, string key) external view returns (int256 attribute)

Used to retrieve the int type token attributes.

Parameters

NameTypeDescription
collectionaddressThe collection address
tokenIduint256The token ID
keystringThe key of the attribute

Returns

NameTypeDescription
attributeint256The value of the uint attribute

getIntAttributes

function getIntAttributes(address[] collections, uint256[] tokenIds, string[] attributeKeys) external view returns (int256[] attributes)

Used to get multiple int parameter values for a token.

Parameters

NameTypeDescription
collectionsaddress[]Addresses of the collections, in the same order as the attribute keys. If all tokens are from the same collection the array can contain a single element with the collection address.
tokenIdsuint256[]IDs of the tokens, in the same order as the attribute keys. If all attributes are for the same token the array can contain a single element with the token ID.
attributeKeysstring[]An array of int keys to retrieve

Returns

NameTypeDescription
attributesint256[]An array of ints, in the same order as the attribute keys

getStringAttribute

function getStringAttribute(address collection, uint256 tokenId, string key) external view returns (string attribute)

Used to retrieve the string type token attributes.

Parameters

NameTypeDescription
collectionaddressThe collection address
tokenIduint256The token ID
keystringThe key of the attribute

Returns

NameTypeDescription
attributestringThe value of the string attribute

getStringAttributes

function getStringAttributes(address[] collections, uint256[] tokenIds, string[] attributeKeys) external view returns (string[] attributes)

Used to get multiple sting parameter values for a token.

Parameters

NameTypeDescription
collectionsaddress[]Addresses of the collections, in the same order as the attribute keys. If all tokens are from the same collection the array can contain a single element with the collection address.
tokenIdsuint256[]IDs of the tokens, in the same order as the attribute keys. If all attributes are for the same token the array can contain a single element with the token ID.
attributeKeysstring[]An array of string keys to retrieve

Returns

NameTypeDescription
attributesstring[]An array of strings, in the same order as the attribute keys

getUintAttribute

function getUintAttribute(address collection, uint256 tokenId, string key) external view returns (uint256 attribute)

Used to retrieve the uint type token attributes.

Parameters

NameTypeDescription
collectionaddressThe collection address
tokenIduint256The token ID
keystringThe key of the attribute

Returns

NameTypeDescription
attributeuint256The value of the uint attribute

getUintAttributes

function getUintAttributes(address[] collections, uint256[] tokenIds, string[] attributeKeys) external view returns (uint256[] attributes)

Used to get multiple uint parameter values for a token.

Parameters

NameTypeDescription
collectionsaddress[]Addresses of the collections, in the same order as the attribute keys. If all tokens are from the same collection the array can contain a single element with the collection address.
tokenIdsuint256[]IDs of the tokens, in the same order as the attribute keys. If all attributes are for the same token the array can contain a single element with the token ID.
attributeKeysstring[]An array of uint keys to retrieve

Returns

NameTypeDescription
attributesuint256[]An array of uints, in the same order as the attribute keys

isCollaborator

function isCollaborator(address collaborator, address collection) external view returns (bool isCollaborator_)

Used to check if the specified address is listed as a collaborator of the given collection's parameter.

Parameters

NameTypeDescription
collaboratoraddressAddress to be checked.
collectionaddressAddress of the collection.

Returns

NameTypeDescription
isCollaborator_boolBoolean value indicating if the address is a collaborator of the given collection's (true) or not (false).

isSpecificAddress

function isSpecificAddress(address specificAddress, address collection, string key) external view returns (bool isSpecificAddress_)

Used to check if the specified address is listed as a specific address of the given collection's parameter.

Parameters

NameTypeDescription
specificAddressaddressAddress to be checked.
collectionaddressAddress of the collection.
keystringThe key of the attribute

Returns

NameTypeDescription
isSpecificAddress_boolBoolean value indicating if the address is a specific address of the given collection's parameter (true) or not (false).

manageAccessControl

function manageAccessControl(address collection, string key, enum IERC7508.AccessType accessType, address specificAddress) external nonpayable

Used to manage the access control settings for a specific parameter.

Only the owner of the collection can call this function.The possible accessType values are: [ Owner, Collaborator, OwnerOrCollaborator, TokenOwner, SpecificAddress, ]Emits an {AccessControlUpdated} event.

Parameters

NameTypeDescription
collectionaddressThe address of the collection being managed.
keystringThe key of the attribute
accessTypeenum IERC7508.AccessTypeThe type of access control to be applied to the parameter.
specificAddressaddressThe address to be added as a specific addresses allowed to manage the given parameter.

manageCollaborators

function manageCollaborators(address collection, address[] collaboratorAddresses, bool[] collaboratorAddressAccess) external nonpayable

Used to manage the collaborators of a collection.

The collaboratorAddresses and collaboratorAddressAccess arrays must be of the same length.Emits a {CollaboratorUpdate} event.

Parameters

NameTypeDescription
collectionaddressThe address of the collection
collaboratorAddressesaddress[]The array of collaborator addresses being managed
collaboratorAddressAccessbool[]The array of boolean values indicating if the collaborator address should receive the permission (true) or not (false).

prepareMessageToPresignAddressAttribute

function prepareMessageToPresignAddressAttribute(address collection, uint256 tokenId, string key, address value, uint256 deadline) external view returns (bytes32 message)

Used to retrieve the message to be signed for submitting a presigned address attribute change.

Parameters

NameTypeDescription
collectionaddressThe address of the collection smart contract of the token receiving the attribute
tokenIduint256The ID of the token receiving the attribute
keystringThe attribute key
valueaddressThe attribute value
deadlineuint256The deadline timestamp for the presigned transaction after which the message is invalid

Returns

NameTypeDescription
messagebytes32Raw message to be signed by the authorized account

prepareMessageToPresignBoolAttribute

function prepareMessageToPresignBoolAttribute(address collection, uint256 tokenId, string key, bool value, uint256 deadline) external view returns (bytes32 message)

Used to retrieve the message to be signed for submitting a presigned bool attribute change.

Parameters

NameTypeDescription
collectionaddressThe address of the collection smart contract of the token receiving the attribute
tokenIduint256The ID of the token receiving the attribute
keystringThe attribute key
valueboolThe attribute value
deadlineuint256The deadline timestamp for the presigned transaction after which the message is invalid

Returns

NameTypeDescription
messagebytes32Raw message to be signed by the authorized account

prepareMessageToPresignBytesAttribute

function prepareMessageToPresignBytesAttribute(address collection, uint256 tokenId, string key, bytes value, uint256 deadline) external view returns (bytes32 message)

Used to retrieve the message to be signed for submitting a presigned bytes attribute change.

Parameters

NameTypeDescription
collectionaddressThe address of the collection smart contract of the token receiving the attribute
tokenIduint256The ID of the token receiving the attribute
keystringThe attribute key
valuebytesThe attribute value
deadlineuint256The deadline timestamp for the presigned transaction after which the message is invalid

Returns

NameTypeDescription
messagebytes32Raw message to be signed by the authorized account

prepareMessageToPresignIntAttribute

function prepareMessageToPresignIntAttribute(address collection, uint256 tokenId, string key, int256 value, uint256 deadline) external view returns (bytes32 message)

Used to retrieve the message to be signed for submitting a presigned int attribute change.

Parameters

NameTypeDescription
collectionaddressThe address of the collection smart contract of the token receiving the attribute
tokenIduint256The ID of the token receiving the attribute
keystringThe attribute key
valueint256The attribute value
deadlineuint256The deadline timestamp for the presigned transaction after which the message is invalid

Returns

NameTypeDescription
messagebytes32Raw message to be signed by the authorized account

prepareMessageToPresignStringAttribute

function prepareMessageToPresignStringAttribute(address collection, uint256 tokenId, string key, string value, uint256 deadline) external view returns (bytes32 message)

Used to retrieve the message to be signed for submitting a presigned string attribute change.

Parameters

NameTypeDescription
collectionaddressThe address of the collection smart contract of the token receiving the attribute
tokenIduint256The ID of the token receiving the attribute
keystringThe attribute key
valuestringThe attribute value
deadlineuint256The deadline timestamp for the presigned transaction after which the message is invalid

Returns

NameTypeDescription
messagebytes32Raw message to be signed by the authorized account

prepareMessageToPresignUintAttribute

function prepareMessageToPresignUintAttribute(address collection, uint256 tokenId, string key, uint256 value, uint256 deadline) external view returns (bytes32 message)

Used to retrieve the message to be signed for submitting a presigned uint attribute change.

Parameters

NameTypeDescription
collectionaddressThe address of the collection smart contract of the token receiving the attribute
tokenIduint256The ID of the token receiving the attribute
keystringThe attribute key
valueuint256The attribute value
deadlineuint256The deadline timestamp for the presigned transaction after which the message is invalid

Returns

NameTypeDescription
messagebytes32Raw message to be signed by the authorized account

presignedSetAddressAttribute

function presignedSetAddressAttribute(address setter, address collection, uint256 tokenId, string key, address value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) external nonpayable

Used to set the address attribute on behalf of an authorized account.

Emits a {AddressAttributeUpdated} event.

Parameters

NameTypeDescription
setteraddressAddress of the account that presigned the attribute change
collectionaddressAddress of the collection receiving the attribute
tokenIduint256The ID of the token receiving the attribute
keystringThe attribute key
valueaddressThe attribute value
deadlineuint256The deadline timestamp for the presigned transaction
vuint8v value of an ECDSA signature of the presigned message
rbytes32r value of an ECDSA signature of the presigned message
sbytes32s value of an ECDSA signature of the presigned message

presignedSetBoolAttribute

function presignedSetBoolAttribute(address setter, address collection, uint256 tokenId, string key, bool value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) external nonpayable

Used to set the bool attribute on behalf of an authorized account.

Emits a {BoolAttributeUpdated} event.

Parameters

NameTypeDescription
setteraddressAddress of the account that presigned the attribute change
collectionaddressAddress of the collection receiving the attribute
tokenIduint256The ID of the token receiving the attribute
keystringThe attribute key
valueboolThe attribute value
deadlineuint256The deadline timestamp for the presigned transaction
vuint8v value of an ECDSA signature of the presigned message
rbytes32r value of an ECDSA signature of the presigned message
sbytes32s value of an ECDSA signature of the presigned message

presignedSetBytesAttribute

function presignedSetBytesAttribute(address setter, address collection, uint256 tokenId, string key, bytes value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) external nonpayable

Used to set the bytes attribute on behalf of an authorized account.

Emits a {BytesAttributeUpdated} event.

Parameters

NameTypeDescription
setteraddressAddress of the account that presigned the attribute change
collectionaddressAddress of the collection receiving the attribute
tokenIduint256The ID of the token receiving the attribute
keystringThe attribute key
valuebytesThe attribute value
deadlineuint256The deadline timestamp for the presigned transaction
vuint8v value of an ECDSA signature of the presigned message
rbytes32r value of an ECDSA signature of the presigned message
sbytes32s value of an ECDSA signature of the presigned message

presignedSetIntAttribute

function presignedSetIntAttribute(address setter, address collection, uint256 tokenId, string key, int256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) external nonpayable

Used to set the int attribute on behalf of an authorized account.

Emits a {IntAttributeUpdated} event.

Parameters

NameTypeDescription
setteraddressAddress of the account that presigned the attribute change
collectionaddressAddress of the collection receiving the attribute
tokenIduint256The ID of the token receiving the attribute
keystringThe attribute key
valueint256The attribute value
deadlineuint256The deadline timestamp for the presigned transaction
vuint8v value of an ECDSA signature of the presigned message
rbytes32r value of an ECDSA signature of the presigned message
sbytes32s value of an ECDSA signature of the presigned message

presignedSetStringAttribute

function presignedSetStringAttribute(address setter, address collection, uint256 tokenId, string key, string value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) external nonpayable

Used to set the string attribute on behalf of an authorized account.

Emits a {StringAttributeUpdated} event.

Parameters

NameTypeDescription
setteraddressAddress of the account that presigned the attribute change
collectionaddressAddress of the collection receiving the attribute
tokenIduint256The ID of the token receiving the attribute
keystringThe attribute key
valuestringThe attribute value
deadlineuint256The deadline timestamp for the presigned transaction
vuint8v value of an ECDSA signature of the presigned message
rbytes32r value of an ECDSA signature of the presigned message
sbytes32s value of an ECDSA signature of the presigned message

presignedSetUintAttribute

function presignedSetUintAttribute(address setter, address collection, uint256 tokenId, string key, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) external nonpayable

Used to set the uint attribute on behalf of an authorized account.

Emits a {UintAttributeUpdated} event.

Parameters

NameTypeDescription
setteraddressAddress of the account that presigned the attribute change
collectionaddressAddress of the collection receiving the attribute
tokenIduint256The ID of the token receiving the attribute
keystringThe attribute key
valueuint256The attribute value
deadlineuint256The deadline timestamp for the presigned transaction
vuint8v value of an ECDSA signature of the presigned message
rbytes32r value of an ECDSA signature of the presigned message
sbytes32s value of an ECDSA signature of the presigned message

registerAccessControl

function registerAccessControl(address collection, address owner, bool useOwnable) external nonpayable

Used to register a collection to use the RMRK token attributes repository.

If the collection does not implement the Ownable interface, the useOwnable value must be set to false.Emits an {AccessControlRegistration} event.

Parameters

NameTypeDescription
collectionaddressThe address of the collection that will use the RMRK token attributes repository.
owneraddressThe address of the owner of the collection.
useOwnableboolThe boolean value to indicate if the collection implements the Ownable interface and whether it should be used to validate that the caller is the owner (true) or to use the manually set owner address (false).

setAddressAttribute

function setAddressAttribute(address collection, uint256 tokenId, string key, address value) external nonpayable

Used to set an address attribute.

Emits a {AddressAttributeUpdated} event.

Parameters

NameTypeDescription
collectionaddressAddress of the collection receiving the attribute
tokenIduint256The token ID
keystringThe attribute key
valueaddressThe attribute value

setAddressAttributes

function setAddressAttributes(address[] collections, uint256[] tokenIds, IERC7508.AddressAttribute[] attributes) external nonpayable

Parameters

NameTypeDescription
collectionsaddress[]undefined
tokenIdsuint256[]undefined
attributesIERC7508.AddressAttribute[]undefined

setAttributes

function setAttributes(address collection, uint256 tokenId, IERC7508.AddressAttribute[] addressAttributes, IERC7508.BoolAttribute[] boolAttributes, IERC7508.BytesAttribute[] bytesAttributes, IERC7508.IntAttribute[] intAttributes, IERC7508.StringAttribute[] stringAttributes, IERC7508.UintAttribute[] uintAttributes) external nonpayable

Parameters

NameTypeDescription
collectionaddressundefined
tokenIduint256undefined
addressAttributesIERC7508.AddressAttribute[]undefined
boolAttributesIERC7508.BoolAttribute[]undefined
bytesAttributesIERC7508.BytesAttribute[]undefined
intAttributesIERC7508.IntAttribute[]undefined
stringAttributesIERC7508.StringAttribute[]undefined
uintAttributesIERC7508.UintAttribute[]undefined

setAttributesMetadataURIForCollection

function setAttributesMetadataURIForCollection(address collection, string attributesMetadataURI) external nonpayable

Used to set the metadata URI for a collection, which contains all the information about the collection attributes.

Emits a {MetadataURIUpdated} event.

Parameters

NameTypeDescription
collectionaddressAddress of the collection
attributesMetadataURIstringThe URI of the attributes metadata

setBoolAttribute

function setBoolAttribute(address collection, uint256 tokenId, string key, bool value) external nonpayable

Used to set a boolean attribute.

Emits a {BoolAttributeUpdated} event.

Parameters

NameTypeDescription
collectionaddressAddress of the collection receiving the attribute
tokenIduint256The token ID
keystringThe attribute key
valueboolThe attribute value

setBoolAttributes

function setBoolAttributes(address[] collections, uint256[] tokenIds, IERC7508.BoolAttribute[] attributes) external nonpayable

Parameters

NameTypeDescription
collectionsaddress[]undefined
tokenIdsuint256[]undefined
attributesIERC7508.BoolAttribute[]undefined

setBytesAttribute

function setBytesAttribute(address collection, uint256 tokenId, string key, bytes value) external nonpayable

Used to set an bytes attribute.

Emits a {BytesAttributeUpdated} event.

Parameters

NameTypeDescription
collectionaddressAddress of the collection receiving the attribute
tokenIduint256The token ID
keystringThe attribute key
valuebytesThe attribute value

setBytesAttributes

function setBytesAttributes(address[] collections, uint256[] tokenIds, IERC7508.BytesAttribute[] attributes) external nonpayable

Parameters

NameTypeDescription
collectionsaddress[]undefined
tokenIdsuint256[]undefined
attributesIERC7508.BytesAttribute[]undefined

setIntAttribute

function setIntAttribute(address collection, uint256 tokenId, string key, int256 value) external nonpayable

Used to set a signed number attribute.

Emits a {IntAttributeUpdated} event.

Parameters

NameTypeDescription
collectionaddressAddress of the collection receiving the attribute
tokenIduint256The token ID
keystringThe attribute key
valueint256The attribute value

setIntAttributes

function setIntAttributes(address[] collections, uint256[] tokenIds, IERC7508.IntAttribute[] attributes) external nonpayable

Parameters

NameTypeDescription
collectionsaddress[]undefined
tokenIdsuint256[]undefined
attributesIERC7508.IntAttribute[]undefined

setStringAttribute

function setStringAttribute(address collection, uint256 tokenId, string key, string value) external nonpayable

Used to set a string attribute.

Emits a {StringAttributeUpdated} event.

Parameters

NameTypeDescription
collectionaddressAddress of the collection receiving the attribute
tokenIduint256The token ID
keystringThe attribute key
valuestringThe attribute value

setStringAttributes

function setStringAttributes(address[] collections, uint256[] tokenIds, IERC7508.StringAttribute[] attributes) external nonpayable

Parameters

NameTypeDescription
collectionsaddress[]undefined
tokenIdsuint256[]undefined
attributesIERC7508.StringAttribute[]undefined

setUintAttribute

function setUintAttribute(address collection, uint256 tokenId, string key, uint256 value) external nonpayable

Used to set an unsigned number attribute.

Emits a {UintAttributeUpdated} event.

Parameters

NameTypeDescription
collectionaddressAddress of the collection receiving the attribute
tokenIduint256The token ID
keystringThe attribute key
valueuint256The attribute value

setUintAttributes

function setUintAttributes(address[] collections, uint256[] tokenIds, IERC7508.UintAttribute[] attributes) external nonpayable

Parameters

NameTypeDescription
collectionsaddress[]undefined
tokenIdsuint256[]undefined
attributesIERC7508.UintAttribute[]undefined

supportsInterface

function supportsInterface(bytes4 interfaceId) external view returns (bool)

Returns true if this contract implements the interface defined by interfaceId. See the corresponding https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP (opens in a new tab) section] to learn more about how these ids are created. This function call must use less than 30 000 gas.

Parameters

NameTypeDescription
interfaceIdbytes4undefined

Returns

NameTypeDescription
_0boolundefined

Events

AccessControlRegistration

event AccessControlRegistration(address indexed collection, address indexed owner, address indexed registeringAddress, bool useOwnable)

Used to notify listeners that a new collection has been registered to use the repository.

Parameters

NameTypeDescription
collection indexedaddressAddress of the collection
owner indexedaddressAddress of the owner of the collection; the addess authorized to manage the access control
registeringAddress indexedaddressAddress that registered the collection
useOwnableboolA boolean value indicating whether the collection uses the Ownable extension to verify the owner (true) or not (false)

AccessControlUpdate

event AccessControlUpdate(address indexed collection, string key, enum IERC7508.AccessType accessType, address specificAddress)

Used to notify listeners that the access control settings for a specific parameter have been updated.

Parameters

NameTypeDescription
collection indexedaddressAddress of the collection
keystringThe name of the parameter for which the access control settings have been updated
accessTypeenum IERC7508.AccessTypeThe AccessType of the parameter for which the access control settings have been updated
specificAddressaddressThe specific addresses that has been updated

AddressAttributeUpdated

event AddressAttributeUpdated(address indexed collection, uint256 indexed tokenId, string key, address value)

Used to notify listeners that an address attribute has been updated.

Parameters

NameTypeDescription
collection indexedaddressThe collection address
tokenId indexeduint256The token ID
keystringThe key of the attribute
valueaddressThe new value of the attribute

BoolAttributeUpdated

event BoolAttributeUpdated(address indexed collection, uint256 indexed tokenId, string key, bool value)

Used to notify listeners that a boolean attribute has been updated.

Parameters

NameTypeDescription
collection indexedaddressThe collection address
tokenId indexeduint256The token ID
keystringThe key of the attribute
valueboolThe new value of the attribute

BytesAttributeUpdated

event BytesAttributeUpdated(address indexed collection, uint256 indexed tokenId, string key, bytes value)

Used to notify listeners that a bytes attribute has been updated.

Parameters

NameTypeDescription
collection indexedaddressThe collection address
tokenId indexeduint256The token ID
keystringThe key of the attribute
valuebytesThe new value of the attribute

CollaboratorUpdate

event CollaboratorUpdate(address indexed collection, address indexed collaborator, bool isCollaborator)

Used to notify listeners that a new collaborator has been added or removed.

Parameters

NameTypeDescription
collection indexedaddressAddress of the collection
collaborator indexedaddressAddress of the collaborator
isCollaboratorboolA boolean value indicating whether the collaborator has been added (true) or removed (false)

IntAttributeUpdated

event IntAttributeUpdated(address indexed collection, uint256 indexed tokenId, string key, int256 value)

Used to notify listeners that an int attribute has been updated.

Parameters

NameTypeDescription
collection indexedaddressThe collection address
tokenId indexeduint256The token ID
keystringThe key of the attribute
valueint256The new value of the attribute

MetadataURIUpdated

event MetadataURIUpdated(address indexed collection, string attributesMetadataURI)

Used to notify listeners that the metadata URI for a collection has been updated.

Parameters

NameTypeDescription
collection indexedaddressAddress of the collection
attributesMetadataURIstringThe new attributes metadata URI

StringAttributeUpdated

event StringAttributeUpdated(address indexed collection, uint256 indexed tokenId, string key, string value)

Used to notify listeners that a string attribute has been updated.

Parameters

NameTypeDescription
collection indexedaddressThe collection address
tokenId indexeduint256The token ID
keystringThe key of the attribute
valuestringThe new value of the attribute

UintAttributeUpdated

event UintAttributeUpdated(address indexed collection, uint256 indexed tokenId, string key, uint256 value)

Used to notify listeners that an uint attribute has been updated.

Parameters

NameTypeDescription
collection indexedaddressThe collection address
tokenId indexeduint256The token ID
keystringThe key of the attribute
valueuint256The new value of the attribute

Errors

CollaboratorArraysNotEqualLength

error CollaboratorArraysNotEqualLength()

Used to signal that the collaborator and collaborator rights array are not of equal length.

CollectionNotRegistered

error CollectionNotRegistered()

Used to signal that the collection is not registered in the repository yet.

ExpiredDeadline

error ExpiredDeadline()

Used to signal that the presigned message's deadline has expired.

InvalidSignature

error InvalidSignature()

Used to signal that the presigned message's signature is invalid.

LengthsMismatch

error LengthsMismatch()

Used to signal that the length of the arrays is not equal.

NotCollectionCollaborator

error NotCollectionCollaborator()

Used to signal that the caller is not aa collaborator of the collection.

NotCollectionOwner

error NotCollectionOwner()

Used to signal that the caller is not the owner of the collection.

NotCollectionOwnerOrCollaborator

error NotCollectionOwnerOrCollaborator()

Used to signal that the caller is not the owner or a collaborator of the collection.

NotSpecificAddress

error NotSpecificAddress()

Used to signal that the caller is not the specific address allowed to manage the attribute.

NotTokenOwner

error NotTokenOwner()

Used to signal that the caller is not the owner of the token.

OwnableNotImplemented

error OwnableNotImplemented()

Used to signal that the smart contract interacting with the repository does not implement Ownable pattern.