🧙‍♂️UserHandles

Register a unique Handle to represent your wallet address within KUTHULU

The UserHandles contract manages user handle changes within KUTHULU, enforcing rules such as maximum length and unique handles, and burning a set amount of DOOM tokens for each handle change.

Table of Contents


Public Functions

updateUserHandle

Description

This function allows a user to update their handle. The handle must be less than maxHandleLength characters. The user must burn costForNameChange DOOM tokens to update their handle.

Inputs

Parameter
Type
Description

handle

string

The new handle that the user wishes to change to.

Outputs

No return value.

Example

Here is an example of how to call updateUserHandle with ethers.js:

const userHandlesContract = new ethers.Contract(contractAddress, abi, signer);

const handle = "new_handle";
await userHandlesContract.updateUserHandle(handle);

checkIfAvailable

Description

This function checks if a handle is available to be registered.

Inputs

Parameter
Type
Description

handle

string

The handle that the user wants to check.

Outputs

Parameter
Type
Description

-

bool

Returns true if the handle is available and false if it is taken.

Example

Here is an example of how to call checkIfAvailable with ethers.js:

const ethers = require('ethers');
const userHandlesContract = new ethers.Contract(contractAddress, abi, signer);

const handle = "check_handle";
const isAvailable = await userHandlesContract.checkIfAvailable(handle);
console.log(`Is the handle available? ${isAvailable}`);

Last updated