AlchemicaFacet
event StartSurveying(uint256 _realmId, uint256 _round)
event ChannelAlchemica(uint256 _realmId, uint256 _gotchiId, uint256[4] _alchemica, uint256 _spilloverRate, uint256 _spilloverRadius)
event ExitAlchemica(uint256 _gotchiId, uint256[] _alchemica)
event SurveyingRoundProgressed(uint256 _newRound)
event TransferTokensToGotchi(address _sender, uint256 _gotchiId, address _tokenAddresses, uint256 _amount)
error ERC20TransferFailed(string _tokenName)
function isSurveying(uint256 _realmId) external view returns (bool)
function startSurveying(uint256 _realmId) external
function getAlchemicaAddresses() external view returns (address[4])
function getTotalAlchemicas() external view returns (uint256[4][5])
Query details about all total alchemicas present
Name | Type | Description |
---|---|---|
[0] | uint256[4][5] | output_ A two dimensional array, each representing an alchemica value |
function getRealmAlchemica(uint256 _realmId) external view returns (uint256[4])
Query details about the remaining alchemica in a parcel
Name | Type | Description |
---|---|---|
_realmId | uint256 | The identifier of the parcel to query |
Name | Type | Description |
---|---|---|
[0] | uint256[4] | output_ An array containing details about each remaining alchemica in the parcel |
function getParcelCurrentRound(uint256 _realmId) external view returns (uint256)
Query details about the remaining alchemica in a parcel
Name | Type | Description |
---|---|---|
_realmId | uint256 | The identifier of the parcel to query |
Name | Type | Description |
---|---|---|
[0] | uint256 | output_ An array containing details about each remaining alchemica in the parcel |
function progressSurveyingRound() external
Allow the diamond owner to increment the surveying round
function getRoundAlchemica(uint256 _realmId, uint256 _roundId) external view returns (uint256[])
Query details about all alchemica gathered in a surveying round in a parcel
Name | Type | Description |
---|---|---|
_realmId | uint256 | Identifier of the parcel to query |
_roundId | uint256 | Identifier of the surveying round to query |
Name | Type | Description |
---|---|---|
[0] | uint256[] | output_ An array representing the numbers of alchemica gathered in a round |
function getRoundBaseAlchemica(uint256 _realmId, uint256 _roundId) external view returns (uint256[])
Query details about the base alchemica gathered in a surveying round in a parcel
Name | Type | Description |
---|---|---|
_realmId | uint256 | Identifier of the parcel to query |
_roundId | uint256 | Identifier of the surveying round to query |
Name | Type | Description |
---|---|---|
[0] | uint256[] | output_ An array representing the numbers of base alchemica gathered in a round |
function setVars(uint256[4][5] _alchemicas, uint256[4] _boostMultipliers, uint256[4] _greatPortalCapacity, address _installationsDiamond, address _vrfCoordinator, address _linkAddress, address[4] _alchemicaAddresses, address _gltrAddress, bytes _backendPubKey, address _gameManager, address _tileDiamond, address _aavegotchiDiamond) external
Allow the diamond owner to set some important diamond state variables
Name | Type | Description |
---|---|---|
_alchemicas | uint256[4][5] | A nested array containing the amount of alchemicas available |
_boostMultipliers | uint256[4] | The boost multiplers applied to each parcel |
_greatPortalCapacity | uint256[4] | The individual alchemica capacity of the great portal |
_installationsDiamond | address | The installations diamond address |
_vrfCoordinator | address | The chainlink vrfCoordinator address |
_linkAddress | address | The link token address |
_alchemicaAddresses | address[4] | The four alchemica token addresses |
_gltrAddress | address | |
_backendPubKey | bytes | The Realm(gotchiverse) backend public key |
_gameManager | address | The address of the game manager |
_tileDiamond | address | |
_aavegotchiDiamond | address | |
function setTotalAlchemicas(uint256[4][5] _totalAlchemicas) external
function getAvailableAlchemica(uint256 _realmId) public view returns (uint256[4] _availableAlchemica)
Query the available alchemica in a parcel
Name | Type | Description |
---|---|---|
_realmId | uint256 | identifier of parcel to query |
Name | Type | Description |
---|---|---|
_availableAlchemica | uint256[4] | An array representing the available quantity of alchemicas |
struct TransferAmounts {
uint256 owner;
uint256 spill;
}
function lastClaimedAlchemica(uint256 _realmId) external view returns (uint256)
function claimAvailableAlchemica(uint256 _realmId, uint256 _gotchiId, bytes _signature) external
Allow parcel owner to claim available alchemica with his parent NFT(Aavegotchi)
Name | Type | Description |
---|---|---|
_realmId | uint256 | Identifier of parcel to claim alchemica from |
_gotchiId | uint256 | Identifier of Aavegotchi to use for alchemica collecction/claiming |
_signature | bytes | Message signature used for backend validation |
function getHarvestRates(uint256 _realmId) external view returns (uint256[] harvestRates)
function getCapacities(uint256 _realmId) external view returns (uint256[] capacities)
function getTotalClaimed(uint256 _realmId) external view returns (uint256[] totalClaimed)
function channelAlchemica(uint256 _realmId, uint256 _gotchiId, uint256 _lastChanneled, bytes _signature) external
Allow a parcel owner to channel alchemica
_This transfers alchemica to the parent ERC721 token with id gotchiId and also to the great portal
Name | Type | Description |
---|---|---|
_realmId | uint256 | Identifier of parcel where alchemica is being channeled from |
_gotchiId | uint256 | Identifier of parent ERC721 aavegotchi which alchemica is channeled to |
_lastChanneled | uint256 | The last time alchemica was channeled in this _realmId |
_signature | bytes | Message signature used for backend validation |
function getLastChanneled(uint256 _gotchiId) public view returns (uint256)
Return the last timestamp of a channeling
used as a parameter in channelAlchemica
Name | Type | Description |
---|---|---|
_gotchiId | uint256 | Identifier of parent ERC721 aavegotchi |
Name | Type | Description |
---|---|---|
[0] | uint256 | last channeling timestamp |
function getParcelLastChanneled(uint256 _parcelId) public view returns (uint256)
Return the last timestamp of an altar channeling
used as a parameter in channelAlchemica
Name | Type | Description |
---|---|---|
_parcelId | uint256 | Identifier of ERC721 parcel |
Name | Type | Description |
---|---|---|
[0] | uint256 | last channeling timestamp |
function batchTransferAlchemica(address[] _targets, uint256[4][] _amounts) external
Helper function to batch transfer alchemica
_The inner array element order for amounts is FUD, FOMO, ALPHA, KEK
Name | Type | Description |
---|---|---|
_targets | address[] | Array of target addresses |
_amounts | uint256[4][] | Nested array of amounts to transfer. |
function batchTransferTokensToGotchis(uint256[] _gotchiIds, address[] _tokenAddresses, uint256[][] _amounts) external
Helper function to batch transfer alchemica to Aavegotchis
Name | Type | Description |
---|---|---|
_gotchiIds | uint256[] | Array of Gotchi IDs |
_tokenAddresses | address[] | Array of tokens to transfer |
_amounts | uint256[][] | Nested array of amounts to transfer. |
function setChannelingLimits(uint256[] _altarLevel, uint256[] _limits) external
Owner function to change the altars channeling limits @param _altarLevel Array of altars level
Name | Type | Description |
---|---|---|
_altarLevel | uint256[] | |
_limits | uint256[] | Array of time limits |
function batchTransferTokens(address[][] _tokens, uint256[][] _amounts, address[] _to) external