ILinklist
Functions
initialize
Initializes the contract.
function initialize(string calldata name_, string calldata symbol_, address web3Entry_) external;
Parameters
Name | Type | Description |
---|---|---|
name_ | string | The name of the token. |
symbol_ | string | The symbol of the token. |
web3Entry_ | address | The address of the Web3Entry contract. |
mint
Mints a Linklist NFT to the specified character with linkType. This can only be called by web3Entry.
function mint(uint256 characterId, bytes32 linkType) external returns (uint256 tokenId);
Parameters
Name | Type | Description |
---|---|---|
characterId | uint256 | The character ID to mint to. |
linkType | bytes32 | The type of link. |
Returns
Name | Type | Description |
---|---|---|
tokenId | uint256 | The minted token ID. |
burn
Burns a Linklist NFT.
Only web3Entry can burn the Linklist NFT.
function burn(uint256 tokenId) external;
Parameters
Name | Type | Description |
---|---|---|
tokenId | uint256 | The token ID to burn. |
setUri
Sets URI for a linklist.
You can set any URI for your linklist, and the functionality of this URI is undetermined and expandable. One scenario that comes to mind is setting a cover for your liked notes or following list in your bookmarks.
function setUri(uint256 tokenId, string memory uri) external;
Parameters
Name | Type | Description |
---|---|---|
tokenId | uint256 | The token ID to set URI. |
uri | string | The new URI to set. |
setLinkType
Sets the link type of the linklist NFT.
function setLinkType(uint256 tokenId, bytes32 linkType) external;
Parameters
Name | Type | Description |
---|---|---|
tokenId | uint256 | The token ID of linklist to set. |
linkType | bytes32 | The link type to set. |
addLinkingCharacterId
Adds a linked character to a linklist.
function addLinkingCharacterId(uint256 tokenId, uint256 toCharacterId) external;
Parameters
Name | Type | Description |
---|---|---|
tokenId | uint256 | The token ID of linklist. |
toCharacterId | uint256 | The character ID to link. |
removeLinkingCharacterId
Removes a linked character from a linklist.
function removeLinkingCharacterId(uint256 tokenId, uint256 toCharacterId) external;
Parameters
Name | Type | Description |
---|---|---|
tokenId | uint256 | The token ID of linklist. |
toCharacterId | uint256 | The character ID to remove. |
addLinkingNote
Adds a linked note to a linklist.
function addLinkingNote(uint256 tokenId, uint256 toCharacterId, uint256 toNoteId) external returns (bytes32);
Parameters
Name | Type | Description |
---|---|---|
tokenId | uint256 | The token ID of linklist. |
toCharacterId | uint256 | The character ID to link. |
toNoteId | uint256 | The note ID to link. |
Returns
Name | Type | Description |
---|---|---|
<none> | bytes32 | linkKey The link key. |
removeLinkingNote
Removes a linked note from a linklist.
function removeLinkingNote(uint256 tokenId, uint256 toCharacterId, uint256 toNoteId) external;
Parameters
Name | Type | Description |
---|---|---|
tokenId | uint256 | The token ID of linklist. |
toCharacterId | uint256 | The character ID to remove. |
toNoteId | uint256 | The note ID to remove. |
addLinkingERC721
Adds a linked ERC721 to a linklist.
function addLinkingERC721(uint256 tokenId, address tokenAddress, uint256 erc721TokenId) external returns (bytes32);
Parameters
Name | Type | Description |
---|---|---|
tokenId | uint256 | The token ID of linklist. |
tokenAddress | address | The address of ERC721 contract. |
erc721TokenId | uint256 | The token ID of ERC721. |
Returns
Name | Type | Description |
---|---|---|
<none> | bytes32 | linkKey The link key of ERC721. |
removeLinkingERC721
Removes a linked ERC721 from a linklist.
function removeLinkingERC721(uint256 tokenId, address tokenAddress, uint256 erc721TokenId) external;
Parameters
Name | Type | Description |
---|---|---|
tokenId | uint256 | The token ID of linklist. |
tokenAddress | address | The address of ERC721 contract. |
erc721TokenId | uint256 | The token ID of ERC721. |
addLinkingAddress
Adds a linked address to a linklist.
function addLinkingAddress(uint256 tokenId, address ethAddress) external;
Parameters
Name | Type | Description |
---|---|---|
tokenId | uint256 | The token ID of linklist. |
ethAddress | address | The address to link. |
removeLinkingAddress
Removes a linked address from a linklist.
function removeLinkingAddress(uint256 tokenId, address ethAddress) external;
Parameters
Name | Type | Description |
---|---|---|
tokenId | uint256 | The token ID of linklist. |
ethAddress | address | The address to remove. |
addLinkingAnyUri
Adds a linked anyURI to a linklist.
function addLinkingAnyUri(uint256 tokenId, string memory toUri) external returns (bytes32);
Parameters
Name | Type | Description |
---|---|---|
tokenId | uint256 | The token ID of linklist. |
toUri | string | The anyURI to link. |
Returns
Name | Type | Description |
---|---|---|
<none> | bytes32 | linkKey The link key of anyURI. |
removeLinkingAnyUri
Removes a linked anyURI from a linklist.
function removeLinkingAnyUri(uint256 tokenId, string memory toUri) external;
Parameters
Name | Type | Description |
---|---|---|
tokenId | uint256 | The token ID of linklist. |
toUri | string | The anyURI to remove. |
addLinkingLinklistId
Adds a linked linklist to a linklist.
function addLinkingLinklistId(uint256 tokenId, uint256 linklistId) external;
Parameters
Name | Type | Description |
---|---|---|
tokenId | uint256 | The token ID of linklist. |
linklistId | uint256 | The linklist ID to link. |
removeLinkingLinklistId
Removes a linked linklist from a linklist.
function removeLinkingLinklistId(uint256 tokenId, uint256 linklistId) external;
Parameters
Name | Type | Description |
---|---|---|
tokenId | uint256 | The token ID of linklist. |
linklistId | uint256 | The linklist ID to remove. |
getLinkingCharacterIds
Returns the linked character IDs of the linklist NFT.
function getLinkingCharacterIds(uint256 tokenId) external view returns (uint256[] memory);
Parameters
Name | Type | Description |
---|---|---|
tokenId | uint256 | The token ID of linklist to check. |
Returns
Name | Type | Description |
---|---|---|
<none> | uint256[] | The linked character IDs. |
getLinkingCharacterListLength
Returns the length of linked character IDs of the linklist NFT.
function getLinkingCharacterListLength(uint256 tokenId) external view returns (uint256);
Parameters
Name | Type | Description |
---|---|---|
tokenId | uint256 | The token ID of linklist to check. |
Returns
Name | Type | Description |
---|---|---|
<none> | uint256 | The length of linked character IDs . |
getOwnerCharacterId
Returns the character ID who owns the linklist NFT.
function getOwnerCharacterId(uint256 tokenId) external view returns (uint256);
Parameters
Name | Type | Description |
---|---|---|
tokenId | uint256 | The token ID of linklist to check. |
Returns
Name | Type | Description |
---|---|---|
<none> | uint256 | The character ID who owns the linklist NFT. |
getLinkingNotes
Returns the linked notes of the linklist NFT.
function getLinkingNotes(uint256 tokenId) external view returns (DataTypes.NoteStruct[] memory results);
Parameters
Name | Type | Description |
---|---|---|
tokenId | uint256 | The token ID of linklist to check. |
Returns
Name | Type | Description |
---|---|---|
results | DataTypes.NoteStruct[] | The linked notes. |
getLinkingNote
Return the linked note of the linklist NFT by linkKey.
function getLinkingNote(bytes32 linkKey) external view returns (DataTypes.NoteStruct memory);
Parameters
Name | Type | Description |
---|---|---|
linkKey | bytes32 | The link key of the note. |
Returns
Name | Type | Description |
---|---|---|
<none> | DataTypes.NoteStruct | The linked note. |
getLinkingNoteListLength
Returns the length of linked notes of the linklist NFT.
function getLinkingNoteListLength(uint256 tokenId) external view returns (uint256);
Parameters
Name | Type | Description |
---|---|---|
tokenId | uint256 | The token ID of linklist to check. |
Returns
Name | Type | Description |
---|---|---|
<none> | uint256 | The length of linked notes. |
getLinkingERC721s
Returns the linked ERC721s of the linklist NFT.
function getLinkingERC721s(uint256 tokenId) external view returns (DataTypes.ERC721Struct[] memory results);
Parameters
Name | Type | Description |
---|---|---|
tokenId | uint256 | The token ID of linklist to check. |
Returns
Name | Type | Description |
---|---|---|
results | DataTypes.ERC721Struct[] | The linked ERC721s. |
getLinkingERC721
Return the linked ERC721 of the linklist NFT by linkKey.
function getLinkingERC721(bytes32 linkKey) external view returns (DataTypes.ERC721Struct memory);
Parameters
Name | Type | Description |
---|---|---|
linkKey | bytes32 | The link key of the ERC721. |
Returns
Name | Type | Description |
---|---|---|
<none> | DataTypes.ERC721Struct | The linked ERC721. |
getLinkingERC721ListLength
Returns the length of linked ERC721s of the linklist NFT.
function getLinkingERC721ListLength(uint256 tokenId) external view returns (uint256);
Parameters
Name | Type | Description |
---|---|---|
tokenId | uint256 | The token ID of linklist to check. |
Returns
Name | Type | Description |
---|---|---|
<none> | uint256 | The length of linked ERC721s. |
getLinkingAddresses
Returns the linked addresses of the linklist NFT.
function getLinkingAddresses(uint256 tokenId) external view returns (address[] memory);
Parameters
Name | Type | Description |
---|---|---|
tokenId | uint256 | The token ID of linklist to check. |
Returns
Name | Type | Description |
---|---|---|
<none> | address[] | The linked addresses. |
getLinkingAddressListLength
Returns the linked address of the linklist NFT by linkKey.
function getLinkingAddressListLength(uint256 tokenId) external view returns (uint256);
Parameters
Name | Type | Description |
---|---|---|
tokenId | uint256 | The token ID of linklist to check. |
Returns
Name | Type | Description |
---|---|---|
<none> | uint256 | The length of linked address. |
getLinkingAnyUris
Returns the linked anyURIs of the linklist NFT.
function getLinkingAnyUris(uint256 tokenId) external view returns (string[] memory results);
Parameters
Name | Type | Description |
---|---|---|
tokenId | uint256 | The token ID of linklist to check. |
Returns
Name | Type | Description |
---|---|---|
results | string[] | The linked anyURIs. |
getLinkingAnyUri
Return the linked anyURI of the linklist NFT by linkKey.
function getLinkingAnyUri(bytes32 linkKey) external view returns (string memory);
Parameters
Name | Type | Description |
---|---|---|
linkKey | bytes32 | The link key of the anyURI. |
Returns
Name | Type | Description |
---|---|---|
<none> | string | The linked anyURI. |
getLinkingAnyUriKeys
Returns the length of linked anyURIs of the linklist NFT.
function getLinkingAnyUriKeys(uint256 tokenId) external view returns (bytes32[] memory);
Parameters
Name | Type | Description |
---|---|---|
tokenId | uint256 | The token ID of linklist to check. |
Returns
Name | Type | Description |
---|---|---|
<none> | bytes32[] | The length of linked anyURIs. |
getLinkingAnyListLength
Returns the length of linked Uris of the linklist NFT.
function getLinkingAnyListLength(uint256 tokenId) external view returns (uint256);
Parameters
Name | Type | Description |
---|---|---|
tokenId | uint256 | The token ID of linklist to check. |
Returns
Name | Type | Description |
---|---|---|
<none> | uint256 | The length of linked Uris. |
getLinkingLinklistIds
Returns the linked linklists of the linklist NFT.
function getLinkingLinklistIds(uint256 tokenId) external view returns (uint256[] memory);
Parameters
Name | Type | Description |
---|---|---|
tokenId | uint256 | The token ID of linklist to check. |
Returns
Name | Type | Description |
---|---|---|
<none> | uint256[] | The linked linklists. |
getLinkingLinklistLength
Return the length of linked linklist of the linklist NFT.
function getLinkingLinklistLength(uint256 tokenId) external view returns (uint256);
Parameters
Name | Type | Description |
---|---|---|
tokenId | uint256 | The token ID of linklist to check. |
Returns
Name | Type | Description |
---|---|---|
<none> | uint256 | The length of linked linklist. |
getCurrentTakeOver
This function is deprecated..
function getCurrentTakeOver(uint256 tokenId) external view returns (uint256);
getLinkType
Returns the link type of the linklist NFT.
function getLinkType(uint256 tokenId) external view returns (bytes32);
Parameters
Name | Type | Description |
---|---|---|
tokenId | uint256 | The token ID of linklist to check. |
Returns
Name | Type | Description |
---|---|---|
<none> | bytes32 | The link type. |
Uri
Returns the URI of the linklist NFT.
function Uri(uint256 tokenId) external view returns (string memory);
Parameters
Name | Type | Description |
---|---|---|
tokenId | uint256 | The token ID of linklist to check. |
Returns
Name | Type | Description |
---|---|---|
<none> | string | The URI of the linklist NFT. |
characterOwnerOf
Returns the character ID who owns the Linklist NFT.
function characterOwnerOf(uint256 tokenId) external view returns (uint256);
Parameters
Name | Type | Description |
---|---|---|
tokenId | uint256 | The token ID to check. |
Returns
Name | Type | Description |
---|---|---|
<none> | uint256 | The character ID. |
totalSupply
Returns the total supply of the Linklist NFTs.
function totalSupply() external view returns (uint256);
Returns
Name | Type | Description |
---|---|---|
<none> | uint256 | The total supply of the Linklist NFTs. |
balanceOf
Returns the balance of the character.
function balanceOf(uint256 characterId) external view returns (uint256);
Parameters
Name | Type | Description |
---|---|---|
characterId | uint256 | The character ID to check. |
Returns
Name | Type | Description |
---|---|---|
<none> | uint256 | uint256 The balance of the character. |
balanceOf
Returns the balance of the address.
function balanceOf(address account) external view returns (uint256 balance);
Parameters
Name | Type | Description |
---|---|---|
account | address | The address to check. |
Returns
Name | Type | Description |
---|---|---|
balance | uint256 | The balance of the address. |
ownerOf
Returns the owner of the tokenId
token.
function ownerOf(uint256 tokenId) external view returns (address);
Parameters
Name | Type | Description |
---|---|---|
tokenId | uint256 | The token ID to check. |
Returns
Name | Type | Description |
---|---|---|
<none> | address | The owner of the tokenId token. |