InstallationAdminFacet

AddressesUpdated

event AddressesUpdated(address _aavegotchiDiamond, address _realmDiamond, address _gltr, address _pixelcraft, address _aavegotchiDAO, bytes _backendPubKey)

AddInstallationType

event AddInstallationType(uint256 _installationId)

EditInstallationType

event EditInstallationType(uint256 _installationId)

DeprecateInstallation

event DeprecateInstallation(uint256 _installationId)

SetInstallationUnequipType

event SetInstallationUnequipType(uint256 _installationId, uint256 _unequipType)

EditInstallationUnequipType

event EditInstallationUnequipType(uint256 _installationId)

UpgradeCancelled

event UpgradeCancelled(uint256 _realmId, uint256 _coordinateX, uint256 _coordinateY, uint256 _installationId)

EditDeprecateTime

event EditDeprecateTime(uint256 _installationId, uint256 _newDeprecatetime)

deprecateInstallations

function deprecateInstallations(uint256[] _installationIds) external

Allow the Diamond owner to deprecate an installation

Deprecated installations cannot be crafted by users

Parameters

NameTypeDescription

_installationIds

uint256[]

An array containing the identifiers of installations to deprecate

setAddresses

function setAddresses(address _aavegotchiDiamond, address _realmDiamond, address _gltr, address _pixelcraft, address _aavegotchiDAO, bytes _backendPubKey) external

Allow the diamond owner to set some important contract addresses

Parameters

NameTypeDescription

_aavegotchiDiamond

address

The aavegotchi diamond address

_realmDiamond

address

The Realm diamond address

_gltr

address

The $GLTR token address

_pixelcraft

address

Pixelcraft address

_aavegotchiDAO

address

The Aavegotchi DAO address

_backendPubKey

bytes

The Backend Key

getAddresses

function getAddresses() external view returns (address _aavegotchiDiamond, address _realmDiamond, address _gltr, address _pixelcraft, address _aavegotchiDAO, bytes _backendPubKey)

addInstallationTypes

function addInstallationTypes(struct InstallationTypeIO[] _installationTypes) external

Allow the diamond owner to add an installation type

Parameters

NameTypeDescription

_installationTypes

struct InstallationTypeIO[]

An array of structs, each struct representing each installationType to be added

editDeprecateTime

function editDeprecateTime(uint256 _typeId, uint40 _deprecateTime) external

editInstallationTypes

function editInstallationTypes(uint256[] _ids, struct InstallationType[] _installationTypes) external

editInstallationUnequipTypes

function editInstallationUnequipTypes(uint256[] _ids, uint256[] _unequipTypes) external

mintInstallations

function mintInstallations(uint16[] _installationIds, uint16[] _amounts, address _toAddress) external

Allow the owner to mint installations

This function does not check for deprecation because otherwise the installations could be minted by players. Make sure that the installation is deprecated when you add it onchain

Parameters

NameTypeDescription

_installationIds

uint16[]

An array containing the identifiers of the installationTypes to mint

_amounts

uint16[]

An array containing the amounts of the installationTypes to mint

_toAddress

address

Address to mint installations

MissingAltars

struct MissingAltars {
  uint256 _parcelId;
  uint256 _oldAltarId;
  uint256 _newAltarId;
}

fixMissingAltars

function fixMissingAltars(struct InstallationAdminFacet.MissingAltars[] _altars) external

BuggedUpgradeInput

struct BuggedUpgradeInput {
  uint256 _parcelId;
  uint16 _coordinateX;
  uint16 _coordinateY;
  uint256 _installationId;
}

deleteBuggedUpgrades

function deleteBuggedUpgrades(struct InstallationAdminFacet.BuggedUpgradeInput[] _upgrades) external

Used if a parcel has an upgrade that must be deleted.

deleteBuggedUpgradesWithHashes

function deleteBuggedUpgradesWithHashes(bytes32[] _hashes) external

getUniqueHash

function getUniqueHash(uint256 _parcelId, uint16 _x, uint16 _y, uint256 _installationId) external view returns (uint256)

toggleGameManager

function toggleGameManager(address _newGameManager, bool _active) external