🛐Kultists

ERC-721 Tokens of 1,000 Loyal KUTHULU Followers that ear massive rewards

Table of Contents


getWhaleSizes

Description

This function retrieves the list of whale sizes (token amounts owned by addresses) within the contract.

Input and Return Variables

Variable
Type
Description

(return)

uint256[]

List of token amounts that are owned by an address

Example

const contract = new ethers.Contract(contractAddress, contractABI, signer);

async function fetchWhaleSizes() {
  const whaleSizes = await contract.getWhaleSizes();
  console.log(whaleSizes);
}

getWhales

Description

This function retrieves the list of addresses that own a specific amount of tokens, specified by the level parameter.

Input and Return Variables

Variable
Type
Description

level

uint256

The amount of tokens owned by a single address

(return)

address[]

List of addresses that own that many tokens

Example

const contract = new ethers.Contract(contractAddress, contractABI, signer);
const level = 1000;

async function fetchWhales() {
  const whales = await contract.getWhales(level);
  console.log(whales);
}

getReRollCount

Description

This function retrieves the number of re-rolls that a wallet has when minting a Kultist, specified by the user parameter.

Input and Return Variables

Variable
Type
Description

user

address

The wallet address of the user to lookup

(return)

uint256

The number of re-rolls a wallet has

Example

const contract = new ethers.Contract(contractAddress, contractABI, signer);
const user = '0xYourWalletAddress';

async function fetchReRollCount() {
  const reRollCount = await contract.getReRollCount(user);
  console.log(reRollCount);
}

getTokenDetails

Description

This function retrieves details of a token with the given tokenID, including its summoning and reveal status and re-roll count.

Input and Return Variables

Variable
Type
Description

tokenID

uint256

The ID of the token to lookup

(return)

uint256[]

Will return the details of the token

Example

const contract = new ethers.Contract(contractAddress, contractABI, signer);
const tokenID = 1234;

async function fetchTokenDetails() {
  const tokenDetails = await contract.getTokenDetails(tokenID);
  console.log(tokenDetails);
}

tokenURI

Description

This function retrieves the token metadata URI for the given _tokenID, which could be different based on the revealed or summoned status of the token.

Input and Return Variables

Variable
Type
Description

_tokenID

uint256

The unique Group ID

(return)

string

The unique ID of the group

Example

const contract = new ethers.Contract(contractAddress, contractABI, signer);
const _tokenID = 5678;

async function fetchTokenURI() {
  const uri = await contract.tokenURI(_tokenID);
  console.log(uri);
}

Last updated