This repository includes proposals for Juno Charter Elections and utils scripts.
The Proposal Generator Script streamlines the process of generating structured proposals for department elections, accommodating both "execute" and "text" proposal types. This script facilitates the creation of Markdown and JSON files tailored to each candidate's nomination, adhering to predefined templates.
- Proposal Type Selection: Supports both "execute" and "text" proposals, utilizing respective Markdown templates and adjusting the JSON output accordingly.
- Input Validation: Incorporates validation for URLs and sanitizes other inputs to prevent the inclusion of unwanted characters.
- Markdown Generation: Automatically generates a Markdown file with the nominee's details based on the selected proposal type.
- JSON Proposal Creation: Produces a
proposal.json
file, encoding specific details in base64 for "execute" proposals and adjusting content for "text" proposals.
Ensure Python 3.6 or later is installed on your system to run the script. Additionally, prepare the following template files in the script's directory:
template_with_execute.md
for "execute" proposalstemplate_without_execute.md
for "text" proposals
-
Run the Script: Navigate to the script's directory in your terminal and execute:
python generate.py
-
Follow Prompts: Enter the required information as prompted:
- Proposal Type (
execute
ortext
) - Department Name (limited to whitelisted departments)
- Candidate Name, Address, Twitter Handle, Discord Handle
- Candidate Nomination URL, Twitter Space URL
- Department Contract Address (for "execute" proposals)
- Proposal Type (
-
Generated Files: The script produces:
- A Markdown file within a structured directory (
/department_name/candidate_name/candidate_name_proposal.md
). - A
proposal.json
file in the same directory, tailored to the proposal type.
- A Markdown file within a structured directory (
For "execute" proposals requiring submission to a blockchain, use the junod
CLI with Cosmos-SDK v0.47 specifications:
-
Prepare the Transaction:
junod tx gov submit-proposal --from <YourWalletName> --chain-id <ChainID> --proposal "proposal.json" --deposit <DepositAmount>ujuno -y
Replace placeholders with your wallet name, chain ID, and deposit amount.
-
Broadcast the Transaction: Broadcast the signed transaction to the network. Check the transaction status using:
junod query tx <TxHash>
Adjust template_with_execute.md
, template_without_execute.md
, and the whitelisted departments in the script as needed to fit your specific proposal requirements.
- Invalid URLs: Ensure URLs begin with
http://
orhttps://
and are correctly formatted. - Permission Issues: Verify write permissions in the script's directory to allow file and directory creation.
For additional assistance or to report issues, please open an issue on the project's GitHub repository.
- Operations:
juno14dmlcpszxrqx6dhcavmwep2nh2dam9fs9whzgmdeluqxzng9vx2qpr2vx6
- Developement:
juno10uy49jku989yj2f4dmj4yplqsrjy9vedwrjflakwkvtalwu0nlusadmcz0