Skip to content

Commit

Permalink
docs(congerss): add example to vote and execute a proposal
Browse files Browse the repository at this point in the history
  • Loading branch information
robert-zaremba committed Dec 24, 2023
1 parent ceddae7 commit 4b1ca9c
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions congress/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,15 @@ Any member can vote for any `InProgress` proposal. Members can't overwrite their
- OR `vote_duration` passed
- OR `min_vote_duration` passed and the tally can be finalized (proposal reached min amount of approval votes or have enough abstain + reject votes to block the approval).


Example CLI command to vote for a proposal:

``` shell
# vote must be one of: "Approve", "Reject", "Abstain"
near call HOUSE vote '{"id": PROP_ID, "vote": "Approve"}' --accountId YOU
```


### Vetoing

Any proposal can be vetoed (even an in progress one) until the cooldown is over.
Expand All @@ -148,6 +157,12 @@ Proposal reaches _failed_ status when it was approved, but the execution failed.

If proposal execution breaks an invariant check (eg: crossing the budget cap), then the transaction will succeed and a composed error will be returned: the `Ok(Err(ExecRespErr::**))` of `Result<PromiseOrValue<Result<(), ExecRespErr>>, ExecError>` type.

Example CLI command to execute a proposal:

``` shell
near call HOUSE '{"id": PROP_ID}' --accountId YOU
```

## Queries

- `get_proposals`: Query all proposals
Expand Down

0 comments on commit 4b1ca9c

Please sign in to comment.