[API Reference](../README.md) > [ProposalService](../classes/ProposalService.md)

# Class: ProposalService

A single instance of ProposalService provides services relating to a single type of proposal (TProposal), for example a proposal to contribute rewards to a beneficiary. When constructing a ProposalService we pass to the constructor a `ProposalMaker<TProposal, TEventArgs>` that provides functions enabling ProposalService to do its job with respect to the given TProposal. Note it is not scoped to a particular Avatar.

For more information, see [Proposals](/Proposals.md#proposals).

## Hierarchy

**ProposalService**

## Index

### Constructors

* [constructor](ProposalService.md#constructor)

### Methods

* [getExecutedProposals](ProposalService.md#getExecutedProposals)
* [getProposalEvents](ProposalService.md#getProposalEvents)
* [getVotableProposals](ProposalService.md#getVotableProposals)

---

## Constructors

<a id="constructor"></a>

###  constructor

⊕ **new ProposalService**(web3EventService: *[Web3EventService](Web3EventService.md)*): [ProposalService](ProposalService.md)

*Defined in [proposalService.ts:27](https://github.com/daostack/arc.js/blob/6f704389/lib/proposalService.ts#L27)*

**Parameters:**

| Param | Type |
| ------ | ------ |
| web3EventService | [Web3EventService](Web3EventService.md) |

**Returns:** [ProposalService](ProposalService.md)

___

## Methods

<a id="getExecutedProposals"></a>

###  getExecutedProposals

▸ **getExecutedProposals**(votingMachine: *[IntVoteInterfaceWrapper](IntVoteInterfaceWrapper.md)*): [EntityFetcherFactory](../#EntityFetcherFactory)<[ExecutedProposal](../interfaces/ExecutedProposal.md), [ExecuteProposalEventResult](../interfaces/ExecuteProposalEventResult.md)>

*Defined in [proposalService.ts:118](https://github.com/daostack/arc.js/blob/6f704389/lib/proposalService.ts#L118)*

Returns promise of an EntityFetcherFactory for fetching executed proposals from the given `IntVoteInterfaceWrapper`. The proposals are returned as promises of instances of `ExecutedProposal`.

**Parameters:**

| Param | Type |
| ------ | ------ |
| votingMachine | [IntVoteInterfaceWrapper](IntVoteInterfaceWrapper.md) |

**Returns:** [EntityFetcherFactory](../#EntityFetcherFactory)<[ExecutedProposal](../interfaces/ExecutedProposal.md), [ExecuteProposalEventResult](../interfaces/ExecuteProposalEventResult.md)>

___
<a id="getProposalEvents"></a>

###  getProposalEvents

▸ **getProposalEvents**<`TProposal`,`TEventArgs`>(options: *[GetProposalEventsOptions](../interfaces/GetProposalEventsOptions.md)<`TProposal`, `TEventArgs`>*): [EntityFetcherFactory](../#EntityFetcherFactory)< `TProposal` &#124;  `TProposal` & [ProposalEntity](../interfaces/ProposalEntity.md), `TEventArgs`>

*Defined in [proposalService.ts:43](https://github.com/daostack/arc.js/blob/6f704389/lib/proposalService.ts#L43)*

Returns an EntityFetcherFactory for fetching proposal-related events. Can take any EventFetcherFactory whose event args supply `_proposalId`. Returns events as a promise of `TProposal`. You must supply an `EventFetcherFactory` for fetching the events and a callback to transform `TEventArgs` to a promise of `TProposal`. Each entity, when the associated proposal is votable and options.votingMachine is supplied, will also contain a `votingMachine` property of type `IntVoteInterfaceWrapper`.
*__type__*: TEventArgs The type of the `args` object in the event.

*__type__*: TProposal The type of object returned as a transformation of the `args` information in each event.

**Type parameters:**

#### TProposal 
#### TEventArgs :  [EventHasPropertyId](../interfaces/EventHasPropertyId.md)
**Parameters:**

| Param | Type | Description |
| ------ | ------ | ------ |
| options | [GetProposalEventsOptions](../interfaces/GetProposalEventsOptions.md)<`TProposal`, `TEventArgs`> |   |

**Returns:** [EntityFetcherFactory](../#EntityFetcherFactory)< `TProposal` &#124;  `TProposal` & [ProposalEntity](../interfaces/ProposalEntity.md), `TEventArgs`>

___
<a id="getVotableProposals"></a>

###  getVotableProposals

▸ **getVotableProposals**(votingMachine: *[IntVoteInterfaceWrapper](IntVoteInterfaceWrapper.md)*): [EntityFetcherFactory](../#EntityFetcherFactory)<[VotableProposal](../interfaces/VotableProposal.md), [NewProposalEventResult](../interfaces/NewProposalEventResult.md)>

*Defined in [proposalService.ts:93](https://github.com/daostack/arc.js/blob/6f704389/lib/proposalService.ts#L93)*

Returns promise of an EntityFetcherFactory for fetching votable proposals from the given `IntVoteInterfaceWrapper`. The proposals are returned as promises of instances of `VotableProposal`.

**Parameters:**

| Param | Type |
| ------ | ------ |
| votingMachine | [IntVoteInterfaceWrapper](IntVoteInterfaceWrapper.md) |

**Returns:** [EntityFetcherFactory](../#EntityFetcherFactory)<[VotableProposal](../interfaces/VotableProposal.md), [NewProposalEventResult](../interfaces/NewProposalEventResult.md)>

___

