New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(cmd): Add support for governance operations #91
Conversation
dc14811
to
dcbd0b2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some refactoring suggestions.
4aadab2
to
03b8f56
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Current example output for Testnet:
$ ./oasis acc gov show 7
Proposal passed, results: map[yes:50502292650718313]
Voted stake: 50502292650718313 (99.74%), total voting stake: 50632443796309264
Voted yes stake: 50502292650718313 (100.00%), voted stake: 50502292650718313, threshold: 68%
Validators voted:
oasis1qz2tg4hsatlxfaf8yut9gxgv8990ujaz4sldgmzx,<none>,10103361401282754 (19.95%)
oasis1qqv25adrld8jjquzxzg769689lgf9jxvwgjs8tha,<none>,10101056743564861 (19.95%)
oasis1qq2vzcvxn0js5unsch5me2xz4kr43vcasv0d5eq4,<none>,10099736164903599 (19.95%)
oasis1qz424yg28jqmgfq3xvly6ky64jqnmlylfc27d7cp,<none>,10099128300187338 (19.95%)
oasis1qr37y56g92chzvsew54kj7gu47cxyly7jytt5rm0,<none>,10099010040779761 (19.95%)
Validators not voted:
oasis1qrwncs459lauc77zw23efdn9dmfcp23cxv095l5z,GateOmega,36925612846659 (0.07%)
oasis1qq60zmsfca0gvmm3v8906pn5zqtt4ee2ssexramg,Validatrium,33743956828846 (0.07%)
oasis1qzjm0zwfg4egs9kk4d9rkujudzk8pjp5rvxyr3ag,Munay Network,11702422579124 (0.02%)
oasis1qpq97fm6lf87jzms9agd6z902nh7axtxvus6m352,LDV,10378819794784 (0.02%)
oasis1qpz97gfrvj5xzx8jx7x9zweeq0rcf2q6jg4a09qz,Stardust Staking,10086070309641 (0.02%)
oasis1qr2jxg57ch6p3787t2a8973v8zn8g82nxuex0773,Doorgod,9076788760953 (0.02%)
oasis1qz9x0zpja6n25hc5242k2e60l6a7ke2zsq9cqrqz,SerGo,5044216011403 (0.01%)
oasis1qqxxut9x74dutu587f9nj8787qz4dm0ueu05l88c,Princess Stake,2823252249537 (0.01%)
oasis1qq45am6gzaur2rxhk26av9qf7ryhgca6ecg28clu,Jr,2017758254984 (0.00%)
oasis1qzlzczsdme4scprjjh4h4vtljnmx3ag4vgpdnqln,Alexander (aka Bambarello) Validator,1593638024547 (0.00%)
oasis1qrq7hgvv26003hy89klcmy3mnedrmyd7lvf0k6qn,Perfect Stake,1403980986777 (0.00%)
oasis1qzwe6xywazp29tp20974wgxhdcpdf6yxfcn2jxvv,Simply Staking,1261098909212 (0.00%)
oasis1qphcvmsh6mw98vtg0cg4dvdsen5tm0g3e58eqpnp,Appload,1108526799775 (0.00%)
oasis1qpc66dgff4wrkj8kac4njrl2uvww3c9m5ycjwar2,<none>,1008643976345 (0.00%)
oasis1qpswaz4djukz0zanquyh2vswk59up22emysq5am9,StakeService,798000138962 (0.00%)
oasis1qr6a9jyxhvnxuq5kmtvntr0uv6mntvzvuyv57aqc,Orion.Money,480502898774 (0.00%)
oasis1qr4vsan850vmztuy9r2pex4fj4wxnmhvlgclg500,<none>,297535440854 (0.00%)
oasis1qqgvqelw8kmcd8k4cqypcsyajkl3gq6ppc4t34n2,AnkaStake,200251058019 (0.00%)
oasis1qzw6ljanmz8h4pjggemlgcysdnamaj830vlwu8c7,Mirror Frequency,200069721755 (0.00%)
I'm picky, but let's make printing more consistent with other commands:
- add
Network: Testnet
- add
Proposal ID: 7
- then something like
Status: PASSED
- followed by
Results:
map[yes:50502292650718313]
should beYes: 50502292650718313 No: 0 Abstein: 0
- and then
=== VALIDATORS VOTED ===
with enumerated list of voters and the same for=== VALIDATORS NOT VOTED ===
b9439de
to
ffaeb8e
Compare
Moved
|
ffaeb8e
to
579fe7b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Adds
oasis network governance
command with the following subcommands:list
lists all governance proposalsshow
moved fromoasis network governance-proposal
cast-vote
votes for the proposal with yes/no/absteincreate-proposal
registers new proposal