Web3Entry

Git Source

Inherits: IWeb3Entry, Multicall, NFTBase, Web3EntryStorage, Initializable, Web3EntryExtendStorage

State Variables

REVISION

uint256 internal constant REVISION = 4;

Functions

validateCallerPermission

modifier validateCallerPermission(uint256 characterId, uint256 permissionId);

onlyExistingToken

modifier onlyExistingToken(uint256 tokenId);

initialize

Initializes the Web3Entry.

function initialize(
    string calldata name_,
    string calldata symbol_,
    address linklist_,
    address mintNFTImpl_,
    address periphery_,
    address newbieVilla_
) external override reinitializer(3);

Parameters

NameTypeDescription
name_stringThe name to set for the web3Entry character NFT.
symbol_stringThe symbol to set for the web3Entry character NFT.
linklist_addressThe address of linklist contract to set.
mintNFTImpl_addressThe address of mintNFTImpl contract to set.
periphery_addressThe address of periphery contract to set.
newbieVilla_addressThe address of newbieVilla contract to set.

grantOperatorPermissions

Grant an address as an operator and authorize it with custom permissions.

Every bit in permissionBitMap stands for a corresponding method in Web3Entry. more details in OP.sol.

function grantOperatorPermissions(uint256 characterId, address operator, uint256 permissionBitMap)
    external
    override
    validateCallerPermission(characterId, OP.GRANT_OPERATOR_PERMISSIONS);

Parameters

NameTypeDescription
characterIduint256ID of your character that you want to authorize.
operatoraddressAddress to grant operator permissions to.
permissionBitMapuint256Bitmap used for finer grained operator permissions controls.

grantOperatorPermissionsWithSig

Grant an address as an operator and authorize it with custom permissions via signature.

Only character owner can call.

function grantOperatorPermissionsWithSig(
    uint256 characterId,
    address operator,
    uint256 permissionBitMap,
    DataTypes.EIP712Signature calldata signature
) external override;

Parameters

NameTypeDescription
characterIduint256ID of your character that you want to authorize.
operatoraddressAddress to grant operator permissions to.
permissionBitMapuint256Bitmap used for finer grained operator permissions controls.
signatureDataTypes.EIP712SignatureThe EIP712Signature struct containing the character owner's signature.

grantOperators4Note

Grant operators allowlist and blocklist roles of a note.

function grantOperators4Note(
    uint256 characterId,
    uint256 noteId,
    address[] calldata blocklist,
    address[] calldata allowlist
) external override validateCallerPermission(characterId, OP.GRANT_OPERATORS_FOR_NOTE);

Parameters

NameTypeDescription
characterIduint256ID of character that you want to set.
noteIduint256ID of note that you want to set.
blocklistaddress[]blocklist addresses that you want to grant.
allowlistaddress[]allowlist addresses that you want to grant.

createCharacter

This method creates a character with the given parameters to the given address.

function createCharacter(DataTypes.CreateCharacterData calldata vars) external override returns (uint256 characterId);

Parameters

NameTypeDescription
varsDataTypes.CreateCharacterDataThe CreateCharacterData struct containing the following parameters: to: The address receiving the character.
handle: The handle to set for the character.
uri: The URI to set for the character metadata.
linkModule: The link module to use, can be the zero address.
linkModuleInitData: The link module initialization data, if any.

setHandle

Sets new handle for a given character.

Owner permission only.

function setHandle(uint256 characterId, string calldata newHandle)
    external
    override
    validateCallerPermission(characterId, OP.SET_HANDLE);

Parameters

NameTypeDescription
characterIduint256The character id to set new handle for.
newHandlestringNew handle to set.

setSocialToken

Sets a social token for a given character.

Owner permission only.

function setSocialToken(uint256 characterId, address tokenAddress)
    external
    override
    validateCallerPermission(characterId, OP.SET_SOCIAL_TOKEN);

Parameters

NameTypeDescription
characterIduint256The characterId to set social token for.
tokenAddressaddressToken address to be set.

setPrimaryCharacterId

Sets a given character as primary.

Only character owner can call this function.

function setPrimaryCharacterId(uint256 characterId) external override;

Parameters

NameTypeDescription
characterIduint256The character id to to be set.

setCharacterUri

Sets a new URI for a given character.

function setCharacterUri(uint256 characterId, string calldata newUri)
    external
    override
    validateCallerPermission(characterId, OP.SET_CHARACTER_URI);

Parameters

NameTypeDescription
characterIduint256The characterId to to be set.
newUristringNew URI to be set.

setLinklistUri

Sets a new metadataURI for a given link list.

function setLinklistUri(uint256 linklistId, string calldata uri) external override;

Parameters

NameTypeDescription
linklistIduint256
uristringThe metadata uri to set.

setLinklistType

Sets a link type for a given linklist.

Emits a {DetachLinklist} event and a {AttachLinklist} event from web3Entry contract..
Emits a {LinkTypeSet} event from linklist contract.
Linklist is the group of all linking objects with the same link type, like "like".
Each character can only have one linklist for each link type.
It will fail if you try to set a link type which is already set for some linklist owned by the same character.

function setLinklistType(uint256 linklistId, bytes32 linkType) external override;

Parameters

NameTypeDescription
linklistIduint256
linkTypebytes32The link type to set.

linkCharacter

Links a character with the given parameters.

function linkCharacter(DataTypes.linkCharacterData calldata vars)
    external
    override
    onlyExistingToken(vars.toCharacterId)
    validateCallerPermission(vars.fromCharacterId, OP.LINK_CHARACTER);

Parameters

NameTypeDescription
varsDataTypes.linkCharacterDataThe linkCharacterData struct containing the linking parameters:
fromCharacterId: The character ID to sponsor a link action.
toCharacterId: The character ID to be linked.
linkType: The link type, like "follow", which is a bytes32 format.
data: The data passed to the link module to use, if any.

unlinkCharacter

Unlinks a character with the given parameters.

function unlinkCharacter(DataTypes.unlinkCharacterData calldata vars)
    external
    override
    validateCallerPermission(vars.fromCharacterId, OP.UNLINK_CHARACTER);

Parameters

NameTypeDescription
varsDataTypes.unlinkCharacterDataThe unlinkCharacterData struct containing the unlinking parameters: fromCharacterId: The character ID to sponsor a unlink action.
toCharacterId: The character ID to be unlinked.
linkType: The link type, like "follow", which is a bytes32 format.

createThenLinkCharacter

Create a character and then link it.

function createThenLinkCharacter(DataTypes.createThenLinkCharacterData calldata vars)
    external
    override
    validateCallerPermission(vars.fromCharacterId, OP.CREATE_THEN_LINK_CHARACTER)
    returns (uint256 characterId);

Parameters

NameTypeDescription
varsDataTypes.createThenLinkCharacterDataThe createThenLinkCharacterData struct containing the parameters:
fromCharacterId: The character ID to sponsor a link action.
to: The address to receive the new character nft.
linkType: The link type, like "follow", which is a bytes32 format.

linkNote

Links a note with the given parameters.

function linkNote(DataTypes.linkNoteData calldata vars)
    external
    override
    validateCallerPermission(vars.fromCharacterId, OP.LINK_NOTE);

Parameters

NameTypeDescription
varsDataTypes.linkNoteDataThe linkNoteData struct containing the linking parameters:
fromCharacterId: The character ID to sponsor a link action.
toCharacterId: The character ID of note to be linked.
toNoteId: The note ID of note to be linked.
linkType: The link type, like "like", which is a bytes32 format.
data: The data passed to the link module to use, if any.

unlinkNote

UnLinks a note with the given parameters.

function unlinkNote(DataTypes.unlinkNoteData calldata vars)
    external
    override
    validateCallerPermission(vars.fromCharacterId, OP.UNLINK_NOTE);

Parameters

NameTypeDescription
varsDataTypes.unlinkNoteDataThe unlinkNoteData struct containing the unlinking parameters:
fromCharacterId: The character ID to sponsor a unlink action.
toCharacterId: The character ID of note to be unlinked.
toNoteId: The note ID of note to be unlinked.
linkType: The link type, like "like", which is a bytes32 format.

linkERC721

Links an ERC721 with the given parameters.

function linkERC721(DataTypes.linkERC721Data calldata vars)
    external
    override
    validateCallerPermission(vars.fromCharacterId, OP.LINK_ERC721);

Parameters

NameTypeDescription
varsDataTypes.linkERC721DataThe linkERC721Data struct containing the linking parameters:
fromCharacterId: The character ID to sponsor a link action.
tokenAddress: The token address of ERC721 to be linked.
tokenId: The token ID of ERC721 to be linked.
linkType: The link type, like "like", which is a bytes32 format.
data: The data passed to the link module to use, if any.

unlinkERC721

Unlinks an ERC721 with the given parameters.

function unlinkERC721(DataTypes.unlinkERC721Data calldata vars)
    external
    override
    validateCallerPermission(vars.fromCharacterId, OP.UNLINK_ERC721);

Parameters

NameTypeDescription
varsDataTypes.unlinkERC721DataThe unlinkERC721Data struct containing the unlinking parameters:
fromCharacterId: The character ID to sponsor a unlink action.
tokenAddress: The token address of ERC721 to be unlinked.
tokenId: The token ID of ERC721 to be unlinked.
linkType: The link type, like "like", which is a bytes32 format.

linkAddress

Links an address with the given parameters.

function linkAddress(DataTypes.linkAddressData calldata vars)
    external
    override
    validateCallerPermission(vars.fromCharacterId, OP.LINK_ADDRESS);

Parameters

NameTypeDescription
varsDataTypes.linkAddressDataThe linkAddressData struct containing the linking parameters:
fromCharacterId: The character ID to sponsor a link action.
ethAddress: The address to be linked.
linkType: The link type, like "like", which is a bytes32 format.
data: The data passed to the link module to use, if any.

unlinkAddress

Unlinks an address with the given parameters.

function unlinkAddress(DataTypes.unlinkAddressData calldata vars)
    external
    override
    validateCallerPermission(vars.fromCharacterId, OP.UNLINK_ADDRESS);

Parameters

NameTypeDescription
varsDataTypes.unlinkAddressDataThe unlinkAddressData struct containing the unlinking parameters:
fromCharacterId: The character ID to sponsor a unlink action.
ethAddress: The address to be unlinked.
linkType: The link type, like "like", which is a bytes32 format.

linkAnyUri

Links any uri with the given parameters.

function linkAnyUri(DataTypes.linkAnyUriData calldata vars)
    external
    override
    validateCallerPermission(vars.fromCharacterId, OP.LINK_ANYURI);

Parameters

NameTypeDescription
varsDataTypes.linkAnyUriDataThe linkAnyUriData struct containing the linking parameters:
fromCharacterId: The character ID to sponsor a link action.
toUri: The uri to be linked.
linkType: The link type, like "like", which is a bytes32 format.
data: The data passed to the link module to use, if any.

unlinkAnyUri

Unlinks any uri with the given parameters.

function unlinkAnyUri(DataTypes.unlinkAnyUriData calldata vars)
    external
    override
    validateCallerPermission(vars.fromCharacterId, OP.UNLINK_ANYURI);

Parameters

NameTypeDescription
varsDataTypes.unlinkAnyUriDataThe unlinkAnyUriData struct containing the unlinking parameters:
fromCharacterId: The character ID to sponsor a unlink action.
toUri: The uri to be unlinked.
linkType: The link type, like "like", which is a bytes32 format.

Links a linklist with the given parameters.

function linkLinklist(DataTypes.linkLinklistData calldata vars)
    external
    override
    validateCallerPermission(vars.fromCharacterId, OP.LINK_LINKLIST);

Parameters

NameTypeDescription
varsDataTypes.linkLinklistDataThe linkLinklistData struct containing the linking parameters:
fromCharacterId: The character ID to sponsor a link action.
toLinkListId: The linklist ID to be linked.
linkType: The link type, like "like", which is a bytes32 format.
data: The data passed to the link module to use, if any.

Unlinks a linklist with the given parameters.

function unlinkLinklist(DataTypes.unlinkLinklistData calldata vars)
    external
    override
    validateCallerPermission(vars.fromCharacterId, OP.UNLINK_LINKLIST);

Parameters

NameTypeDescription
varsDataTypes.unlinkLinklistDataThe unlinkLinklistData struct containing the unlinking parameters:
fromCharacterId: The character ID to sponsor a unlink action.
toLinkListId: The linklist ID to be unlinked.
linkType: The link type, like "like", which is a bytes32 format.

setLinkModule4Character

Sets a link module for a given character.

function setLinkModule4Character(DataTypes.setLinkModule4CharacterData calldata vars)
    external
    override
    validateCallerPermission(vars.characterId, OP.SET_LINK_MODULE_FOR_CHARACTER);

Parameters

NameTypeDescription
varsDataTypes.setLinkModule4CharacterDataThe setLinkModule4CharacterData struct containing the parameters:
characterId: The character ID to set for.
linkModule: The address of link module contract to set.
linkModuleInitData: The data passed to the link module to use, if any.

setLinkModule4Note

Sets a link module for a given note.

function setLinkModule4Note(DataTypes.setLinkModule4NoteData calldata vars)
    external
    override
    validateCallerPermission(vars.characterId, OP.SET_LINK_MODULE_FOR_NOTE);

Parameters

NameTypeDescription
varsDataTypes.setLinkModule4NoteDataThe setLinkModule4NoteData struct containing the parameters:
characterId: The character ID to set for.
noteId: The note ID to set for.
linkModule: The address of link module contract to set.
linkModuleInitData: The data passed to the link module to use, if any.

mintNote

Mints an nft with the given note.

function mintNote(DataTypes.MintNoteData calldata vars) external override returns (uint256 tokenId);

Parameters

NameTypeDescription
varsDataTypes.MintNoteDataThe MintNoteData struct containing the minting parameters:
characterId: The character ID of the note.
noteId: The note ID of the note.
to: The address to receive the minted nft.
data: The data passed to the mint module to use, if any.

setMintModule4Note

Sets a mint module for the given note.

function setMintModule4Note(DataTypes.setMintModule4NoteData calldata vars)
    external
    override
    validateCallerPermission(vars.characterId, OP.SET_MINT_MODULE_FOR_NOTE);

Parameters

NameTypeDescription
varsDataTypes.setMintModule4NoteDataThe setMintModule4NoteData struct containing the setting parameters:
characterId: The character ID of the note.
noteId: The note ID of the note.
mintModule: The address of mint module to set.
mintModuleInitData: The data passed to the mint module to init, if any.

postNote

Posts a note with the given parameters.

function postNote(DataTypes.PostNoteData calldata vars)
    external
    override
    validateCallerPermission(vars.characterId, OP.POST_NOTE)
    returns (uint256 noteId);

Parameters

NameTypeDescription
varsDataTypes.PostNoteDataThe postNoteData struct containing the posting parameters:
characterId: The character ID to post to.
contentUri: The uri to set for the new post.
linkModule: The address of link module to set for the new post.
linkModuleInitData: The data passed to the link module to init, if any.
mintModule: The address of mint module to set for the new post.
mintModuleInitData: The data passed to the mint module to init, if any.

setNoteUri

Set URI for a note.

function setNoteUri(uint256 characterId, uint256 noteId, string calldata newUri) external override;

Parameters

NameTypeDescription
characterIduint256The character ID of the note owner.
noteIduint256The ID of the note to set.
newUristringThe new URI.

lockNote

Lock a note and put it into a immutable state where no modifications are allowed. Locked notes are usually assumed as final versions.

function lockNote(uint256 characterId, uint256 noteId)
    external
    override
    validateCallerPermission(characterId, OP.LOCK_NOTE);

Parameters

NameTypeDescription
characterIduint256The character ID of the note owner.
noteIduint256The ID of the note to lock.

deleteNote

Delete a note.

Deleting a note doesn't essentially mean that the txs or contents are being removed due to the immutability of blockchain itself, but the deleted notes will be tagged as deleted after calling deleteNote.

function deleteNote(uint256 characterId, uint256 noteId)
    external
    override
    validateCallerPermission(characterId, OP.DELETE_NOTE);

Parameters

NameTypeDescription
characterIduint256The character ID of the note owner.
noteIduint256The ID of the note to delete.

postNote4Character

Posts a note for a given character.

function postNote4Character(DataTypes.PostNoteData calldata vars, uint256 toCharacterId)
    external
    override
    validateCallerPermission(vars.characterId, OP.POST_NOTE_FOR_CHARACTER)
    returns (uint256 noteId);

Parameters

NameTypeDescription
varsDataTypes.PostNoteDataThe postNoteData struct containing the posting parameters:
characterId: The character ID to post to.
contentUri: The uri to set for the new post.
linkModule: The address of link module to set for the new post.
linkModuleInitData: The data passed to the link module to init, if any.
mintModule: The address of mint module to set for the new post.
mintModuleInitData: The data passed to the mint module to init, if any.
toCharacterIduint256The target character ID.

Returns

NameTypeDescription
noteIduint256The note ID of the new post.

postNote4Address

Posts a note for a given address.

function postNote4Address(DataTypes.PostNoteData calldata vars, address ethAddress)
    external
    override
    validateCallerPermission(vars.characterId, OP.POST_NOTE_FOR_ADDRESS)
    returns (uint256 noteId);

Parameters

NameTypeDescription
varsDataTypes.PostNoteDataThe postNoteData struct containing the posting parameters:
characterId: The character ID to post to.
contentUri: The uri to set for the new post.
linkModule: The address of link module to set for the new post.
linkModuleInitData: The data passed to the link module to init, if any.
mintModule: The address of mint module to set for the new post.
mintModuleInitData: The data passed to the mint module to init, if any.
ethAddressaddressThe target address.

Returns

NameTypeDescription
noteIduint256The note ID of the new post.

Posts a note for a given linklist.

function postNote4Linklist(DataTypes.PostNoteData calldata vars, uint256 toLinklistId)
    external
    override
    validateCallerPermission(vars.characterId, OP.POST_NOTE_FOR_LINKLIST)
    returns (uint256 noteId);

Parameters

NameTypeDescription
varsDataTypes.PostNoteDataThe postNoteData struct containing the posting parameters:
characterId: The character ID to post to.
contentUri: The uri to set for the new post.
linkModule: The address of link module to set for the new post.
linkModuleInitData: The data passed to the link module to init, if any.
mintModule: The address of mint module to set for the new post.
mintModuleInitData: The data passed to the mint module to init, if any.
toLinklistIduint256The target linklist.

Returns

NameTypeDescription
noteIduint256The note ID of the new post.

postNote4Note

Posts a note for a given note.

function postNote4Note(DataTypes.PostNoteData calldata vars, DataTypes.NoteStruct calldata note)
    external
    override
    validateCallerPermission(vars.characterId, OP.POST_NOTE_FOR_NOTE)
    returns (uint256 noteId);

Parameters

NameTypeDescription
varsDataTypes.PostNoteDataThe postNoteData struct containing the posting parameters:
characterId: The character ID to post to.
contentUri: The uri to set for the new post.
linkModule: The address of link module to set for the new post.
linkModuleInitData: The data passed to the link module to init, if any.
mintModule: The address of mint module to set for the new post.
mintModuleInitData: The data passed to the mint module to init, if any.
noteDataTypes.NoteStructThe target note struct containing the parameters:
characterId: The character ID of target note.
noteId: The note ID of target note.

Returns

NameTypeDescription
noteIduint256The note ID of the new post.

postNote4ERC721

Posts a note for a given ERC721.

function postNote4ERC721(DataTypes.PostNoteData calldata vars, DataTypes.ERC721Struct calldata erc721)
    external
    override
    validateCallerPermission(vars.characterId, OP.POST_NOTE_FOR_ERC721)
    returns (uint256 noteId);

Parameters

NameTypeDescription
varsDataTypes.PostNoteDataThe postNoteData struct containing the posting parameters:
characterId: The character ID to post to.
contentUri: The uri to set for the new post.
linkModule: The address of link module to set for the new post.
linkModuleInitData: The data passed to the link module to init, if any.
mintModule: The address of mint module to set for the new post.
mintModuleInitData: The data passed to the mint module to init, if any.
erc721DataTypes.ERC721StructThe target ERC721 struct containing the parameters:
tokenAddress: The token address of target ERC721.
erc721TokenId: The token ID of target ERC721.

Returns

NameTypeDescription
noteIduint256The note ID of the new post.

postNote4AnyUri

Posts a note for a given uri.

function postNote4AnyUri(DataTypes.PostNoteData calldata vars, string calldata uri)
    external
    override
    validateCallerPermission(vars.characterId, OP.POST_NOTE_FOR_ANYURI)
    returns (uint256 noteId);

Parameters

NameTypeDescription
varsDataTypes.PostNoteDataThe postNoteData struct containing the posting parameters:
characterId: The character ID to post to.
contentUri: The uri to set for the new post.
linkModule: The address of link module to set for the new post.
linkModuleInitData: The data passed to the link module to init, if any.
mintModule: The address of mint module to set for the new post.
mintModuleInitData: The data passed to the mint module to init, if any.
uristringThe target uri(could be an url link).

Returns

NameTypeDescription
noteIduint256The note ID of the new post.

Burns a linklist NFT.

It will burn the linklist NFT and remove the links from a character.

function burnLinklist(uint256 linklistId) external override;

Parameters

NameTypeDescription
linklistIduint256The linklist ID to burn.

getOperators

Get operator list of a character. This operator list has only a sole purpose, which is keeping records of keys of operatorsPermissionBitMap. Thus, addresses queried by this function not always have operator permissions. Keep in mind don't use this function to check authorizations!!!

function getOperators(uint256 characterId) external view override returns (address[] memory);

Parameters

NameTypeDescription
characterIduint256ID of your character that you want to check.

Returns

NameTypeDescription
<none>address[]All keys of operatorsPermission4NoteBitMap.

getOperatorPermissions

Get permission bitmap of an operator.

function getOperatorPermissions(uint256 characterId, address operator) external view override returns (uint256);

Parameters

NameTypeDescription
characterIduint256ID of character that you want to check.
operatoraddressAddress to grant operator permissions to.

Returns

NameTypeDescription
<none>uint256Permission bitmap of this operator.

getOperators4Note

Get operators blocklist and allowlist for a note.

function getOperators4Note(uint256 characterId, uint256 noteId)
    external
    view
    override
    returns (address[] memory blocklist, address[] memory allowlist);

Parameters

NameTypeDescription
characterIduint256ID of character to query.
noteIduint256ID of note to query.

isOperatorAllowedForNote

Query if a operator has permission for a note.

function isOperatorAllowedForNote(uint256 characterId, uint256 noteId, address operator)
    external
    view
    override
    returns (bool);

Parameters

NameTypeDescription
characterIduint256ID of character that you want to query.
noteIduint256ID of note that you want to query.
operatoraddressAddress to query.

Returns

NameTypeDescription
<none>booltrue if Operator has permission for a note, otherwise false.

getPrimaryCharacterId

Returns primary character for a given account.

function getPrimaryCharacterId(address account) external view override returns (uint256);

Parameters

NameTypeDescription
accountaddressThe address to query.

Returns

NameTypeDescription
<none>uint256uint256 The primary character ID, which will be 0 if not mapped.

isPrimaryCharacter

Returns whether or not a character is primary character.

function isPrimaryCharacter(uint256 characterId) external view override returns (bool);

Parameters

NameTypeDescription
characterIduint256The character ID to query.

Returns

NameTypeDescription
<none>boolbool True if the character is primary, false otherwise.

getCharacter

Returns the full character struct associated with a given character token ID.

function getCharacter(uint256 characterId)
    external
    view
    override
    onlyExistingToken(characterId)
    returns (DataTypes.Character memory);

Parameters

NameTypeDescription
characterIduint256The token ID of the character to query.

Returns

NameTypeDescription
<none>DataTypes.CharacterThe full character struct of given character.

getCharacterByHandle

Returns the full character struct associated with a given character handle.

function getCharacterByHandle(string calldata handle) external view override returns (DataTypes.Character memory);

Parameters

NameTypeDescription
handlestringThe handle of the character to query.

Returns

NameTypeDescription
<none>DataTypes.CharacterThe full character struct of given character.

getHandle

Returns the handle of character with a given character.

function getHandle(uint256 characterId) external view override onlyExistingToken(characterId) returns (string memory);

Parameters

NameTypeDescription
characterIduint256The token ID of the character to query.

Returns

NameTypeDescription
<none>stringThe handle of given character.

getCharacterUri

Returns the uri of character with a given character.

function getCharacterUri(uint256 characterId) external view override returns (string memory);

Parameters

NameTypeDescription
characterIduint256The token ID of the character to query.

Returns

NameTypeDescription
<none>stringThe uri of given character.

getNote

Returns the full note struct associated with a given note.

function getNote(uint256 characterId, uint256 noteId) external view override returns (DataTypes.Note memory);

Parameters

NameTypeDescription
characterIduint256The token ID of the character to query.
noteIduint256The token ID of the note to query.

Returns

NameTypeDescription
<none>DataTypes.NoteThe full note struct of given note.

getLinklistUri

Returns the uri of linklist with a given linklist.

function getLinklistUri(uint256 tokenId) external view override returns (string memory);

Parameters

NameTypeDescription
tokenIduint256The token ID of the linklist to query.

Returns

NameTypeDescription
<none>stringstring The uri of given linklist.

getLinklistId

Returns the token ID of linklist with a given character and linkType.

function getLinklistId(uint256 characterId, bytes32 linkType) external view override returns (uint256);

Parameters

NameTypeDescription
characterIduint256The token ID of the character to query.
linkTypebytes32The linkType.

Returns

NameTypeDescription
<none>uint256The token ID of linklist.

getLinklistType

Returns the linkType of linklist with a given linklist.

function getLinklistType(uint256 linkListId) external view override returns (bytes32);

Parameters

NameTypeDescription
linkListIduint256The token ID of the linklist to query.

Returns

NameTypeDescription
<none>bytes32bytes32 The linkType of given linklist.

getLinklistContract

Returns the address of linklist contract.

function getLinklistContract() external view override returns (address);

Returns

NameTypeDescription
<none>addressThe address of linklist contract.

getDomainSeparator

Returns the domain separator for this NFT contract.

function getDomainSeparator() external view override returns (bytes32);

Returns

NameTypeDescription
<none>bytes32bytes32 The domain separator.

nonces

Returns the current nonce for owner. This value must be included whenever a signature is generated by grantOperatorPermissionsWithSig. Every successful call to grantOperatorPermissionsWithSig increases owner's nonce by one. This prevents a signature from being used multiple times.

function nonces(address owner) external view override returns (uint256);

Parameters

NameTypeDescription
owneraddressThe owner address to query.

Returns

NameTypeDescription
<none>uint256uint256 The current nonce for owner.

getRevision

Returns the revision number of web3Entry contract.

function getRevision() external pure override returns (uint256);

Returns

NameTypeDescription
<none>uint256The the revision number of web3Entry contract.

burn

Burns a web3Entry character nft.

function burn(uint256 tokenId) public virtual override;

Parameters

NameTypeDescription
tokenIduint256The token ID to burn.

tokenURI

Returns the associated URI with a given character.

function tokenURI(uint256 characterId) public view override onlyExistingToken(characterId) returns (string memory);

Parameters

NameTypeDescription
characterIduint256The character ID to query.

Returns

NameTypeDescription
<none>stringThe token URI.

_createCharacter

function _createCharacter(DataTypes.CreateCharacterData memory vars, bool validateHandle)
    internal
    returns (uint256 characterId);

_beforeTokenTransfer

Operators will be reset to blank before the characters are transferred in order to grant the whole control power to receivers of character transfers. If character is transferred from newbieVilla contract, don't clear operators. Permissions4Note is left unset, because permissions for notes are always stricter than default.

function _beforeTokenTransfer(address from, address to, uint256 tokenId) internal virtual override;

_afterTokenTransfer

function _afterTokenTransfer(address from, address to, uint256 tokenId) internal virtual override;

_nextNoteId

function _nextNoteId(uint256 characterId) internal returns (uint256);

_isOperatorAllowedForNote

It will first check note permission, and then check operators permission.

function _isOperatorAllowedForNote(uint256 characterId, uint256 noteId, address operator)
    internal
    view
    returns (bool);

_validateCallerPermission

function _validateCallerPermission(uint256 characterId, uint256 permissionId) internal view;

_callerIsCharacterOwner

function _callerIsCharacterOwner(address caller, uint256 characterId) internal view returns (bool);

_validateCallerPermission4Note

function _validateCallerPermission4Note(uint256 characterId, uint256 noteId) internal view;

_checkBit

_checkBit checks if the value of the i'th bit of x is 1

function _checkBit(uint256 x, uint256 i) internal pure returns (bool);

_addressToHexString

_addressToHexString converts an address to its ASCII `string hexadecimal representation.

function _addressToHexString(address addr) internal pure returns (string memory);

_handleHash

function _handleHash(string memory handle) internal pure returns (bytes32);