Links

InstallationUpgradeFacet

UpgradeTimeReduced

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

upgradeInstallation

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

Parameters

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

finalizeUpgrades

function finalizeUpgrades(uint256[] _upgradeIndexes) external
Allow anyone to finalize any existing queue upgrade

reduceUpgradeTime

function reduceUpgradeTime(uint256 _upgradeIndex, uint256 _gotchiId, uint40 _blocks, bytes _signature) external

getAllUpgradeQueue

function getAllUpgradeQueue() external view returns (struct UpgradeQueue[])
Query details about all ongoing upgrade queues
TO BE DEPRECATED

Return Values

Name
Type
Description
[0]
struct UpgradeQueue[]
output_ An array of structs, each representing an ongoing upgrade queue

getUserUpgradeQueue

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

Parameters

Name
Type
Description
_owner
address
Address to query queue

Return Values

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

getUserUpgradeQueueNew

function getUserUpgradeQueueNew(address _owner) external view returns (struct UpgradeQueue[] output_, uint256[] indexes_)
Query details about all pending craft queues

Parameters

Name
Type
Description
_owner
address
Address to query queue

Return Values

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

getUpgradeQueueId

function getUpgradeQueueId(uint256 _queueId) external view returns (struct UpgradeQueue)

getParcelUpgradeQueue

function getParcelUpgradeQueue(uint256 _parcelId) external view returns (struct UpgradeQueue[] output_, uint256[] indexes_)

parcelQueueEmpty

function parcelQueueEmpty(uint256 _parcelId) external view returns (bool)
For realm to validate whether a parcel has an upgrade queueing before removing an installation

parcelInstallationUpgrading

function parcelInstallationUpgrading(uint256 _parcelId, uint256 _installationId, uint256 _x, uint256 _y) external view returns (bool)

getUpgradeQueueLength

function getUpgradeQueueLength() external view returns (uint256)