Skip to content

Expiring an Initiative

Function Signature

function expireInitiative(uint256 initiativeId) external payable onlyOwner

Parameters

ParameterTypeDescription
initiativeIduint256ID of the initiative to expire

Access Control

Owner-only - Uses onlyOwner modifier.

Pre-conditions

  1. Initiative must exist
  2. Initiative must be in Proposed state - Cannot expire Accepted initiatives
  3. Initiative must be inactive for ≥ inactivityTimeout (default 60 days)
Activity tracking:
  • lastActivity updates when:
    • Initiative is created
    • Any supporter locks tokens
  • Default timeout: 60 days (configured at deployment via BoardConfig.inactivityTimeout)

Validation

Reverts if the initiative is not in Proposed state or if block.timestamp is not beyond lastActivity + inactivityTimeout.

What Happens When Expiring

  1. State changes to Expired
  2. Emits InitiativeExpired event

Note: Bounty integration is not wired into Signals yet.

Impact on Token Locks

Redemption from Expired Initiatives

Supporters can redeem immediately (no timelock). Redemption is allowed when the initiative is Accepted or Expired.

Events Emitted

event InitiativeExpired(uint256 indexed initiativeId, address indexed actor)

Validation & Errors

ErrorConditionSolution
Signals_InvalidIDInvalid initiative IDUse valid ID
Signals_IncorrectInitiativeStateInitiative not in Proposed state or not inactive long enoughWait for inactivity timeout and ensure state is Proposed
OwnableUnauthorizedAccountCaller is not ownerMust be board owner

Related Functions

// Query functions
function getInitiative(uint256 initiativeId) external view returns (Initiative memory)
function inactivityTimeout() external view returns (uint256)
 
// Owner functions for managing initiatives
function acceptInitiative(uint256 initiativeId) external onlyOwner
function expireInitiative(uint256 initiativeId) external onlyOwner