ItemsFacet
TransferToParent
EquipWearables
UseConsumables
ItemIdIO
itemBalances
Returns balance for each item that exists for an account
Parameters
Name | Type | Description |
---|---|---|
_account | address | Address of the account to query |
Return Values
Name | Type | Description |
---|---|---|
bals_ | struct ItemsFacet.ItemIdIO[] | An array of structs,each struct containing details about each item owned |
itemBalancesWithTypes
Returns balance for each item(and their types) that exists for an account
Parameters
Name | Type | Description |
---|---|---|
_owner | address | Address of the account to query |
Return Values
Name | Type | Description |
---|---|---|
output_ | struct ItemTypeIO[] | An array of structs containing details about each item owned(including the item types) |
balanceOf
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
Get the balance of a non-fungible parent token
Parameters
Name | Type | Description |
---|---|---|
_tokenContract | address | The contract tracking the parent token |
_tokenId | uint256 | The ID of the parent token |
_id | uint256 | ID of the token |
Return Values
Name | Type | Description |
---|---|---|
value | uint256 | The balance of the token |
itemBalancesOfToken
Returns the balances for all ERC1155 items for a ERC721 token
Only valid for claimed aavegotchis
Parameters
Name | Type | Description |
---|---|---|
_tokenContract | address | Contract address for the token to query |
_tokenId | uint256 | Identifier of the token to query |
Return Values
Name | Type | Description |
---|---|---|
bals_ | struct ItemsFacet.ItemIdIO[] | An array of structs containing details about each item owned |
itemBalancesOfTokenWithTypes
Returns the balances for all ERC1155 items for a ERC721 token
Only valid for claimed aavegotchis
Parameters
Name | Type | Description |
---|---|---|
_tokenContract | address | Contract address for the token to query |
_tokenId | uint256 | Identifier of the token to query |
Return Values
Name | Type | Description |
---|---|---|
itemBalancesOfTokenWithTypes_ | struct ItemTypeIO[] | An array of structs containing details about each item owned(including the types) |
balanceOfBatch
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
Query the current wearables equipped for an NFT
only valid for claimed aavegotchis
Parameters
Name | Type | Description |
---|---|---|
_tokenId | uint256 | Identifier of the NFT to query |
Return Values
Name | Type | Description |
---|---|---|
wearableIds_ | uint16[16] | An array containing the Identifiers of the wearable items currently equipped for the NFT |
getItemType
Query the item type of a particular item
Parameters
Name | Type | Description |
---|---|---|
_itemId | uint256 | Item to query |
Return Values
Name | Type | Description |
---|---|---|
itemType_ | struct ItemType | A struct containing details about the item type of an item with identifier |
getItemTypes
Query the item type of multiple items
Parameters
Name | Type | Description |
---|---|---|
_itemIds | uint256[] | An array containing the identifiers of items to query |
Return Values
Name | Type | Description |
---|---|---|
itemTypes_ | struct ItemType[] | An array of structs,each struct containing details about the item type of the corresponding item |
uri
Get the URI for a voucher type @return URI for token type
setBaseURI
Set the base url for all voucher types @param _value The new base url
equipWearables
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
Name | Type | Description |
---|---|---|
_tokenId | uint256 | The identifier of the aavegotchi to make changes to |
_wearablesToEquip | uint16[16] | An array containing the identifiers of the wearables to equip |
useConsumables
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
Name | Type | Description |
---|---|---|
_tokenId | uint256 | Identtifier of aavegotchi to use the consumables on |
_itemIds | uint256[] | An array containing the identifiers of the items/consumables to use |
_quantities | uint256[] | An array containing the quantity of each consumable to use |