Documentation Index
Fetch the complete documentation index at: https://docs.patchwork.dev/llms.txt
Use this file to discover all available pages before exploring further.
Functions
schemaURI
Returns the URI of the schema
function schemaURI() external view returns (string memory);
Returns
| Name | Type | Description |
|---|
<none> | string | string the URI of the schema |
schema
Returns the metadata schema
function schema() external view returns (MetadataSchema memory);
Returns
| Name | Type | Description |
|---|
<none> | MetadataSchema | MetadataSchema the metadata schema |
imageURI
Returns the URI of the image associated with the given token ID
function imageURI(uint256 tokenId) external view returns (string memory);
Parameters
| Name | Type | Description |
|---|
tokenId | uint256 | ID of the token |
Returns
| Name | Type | Description |
|---|
<none> | string | string the image URI |
setPermissions
Sets permissions for a given address
function setPermissions(address to, uint256 permissions) external;
Parameters
| Name | Type | Description |
|---|
to | address | Address to set permissions for |
permissions | uint256 | Permissions value |
Stores packed metadata for a given token ID and slot
function storePackedMetadataSlot(uint256 tokenId, uint256 slot, uint256 data) external;
Parameters
| Name | Type | Description |
|---|
tokenId | uint256 | ID of the token |
slot | uint256 | Slot to store metadata |
data | uint256 | Metadata to store |
Stores packed metadata for a given token ID
function storePackedMetadata(uint256 tokenId, uint256[] memory data) external;
Parameters
| Name | Type | Description |
|---|
tokenId | uint256 | ID of the token |
data | uint256[] | Metadata to store |
Loads packed metadata for a given token ID and slot
function loadPackedMetadataSlot(uint256 tokenId, uint256 slot) external view returns (uint256);
Parameters
| Name | Type | Description |
|---|
tokenId | uint256 | ID of the token |
slot | uint256 | Slot to load metadata from |
Returns
| Name | Type | Description |
|---|
<none> | uint256 | uint256 the raw slot data as a uint256 |
Loads packed metadata for a given token ID
function loadPackedMetadata(uint256 tokenId) external view returns (uint256[] memory);
Parameters
| Name | Type | Description |
|---|
tokenId | uint256 | ID of the token |
Returns
| Name | Type | Description |
|---|
<none> | uint256[] | uint256[] the raw slot data as a uint256 array |
getFreezeNonce
Returns the freeze nonce for a given token ID.
function getFreezeNonce(uint256 tokenId) external view returns (uint256 nonce);
Parameters
| Name | Type | Description |
|---|
tokenId | uint256 | ID of the token |
Returns
| Name | Type | Description |
|---|
nonce | uint256 | the nonce |
setFrozen
Sets the freeze status of a token (ERC-5192).
function setFrozen(uint256 tokenId, bool frozen) external;
Parameters
| Name | Type | Description |
|---|
tokenId | uint256 | ID of the token |
frozen | bool | Freeze status to set |
frozen
Gets the freeze status of a token (ERC-5192).
function frozen(uint256 tokenId) external view returns (bool);
Parameters
| Name | Type | Description |
|---|
tokenId | uint256 | ID of the token |
Returns
| Name | Type | Description |
|---|
<none> | bool | bool true if frozen, false if not |
setLocked
Sets the lock status of a token (ERC-5192).
function setLocked(uint256 tokenId, bool locked) external;
Parameters
| Name | Type | Description |
|---|
tokenId | uint256 | ID of the token |
locked | bool | Lock status to set |
Events
Frozen
Emitted when the freeze status is changed to frozen.
event Frozen(uint256 indexed tokenId);
Parameters
| Name | Type | Description |
|---|
tokenId | uint256 | The identifier for a token. |
Thawed
Emitted when the locking status is changed to not frozen.
event Thawed(uint256 indexed tokenId);
Parameters
| Name | Type | Description |
|---|
tokenId | uint256 | The identifier for a token. |
PermissionChange
Emitted when the permissions are changed
event PermissionChange(address indexed to, uint256 permissions);
Parameters
| Name | Type | Description |
|---|
to | address | The address the permissions are assigned to |
permissions | uint256 | The permissions |
SchemaChange
Emitted when the schema has changed
event SchemaChange(address indexed addr);
Parameters
| Name | Type | Description |
|---|
addr | address | the address of the Patchwork721 |