ILensHandles
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
Name | Type | Description |
---|---|---|
to | address | The address to mint the handle to. |
localName | string | The local name of the handle (the part before ".lens"). |
Returns
Name | Type | Description |
---|---|---|
<none> | uint256 | uint256 The ID of the handle NFT minted. |
burn
Burns a handle NFT.
function burn(uint256 tokenId) external;
Parameters
Name | Type | Description |
---|---|---|
tokenId | uint256 | The 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
Name | Type | Description |
---|---|---|
<none> | string | string 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
Name | Type | Description |
---|---|---|
<none> | bytes32 | bytes32 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
Name | Type | Description |
---|---|---|
<none> | bool | bool Whether the token exists. |