Closed ewagmig closed 5 years ago
data struct design for the table proposal
is ongoing...
Take the following printout for example:
[vagrant@vagrant-192-168-1-190 ~]$ ./qoscli query proposals --node "tcp://192.168.1.221:26657"
[{"proposal_content":{"type":"gov/TextProposal","value":{"title":"myproposal","description":"the 1st proposal","deposit":"33500000"}},"proposal_id":"1","proposal_status":"Rejected","final_tally_result":{"yes":"0","abstain":"0","no":"0","no_with_veto":"0"},"submit_time":"2019-09-05T02:34:57.645497682Z","deposit_end_time":"2019-09-07T02:34:57.645497682Z","total_deposit":"33500000","voting_start_time":"2019-09-05T02:34:57.645497682Z","voting_start_height":"15658","voting_end_time":"2019-09-07T02:34:57.645497682Z"},{"proposal_content":{"type":"gov/TextProposal","value":{"title":"myproposal2","description":"the second proposal","deposit":"4"}},"proposal_id":"2","proposal_status":"Rejected","final_tally_result":{"yes":"100000000","abstain":"0","no":"0","no_with_veto":"0"},"submit_time":"2019-09-05T02:39:13.615666376Z","deposit_end_time":"2019-09-07T02:39:13.615666376Z","total_deposit":"12","voting_start_time":"2019-09-05T02:41:09.062980111Z","voting_start_height":"15732","voting_end_time":"2019-09-07T02:41:09.062980111Z"}]
However, for the other tally information inquiry, a new ABCI
query should also be sent to Tendermint for the exact poll information:
[vagrant@vagrant-192-168-1-190 ~]$ ./qoscli query tally 2 --node "tcp://192.168.1.221:26657"
{"yes":"100000000","abstain":"0","no":"0","no_with_veto":"0"}
Something about votes
:
./qoscli query votes 2 --node "tcp://192.168.1.221:26657"
[{"voter":"address1f66wr25emjtp5urfcpd02epwg5ply3xzcv2u20","proposal_id":"2","option":"Yes"},{"voter":"address1swsxrkgz73lqpsp562kz3k3c7tzmmgtyg74vd2","proposal_id":"2","option":"Yes"}]
new table added in latest commit 4a9ae6e
add the deposits query infos
[vagrant@vagrant-192-168-1-223 qos]$ ./qoscli query deposits 5 --node "tcp://192.168.1.221:26657"
[{"depositor":"address1tl0gdpdwjz2g77s7qcf0jvr4sxc0szw0nlk08t","proposal_id":"5","amount":"50"}]
proposals is ready:http://47.252.11.248:9527/nodes/aquarius-2001/proposals
@yangchuang64 for more progress
A new table should be added for
proposal
storage, and it should follow current architecture of the Qmoon as an extension to API exposed for external call.