> For the complete documentation index, see [llms.txt](https://developers.polymath.network/polymath/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developers.polymath.network/polymath/api/ivoting.md).

# IVoting.sol

View Source: [contracts/interfaces/IVoting.sol](https://github.com/PolymathNetwork/polymath-core/tree/096ba240a927c98e1f1a182d2efee7c4c4c1dfc5/contracts/interfaces/IVoting.sol)

**↘ Derived Contracts:** [**VotingCheckpoint**](https://github.com/PolymathNetwork/polymath-core/tree/096ba240a927c98e1f1a182d2efee7c4c4c1dfc5/docs/api/VotingCheckpoint.md)

**IVoting**

## Functions

* [changeBallotStatus(uint256 \_ballotId, bool \_isActive)](/polymath/api/ivoting.md#changeballotstatus)
* [getBallotResults(uint256 \_ballotId)](/polymath/api/ivoting.md#getballotresults)
* [getSelectedProposal(uint256 \_ballotId, address \_voter)](/polymath/api/ivoting.md#getselectedproposal)
* [getBallotDetails(uint256 \_ballotId)](/polymath/api/ivoting.md#getballotdetails)

### changeBallotStatus

⤿ Overridden Implementation(s): [PLCRVotingCheckpoint.changeBallotStatus](https://github.com/PolymathNetwork/polymath-core/tree/096ba240a927c98e1f1a182d2efee7c4c4c1dfc5/docs/api/PLCRVotingCheckpoint.md#changeballotstatus),[WeightedVoteCheckpoint.changeBallotStatus](https://github.com/PolymathNetwork/polymath-core/tree/096ba240a927c98e1f1a182d2efee7c4c4c1dfc5/docs/api/WeightedVoteCheckpoint.md#changeballotstatus)

Allows the token issuer to set the active stats of a ballot

```javascript
function changeBallotStatus(uint256 _ballotId, bool _isActive) external nonpayable
```

**Returns**

bool success

**Arguments**

| Name       | Type    | Description                                      |
| ---------- | ------- | ------------------------------------------------ |
| \_ballotId | uint256 | The index of the target ballot                   |
| \_isActive | bool    | The bool value of the active stats of the ballot |

### getBallotResults

⤿ Overridden Implementation(s): [PLCRVotingCheckpoint.getBallotResults](https://github.com/PolymathNetwork/polymath-core/tree/096ba240a927c98e1f1a182d2efee7c4c4c1dfc5/docs/api/PLCRVotingCheckpoint.md#getballotresults),[WeightedVoteCheckpoint.getBallotResults](https://github.com/PolymathNetwork/polymath-core/tree/096ba240a927c98e1f1a182d2efee7c4c4c1dfc5/docs/api/WeightedVoteCheckpoint.md#getballotresults)

Queries the result of a given ballot

```javascript
function getBallotResults(uint256 _ballotId) external view
returns(voteWeighting uint256[], tieWith uint256[], winningProposal uint256, isVotingSucceed bool, totalVoters uint256)
```

**Returns**

uint256 voteWeighting

**Arguments**

| Name       | Type    | Description             |
| ---------- | ------- | ----------------------- |
| \_ballotId | uint256 | Id of the target ballot |

### getSelectedProposal

⤿ Overridden Implementation(s): [PLCRVotingCheckpoint.getSelectedProposal](https://github.com/PolymathNetwork/polymath-core/tree/096ba240a927c98e1f1a182d2efee7c4c4c1dfc5/docs/api/PLCRVotingCheckpoint.md#getselectedproposal),[WeightedVoteCheckpoint.getSelectedProposal](https://github.com/PolymathNetwork/polymath-core/tree/096ba240a927c98e1f1a182d2efee7c4c4c1dfc5/docs/api/WeightedVoteCheckpoint.md#getselectedproposal)

Get the voted proposal

```javascript
function getSelectedProposal(uint256 _ballotId, address _voter) external view
returns(proposalId uint256)
```

**Arguments**

| Name       | Type    | Description          |
| ---------- | ------- | -------------------- |
| \_ballotId | uint256 | Id of the ballot     |
| \_voter    | address | Address of the voter |

### getBallotDetails

⤿ Overridden Implementation(s): [PLCRVotingCheckpoint.getBallotDetails](https://github.com/PolymathNetwork/polymath-core/tree/096ba240a927c98e1f1a182d2efee7c4c4c1dfc5/docs/api/PLCRVotingCheckpoint.md#getballotdetails),[WeightedVoteCheckpoint.getBallotDetails](https://github.com/PolymathNetwork/polymath-core/tree/096ba240a927c98e1f1a182d2efee7c4c4c1dfc5/docs/api/WeightedVoteCheckpoint.md#getballotdetails)

Get the details of the ballot

```javascript
function getBallotDetails(uint256 _ballotId) external view
returns(quorum uint256, totalSupplyAtCheckpoint uint256, checkpointId uint256, startTime uint256, endTime uint256, totalProposals uint256, totalVoters uint256, isActive bool)
```

**Returns**

uint256 quorum

**Arguments**

| Name       | Type    | Description                    |
| ---------- | ------- | ------------------------------ |
| \_ballotId | uint256 | The index of the target ballot |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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://developers.polymath.network/polymath/api/ivoting.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.
