Space controller actions

In this section we will go over the actions that can be made by the Space Controller. Note that we use Open Zeppelin's OwnableUpgradable module to gate access to this functions, and therefore at the contract level we use the term owner instead of controller.

Cancel a proposal

A proposal can be cancelled as long as it has not already been executed.

function cancel(uint256 proposalId) external;
  • proposalId: The ID of the proposal

This can be used to prevent damage from malicious or broken proposals.

Update space settings

All Space settings can be updated using the updateSettings function:

function updateSettings(UpdateSettingsInput calldata input) external;

struct UpdateSettingsInput {
    uint32 minVotingDuration;
    uint32 maxVotingDuration;
    uint32 votingDelay;
    string metadataURI;
    string daoURI;
    Strategy proposalValidationStrategy;
    string proposalValidationStrategyMetadataURI;
    address[] authenticatorsToAdd;
    address[] authenticatorsToRemove;
    Strategy[] votingStrategiesToAdd;
    string[] votingStrategyMetadataURIsToAdd;
    uint8[] votingStrategiesToRemove;
}

A single entrypoint is used instead of separate ones for each value so that a single transaction can be used to update a large number of settings. This improves the UX while also preventing undesired behaviour that may arise if proposals are created half way though the settings update process.

If one does not want to update a certain value, then the following placeholder values can be used in the function call (arrays can just be left empty):

Upgrade implementation

A Space contract's implementation can be upgraded to a new version using the following methods:

  • newImplementation: The address of the new space implementation.

  • data: A encoded function call to initialize the new implementation.

Refer to Open Zeppelin's UUPS guide for more information.

Manage ownership

The owner can be transferred to a new address or renounced entirely.

Last updated