| Crates.io | numbat-wasm-module-governance |
| lib.rs | numbat-wasm-module-governance |
| version | 0.0.15 |
| created_at | 2025-06-23 12:05:09.81524+00 |
| updated_at | 2025-06-24 06:45:34.162028+00 |
| description | Numbat WebAssembly smart contract module that provides governance features |
| homepage | https://numbat.com/ |
| repository | https://github.com/TerraDharitri/drt-rs-sdk |
| max_upload_size | |
| id | 1722845 |
| size | 39,840 |
This is a standard smart contract module, that when added to a smart contract offers governance features:
Voting can only be done by depositing a certain token, decided upon first time setup.
The module provides the following configurable parameters:
quorum - the minimum number of (votes minus downvotes) at the end of voting periodminTokenBalanceForProposing - Minimum numbers of tokens the proposer has to deposit. These automatically count as votes as wellmaxActionsPerProposal - Maximum number of actions (transfers and/or smart contract calls) that a proposal may havevotingDelayInBlocks - Number of blocks to wait after a block is proposed before being able to vote/downvote that proposalvotingPeriodInBlocks - Number of blocks the voting period lasts (voting delay does not count towards this)lockTimeAfterVotingEndsInBlocks - Number of blocks to wait before a successful proposal can be executedThe module also provides events for most actions that happen:
proposalCreated - triggers when a proposal is created. Also provoides all the relevant information, like proposer, actions etc.voteCast - user voted on a proposaldownvoteCast - user downvoted a proposalproposalCanceled, proposalQueued and proposalExecuted - provides the ID of the specific proposaluserDeposit - a user deposited some tokens needed for a future payable actionPlease note that although the main contract can modify the module's storage directly, it is not recommended to do so, as that defeats the whole purpose of having governance. These parameters should only be modified through actions.