InstallationUpgradeFacet
event UpgradeTimeReduced(uint256 _queueId, uint256 _realmId, uint256 _coordinateX, uint256 _coordinateY, uint40 _blocksReduced)
function upgradeInstallation(struct UpgradeQueue _upgradeQueue, uint256 _gotchiId, bytes _signature, uint40 _gltr) external
Allow a user to upgrade an installation in a parcel
Will throw if the caller is not the owner of the parcel in which the installation is installed
Name | Type | Description |
---|---|---|
_upgradeQueue | struct UpgradeQueue | A struct containing details about the queue which contains the installation to upgrade |
_gotchiId | uint256 | The id of the gotchi which is upgrading the installation |
_signature | bytes | API signature |
_gltr | uint40 | Amount of GLTR to use, can be 0 |
function finalizeUpgrades(uint256[] _upgradeIndexes) external
Allow anyone to finalize any existing queue upgrade
function reduceUpgradeTime(uint256 _upgradeIndex, uint256 _gotchiId, uint40 _blocks, bytes _signature) external
function getAllUpgradeQueue() external view returns (struct UpgradeQueue[])
Query details about all ongoing upgrade queues
TO BE DEPRECATED
Name | Type | Description |
---|---|---|
[0] | struct UpgradeQueue[] | output_ An array of structs, each representing an ongoing upgrade queue |
function getUserUpgradeQueue(address _owner) external view returns (struct UpgradeQueue[] output_, uint256[] indexes_)
Query details about all pending craft queues
TO BE REPLACED BY getUserUpgradeQueueNew after the old queue is cleared out
Name | Type | Description |
---|---|---|
_owner | address | Address to query queue |
Name | Type | Description |
---|---|---|
output_ | struct UpgradeQueue[] | An array of structs, each representing a pending craft queue |
indexes_ | uint256[] | An array of IDs, to be used in the new finalizeUpgrades() function |
function getUserUpgradeQueueNew(address _owner) external view returns (struct UpgradeQueue[] output_, uint256[] indexes_)
Query details about all pending craft queues
Name | Type | Description |
---|---|---|
_owner | address | Address to query queue |
Name | Type | Description |
---|---|---|
output_ | struct UpgradeQueue[] | An array of structs, each representing a pending craft queue |
indexes_ | uint256[] | An array of IDs, to be used in the new finalizeUpgrades() function |
function getUpgradeQueueId(uint256 _queueId) external view returns (struct UpgradeQueue)
function getParcelUpgradeQueue(uint256 _parcelId) external view returns (struct UpgradeQueue[] output_, uint256[] indexes_)
function parcelQueueEmpty(uint256 _parcelId) external view returns (bool)
For realm to validate whether a parcel has an upgrade queueing before removing an installation
function parcelInstallationUpgrading(uint256 _parcelId, uint256 _installationId, uint256 _x, uint256 _y) external view returns (bool)
function getUpgradeQueueLength() external view returns (uint256)