Are you an LLM? Read llms.txt for a summary of the docs, or llms-full.txt for the full context.
Skip to content

Proposing Initiatives

proposeInitiative()

function proposeInitiative(
    Metadata calldata _metadata
) external returns (uint256 initiativeId)
ParameterTypeDescription
_metadataMetadataTitle (required), body, and up to 5 attachments

Returns: initiativeId of the newly created initiative.

proposeInitiativeWithLock()

function proposeInitiativeWithLock(
    Metadata calldata _metadata,
    uint256 _amount,
    uint256 _lockDuration
) external returns (uint256 initiativeId, uint256 tokenId)
ParameterTypeDescription
_metadataMetadataTitle (required), body, and up to 5 attachments
_amountuint256Tokens to lock (wei). Requires prior ERC20 approval.
_lockDurationuint256Lock duration in intervals. Must be > 0 and ≤ maxLockIntervals

Returns: initiativeId and tokenId (ERC721 lock NFT).

Events

event InitiativeProposed(uint256 indexed initiativeId, address indexed proposer, Metadata metadata)
event InitiativeSupported(uint256 indexed initiativeId, address indexed supporter, uint256 tokenAmount, uint256 lockDuration, uint256 tokenId)

InitiativeSupported is only emitted by proposeInitiativeWithLock().

Errors

ErrorCondition
Signals_EmptyTitleOrBodyTitle is empty
Signals_AttachmentLimitExceededMore than 5 attachments
Signals_IncorrectBoardStateBoard not open
Signals_InsufficientTokensBalance < minBalance
Signals_InsufficientTokenDurationHistorical balance < minBalance
Signals_InsufficientLockAmountAmount < minLockAmount
Signals_TokenHasNoCheckpointSupportToken doesn't implement IVotes
Signals_InvalidArgumentsInvalid lock duration or attachment URI
Signals_TokenTransferFailedERC20 transfer reverted