Amulets
Amulets give powers to those that hold them.
Table of Contents
KUTHULU Functions
KuthuluHook
The KuthuluHook
function can only be invoked by trusted contracts. It is used to mint a new Amulet if a post is considered as a "real post", having a non-zero msgID
, exactly one tagged account (or two if tipERC20Amount
is greater than zero), and the tagged account equals vaultAddress
, and the tips received equals costToMint
.
Inputs
newMsg
MsgData memory
The struct containing the details about the new message
Returns
bool
Returns true if the function call was successful
Example
Public Functions
getWhaleSizes
The getWhaleSizes
function is used to get a list of token amounts owned by any address.
Inputs
None
Returns
uint256[] memory
Returns an array containing the number of tokens owned by any address
Example
getWhales
The getWhales
function is used to get the list of addresses that own a specific number of tokens.
Inputs
level
uint256
The number of tokens owned by a single address
Returns
address[] memory
Returns an array containing the addresses that own the number of tokens specified in level
Example
tokenURI
The tokenURI
function is used to get the metadata of the token.
Inputs
_tokenID
uint256
The unique Group ID
Returns
string memory
Returns the metadata of the token as a string
Example
getAmuletType
The getAmuletType
function is used to get the type of amulet a token is by its ID.
Inputs
amuletID
uint256
The Amulet token ID
Returns
uint256[] memory
Returns an array containing the badgeID and the amulet type
Example
kuthuluVerifyBadgeType
The kuthuluVerifyBadgeType
function is used to verify if a badge type ID exists for the address invoking the function.
Inputs
badgeTypeID
uint256
The Badge type ID
owner
address
Address of the badge holder
Returns
bool
Returns true if the badge type ID exists, otherwise returns false
Example
Multi-Sig Functions
addMultiSigLock
The addMultiSigLock
function is used to add multi-signature address locking for transfers. The function can only be invoked by the token owner.
Inputs
tokenID
uint256
The token's unique ID
_addresses
address[]
The array of addresses required for multi-signature approval
Returns
bool
Returns true if the function call was successful
Example
removeMultiSigLock
The removeMultiSigLock
function is used to remove multi-signature address locking for transfers. The function can only be invoked by the token owner.
Inputs
tokenID
uint256
The token's unique ID
Returns
bool
Returns true if the function call was successful
Example
approveMultiSigTransfer
The approveMultiSigTransfer
function is used to approve a multi-signature transfer for a token. The function can only be invoked by one of the addresses in the multi-signature array.
Inputs
tokenID
uint256
The token's unique ID
to
address
The address to which the token is being transferred
Returns
bool
Returns true if the function call was successful
Example
isMultiSigApproved
The isMultiSigApproved
function is used to check if a multi-signature transfer for a token has been approved.
Inputs
tokenID
uint256
The token's unique ID
to
address
The address to which the token is being transferred
Returns
bool
Returns true if the transfer is approved, false otherwise
Example
Last updated