AavegotchiGameFacet
ClaimAavegotchi
This emits when an operator is enabled or disabled for an owner. The operator can manage all NFTs of the owner.
SetAavegotchiName
SetBatchId
SpendSkillpoints
LockAavegotchi
UnLockAavegotchi
aavegotchiNameAvailable
Check if a string _name
has not been assigned to another NFT
Parameters
Name | Type | Description |
---|---|---|
_name | string | Name to check |
Return Values
Name | Type | Description |
---|---|---|
available_ | bool | True if the name has not been taken, False otherwise |
currentHaunt
Check the latest Haunt identifier and details
Return Values
Name | Type | Description |
---|---|---|
hauntId_ | uint256 | The latest haunt identifier |
haunt_ | struct Haunt | A struct containing the details about the latest haunt` |
RevenueSharesIO
revenueShares
Check all addresses relating to revenue deposits including the burn address
Return Values
Name | Type | Description |
---|---|---|
[0] | struct AavegotchiGameFacet.RevenueSharesIO | RevenueSharesIO A struct containing all addresses relating to revenue deposits |
portalAavegotchiTraits
Query all details associated with an NFT like collateralType,numericTraits e.t.c
Parameters
Name | Type | Description |
---|---|---|
_tokenId | uint256 | Identifier of the NFT to query |
Return Values
Name | Type | Description |
---|---|---|
portalAavegotchiTraits_ | struct PortalAavegotchiTraitsIO[10] | A struct containing all details about the NFT with identifier |
ghstAddress
Query the $GHST token address
Return Values
Name | Type | Description |
---|---|---|
contract_ | address | the deployed address of the $GHST token contract |
getNumericTraits
Query the numeric traits of an NFT
Only valid for claimed Aavegotchis
Parameters
Name | Type | Description |
---|---|---|
_tokenId | uint256 | The identifier of the NFT to query |
Return Values
Name | Type | Description |
---|---|---|
numericTraits_ | int16[6] | A six-element array containing integers,each representing the traits of the NFT with identifier |
availableSkillPoints
Query the available skill points that can be used for an NFT
Will throw if the amount of skill points available is greater than or equal to the amount of skill points which have been used
Parameters
Name | Type | Description |
---|---|---|
_tokenId | uint256 | The identifier of the NFT to query |
Return Values
Name | Type | Description |
---|---|---|
[0] | uint256 | An unsigned integer which represents the available skill points of an NFT with identifier |
aavegotchiLevel
Calculate level given the XP(experience points)
Only valid for claimed Aavegotchis
Parameters
Name | Type | Description |
---|---|---|
_experience | uint256 | the current XP gathered by an NFT |
Return Values
Name | Type | Description |
---|---|---|
level_ | uint256 | The level of an NFT with experience |
xpUntilNextLevel
Calculate the XP needed for an NFT to advance to the next level
Only valid for claimed Aavegotchis
Parameters
Name | Type | Description |
---|---|---|
_experience | uint256 | The current XP points gathered by an NFT |
Return Values
Name | Type | Description |
---|---|---|
requiredXp_ | uint256 | The XP required for the NFT to move to the next level |
rarityMultiplier
Compute the rarity multiplier of an NFT
Only valid for claimed Aavegotchis
Parameters
Name | Type | Description |
---|---|---|
_numericTraits | int16[6] | An array of six integers each representing a numeric trait of an NFT return multiplier_ The rarity multiplier of an NFT with numeric traits |
baseRarityScore
Calculates the base rarity score, including collateral modifier
Only valid for claimed Aavegotchis
Parameters
Name | Type | Description |
---|---|---|
_numericTraits | int16[6] | An array of six integers each representing a numeric trait of an NFT |
Return Values
Name | Type | Description |
---|---|---|
rarityScore_ | uint256 | The base rarity score of an NFT with numeric traits |
modifiedTraitsAndRarityScore
Check the modified traits and rarity score of an NFT(as a result of equipped wearables)
Only valid for claimed Aavegotchis
Parameters
Name | Type | Description |
---|---|---|
_tokenId | uint256 | Identifier of the NFT to query |
Return Values
Name | Type | Description |
---|---|---|
numericTraits_ | int16[6] | An array of six integers each representing a numeric trait(modified) of an NFT with identifier |
rarityScore_ | uint256 | The modified rarity score of an NFT with identifier |
kinship
Check the kinship of an NFT
Only valid for claimed Aavegotchis Default kinship value is 50
Parameters
Name | Type | Description |
---|---|---|
_tokenId | uint256 | Identifier of the NFT to query |
Return Values
Name | Type | Description |
---|---|---|
score_ | uint256 | The kinship of an NFT with identifier |
TokenIdsWithKinship
tokenIdsWithKinship
Query the tokenId,kinship and lastInteracted values of a set of NFTs belonging to an address
Will throw if _count
is greater than the number of NFTs owned by _owner
Parameters
Name | Type | Description |
---|---|---|
_owner | address | Address to query |
_count | uint256 | Number of NFTs to check |
_skip | uint256 | Number of NFTs to skip while querying |
all | bool | If true, query all NFTs owned by |
Return Values
Name | Type | Description |
---|---|---|
tokenIdsWithKinship_ | struct AavegotchiGameFacet.TokenIdsWithKinship[] | An array of structs where each struct contains the |
claimAavegotchi
Allows the owner of an NFT(Portal) to claim an Aavegotchi provided it has been unlocked
Will throw if the Portal(with identifier _tokenid
) has not been opened(Unlocked) yet If the NFT(Portal) with identifier _tokenId
is listed for sale on the baazaar while it is being unlocked, that listing is cancelled
Parameters
Name | Type | Description |
---|---|---|
_tokenId | uint256 | The identifier of NFT to claim an Aavegotchi from |
_option | uint256 | The index of the aavegotchi to claim(1-10) |
_stakeAmount | uint256 | Minimum amount of collateral tokens needed to be sent to the new aavegotchi escrow contract |
setAavegotchiName
Allows the owner of a NFT to set a name for it
only valid for claimed aavegotchis Will throw if the name has been used for another claimed aavegotchi
Parameters
Name | Type | Description |
---|---|---|
_tokenId | uint256 | the identifier if the NFT to name |
_name | string | Preferred name to give the claimed aavegotchi |
interact
Allow the owner of an NFT to interact with them.thereby increasing their kinship(petting)
only valid for claimed aavegotchis Kinship will only increase if the lastInteracted minus the current time is greater than or equal to 12 hours
Parameters
Name | Type | Description |
---|---|---|
_tokenIds | uint256[] | An array containing the token identifiers of the claimed aavegotchis that are to be interacted with |
setRealmAddress
spendSkillPoints
Allow the owner of an NFT to spend skill points for it(basically to boost the numeric traits of that NFT)
only valid for claimed aavegotchis
Parameters
Name | Type | Description |
---|---|---|
_tokenId | uint256 | The identifier of the NFT to spend the skill points on |
_values | int16[4] | An array of four integers that represent the values of the skill points |
isAavegotchiLocked
reduceKinshipViaChanneling
Allow the current owner/borrower of an NFT to reduce kinship while channelling alchemica
will revert if the gotchi kinship is too low to channel or if the lending listing does not enable channeling
Parameters
Name | Type | Description |
---|---|---|
_gotchiId | uint32 | Id of the Gotchi used to channel |