# Vote

Nordek chain functionality can be change by voting on the contracts implementations. New implementations can be deployed, and opened to vote by validators for others to decide on whether to accept/reject the changes.

## Open a new ballot

In order to open a new vote, a validator needs to call the \`newBallot\` function on the [voting contract](https://nordekscan.com/address/0xC59D39E832316504219B7236Ea03919B9dF96FDD) with the following params:

* startAfterNumberOfCycles - number of cycles (minimum 1) after which the ballot is open for voting
* cyclesDuration - number of cycles (minimum 2) for the ballot to remain open for voting
* contractType
  * 1 - Consensus
  * 2 - BlockReward
  * 3 - ProxyStorage
  * 4 - Voting
* proposedValue - address of the new implementation deployed for the relevant contract type
* description - text description which should contain the reason/change introduced in the ballot

<figure><img src="/files/PeoTBIoNdv5bWlHx15S8" alt=""><figcaption><p>new ballot</p></figcaption></figure>

## Check ballot info

Everyone can check all the ballots that were created using the \`getBallotInfo\` function. This function receives two params:

* id - the ballot id
* key - account address

<figure><img src="/files/tdct8RrFs28UrdRY5CkY" alt=""><figcaption><p>getBallotInfo</p></figcaption></figure>

## Vote

Everyone can vote on open ballots, after the start block has passed and until the end block hasn't yet.

It's important to note that at the end of a vote, only validators count towards the final result.

Voting is done by calling the \`vote\` function, which receives two params:

* id - the ballot id
* choice - 1 is accept, 2 is reject

<figure><img src="/files/r38BLhoxUAsP9Lts7Jt8" alt=""><figcaption><p>vote</p></figcaption></figure>

Some other useful functions on the [voting contract](https://nordekscan.com/address/0xC59D39E832316504219B7236Ea03919B9dF96FDD) are:

## getQuorumState

Returns the state of a specific ballot id: 1 - in progress, 2 - accepted, 3 - rejected

## getAccepted/getRejected

Returns the number of accepts/reject of a specific ballot id.

## activeBallots

Returns an array of active ballot ids.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://nordekdocs.gitbook.io/nordek/developers/nordek-consensus/vote.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
