CollateralFacet

IncreaseStake

event IncreaseStake(uint256 _tokenId, uint256 _stakeAmount)

DecreaseStake

event DecreaseStake(uint256 _tokenId, uint256 _reduceAmount)

ExperienceTransfer

event ExperienceTransfer(uint256 _fromTokenId, uint256 _toTokenId, uint256 experience)

collaterals

function collaterals(uint256 _hauntId) external view returns (address[] collateralTypes_)

Query addresses about all collaterals available for a particular haunt

Parameters

Return Values

collateralInfo

function collateralInfo(uint256 _hauntId, uint256 _collateralId) external view returns (struct AavegotchiCollateralTypeIO collateralInfo_)

Query all details about a collateral in a haunt

Parameters

getCollateralInfo

function getCollateralInfo(uint256 _hauntId) external view returns (struct AavegotchiCollateralTypeIO[] collateralInfo_)

Query all details about all collaterals in a haunt

Parameters

getAllCollateralTypes

function getAllCollateralTypes() external view returns (address[])

Query the address of all collaterals that are available universally throughout all haunts

Return Values

collateralBalance

function collateralBalance(uint256 _tokenId) external view returns (address collateralType_, address escrow_, uint256 balance_)

Query the collateral address,balance and escrow contract of an NFT

Only valid for claimed aavegotchis

Parameters

Return Values

increaseStake

function increaseStake(uint256 _tokenId, uint256 _stakeAmount) external

Allow the owner of a claimed aavegotchi to increase its collateral stake

Only valid for claimed aavegotchis

Parameters

decreaseStake

function decreaseStake(uint256 _tokenId, uint256 _reduceAmount) external

Allow the owner of a claimed aavegotchi to decrease its collateral stake

Only valid for claimed aavegotchis Will throw if it is reduced less than the minimum stake

Parameters

decreaseAndDestroy

function decreaseAndDestroy(uint256 _tokenId, uint256 _toId) external

Allow the owner of an aavegotchi to destroy his aavegotchi and transfer the XP points to another aavegotchi

Only valid for claimed aavegotchisi Name assigned to destroyed aavegotchi is freed up for use by another aavegotch

Parameters

setCollateralEyeShapeSvgId

function setCollateralEyeShapeSvgId(address _collateralToken, uint8 _svgId) external

Set the SVG id for a supported/existing collateral

Parameters