Skip to content

Latest commit

 

History

History
149 lines (85 loc) · 4.82 KB

governance.md

File metadata and controls

149 lines (85 loc) · 4.82 KB

Class: Governance

Handles all Governance related functionality

Hierarchy

  • Governance

Index

Methods

Methods

createProposal

createProposal(args: CreateProposalParams): Promise‹TransactionQueueProposal››

Defined in src/Governance.ts:105

Create a proposal

Parameters:

Name Type
args CreateProposalParams

Returns: Promise‹TransactionQueueProposal››


getGovernanceCommitteeMembers

getGovernanceCommitteeMembers(): Promise‹Identity[]›

Defined in src/Governance.ts:36

Retrieve a list of all active committee members

Returns: Promise‹Identity[]›


getProposals

getProposals(opts: object): Promise‹Proposal[]›

Defined in src/Governance.ts:71

Retrieve a list of proposals. Can be filtered using parameters

note uses the middleware

Parameters:

Default value opts: object= {}

Name Type Description
orderBy? ProposalOrderByInput the order in which the proposals are returned
proposers? (string | Identity‹›)[] identities (or identity IDs) for which to fetch proposals. Defaults to all proposers
size? undefined | number page size
start? undefined | number page offset
states? ProposalState[] state of the proposal

Returns: Promise‹Proposal[]›


getTransactionArguments

getTransactionArguments(args: object): TransactionArgument[]

Defined in src/Governance.ts:56

Retrieve the types of arguments that a certain transaction requires to be run

Parameters:

args: object

Name Type Description
tag TxTag tag associated with the transaction that will be executed if the proposal passes

Returns: TransactionArgument[]


minimumProposalDeposit

minimumProposalDeposit(): Promise‹BigNumber›

Defined in src/Governance.ts:114

Get the minimum amount of POLYX that has to be deposited when creating a proposal

note can be subscribed to

Returns: Promise‹BigNumber›

minimumProposalDeposit(callback: SubCallback‹BigNumber›): Promise‹UnsubCallback

Defined in src/Governance.ts:115

Parameters:

Name Type
callback SubCallback‹BigNumber›

Returns: Promise‹UnsubCallback


proposalTimeFrames

proposalTimeFrames(): Promise‹ProposalTimeFrames

Defined in src/Governance.ts:148

Retrieve the proposal time frames. This includes:

  • Amount of blocks from proposal creation until the proposal can be voted on (cool off)
  • Amount of blocks from when cool off ends until the voting period is over (duration)

note can be subscribed to

Returns: Promise‹ProposalTimeFrames

proposalTimeFrames(callback: SubCallbackProposalTimeFrames›): Promise‹UnsubCallback

Defined in src/Governance.ts:149

Parameters:

Name Type
callback SubCallbackProposalTimeFrames

Returns: Promise‹UnsubCallback