stellar-governor
Create a governor smart contract for token-based on-chain governance. Customizable voting parameters, timelock, and access control.
Instructions
Make a governor contract for on-chain governance using token-based voting.
Returns the source code of the generated contract, formatted in a Markdown code block. Does not write to disk.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | The name of the contract | |
| version | No | The semantic version label returned by the governor contract. | |
| votingDelay | No | Number of ledgers between proposal creation and voting start (17,000 ledgers are approx. 1 day). | |
| votingPeriod | No | Number of ledgers during which voting remains open (120,000 ledgers are approx. 1 week). | |
| proposalThreshold | No | Minimum voting power required for creating a proposal, default is 100. | |
| quorum | No | Minimum number of votes required for a proposal to pass, default is 500. | |
| timelock | No | Whether to add a timelock mechanism that enforces a delay between proposal queuing and execution. | |
| access | No | The type of access control to provision. Ownable is a simple mechanism with a single account authorized for all privileged actions. Roles is a flexible mechanism with a separate role for each privileged action. A role can have many authorized accounts. | |
| explicitImplementations | No | Whether the contract should use explicit trait implementations instead of using the default ones provided by the library. | |
| upgradeable | No | Whether the contract can be upgraded. | |
| info | No | Metadata about the contract and author |