InstallationFacet

AddedToQueue

event AddedToQueue(uint256 _queueId, uint256 _installationId, uint256 _readyBlock, address _sender)

QueueClaimed

event QueueClaimed(uint256 _queueId)

CraftTimeReduced

event CraftTimeReduced(uint256 _queueId, uint256 _blocksReduced)

UpgradeTimeReduced

event UpgradeTimeReduced(uint256 _queueId, uint256 _realmId, uint256 _coordinateX, uint256 _coordinateY, uint256 _blocksReduced)

InstallationIdIO

struct InstallationIdIO {
  uint256 installationId;
  uint256 balance;
}

ReservoirStats

struct ReservoirStats {
  uint256 spillRate;
  uint256 spillRadius;
  uint256 capacity;
}

installationsBalances

function installationsBalances(address _account) external view returns (struct InstallationFacet.InstallationIdIO[] bals_)

Returns balance for each installation that exists for an account

Parameters

Return Values

installationsBalancesWithTypes

function installationsBalancesWithTypes(address _owner) external view returns (struct ItemTypeIO[] output_)

Returns balance for each installation(and their types) that exists for an account

Parameters

Return Values

balanceOfToken

function balanceOfToken(address _tokenContract, uint256 _tokenId, uint256 _id) public view returns (uint256 value)

Get the balance of a non-fungible parent token

Parameters

Return Values

installationBalancesOfToken

function installationBalancesOfToken(address _tokenContract, uint256 _tokenId) public view returns (struct InstallationFacet.InstallationIdIO[] bals_)

Returns the balances for all ERC1155 items for a ERC721 token

Parameters

Return Values

installationBalancesOfTokenWithTypes

function installationBalancesOfTokenWithTypes(address _tokenContract, uint256 _tokenId) external view returns (struct ItemTypeIO[] installationBalancesOfTokenWithTypes_)

Returns the balances for all ERC1155 items for a ERC721 token

Parameters

Return Values

spilloverRateAndRadiusOfId

function spilloverRateAndRadiusOfId(uint256 _id) external view returns (uint256, uint256)

Check the spillover radius of an installation type

Parameters

Return Values

installationBalancesOfTokenByIds

function installationBalancesOfTokenByIds(address _tokenContract, uint256 _tokenId, uint256[] _ids) external view returns (uint256[])

Query the installation balances of an ERC721 parent token

Parameters

Return Values

getInstallationType

function getInstallationType(uint256 _installationTypeId) external view returns (struct InstallationType installationType)

Query the item type of a particular installation

Parameters

Return Values

getInstallationUnequipType

function getInstallationUnequipType(uint256 _installationId) external view returns (uint256)

getInstallationTypes

function getInstallationTypes(uint256[] _installationTypeIds) external view returns (struct InstallationType[] installationTypes_)

Query the item type of multiple installation types

Parameters

Return Values

getCraftQueue

function getCraftQueue(address _owner) external view returns (struct QueueItem[] output_)

Query details about all ongoing craft queues

Parameters

Return Values

getAltarLevel

function getAltarLevel(uint256 _altarId) external view returns (uint256 altarLevel_)

getLodgeLevel

function getLodgeLevel(uint256 _installationId) external view returns (uint256 lodgeLevel_)

getReservoirCapacity

function getReservoirCapacity(uint256 _installationId) external view returns (uint256 capacity_)

getReservoirStats

function getReservoirStats(uint256 _installationId) external view returns (struct InstallationFacet.ReservoirStats reservoirStats_)

BatchCraftInstallationsInput

struct BatchCraftInstallationsInput {
  uint16 installationID;
  uint16 amount;
  uint40 gltr;
}

batchCraftInstallations

function batchCraftInstallations(struct InstallationFacet.BatchCraftInstallationsInput[] _inputs) external

craftInstallations

function craftInstallations(uint16[] _installationTypes, uint40[] _gltr) external

Allow a user to craft installations

Will throw even if one of the installationTypes is deprecated Puts the installation into a queue

Parameters

claimInstallations

function claimInstallations(uint256[] _queueIds) external

Allow a user to claim installations from ready queues

Will throw if the caller is not the queue owner Will throw if one of the queues is not ready

Parameters

reduceCraftTime

function reduceCraftTime(uint256[] _queueIds, uint40[] _amounts) external

Allow a user to speed up multiple queues(installation craft time) by paying the correct amount of $GLTR tokens

Will throw if the caller is not the queue owner $GLTR tokens are burnt upon usage amount expressed in block numbers

Parameters

equipInstallation

function equipInstallation(address _owner, uint256 _realmId, uint256 _installationId) external

Allow a user to equip an installation to a parcel

Will throw if the caller is not the parcel diamond contract Will also throw if various prerequisites for the installation are not met

Parameters

unequipInstallation

function unequipInstallation(address _owner, uint256 _realmId, uint256 _installationId) external

Allow a user to unequip an installation from a parcel

Will throw if the caller is not the parcel diamond contract

Parameters

upgradeComplete

function upgradeComplete(uint256 _queueId) external view returns (bool)