Crates.io | cw-proposal-single |
lib.rs | cw-proposal-single |
version | 0.1.0 |
source | src |
created_at | 2023-07-03 13:57:02.697374 |
updated_at | 2023-07-03 14:52:57.254569 |
description | DAO DAO v1 proposal single module. |
homepage | |
repository | https://github.com/DA0-DA0/dao-contracts |
max_upload_size | |
id | 907035 |
size | 411,589 |
A proposal module for a DAO DAO DAO which supports simple "yes", "no", "abstain" voting. Proposals may have associated messages which will be executed by the core module upon the proposal being passed and executed.
For more information about how these modules fit together see this wiki page.
For information about how this module counts votes and handles passing thresholds see this wiki page.
This contract may optionally be configured to require a deposit for proposal creation. Currently, any cw20 token may be used.
As a convienence one may specify that the module should use the same
token as the DAO's voting module using the VotingModuleToken
variant
when specifying information about the deposit. For this to work the
voting module associated with the DAO must support the TokenContract
query. This query may be derived via the #[token_query]
macro.
This module supports hooks for voting and proposal status changes. One
may register a contract to receive these hooks with the AddVoteHook
and AddProposalHook
methods. Upon registration the contract will
receive messages whenever a vote is cast and a proposal's status
changes (for example, when the proposal passes).
The format for these hook messages can be located in the
proposal-hooks
and vote-hooks
packages located in
packages/proposal-hooks
and packages/vote-hooks
respectively.
To stop an invalid hook receiver from locking the proposal module receivers will be removed from the hook list if they error when handling a hook.