Handles all Governance related functionality
- Governance
- createProposal
- getGovernanceCommitteeMembers
- getProposals
- getTransactionArguments
- minimumProposalDeposit
- proposalTimeFrames
▸ createProposal(args
: CreateProposalParams): Promise‹TransactionQueue‹Proposal››
Defined in src/Governance.ts:105
Create a proposal
Parameters:
Name | Type |
---|---|
args |
CreateProposalParams |
Returns: Promise‹TransactionQueue‹Proposal››
▸ getGovernanceCommitteeMembers(): Promise‹Identity[]›
Defined in src/Governance.ts:36
Retrieve a list of all active committee members
Returns: Promise‹Identity[]›
▸ 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(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(): 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(): 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
: SubCallback‹ProposalTimeFrames›): Promise‹UnsubCallback›
Defined in src/Governance.ts:149
Parameters:
Name | Type |
---|---|
callback |
SubCallback‹ProposalTimeFrames› |
Returns: Promise‹UnsubCallback›