ILensHandles

Git Source

Inherits: IERC721

Author: Lens Protocol

This is the interface for the LensHandles contract that is responsible for minting and burning handle NFTs. A handle is composed of a local name and a namespace, separated by a dot. Example: satoshi.lens is a handle composed of the local name satoshi and the namespace lens.

Functions

mintHandle

Mints a handle NFT in the given namespace.

function mintHandle(address to, string calldata localName) external returns (uint256);

Parameters

NameTypeDescription
toaddressThe address to mint the handle to.
localNamestringThe local name of the handle (the part before ".lens").

Returns

NameTypeDescription
<none>uint256uint256 The ID of the handle NFT minted.

burn

Burns a handle NFT.

function burn(uint256 tokenId) external;

Parameters

NameTypeDescription
tokenIduint256The ID of the handle NFT to burn.

getNamespace

Gets the namespace of the contract. It's 'lens' for the LensHandles contract.

function getNamespace() external pure returns (string memory);

Returns

NameTypeDescription
<none>stringstring The namespace of the contract.

getNamespaceHash

Gets the hash of the namespace of the contract. It's keccak256('lens') for the LensHandles contract.

function getNamespaceHash() external pure returns (bytes32);

Returns

NameTypeDescription
<none>bytes32bytes32 The hash of the namespace of the contract.

exists

Returns whether tokenId exists. Tokens start existing when they are minted (_mint), and stop existing when they are burned (_burn).

function exists(uint256 tokenId) external view returns (bool);

Returns

NameTypeDescription
<none>boolbool Whether the token exists.