import”@patchwork/contracts/Patchwork721/IPatchwork721.sol”;
Inherits: IPatchworkScoped IPatchworkMetadata IERC5192 IERC721

Functions


schemaURI

Returns the URI of the schema
function schemaURI() external view returns (string memory);
Returns
NameTypeDescription
<none>stringstring the URI of the schema

schema

Returns the metadata schema
function schema() external view returns (MetadataSchema memory);
Returns
NameTypeDescription
<none>MetadataSchemaMetadataSchema 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
NameTypeDescription
tokenIduint256ID of the token
Returns
NameTypeDescription
<none>stringstring the image URI

setPermissions

Sets permissions for a given address
function setPermissions(address to, uint256 permissions) external;
Parameters
NameTypeDescription
toaddressAddress to set permissions for
permissionsuint256Permissions value

storePackedMetadataSlot

Stores packed metadata for a given token ID and slot
function storePackedMetadataSlot(uint256 tokenId, uint256 slot, uint256 data) external;
Parameters
NameTypeDescription
tokenIduint256ID of the token
slotuint256Slot to store metadata
datauint256Metadata to store

storePackedMetadata

Stores packed metadata for a given token ID
function storePackedMetadata(uint256 tokenId, uint256[] memory data) external;
Parameters
NameTypeDescription
tokenIduint256ID of the token
datauint256[]Metadata to store

loadPackedMetadataSlot

Loads packed metadata for a given token ID and slot
function loadPackedMetadataSlot(uint256 tokenId, uint256 slot) external view returns (uint256);
Parameters
NameTypeDescription
tokenIduint256ID of the token
slotuint256Slot to load metadata from
Returns
NameTypeDescription
<none>uint256uint256 the raw slot data as a uint256

loadPackedMetadata

Loads packed metadata for a given token ID
function loadPackedMetadata(uint256 tokenId) external view returns (uint256[] memory);
Parameters
NameTypeDescription
tokenIduint256ID of the token
Returns
NameTypeDescription
<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
NameTypeDescription
tokenIduint256ID of the token
Returns
NameTypeDescription
nonceuint256the nonce

setFrozen

Sets the freeze status of a token (ERC-5192).
function setFrozen(uint256 tokenId, bool frozen) external;
Parameters
NameTypeDescription
tokenIduint256ID of the token
frozenboolFreeze status to set

frozen

Gets the freeze status of a token (ERC-5192).
function frozen(uint256 tokenId) external view returns (bool);
Parameters
NameTypeDescription
tokenIduint256ID of the token
Returns
NameTypeDescription
<none>boolbool true if frozen, false if not

setLocked

Sets the lock status of a token (ERC-5192).
function setLocked(uint256 tokenId, bool locked) external;
Parameters
NameTypeDescription
tokenIduint256ID of the token
lockedboolLock status to set

Events


Frozen

Emitted when the freeze status is changed to frozen.
event Frozen(uint256 indexed tokenId);
Parameters
NameTypeDescription
tokenIduint256The identifier for a token.

Thawed

Emitted when the locking status is changed to not frozen.
event Thawed(uint256 indexed tokenId);
Parameters
NameTypeDescription
tokenIduint256The identifier for a token.

PermissionChange

Emitted when the permissions are changed
event PermissionChange(address indexed to, uint256 permissions);
Parameters
NameTypeDescription
toaddressThe address the permissions are assigned to
permissionsuint256The permissions

SchemaChange

Emitted when the schema has changed
event SchemaChange(address indexed addr);
Parameters
NameTypeDescription
addraddressthe address of the Patchwork721