Skip to main content

Recovery (IRecovery)

This internal contract provides recovery functionality to both colonies and the Colony Network. It implements logic for assinging the "recovery" role to various addresses as well as for entering "recovery mode", a special state which allows for direct writes to a colony's underlying storage, meant to allow for recovery in case of critical bugs or security failures.

Interface Methods


Indicate approval to exit recovery mode. Can only be called by user with recovery role.

checkNotAdditionalProtectedVariable(uint256 _slot)

Check whether the supplied slot is a protected variable specific to this contract

Note: No return value, but should throw if protected.


_slotuint256The storage slot number to check.


Put colony network mining into recovery mode. Can only be called by user with recovery role.


Exit recovery mode, can be called by anyone if enough whitelist approvals are given.

isInRecoveryMode():bool inRecoveryMode

Is colony network in recovery mode.

Return Parameters

inRecoveryModeboolReturn true if recovery mode is active, false otherwise

numRecoveryRoles():uint64 numRoles

Return number of recovery roles.

Return Parameters

numRolesuint64Number of users with the recovery role.

removeRecoveryRole(address _user)

Remove colony recovery role. Can only be called by root role.


_useraddressUser we want to remove recovery role from

setRecoveryRole(address _user)

Set new colony recovery role. Can be called by root.


_useraddressUser we want to give a recovery role to

setStorageSlotRecovery(uint256 _slot, bytes32 _value)

Update value of arbitrary storage variable. Can only be called by user with recovery role.

Note: certain critical variables are protected from editing in this function


_slotuint256Uint address of storage slot to be updated
_valuebytes32word of data to be set