CollateralFacet
IncreaseStake
DecreaseStake
ExperienceTransfer
collaterals
Query addresses about all collaterals available for a particular haunt
Parameters
Name | Type | Description |
---|---|---|
_hauntId | uint256 | identifier of the haunt to query |
Return Values
Name | Type | Description |
---|---|---|
collateralTypes_ | address[] | An array containing the addresses of all collaterals available for haunt |
collateralInfo
Query all details about a collateral in a haunt
Parameters
Name | Type | Description |
---|---|---|
_hauntId | uint256 | The identifier of the haunt to query |
_collateralId | uint256 | the identifier of the collateral to query return collateralInfo_ A struct containing extensive details about a collateral of identifier |
getCollateralInfo
Query all details about all collaterals in a haunt
Parameters
Name | Type | Description |
---|---|---|
_hauntId | uint256 | The identifier of the haunt to query return collateralInfo_ An array of structs where each struct contains extensive details about each collateral that is available in haunt |
getAllCollateralTypes
Query the address of all collaterals that are available universally throughout all haunts
Return Values
Name | Type | Description |
---|---|---|
[0] | address[] | An array of addresses,each address representing a collateral's contract address |
collateralBalance
Query the collateral address,balance and escrow contract of an NFT
Only valid for claimed aavegotchis
Parameters
Name | Type | Description |
---|---|---|
_tokenId | uint256 | the identifier of the NFT to query |
Return Values
Name | Type | Description |
---|---|---|
collateralType_ | address | The contract address of the collateral |
escrow_ | address | The contract address of the NFT's escrow contract |
balance_ | uint256 | The collateral balance of the NFT |
increaseStake
Allow the owner of a claimed aavegotchi to increase its collateral stake
Only valid for claimed aavegotchis
Parameters
Name | Type | Description |
---|---|---|
_tokenId | uint256 | The identifier of the NFT to increase |
_stakeAmount | uint256 | The amount of collateral tokens to increase the current collateral by |
decreaseStake
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
Name | Type | Description |
---|---|---|
_tokenId | uint256 | The identifier of the NFT to decrease |
_reduceAmount | uint256 | The amount of collateral tokens to decrease the current collateral by |
decreaseAndDestroy
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
Name | Type | Description |
---|---|---|
_tokenId | uint256 | Identifier of NFT to destroy |
_toId | uint256 | Identifier of another claimed aavegotchi where the XP of the sacrificed aavegotchi will be sent |
setCollateralEyeShapeSvgId
Set the SVG id for a supported/existing collateral
Parameters
Name | Type | Description |
---|---|---|
_collateralToken | address | The contract address for the collateral token |
_svgId | uint8 | The identifier for the onchain svg to be mapped to the collateral |