AavegotchiFacet.sol

Documentation for AavegotchiFacet.sol

READ FUNCTIONS

function aavegotchiNameAvailable(string) external

Checks if a given name has been taken.

function currentHaunt() public

‌Returns the current hauntId.

function revenueShares()

‌Returns the addresses used for GHST revenue sharing.

function toNumericTraits(uint256) internal

‌Converts the Chainlink VRF generated randomNumber into the int256 used for numericTraits.

function singlePortalAavegotchiTraits(uint256, uint256) internal

‌Returns trait information about a single, unclaimed Aavegotchi.

function portalAavegotchiTraits(uint256) public

‌Returns an array of traits for all 10 Aavegotchis in a Portal.

function ghstAddress() external

‌Returns the GHST contract address for the current network.

function balanceOf(address) external

‌Returns the number of NFTs assigned to the owner.

function getAavegotchi(uint256) public

‌Returns information about a single, claimed Aavegotchi.

function availableSkillPoints(uint256) public

‌Returns the number of skill points available for the given Aavegotchi based on its current level.

function abs(int8) private

‌Returns the absolute value of the given int8.

function aavegotchiLevel(uint32) public

‌Returns the Aavegotchi level given the amount of experience.

function rarityMultiplier(int256, address) public

‌Returns how many DAI/USD worth of collateral is required for the base rarity score of an Aavegotchi.

function baseRarityScore(int256, address) public

‌Returns the base rarity score for an Aavegotchi calculated from its numeric traits and collateral type.

function modifiedRarityScore(uint256) external

‌Returns the rarity score of an Aavegotchi, including all equipped wearables.

function kinship(uint256) external

Returns the current kinship value of a given Aavegotchi.

function allAavegotchiIdsOfOwner(address) external

‌Returns all the Aavegotchi Ids of a given owner.

function allAavegotchisOfOwner(address) external

‌Returns detailed information about all the Aavegotchis of a given owner.

function ownerOf(uint256) external

‌Returns the owner of a given Aavegotchi.

function getApproved(uint256) external

‌Get the approved address for a single Aavegotchi.

function isApprovedForAll(address, address) external

‌Returns if an address is an authorized operator for another address.

WRITE FUNCTIONS

function setAavegotchiName(uint256, string) external

‌Sets the unique name of an Aavegotchi to the given string, if available.

function setBatchId(uint256[]) external

‌Includes the given Aavegotchis in the next Chainlink VRF batch call.

function spendSkillPoints(uint256, int8[4]) external

‌Spends the given number of skill points on the specified trait modifiers.

function claimAavegotchi(uint256, uint256, uint256) external

‌Claims an Aavegotchi from the Portal and transfers the required collateral from msg.sender to the Aavegotchi's escrow address.

function interact(uint256) public

‌Performs a basic interaction with the Aavegotchi to increase kinship.

function lockAavegotchi(uint256, uint256) external

‌Prevents transferring and equipping wearables for a given period of time. Used to ensure that Aavegotchis listed on the secondary marketplace cannot be rugpulled by their owners.

function safeTransferFrom(address, address, uint256, bytes) external

‌Transfers the ownership of an NFT from one address to another address

function safeTransfer(address, address, uint256) external

‌Transfers the ownership of an NFT from one address to another address

function transferFrom(address, address, uint256) external

‌Transfer ownership of an NFT -- THE CALLER IS RESPONSIBLE /// TO CONFIRM THAT _to IS CAPABLE OF RECEIVING NFTS OR ELSE /// THEY MAY BE PERMANENTLY LOST

function internalTransferFrom(address, address, uint256) internal

‌This function is used by transfer functions.

function approve(address, uint256) external

‌Change or reaffirm the approved address for an NFT.

function setApprovalForAll(address, bool) external

‌Enable or disable approval for a third party ("operator") to manage.

Contents
READ FUNCTIONS
function aavegotchiNameAvailable(string) external
function currentHaunt() public
function revenueShares()
function toNumericTraits(uint256) internal
function singlePortalAavegotchiTraits(uint256, uint256) internal
function portalAavegotchiTraits(uint256) public
function ghstAddress() external
function balanceOf(address) external
function getAavegotchi(uint256) public
function availableSkillPoints(uint256) public
function abs(int8) private
function aavegotchiLevel(uint32) public
function rarityMultiplier(int256, address) public
function baseRarityScore(int256, address) public
function modifiedRarityScore(uint256) external
function kinship(uint256) external
function allAavegotchiIdsOfOwner(address) external
function allAavegotchisOfOwner(address) external
function ownerOf(uint256) external
function getApproved(uint256) external
function isApprovedForAll(address, address) external
WRITE FUNCTIONS
function setAavegotchiName(uint256, string) external
function setBatchId(uint256[]) external
function spendSkillPoints(uint256, int8[4]) external
function claimAavegotchi(uint256, uint256, uint256) external
function interact(uint256) public
function lockAavegotchi(uint256, uint256) external
function safeTransferFrom(address, address, uint256, bytes) external
function safeTransfer(address, address, uint256) external
function transferFrom(address, address, uint256) external
function internalTransferFrom(address, address, uint256) internal
function approve(address, uint256) external
function setApprovalForAll(address, bool) external