👻SOULS
ERC-1155 Tokens that are used to re-roll when minting Kultists
Table of Contents
getTopAmuletOwned
Description: This function can be used to retrieve the highest level of an Amulet owned by a specific wallet.
user
The address of the wallet to lookup
address
uint256
The level of the top amulet the given wallet owns
uint256
Example
const user = "0xAddressOfTheWalletToLookup";
const topAmuletOwned = await contract.getTopAmuletOwned(user);
console.log("Top Amulet Level:", topAmuletOwned);
remainingToMint
Description: This function is used to determine how many SOULS a user can mint based on their ownership of the top-level Amulet.
user
The address of the wallet to lookup
address
uint256
The amount of SOULS left that the user can mint
uint256
Example
const user = "0xAddressOfTheWalletToLookup";
const remainingSoulsToMint = await contract.remainingToMint(user);
console.log("Remaining SOULS to mint:", remainingSoulsToMint);
burnSoul
Description: This function enables a user to burn a SOUL token. By burning a SOUL token, the user can gain a re-roll when minting a Kultist.
amount
The number of SOULS the user wants to burn
uint256
Example
const amount = 5; // Amount of SOULS to burn
await contract.burnSoul(amount);
console.log(`Burned ${amount} SOULS for re-rolls`);
Note: Since the burnSoul
function is nonReentrant and modifies the state of the contract, make sure to handle it appropriately in a transactional context.
Last updated