ItemsFacet

TransferToParent

event TransferToParent(address _toContract, uint256 _toTokenId, uint256 _tokenTypeId, uint256 _value)

EquipWearables

event EquipWearables(uint256 _tokenId, uint16[16] _oldWearables, uint16[16] _newWearables)

UseConsumables

event UseConsumables(uint256 _tokenId, uint256[] _itemIds, uint256[] _quantities)

ItemIdIO

struct ItemIdIO {
  uint256 itemId;
  uint256 balance;
}

itemBalances

function itemBalances(address _account) external view returns (struct ItemsFacet.ItemIdIO[] bals_)

Returns balance for each item that exists for an account

Parameters

Return Values

itemBalancesWithTypes

function itemBalancesWithTypes(address _owner) external view returns (struct ItemTypeIO[] output_)

Returns balance for each item(and their types) that exists for an account

Parameters

Return Values

balanceOf

function balanceOf(address _owner, uint256 _id) external view returns (uint256 bal_)

Get the balance of an account's tokens. @param _owner The address of the token holder @param id ID of the token @return bal The _owner's balance of the token type requested

balanceOfToken

function balanceOfToken(address _tokenContract, uint256 _tokenId, uint256 _id) external view returns (uint256 value)

Get the balance of a non-fungible parent token

Parameters

Return Values

itemBalancesOfToken

function itemBalancesOfToken(address _tokenContract, uint256 _tokenId) external view returns (struct ItemsFacet.ItemIdIO[] bals_)

Returns the balances for all ERC1155 items for a ERC721 token

Only valid for claimed aavegotchis

Parameters

Return Values

itemBalancesOfTokenWithTypes

function itemBalancesOfTokenWithTypes(address _tokenContract, uint256 _tokenId) external view returns (struct ItemTypeIO[] itemBalancesOfTokenWithTypes_)

Returns the balances for all ERC1155 items for a ERC721 token

Only valid for claimed aavegotchis

Parameters

Return Values

balanceOfBatch

function balanceOfBatch(address[] _owners, uint256[] _ids) external view returns (uint256[] bals)

Get the balance of multiple account/token pairs @param _owners The addresses of the token holders @param _ids ID of the tokens @return bals The _owner's balance of the token types requested (i.e. balance for each (owner, id) pair)

equippedWearables

function equippedWearables(uint256 _tokenId) external view returns (uint16[16] wearableIds_)

Query the current wearables equipped for an NFT

only valid for claimed aavegotchis

Parameters

Return Values

getItemType

function getItemType(uint256 _itemId) public view returns (struct ItemType itemType_)

Query the item type of a particular item

Parameters

Return Values

getItemTypes

function getItemTypes(uint256[] _itemIds) external view returns (struct ItemType[] itemTypes_)

Query the item type of multiple items

Parameters

Return Values

uri

function uri(uint256 _id) external view returns (string)

Get the URI for a voucher type @return URI for token type

setBaseURI

function setBaseURI(string _value) external

Set the base url for all voucher types @param _value The new base url

equipWearables

function equipWearables(uint256 _tokenId, uint16[16] _wearablesToEquip) external

Allow the owner of a claimed aavegotchi to equip/unequip wearables to his aavegotchi

Only valid for claimed aavegotchis A zero value will unequip that slot and a non-zero value will equip that slot with the wearable whose identifier is provided A wearable cannot be equipped in the wrong slot

Parameters

useConsumables

function useConsumables(uint256 _tokenId, uint256[] _itemIds, uint256[] _quantities) external

Allow the owner of an NFT to use multiple consumable items for his aavegotchi

Only valid for claimed aavegotchis Consumables can be used to boost kinship/XP of an aavegotchi

Parameters