github.com/Finschia/finschia-sdk@v0.48.1/x/gov/spec/07_client.md (about)

     1  <!--
     2  order: 7
     3  -->
     4  
     5  # Client
     6  
     7  ## CLI
     8  
     9  A user can query and interact with the `gov` module using the CLI.
    10  
    11  ### Query
    12  
    13  The `query` commands allow users to query `gov` state.
    14  
    15  ```bash
    16  simd query gov --help
    17  ```
    18  
    19  #### deposit
    20  
    21  The `deposit` command allows users to query a deposit for a given proposal from a given depositor.
    22  
    23  ```bash
    24  simd query gov deposit [proposal-id] [depositer-addr] [flags]
    25  ```
    26  
    27  Example:
    28  
    29  ```bash
    30  simd query gov deposit 1 cosmos1..
    31  ```
    32  
    33  Example Output:
    34  
    35  ```bash
    36  amount:
    37  - amount: "100"
    38    denom: stake
    39  depositor: cosmos1..
    40  proposal_id: "1"
    41  ```
    42  
    43  #### deposits
    44  
    45  The `deposits` command allows users to query all deposits for a given proposal.
    46  
    47  ```bash
    48  simd query gov deposits [proposal-id] [flags]
    49  ```
    50  
    51  Example:
    52  
    53  ```bash
    54  simd query gov deposits 1
    55  ```
    56  
    57  Example Output:
    58  
    59  ```bash
    60  deposits:
    61  - amount:
    62    - amount: "100"
    63      denom: stake
    64    depositor: cosmos1..
    65    proposal_id: "1"
    66  pagination:
    67    next_key: null
    68    total: "0"
    69  ```
    70  
    71  #### param
    72  
    73  The `param` command allows users to query a given parameter for the `gov` module.
    74  
    75  ```bash
    76  simd query gov param [param-type] [flags]
    77  ```
    78  
    79  Example:
    80  
    81  ```bash
    82  simd query gov param voting
    83  ```
    84  
    85  Example Output:
    86  
    87  ```bash
    88  voting_period: "172800000000000"
    89  ```
    90  
    91  #### params
    92  
    93  The `params` command allows users to query all parameters for the `gov` module.
    94  
    95  ```bash
    96  simd query gov params [flags]
    97  ```
    98  
    99  Example:
   100  
   101  ```bash
   102  simd query gov params
   103  ```
   104  
   105  Example Output:
   106  
   107  ```bash
   108  deposit_params:
   109    max_deposit_period: "172800000000000"
   110    min_deposit:
   111    - amount: "10000000"
   112      denom: stake
   113  tally_params:
   114    quorum: "0.334000000000000000"
   115    threshold: "0.500000000000000000"
   116    veto_threshold: "0.334000000000000000"
   117  voting_params:
   118    voting_period: "172800000000000"
   119  ```
   120  
   121  #### proposal
   122  
   123  The `proposal` command allows users to query a given proposal.
   124  
   125  ```bash
   126  simd query gov proposal [proposal-id] [flags]
   127  ```
   128  
   129  Example:
   130  
   131  ```bash
   132  simd query gov proposal 1
   133  ```
   134  
   135  Example Output:
   136  
   137  ```bash
   138  content:
   139    '@type': /cosmos.gov.v1beta1.TextProposal
   140    description: testing, testing, 1, 2, 3
   141    title: Test Proposal
   142  deposit_end_time: "2021-09-17T23:36:18.254995423Z"
   143  final_tally_result:
   144    abstain: "0"
   145    "no": "0"
   146    no_with_veto: "0"
   147    "yes": "0"
   148  proposal_id: "1"
   149  status: PROPOSAL_STATUS_DEPOSIT_PERIOD
   150  submit_time: "2021-09-15T23:36:18.254995423Z"
   151  total_deposit:
   152  - amount: "100"
   153    denom: stake
   154  voting_end_time: "0001-01-01T00:00:00Z"
   155  voting_start_time: "0001-01-01T00:00:00Z"
   156  ```
   157  
   158  #### proposals
   159  
   160  The `proposals` command allows users to query all proposals with optional filters.
   161  
   162  ```bash
   163  simd query gov proposals [flags]
   164  ```
   165  
   166  Example:
   167  
   168  ```bash
   169  simd query gov proposals
   170  ```
   171  
   172  Example Output:
   173  
   174  ```bash
   175  pagination:
   176    next_key: null
   177    total: "1"
   178  proposals:
   179  - content:
   180      '@type': /cosmos.gov.v1beta1.TextProposal
   181      description: testing, testing, 1, 2, 3
   182      title: Test Proposal
   183    deposit_end_time: "2021-09-17T23:36:18.254995423Z"
   184    final_tally_result:
   185      abstain: "0"
   186      "no": "0"
   187      no_with_veto: "0"
   188      "yes": "0"
   189    proposal_id: "1"
   190    status: PROPOSAL_STATUS_DEPOSIT_PERIOD
   191    submit_time: "2021-09-15T23:36:18.254995423Z"
   192    total_deposit:
   193    - amount: "100"
   194      denom: stake
   195    voting_end_time: "0001-01-01T00:00:00Z"
   196    voting_start_time: "0001-01-01T00:00:00Z"
   197  ```
   198  
   199  #### proposer
   200  
   201  The `proposer` command allows users to query the proposer for a given proposal.
   202  
   203  ```bash
   204  simd query gov proposer [proposal-id] [flags]
   205  ```
   206  
   207  Example:
   208  
   209  ```bash
   210  simd query gov proposer 1
   211  ```
   212  
   213  Example Output:
   214  
   215  ```bash
   216  proposal_id: "1"
   217  proposer: cosmos1r0tllwu5c9dtgwg3wr28lpvf76hg85f5zmh9l2
   218  ```
   219  
   220  #### tally
   221  
   222  The `tally` command allows users to query the tally of a given proposal vote.
   223  
   224  ```bash
   225  simd query gov tally [proposal-id] [flags]
   226  ```
   227  
   228  Example:
   229  
   230  ```bash
   231  simd query gov tally 1
   232  ```
   233  
   234  Example Output:
   235  
   236  ```bash
   237  abstain: "0"
   238  "no": "0"
   239  no_with_veto: "0"
   240  "yes": "1"
   241  ```
   242  
   243  #### vote
   244  
   245  The `vote` command allows users to query a vote for a given proposal.
   246  
   247  ```bash
   248  simd query gov vote [proposal-id] [voter-addr] [flags]
   249  ```
   250  
   251  Example:
   252  
   253  ```bash
   254  simd query gov vote 1 cosmos1..
   255  ```
   256  
   257  Example Output:
   258  
   259  ```bash
   260  option: VOTE_OPTION_YES
   261  options:
   262  - option: VOTE_OPTION_YES
   263    weight: "1.000000000000000000"
   264  proposal_id: "1"
   265  voter: cosmos1..
   266  ```
   267  
   268  #### votes
   269  
   270  The `votes` command allows users to query all votes for a given proposal.
   271  
   272  ```bash
   273  simd query gov votes [proposal-id] [flags]
   274  ```
   275  
   276  Example:
   277  
   278  ```bash
   279  simd query gov votes 1
   280  ```
   281  
   282  Example Output:
   283  
   284  ```bash
   285  pagination:
   286    next_key: null
   287    total: "0"
   288  votes:
   289  - option: VOTE_OPTION_YES
   290    options:
   291    - option: VOTE_OPTION_YES
   292      weight: "1.000000000000000000"
   293    proposal_id: "1"
   294    voter: cosmos1r0tllwu5c9dtgwg3wr28lpvf76hg85f5zmh9l2
   295  ```
   296  
   297  ### Transactions
   298  
   299  The `tx` commands allow users to interact with the `gov` module.
   300  
   301  ```bash
   302  simd tx gov --help
   303  ```
   304  
   305  #### deposit
   306  
   307  The `deposit` command allows users to deposit tokens for a given proposal.
   308  
   309  ```bash
   310  simd tx gov deposit [proposal-id] [deposit] [flags]
   311  ```
   312  
   313  Example:
   314  
   315  ```bash
   316  simd tx gov deposit 1 10000000stake --from cosmos1..
   317  ```
   318  
   319  #### submit-proposal
   320  
   321  The `submit-proposal` command allows users to submit a governance proposal and to optionally include an initial deposit.
   322  
   323  ```bash
   324  simd tx gov submit-proposal [command] [flags]
   325  ```
   326  
   327  Example:
   328  
   329  ```bash
   330  simd tx gov submit-proposal --title="Test Proposal" --description="testing, testing, 1, 2, 3" --type="Text" --deposit="10000000stake" --from cosmos1..
   331  ```
   332  
   333  Example (`cancel-software-upgrade`):
   334  
   335  ```bash
   336  simd tx gov submit-proposal cancel-software-upgrade --title="Test Proposal" --description="testing, testing, 1, 2, 3" --deposit="10000000stake" --from cosmos1..
   337  ```
   338  
   339  Example (`community-pool-spend`):
   340  
   341  ```bash
   342  simd tx gov submit-proposal community-pool-spend proposal.json --from cosmos1..
   343  ```
   344  
   345  ```json
   346  {
   347    "title": "Test Proposal",
   348    "description": "testing, testing, 1, 2, 3",
   349    "recipient": "cosmos1..",
   350    "amount": "10000000stake",
   351    "deposit": "10000000stake"
   352  }
   353  ```
   354  
   355  Example (`param-change`):
   356  
   357  ```bash
   358  simd tx gov submit-proposal param-change proposal.json --from cosmos1..
   359  ```
   360  
   361  ```json
   362  {
   363    "title": "Test Proposal",
   364    "description": "testing, testing, 1, 2, 3",
   365    "changes": [
   366      {
   367        "subspace": "staking",
   368        "key": "MaxValidators",
   369        "value": 100
   370      }
   371    ],
   372    "deposit": "10000000stake"
   373  }
   374  ```
   375  
   376  Example (`software-upgrade`):
   377  
   378  ```bash
   379  simd tx gov submit-proposal software-upgrade v2 --title="Test Proposal" --description="testing, testing, 1, 2, 3" --upgrade-height 1000000 --from cosmos1..
   380  ```
   381  
   382  #### vote
   383  
   384  The `vote` command allows users to submit a vote for a given governance proposal.
   385  
   386  ```bash
   387  simd tx gov vote [command] [flags]
   388  ```
   389  
   390  Example:
   391  
   392  ```bash
   393  simd tx gov vote 1 yes --from cosmos1..
   394  ```
   395  
   396  #### weighted-vote
   397  
   398  The `weighted-vote` command allows users to submit a weighted vote for a given governance proposal.
   399  
   400  ```bash
   401  simd tx gov weighted-vote [proposal-id] [weighted-options]
   402  ```
   403  
   404  Example:
   405  
   406  ```bash
   407  simd tx gov weighted-vote 1 yes=0.5,no=0.5 --from cosmos1
   408  ```
   409  
   410  ## gRPC
   411  
   412  A user can query the `gov` module using gRPC endpoints.
   413  
   414  ### Proposal
   415  
   416  The `Proposal` endpoint allows users to query a given proposal.
   417  
   418  ```bash
   419  cosmos.gov.v1beta1.Query/Proposal
   420  ```
   421  
   422  Example:
   423  
   424  ```bash
   425  grpcurl -plaintext \
   426      -d '{"proposal_id":"1"}' \
   427      localhost:9090 \
   428      cosmos.gov.v1beta1.Query/Proposal
   429  ```
   430  
   431  Example Output:
   432  
   433  ```bash
   434  {
   435    "proposal": {
   436      "proposalId": "1",
   437      "content": {"@type":"/cosmos.gov.v1beta1.TextProposal","description":"testing, testing, 1, 2, 3","title":"Test Proposal"},
   438      "status": "PROPOSAL_STATUS_VOTING_PERIOD",
   439      "finalTallyResult": {
   440        "yes": "0",
   441        "abstain": "0",
   442        "no": "0",
   443        "noWithVeto": "0"
   444      },
   445      "submitTime": "2021-09-16T19:40:08.712440474Z",
   446      "depositEndTime": "2021-09-18T19:40:08.712440474Z",
   447      "totalDeposit": [
   448        {
   449          "denom": "stake",
   450          "amount": "10000000"
   451        }
   452      ],
   453      "votingStartTime": "2021-09-16T19:40:08.712440474Z",
   454      "votingEndTime": "2021-09-18T19:40:08.712440474Z"
   455    }
   456  }
   457  ```
   458  
   459  ### Proposals
   460  
   461  The `Proposals` endpoint allows users to query all proposals with optional filters.
   462  
   463  ```bash
   464  cosmos.gov.v1beta1.Query/Proposals
   465  ```
   466  
   467  Example:
   468  
   469  ```bash
   470  grpcurl -plaintext \
   471      localhost:9090 \
   472      cosmos.gov.v1beta1.Query/Proposals
   473  ```
   474  
   475  Example Output:
   476  
   477  ```bash
   478  {
   479    "proposals": [
   480      {
   481        "proposalId": "1",
   482        "content": {"@type":"/cosmos.gov.v1beta1.TextProposal","description":"testing, testing, 1, 2, 3","title":"Test Proposal"},
   483        "status": "PROPOSAL_STATUS_VOTING_PERIOD",
   484        "finalTallyResult": {
   485          "yes": "0",
   486          "abstain": "0",
   487          "no": "0",
   488          "noWithVeto": "0"
   489        },
   490        "submitTime": "2021-09-16T19:40:08.712440474Z",
   491        "depositEndTime": "2021-09-18T19:40:08.712440474Z",
   492        "totalDeposit": [
   493          {
   494            "denom": "stake",
   495            "amount": "10000000"
   496          }
   497        ],
   498        "votingStartTime": "2021-09-16T19:40:08.712440474Z",
   499        "votingEndTime": "2021-09-18T19:40:08.712440474Z"
   500      },
   501      {
   502        "proposalId": "2",
   503        "content": {"@type":"/cosmos.upgrade.v1beta1.CancelSoftwareUpgradeProposal","description":"Test Proposal","title":"testing, testing, 1, 2, 3"},
   504        "status": "PROPOSAL_STATUS_DEPOSIT_PERIOD",
   505        "finalTallyResult": {
   506          "yes": "0",
   507          "abstain": "0",
   508          "no": "0",
   509          "noWithVeto": "0"
   510        },
   511        "submitTime": "2021-09-17T18:26:57.866854713Z",
   512        "depositEndTime": "2021-09-19T18:26:57.866854713Z",
   513        "votingStartTime": "0001-01-01T00:00:00Z",
   514        "votingEndTime": "0001-01-01T00:00:00Z"
   515      }
   516    ],
   517    "pagination": {
   518      "total": "2"
   519    }
   520  }
   521  ```
   522  
   523  ### Vote
   524  
   525  The `Vote` endpoint allows users to query a vote for a given proposal.
   526  
   527  ```bash
   528  cosmos.gov.v1beta1.Query/Vote
   529  ```
   530  
   531  Example:
   532  
   533  ```bash
   534  grpcurl -plaintext \
   535      -d '{"proposal_id":"1","voter":"cosmos1.."}' \
   536      localhost:9090 \
   537      cosmos.gov.v1beta1.Query/Vote
   538  ```
   539  
   540  Example Output:
   541  
   542  ```bash
   543  {
   544    "vote": {
   545      "proposalId": "1",
   546      "voter": "cosmos1..",
   547      "option": "VOTE_OPTION_YES",
   548      "options": [
   549        {
   550          "option": "VOTE_OPTION_YES",
   551          "weight": "1000000000000000000"
   552        }
   553      ]
   554    }
   555  }
   556  ```
   557  
   558  ### Votes
   559  
   560  The `Votes` endpoint allows users to query all votes for a given proposal.
   561  
   562  ```bash
   563  cosmos.gov.v1beta1.Query/Votes
   564  ```
   565  
   566  Example:
   567  
   568  ```bash
   569  grpcurl -plaintext \
   570      -d '{"proposal_id":"1"}' \
   571      localhost:9090 \
   572      cosmos.gov.v1beta1.Query/Votes
   573  ```
   574  
   575  Example Output:
   576  
   577  ```bash
   578  {
   579    "votes": [
   580      {
   581        "proposalId": "1",
   582        "voter": "cosmos1..",
   583        "option": "VOTE_OPTION_YES",
   584        "options": [
   585          {
   586            "option": "VOTE_OPTION_YES",
   587            "weight": "1000000000000000000"
   588          }
   589        ]
   590      }
   591    ],
   592    "pagination": {
   593      "total": "1"
   594    }
   595  }
   596  ```
   597  
   598  ### Params
   599  
   600  The `Params` endpoint allows users to query all parameters for the `gov` module.
   601  
   602  <!-- TODO: #10197 Querying governance params outputs nil values -->
   603  
   604  ```bash
   605  cosmos.gov.v1beta1.Query/Params
   606  ```
   607  
   608  Example:
   609  
   610  ```bash
   611  grpcurl -plaintext \
   612      -d '{"params_type":"voting"}' \
   613      localhost:9090 \
   614      cosmos.gov.v1beta1.Query/Params
   615  ```
   616  
   617  Example Output:
   618  
   619  ```bash
   620  {
   621    "votingParams": {
   622      "votingPeriod": "172800s"
   623    },
   624    "depositParams": {
   625      "maxDepositPeriod": "0s"
   626    },
   627    "tallyParams": {
   628      "quorum": "MA==",
   629      "threshold": "MA==",
   630      "vetoThreshold": "MA=="
   631    }
   632  }
   633  ```
   634  
   635  ### Deposit
   636  
   637  The `Deposit` endpoint allows users to query a deposit for a given proposal from a given depositor.
   638  
   639  ```bash
   640  cosmos.gov.v1beta1.Query/Deposit
   641  ```
   642  
   643  Example:
   644  
   645  ```bash
   646  grpcurl -plaintext \
   647      '{"proposal_id":"1","depositor":"cosmos1.."}' \
   648      localhost:9090 \
   649      cosmos.gov.v1beta1.Query/Deposit
   650  ```
   651  
   652  Example Output:
   653  
   654  ```bash
   655  {
   656    "deposit": {
   657      "proposalId": "1",
   658      "depositor": "cosmos1..",
   659      "amount": [
   660        {
   661          "denom": "stake",
   662          "amount": "10000000"
   663        }
   664      ]
   665    }
   666  }
   667  ```
   668  
   669  ### deposits
   670  
   671  The `Deposits` endpoint allows users to query all deposits for a given proposal.
   672  
   673  ```bash
   674  cosmos.gov.v1beta1.Query/Deposits
   675  ```
   676  
   677  Example:
   678  
   679  ```bash
   680  grpcurl -plaintext \
   681      -d '{"proposal_id":"1"}' \
   682      localhost:9090 \
   683      cosmos.gov.v1beta1.Query/Deposits
   684  ```
   685  
   686  Example Output:
   687  
   688  ```bash
   689  {
   690    "deposits": [
   691      {
   692        "proposalId": "1",
   693        "depositor": "cosmos1..",
   694        "amount": [
   695          {
   696            "denom": "stake",
   697            "amount": "10000000"
   698          }
   699        ]
   700      }
   701    ],
   702    "pagination": {
   703      "total": "1"
   704    }
   705  }
   706  ```
   707  
   708  ### TallyResult
   709  
   710  The `TallyResult` endpoint allows users to query the tally of a given proposal.
   711  
   712  ```bash
   713  cosmos.gov.v1beta1.Query/TallyResult
   714  ```
   715  
   716  Example:
   717  
   718  ```bash
   719  grpcurl -plaintext \
   720      -d '{"proposal_id":"1"}' \
   721      localhost:9090 \
   722      cosmos.gov.v1beta1.Query/TallyResult
   723  ```
   724  
   725  Example Output:
   726  
   727  ```bash
   728  {
   729    "tally": {
   730      "yes": "1000000",
   731      "abstain": "0",
   732      "no": "0",
   733      "noWithVeto": "0"
   734    }
   735  }
   736  ```
   737  
   738  ## REST
   739  
   740  A user can query the `gov` module using REST endpoints.
   741  
   742  ### proposal
   743  
   744  The `proposals` endpoint allows users to query a given proposal.
   745  
   746  ```bash
   747  /cosmos/gov/v1beta1/proposals/{proposal_id}
   748  ```
   749  
   750  Example:
   751  
   752  ```bash
   753  curl localhost:1317/cosmos/gov/v1beta1/proposals/1
   754  ```
   755  
   756  Example Output:
   757  
   758  ```bash
   759  {
   760    "proposal": {
   761      "proposal_id": "1",
   762      "content": {
   763        "@type": "/cosmos.gov.v1beta1.TextProposal",
   764        "title": "Test Proposal",
   765        "description": "testing, testing, 1, 2, 3"
   766      },
   767      "status": "PROPOSAL_STATUS_VOTING_PERIOD",
   768      "final_tally_result": {
   769        "yes": "0",
   770        "abstain": "0",
   771        "no": "0",
   772        "no_with_veto": "0"
   773      },
   774      "submit_time": "2021-09-16T19:40:08.712440474Z",
   775      "deposit_end_time": "2021-09-18T19:40:08.712440474Z",
   776      "total_deposit": [
   777        {
   778          "denom": "stake",
   779          "amount": "10000000"
   780        }
   781      ],
   782      "voting_start_time": "2021-09-16T19:40:08.712440474Z",
   783      "voting_end_time": "2021-09-18T19:40:08.712440474Z"
   784    }
   785  }
   786  ```
   787  
   788  ### proposals
   789  
   790  The `proposals` endpoint also allows users to query all proposals with optional filters.
   791  
   792  ```bash
   793  /cosmos/gov/v1beta1/proposals
   794  ```
   795  
   796  Example:
   797  
   798  ```bash
   799  curl localhost:1317/cosmos/gov/v1beta1/proposals
   800  ```
   801  
   802  Example Output:
   803  
   804  ```bash
   805  {
   806    "proposals": [
   807      {
   808        "proposal_id": "1",
   809        "content": {
   810          "@type": "/cosmos.gov.v1beta1.TextProposal",
   811          "title": "Test Proposal",
   812          "description": "testing, testing, 1, 2, 3"
   813        },
   814        "status": "PROPOSAL_STATUS_VOTING_PERIOD",
   815        "final_tally_result": {
   816          "yes": "0",
   817          "abstain": "0",
   818          "no": "0",
   819          "no_with_veto": "0"
   820        },
   821        "submit_time": "2021-09-16T19:40:08.712440474Z",
   822        "deposit_end_time": "2021-09-18T19:40:08.712440474Z",
   823        "total_deposit": [
   824          {
   825            "denom": "stake",
   826            "amount": "10000000"
   827          }
   828        ],
   829        "voting_start_time": "2021-09-16T19:40:08.712440474Z",
   830        "voting_end_time": "2021-09-18T19:40:08.712440474Z"
   831      },
   832      {
   833        "proposal_id": "2",
   834        "content": {
   835          "@type": "/cosmos.upgrade.v1beta1.CancelSoftwareUpgradeProposal",
   836          "title": "Test Proposal",
   837          "description": "testing, testing, 1, 2, 3"
   838        },
   839        "status": "PROPOSAL_STATUS_DEPOSIT_PERIOD",
   840        "final_tally_result": {
   841          "yes": "0",
   842          "abstain": "0",
   843          "no": "0",
   844          "no_with_veto": "0"
   845        },
   846        "submit_time": "2021-09-17T18:26:57.866854713Z",
   847        "deposit_end_time": "2021-09-19T18:26:57.866854713Z",
   848        "total_deposit": [
   849        ],
   850        "voting_start_time": "0001-01-01T00:00:00Z",
   851        "voting_end_time": "0001-01-01T00:00:00Z"
   852      }
   853    ],
   854    "pagination": {
   855      "next_key": null,
   856      "total": "2"
   857    }
   858  }
   859  ```
   860  
   861  ### voter vote
   862  
   863  The `votes` endpoint allows users to query a vote for a given proposal.
   864  
   865  ```bash
   866  /cosmos/gov/v1beta1/proposals/{proposal_id}/votes/{voter}
   867  ```
   868  
   869  Example:
   870  
   871  ```bash
   872  curl localhost:1317/cosmos/gov/v1beta1/proposals/1/votes/cosmos1..
   873  ```
   874  
   875  Example Output:
   876  
   877  ```bash
   878  {
   879    "vote": {
   880      "proposal_id": "1",
   881      "voter": "cosmos1..",
   882      "option": "VOTE_OPTION_YES",
   883      "options": [
   884        {
   885          "option": "VOTE_OPTION_YES",
   886          "weight": "1.000000000000000000"
   887        }
   888      ]
   889    }
   890  }
   891  ```
   892  
   893  ### votes
   894  
   895  The `votes` endpoint allows users to query all votes for a given proposal.
   896  
   897  ```bash
   898  /cosmos/gov/v1beta1/proposals/{proposal_id}/votes
   899  ```
   900  
   901  Example:
   902  
   903  ```bash
   904  curl localhost:1317/cosmos/gov/v1beta1/proposals/1/votes
   905  ```
   906  
   907  Example Output:
   908  
   909  ```bash
   910  {
   911    "votes": [
   912      {
   913        "proposal_id": "1",
   914        "voter": "cosmos1..",
   915        "option": "VOTE_OPTION_YES",
   916        "options": [
   917          {
   918            "option": "VOTE_OPTION_YES",
   919            "weight": "1.000000000000000000"
   920          }
   921        ]
   922      }
   923    ],
   924    "pagination": {
   925      "next_key": null,
   926      "total": "1"
   927    }
   928  }
   929  ```
   930  
   931  ### params
   932  
   933  The `params` endpoint allows users to query all parameters for the `gov` module.
   934  
   935  <!-- TODO: #10197 Querying governance params outputs nil values -->
   936  
   937  ```bash
   938  /cosmos/gov/v1beta1/params/{params_type}
   939  ```
   940  
   941  Example:
   942  
   943  ```bash
   944  curl localhost:1317/cosmos/gov/v1beta1/params/voting
   945  ```
   946  
   947  Example Output:
   948  
   949  ```bash
   950  {
   951    "voting_params": {
   952      "voting_period": "172800s"
   953    },
   954    "deposit_params": {
   955      "min_deposit": [
   956      ],
   957      "max_deposit_period": "0s"
   958    },
   959    "tally_params": {
   960      "quorum": "0.000000000000000000",
   961      "threshold": "0.000000000000000000",
   962      "veto_threshold": "0.000000000000000000"
   963    }
   964  }
   965  ```
   966  
   967  ### deposits
   968  
   969  The `deposits` endpoint allows users to query a deposit for a given proposal from a given depositor.
   970  
   971  ```bash
   972  /cosmos/gov/v1beta1/proposals/{proposal_id}/deposits/{depositor}
   973  ```
   974  
   975  Example:
   976  
   977  ```bash
   978  curl localhost:1317/cosmos/gov/v1beta1/proposals/1/deposits/cosmos1..
   979  ```
   980  
   981  Example Output:
   982  
   983  ```bash
   984  {
   985    "deposit": {
   986      "proposal_id": "1",
   987      "depositor": "cosmos1..",
   988      "amount": [
   989        {
   990          "denom": "stake",
   991          "amount": "10000000"
   992        }
   993      ]
   994    }
   995  }
   996  ```
   997  
   998  ### proposal deposits
   999  
  1000  The `deposits` endpoint allows users to query all deposits for a given proposal.
  1001  
  1002  ```bash
  1003  /cosmos/gov/v1beta1/proposals/{proposal_id}/deposits
  1004  ```
  1005  
  1006  Example:
  1007  
  1008  ```bash
  1009  curl localhost:1317/cosmos/gov/v1beta1/proposals/1/deposits
  1010  ```
  1011  
  1012  Example Output:
  1013  
  1014  ```bash
  1015  {
  1016    "deposits": [
  1017      {
  1018        "proposal_id": "1",
  1019        "depositor": "cosmos1..",
  1020        "amount": [
  1021          {
  1022            "denom": "stake",
  1023            "amount": "10000000"
  1024          }
  1025        ]
  1026      }
  1027    ],
  1028    "pagination": {
  1029      "next_key": null,
  1030      "total": "1"
  1031    }
  1032  }
  1033  ```
  1034  
  1035  ### tally
  1036  
  1037  The `tally` endpoint allows users to query the tally of a given proposal.
  1038  
  1039  ```bash
  1040  /cosmos/gov/v1beta1/proposals/{proposal_id}/tally
  1041  ```
  1042  
  1043  Example:
  1044  
  1045  ```bash
  1046  curl localhost:1317/cosmos/gov/v1beta1/proposals/1/tally
  1047  ```
  1048  
  1049  Example Output:
  1050  
  1051  ```bash
  1052  {
  1053    "tally": {
  1054      "yes": "1000000",
  1055      "abstain": "0",
  1056      "no": "0",
  1057      "no_with_veto": "0"
  1058    }
  1059  }
  1060  ```