ItemsFacet.sol
Documentation for ItemsFacet.sol
Returns balance for each item that exists for an account
RETURNS
tuple<bals_>[]
bals_ | TYPE |
itemId | uint256 |
balance | uint256 |
Returns the balance of an account's tokens.
RETURNS
uint256
Get the balance of a non-fungible parent token.
RETURNS
uint256
Returns the balances for all items for a token
Get the balance of multiple account/token pairs
RETURNS
uint256[]
Returns the Ids of all equipped Wearables.
RETURNS
uint16[16]
Returns information about all of the Wearable Sets.
RETURNS
tuple<wearableSet_>[]
wearableSet_ | TYPES |
name | string |
allowedCollaterals | uint8[] |
wearableIds | uint16[] |
traitsBonuses | int8[5] |
Returns information about the given Wearable Set.
Returns a count of the total Wearable Sets.
RETURNS
uint256
Returns information about the given Item.
itemType_ | TYPE |
name | string |
description | string |
author | string |
traitModifiers | int8[6] |
slotPositions | bool[16] |
allowedCollaterals | uint8[] |
dimensions x y width height | tuple uint8 uint8 uint8 uint8 |
ghstPrice | uint256 |
maxQuantity | uint256 |
totalQuantity | uint256 |
svgId | uint32 |
rarityScoreModifier | uint8 |
canPurchaseWithGhst | bool |
minLevel | uint16 |
canBeTransferred | bool |
category | uint8 |
kinshipBonus | int16 |
experienceBonus | uint32 |
Returns information about multiple Items.
Transfers
_value
amount of an _id
from the _from
address to the _to
address specified (with safety call).Transfers
_values
amount(s) of _ids
from the _from
address to the _to
address specified (with safety call).Transfer tokens from owner address to a token.
Transfer token from a token to an address.
Transfer a token from a token to another token
Equips the given Wearables to a given Aavegotchi.
Equipping rules:
- 1.If the new value for a slot is non-zero and is the same as the old value then it means don't unequip the item.
- 2.If the new value for a slot is non-zero and the old value is non-zero but not the same then it means unequip the wearable and equip the new wearable in the slot.
- 3.If the new value for a slot is non-zero and the old value is 0 it means equip the slot.
- 4.If the new value for a slot is 0 and the old value is non-zero it means unequp the slot.
- 5.If the new value for a slot is 0 and the old value is 0 then don't do anything with the slot.
Uses a Consumable Item, applies the bonuses to the Aavegotchi, then burns the Item.
Last modified 2yr ago