forked from Reecepbcups/cosmos-proposal-maker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.py
66 lines (42 loc) · 2.06 KB
/
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# flake8: noqa
"""
Reece Williams (reece.sh) | 2023
Easily make a proposal for a network, shrinking the markdown to a single line for the description.
||| Test this with: https://markdownlivepreview.com/ |||
"""
# =====
VOTE_OPTIONS = """
## Voting Options
YES: Agree to proceed with increasing the minimum deposit.
NO: Disagree with this increase of the minimum deposit.
NO WITH VETO: Disagree with the increase and want depositors penalized.
ABSTAIN: Decline to give an opinion on this increase of the minimum deposit.
"""
proposal_text = f"""
## Increase Juno's Deposit Minimum
[Commonwealth Thread](https://commonwealth.im/juno/discussion/11579-increase-governance-deposit-to-5000juno)
With the decline in JUNO's price the past few months, we have seen an uptick in scam proposals making it to voting period. With this, this proposal will update Juno's current governance deposit from 1000JUNO to 5000JUNO if passed.
Currently this includes: 296, 298, 299, 300, 301, 302, 303. All of these are used to phish for users wallet mnemonics and drain their personal funds.
By increasing this, it increases the cost of the attack which makes it unprofitable to execute on.
The minimum deposit rate to enter deposit period will remain at the same at 20%, which would now be 1000 JUNO.
If you do not have enough Juno to make a proposal, you can reach out to a Core-1, Core-2, or SubDAO to help get your proposal live.
---
{VOTE_OPTIONS}
"""
# replace res new lines to the \n character
res = proposal_text.replace("\n", "\\n")
# This fixes it so code blocks work
res = res.replace("```", "_$$_;")
# res = res.replace("'", "\\'") # I do not think we need to do this? does this break text props?
res = res.replace("’", "'") # when you copy paste from the web
res = res.replace('"', '\\"')
res = res.replace("`", "'") # can not do ` or else linux tries to run it in the CMD
res = res.replace(" ", "\\t") # tabs
# code blocks re-replacement
res = res.replace("_$$_;", "```")
print("=" * 20)
if res.startswith("\\n"):
res = res[2:]
if res.endswith("\\n"):
res = res[:-2]
print(res)