Links

AavegotchiGameFacet

ClaimAavegotchi

event ClaimAavegotchi(uint256 _tokenId)
This emits when an operator is enabled or disabled for an owner. The operator can manage all NFTs of the owner.

SetAavegotchiName

event SetAavegotchiName(uint256 _tokenId, string _oldName, string _newName)

SetBatchId

event SetBatchId(uint256 _batchId, uint256[] tokenIds)

SpendSkillpoints

event SpendSkillpoints(uint256 _tokenId, int16[4] _values)

LockAavegotchi

event LockAavegotchi(uint256 _tokenId, uint256 _time)

UnLockAavegotchi

event UnLockAavegotchi(uint256 _tokenId, uint256 _time)

aavegotchiNameAvailable

function aavegotchiNameAvailable(string _name) external view returns (bool available_)
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

function currentHaunt() external view returns (uint256 hauntId_, struct Haunt haunt_)
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

struct RevenueSharesIO {
address burnAddress;
address daoAddress;
address rarityFarming;
address pixelCraft;
}

revenueShares

function revenueShares() external view returns (struct AavegotchiGameFacet.RevenueSharesIO)
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

function portalAavegotchiTraits(uint256 _tokenId) external view returns (struct PortalAavegotchiTraitsIO[10] 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 _tokenId

ghstAddress

function ghstAddress() external view returns (address contract_)
Query the $GHST token address

Return Values

Name
Type
Description
contract_
address
the deployed address of the $GHST token contract

getNumericTraits

function getNumericTraits(uint256 _tokenId) external view returns (int16[6] numericTraits_)
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 _tokenId

availableSkillPoints

function availableSkillPoints(uint256 _tokenId) public view returns (uint256)
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 _tokenId

aavegotchiLevel

function aavegotchiLevel(uint256 _experience) external pure returns (uint256 level_)
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 _experience

xpUntilNextLevel

function xpUntilNextLevel(uint256 _experience) external pure returns (uint256 requiredXp_)
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

function rarityMultiplier(int16[6] _numericTraits) external pure returns (uint256 multiplier_)
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 _numericTraits

baseRarityScore

function baseRarityScore(int16[6] _numericTraits) external pure returns (uint256 rarityScore_)
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 _numericTraits

modifiedTraitsAndRarityScore

function modifiedTraitsAndRarityScore(uint256 _tokenId) external view returns (int16[6] numericTraits_, uint256 rarityScore_)
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 _tokenId
rarityScore_
uint256
The modified rarity score of an NFT with identifier _tokenId

kinship

function kinship(uint256 _tokenId) external view returns (uint256 score_)
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 _tokenId

TokenIdsWithKinship

struct TokenIdsWithKinship {
uint256 tokenId;
uint256 kinship;
uint256 lastInteracted;
}

tokenIdsWithKinship

function tokenIdsWithKinship(address _owner, uint256 _count, uint256 _skip, bool all) external view returns (struct AavegotchiGameFacet.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 _owner; if false, query _count NFTs owned by _owner

Return Values

Name
Type
Description
tokenIdsWithKinship_
struct AavegotchiGameFacet.TokenIdsWithKinship[]
An array of structs where each struct contains the tokenId,kinshipand lastInteracted of each NFT

claimAavegotchi

function claimAavegotchi(uint256 _tokenId, uint256 _option, uint256 _stakeAmount) external
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

function setAavegotchiName(uint256 _tokenId, string _name) external
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

function interact(uint256[] _tokenIds) external
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

function setRealmAddress(address _realm) public

spendSkillPoints

function spendSkillPoints(uint256 _tokenId, int16[4] _values) external
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

function isAavegotchiLocked(uint256 _tokenId) external view returns (bool isLocked)

reduceKinshipViaChanneling

function reduceKinshipViaChanneling(uint32 _gotchiId) external
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