🎟️RaffleTix

Raffle Tickets are awarded to users for participating in the KUTHULU ecosystem. They are used to grant access to NFT mints and other rewards. They can also be purchased with MATIC.

RaffleTix is a smart contract used to manage raffle tickets which are minted as NFTs (ERC-1155). It also includes administrative functionalities, like managing raffle ticket claim by users, observing whale activities, and handling multi-signature locks for transfers.

Table of Contents


Public Functions

mintTix

The mintTix function allows a user to mint themselves a new Raffle Tix. It only allows for up to 10 Raffle Tix to be minted at a time, to prevent spamming.

Parameters

Name
Type
Description

quantity

uint256

The amount of Raffle Tix a user wishes to mint.

const ethers = require('ethers');
const provider = new ethers.providers.JsonRpcProvider('<rpc-url>');
const signer = new ethers.Wallet('<private-key>', provider);
const contract = new ethers.Contract('<contract-address>', abi, signer);

let quantity = 5;

async function mintRaffleTix() {
    let tx = await contract.mintTix(quantity, { value: ethers.utils.parseEther((costToMint * quantity).toString()) });
    console.log(tx.hash);
}
mintRaffleTix();

claimTix

The claimTix function allows a user to claim their awarded Raffle Tix. This function can be called only if a user has Raffle Tix to claim.


checkTix

The checkTix function checks the amount of Raffle Tix a user can claim.

Parameters

Name
Type
Description

user

address

Address to check the number of claimable Raffle Tix.


getWhaleSizes

The getWhaleSizes function returns a list of token amounts owned by addresses.


getWhales

The getWhales function returns a list of addresses owning a certain amount of tokens.

Parameters

Name
Type
Description

level

uint256

The amount of tokens owned by a single address.


tokenURI

The tokenURI function returns the token metadata URI for a given token ID.

Parameters

Name
Type
Description

_tokenID

uint256

The unique token ID.

Multi-Sig Functions

addMultiSigLock

The addMultiSigLock function is used to add a MultiSig address for locking token transfers.

Parameters

Name
Type
Description

tokenID

uint256

The token ID to lock with the multi-sig address.

multiSigAddress

address

The wallet address to be used to lock the token with.


activateMultiSigLock

The activateMultiSigLock function activates the MultiSig lock added to a token.

Parameters

Name
Type
Description

tokenID

uint256

The token ID to lock with the multi-sig address.


removeMultiSigLock

The removeMultiSigLock function removes a MultiSig lock from a token.

Parameters

Name
Type
Description

tokenID

uint256

The token ID to unlock with the multi-sig address.


getMultiSigAddress

The getMultiSigAddress function returns the MultiSig address associated with a token.

Parameters

Name
Type
Description

tokenID

uint256

The token ID to return the multi-sig address for.


isMultiSigLocked

The isMultiSigLocked function checks if a token is locked.

Parameters

Name
Type
Description

tokenID

uint256

The token ID to check for the multi-sig lock.


Last updated