Expiring an Initiative
Function Signature
function expireInitiative(uint256 initiativeId) external payable onlyOwnerParameters
| Parameter | Type | Description |
|---|---|---|
initiativeId | uint256 | ID of the initiative to expire |
Access Control
Owner-only - Uses onlyOwner modifier.
Pre-conditions
- ✅ Initiative must exist
- ✅ Initiative must be in Proposed state - Cannot expire Accepted initiatives
- ✅ Initiative must be inactive for ≥
inactivityTimeout(default 60 days)
lastActivityupdates 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
- State changes to
Expired - Emits
InitiativeExpiredevent
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
| Error | Condition | Solution |
|---|---|---|
Signals_InvalidID | Invalid initiative ID | Use valid ID |
Signals_IncorrectInitiativeState | Initiative not in Proposed state or not inactive long enough | Wait for inactivity timeout and ensure state is Proposed |
OwnableUnauthorizedAccount | Caller is not owner | Must 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