Links

CollateralFacet.sol

Documentation for CollateralFacet.sol

READ FUNCTIONS

function collaterals() external

‌Returns addresses of all the whitelisted collaterals.
RETURNS address[]

function getCollateralInfo() external

Returns information about all of the whitelisted collaterals.
RETURNS collateralType: address collateralTypeInfo: tuple
collateralTypeInfo
TYPE
modifiers
int16[6]
primaryColor
bytes3
secondaryColor
bytes3
cheekColor
bytes3
svgId
uint8
eyeShapeSvgId
uint8
conversionRate
uint16
delisted
bool

function collateralBalance(uint256) external

‌Returns the balance of the Aavegotchi's default escrow token.
collateralBalance
TYPE
collateralType_
address
escrow_
address
balance_
uint256

WRITE FUNCTIONS

function increaseStake(uint256, uint256) external

‌Transfers funds from msg.sender to the Aavegotchi's escrow contract.

function decreaseStake(uint256, uint256) external

‌Transfers funds from the Aavegotchi's escrow contract back to msg.sender. Reverts if the reduced amount would be lower than the Aavegotchi's minimumStake.

function decreaseAndDestroy(uint256, uint256) external

‌Transfers all of the funds in the Aavegotchi's escrow contract to msg.sender and burns the Aavegotchi NFT. If the second _tokenId parameter is different from the first, the burned Aavegotchi also transfers its experience to the receiving Aavegotchi in a process known as "essence transfer".