author is allowed to create a proposal.
Each Space has to set a proposal validation strategy which consists of an address and a set of params that are stored in the space. These strategies should have the following interface:
author: The author of the proposal.params: Parameter array set in the space contract that is the same for every user of the Strategy.userParams: Parameter array submitted by theauthorwhen they create a proposal, and can therefore be different for each user.
Proposition power
A strategy that validates anauthor to create a proposal if their propositionPower calculated from a set of Voting strategies exceeds a proposalThreshold value. It means that if the proposal threshold is set to 5, the author needs to have at least 5 Proposition power to create a proposal. This strategy uses the same logic as Voting strategies, so refer to that section for more information.
When calling this strategy, params should be:
userParams should contain the indexed strategies that the author has power with:
Active proposal limiter
A strategy that validates anauthor to create a proposal if the author has not exceeded a limit of maxActiveProposals.
Each time an author creates a proposal, a counter is incremented up to a limit of maxActiveProposals. After this point, no more proposals can be created until a cooldown period has elapsed since the most recent proposal they created.
Using this strategy can help to prevent proposal creation spam in your space.
Proposition power with active proposal limiter
A strategy that combines the two strategies above. Anauthor can create a proposal only if their propositionPower is at least the proposalThreshold and they have not reached the limit of maxActiveProposals within the cooldown period. It is available in the Snapshot interface as “Voting power with cooldown”.
When calling this strategy, params should be:
userParams is the same as for the Proposition power strategy.
Proposition power with active proposal limiter V2
The same as the strategy above, except that theauthor can have the proposition power computed at a recent block, at most maxBlockAge blocks old, rather than at the block the proposal is created in. This lets strategies whose power is signed offchain for a given block be used. A block number of 0 computes it at the block the proposal is created in, like the strategies above. A cooldown of 0 disables the active proposals limit.
When calling this strategy, params should be as follows. The three limits are packed in a single uint96 so that they take one storage slot instead of three, which makes proposals cheaper:
userParams should contain the block the proposition power is computed at, either 0 for the current block or a block that isn’t in the future or older than maxBlockAge blocks, and the indexed strategies that the author has power with: