import”@patchwork/contracts/PatchworkLiteRef/IPatchworkLiteRef.sol”;
Functions
registerReferenceAddress
Registers a reference addressName | Type | Description |
---|---|---|
addr | address | Address to register |
Name | Type | Description |
---|---|---|
id | uint8 | ID assigned to the address |
getReferenceId
Gets the ID assigned to the address from registrationName | Type | Description |
---|---|---|
addr | address | Registered address |
Name | Type | Description |
---|---|---|
id | uint8 | ID assigned to the address |
redacted | bool | Redacted status |
getReferenceAddress
Gets the address assigned to this idName | Type | Description |
---|---|---|
id | uint8 | ID assigned to the address |
Name | Type | Description |
---|---|---|
addr | address | Registered address |
redacted | bool | Redacted status |
redactReferenceAddress
Redacts a reference addressName | Type | Description |
---|---|---|
id | uint8 | ID of the address to redact |
unredactReferenceAddress
Unredacts a reference addressName | Type | Description |
---|---|---|
id | uint8 | ID of the address to unredact |
getLiteReference
Returns a lite reference for a given address and token IDName | Type | Description |
---|---|---|
addr | address | Address to get reference for |
tokenId | uint256 | ID of the token |
Name | Type | Description |
---|---|---|
liteRef | uint64 | Lite reference |
redacted | bool | Redacted status |
getReferenceAddressAndTokenId
Returns an address and token ID for a given lite referenceName | Type | Description |
---|---|---|
liteRef | uint64 | Lite reference to get address and token ID for |
Name | Type | Description |
---|---|---|
addr | address | Address |
tokenId | uint256 | Token ID |
addReference
Adds a reference to a tokenName | Type | Description |
---|---|---|
tokenId | uint256 | ID of the token |
liteRef | uint64 | LiteRef to add |
addReference
Adds a reference to a tokenName | Type | Description |
---|---|---|
tokenId | uint256 | ID of the token |
liteRef | uint64 | LiteRef to add |
targetMetadataId | uint256 | The metadata ID on the target to assign to |
addReferenceBatch
Adds multiple references to a tokenName | Type | Description |
---|---|---|
tokenId | uint256 | ID of the token |
liteRefs | uint64[] | Array of lite references to add |
addReferenceBatch
Adds multiple references to a tokenName | Type | Description |
---|---|---|
tokenId | uint256 | ID of the token |
liteRefs | uint64[] | Array of lite references to add |
targetMetadataId | uint256 | The metadata ID on the target to assign to |
removeReference
Removes a reference from a tokenName | Type | Description |
---|---|---|
tokenId | uint256 | ID of the token |
liteRef | uint64 | Lite reference to remove |
removeReference
Removes a reference from a tokenName | Type | Description |
---|---|---|
tokenId | uint256 | ID of the token |
liteRef | uint64 | Lite reference to remove |
targetMetadataId | uint256 | The metadata ID on the target to unassign from |
loadReferenceAddressAndTokenId
Loads a reference address and token ID at a given indexName | Type | Description |
---|---|---|
ourTokenId | uint256 | ID of the token |
idx | uint256 | Index to load from |
Name | Type | Description |
---|---|---|
addr | address | Address |
tokenId | uint256 | Token ID |
loadAllStaticReferences
Loads all static references for a given token IDName | Type | Description |
---|---|---|
tokenId | uint256 | ID of the token |
Name | Type | Description |
---|---|---|
addresses | address[] | Array of addresses |
tokenIds | uint256[] | Array of token IDs |
getDynamicReferenceCount
Count all dynamic references for a given token IDName | Type | Description |
---|---|---|
tokenId | uint256 | ID of the token |
Name | Type | Description |
---|---|---|
count | uint256 | the number of dynamic references |
loadDynamicReferencePage
Load a page of dynamic references for a given token IDName | Type | Description |
---|---|---|
tokenId | uint256 | ID of the token |
offset | uint256 | The starting offset 0-indexed |
count | uint256 | The maximum number of references to return |
Name | Type | Description |
---|---|---|
addresses | address[] | An array of reference addresses |
tokenIds | uint256[] | An array of reference token IDs |
Events
Redact
Emitted when a contract redacts a fragmentName | Type | Description |
---|---|---|
target | address | the contract which issued the redaction |
fragment | address | the fragment that was redacted |
Unredact
Emitted when a contract unredacts a fragmentName | Type | Description |
---|---|---|
target | address | the contract which revoked the redaction |
fragment | address | the fragment that was unredacted |
Register
Emitted when a contract registers a fragmentName | Type | Description |
---|---|---|
target | address | the contract that registered the fragment |
fragment | address | the fragment that was registered |
idx | uint8 | the idx of the literef |