CollateralFacet.sol

Documentation for CollateralFacet.sol

READ FUNCTIONS

function collaterals() external

‌Returns addresses of all the whitelisted collaterals.

function getCollateralInfo() external

Returns information about all of the whitelisted collaterals.

function collateralBalance(uint256) external

‌Returns the balance of the Aavegotchi's default escrow token.

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".