diff --git a/docs/METHODS_EVENTS.md b/docs/METHODS_EVENTS.md index a6d04ce107..f88eb55779 100644 --- a/docs/METHODS_EVENTS.md +++ b/docs/METHODS_EVENTS.md @@ -3,14 +3,16 @@ Events are emitted for certain operations on the runtime. The following sections describe the events that are part of the default Substrate runtime. - **[balances](#balances)** +- **[collective](#collective)** + +- **[collective](#collective)** + - **[contracts](#contracts)** -- **[council](#council)** - -- **[councilMotions](#councilMotions)** - - **[democracy](#democracy)** +- **[elections](#elections)** + - **[grandpa](#grandpa)** - **[indices](#indices)** @@ -43,6 +45,58 @@ ___ ___ +### collective + +▸ **_Phantom**(`Phantom`) +- **summary**: Dummy to manage the fact we have instancing. + +▸ **Approved**(`Hash`) +- **summary**: A motion was approved by the required threshold. + +▸ **Disapproved**(`Hash`) +- **summary**: A motion was not approved by the required threshold. + +▸ **Executed**(`Hash`, `bool`) +- **summary**: A motion was executed; `bool` is true if returned without error. + +▸ **MemberExecuted**(`Hash`, `bool`) +- **summary**: A single member did some action; `bool` is true if returned without error. + +▸ **Proposed**(`AccountId`, `ProposalIndex`, `Hash`, `MemberCount`) +- **summary**: A motion (given hash) has been proposed (by given account) with a threshold (given `MemberCount`). + +▸ **Voted**(`AccountId`, `Hash`, `bool`, `MemberCount`, `MemberCount`) +- **summary**: A motion (given hash) has been voted on by given account, leaving a tally (yes votes and no votes given respectively as `MemberCount`). + +___ + + +### collective + +▸ **_Phantom**(`Phantom`) +- **summary**: Dummy to manage the fact we have instancing. + +▸ **Approved**(`Hash`) +- **summary**: A motion was approved by the required threshold. + +▸ **Disapproved**(`Hash`) +- **summary**: A motion was not approved by the required threshold. + +▸ **Executed**(`Hash`, `bool`) +- **summary**: A motion was executed; `bool` is true if returned without error. + +▸ **MemberExecuted**(`Hash`, `bool`) +- **summary**: A single member did some action; `bool` is true if returned without error. + +▸ **Proposed**(`AccountId`, `ProposalIndex`, `Hash`, `MemberCount`) +- **summary**: A motion (given hash) has been proposed (by given account) with a threshold (given `MemberCount`). + +▸ **Voted**(`AccountId`, `Hash`, `bool`, `MemberCount`, `MemberCount`) +- **summary**: A motion (given hash) has been voted on by given account, leaving a tally (yes votes and no votes given respectively as `MemberCount`). + +___ + + ### contracts ▸ **CodeStored**(`Hash`) @@ -66,46 +120,6 @@ ___ ___ -### council - -▸ **BadReaperSlashed**(`AccountId`) -- **summary**: slashed reaper - -▸ **TallyFinalized**(`Vec`, `Vec`) -- **summary**: A tally (for approval votes of council seat(s)) has ended (with one or more new members). - -▸ **TallyStarted**(`u32`) -- **summary**: A tally (for approval votes of council seat(s)) has started. - -▸ **VoterReaped**(`AccountId`, `AccountId`) -- **summary**: reaped voter, reaper - -___ - - -### councilMotions - -▸ **Approved**(`Hash`) -- **summary**: A motion was approved by the required threshold. - -▸ **Disapproved**(`Hash`) -- **summary**: A motion was not approved by the required threshold. - -▸ **Executed**(`Hash`, `bool`) -- **summary**: A motion was executed; `bool` is true if returned without error. - -▸ **MemberExecuted**(`Hash`, `bool`) -- **summary**: A single councillor did some action; `bool` is true if returned without error. - -▸ **Proposed**(`AccountId`, `ProposalIndex`, `Hash`, `MemberCount`) -- **summary**: A motion (given hash) has been proposed (by given account) with a threshold (given `MemberCount`). - -▸ **Voted**(`AccountId`, `Hash`, `bool`, `MemberCount`, `MemberCount`) -- **summary**: A motion (given hash) has been voted on by given account, leaving a tally (yes votes and no votes given respectively as `MemberCount`). - -___ - - ### democracy ▸ **Cancelled**(`ReferendumIndex`) @@ -133,6 +147,23 @@ ___ ___ +### elections + +▸ **BadReaperSlashed**(`AccountId`) +- **summary**: slashed reaper + +▸ **TallyFinalized**(`Vec`, `Vec`) +- **summary**: A tally (for approval votes of seat(s)) has ended (with one or more new members). + +▸ **TallyStarted**(`u32`) +- **summary**: A tally (for approval votes of seat(s)) has started. + +▸ **VoterReaped**(`AccountId`, `AccountId`) +- **summary**: reaped voter, reaper + +___ + + ### grandpa ▸ **NewAuthorities**(`Vec<(AuthorityId,u64)>`) diff --git a/docs/METHODS_EXTRINSICS.md b/docs/METHODS_EXTRINSICS.md index a705748009..83e8f59898 100644 --- a/docs/METHODS_EXTRINSICS.md +++ b/docs/METHODS_EXTRINSICS.md @@ -5,14 +5,16 @@ _The following sections contain Extrinsics methods are part of the default Subst - **[balances](#balances)** +- **[collective](#collective)** + +- **[collective](#collective)** + - **[contract](#contract)** -- **[council](#council)** - -- **[councilMotions](#councilMotions)** - - **[democracy](#democracy)** +- **[council](#council)** + - **[](#)** - **[grandpaFinality](#grandpaFinality)** @@ -52,6 +54,40 @@ ___ ___ +### collective + +▸ **execute**(proposal: `Proposal`) +- **summary**: Dispatch a proposal from a member using the `Member` origin. Origin must be a member of the collective. + +▸ **propose**(threshold: `Compact`, proposal: `Proposal`) +- **summary**: # - Bounded storage reads and writes. - Argument `threshold` has bearing on weight. # + +▸ **setMembers**(new_members: `Vec`) +- **summary**: Set the collective's membership manually to `new_members`. Be nice to the chain and provide it pre-sorted. Requires root origin. + +▸ **vote**(proposal: `Hash`, index: `Compact`, approve: `bool`) +- **summary**: # - Bounded storage read and writes. - Will be slightly heavier if the proposal is approved / disapproved after the vote. # + +___ + + +### collective + +▸ **execute**(proposal: `Proposal`) +- **summary**: Dispatch a proposal from a member using the `Member` origin. Origin must be a member of the collective. + +▸ **propose**(threshold: `Compact`, proposal: `Proposal`) +- **summary**: # - Bounded storage reads and writes. - Argument `threshold` has bearing on weight. # + +▸ **setMembers**(new_members: `Vec`) +- **summary**: Set the collective's membership manually to `new_members`. Be nice to the chain and provide it pre-sorted. Requires root origin. + +▸ **vote**(proposal: `Hash`, index: `Compact`, approve: `bool`) +- **summary**: # - Bounded storage read and writes. - Will be slightly heavier if the proposal is approved / disapproved after the vote. # + +___ + + ### contract ▸ **call**(dest: `Address`, value: `Compact`, gas_limit: `Compact`, data: `Bytes`) @@ -75,55 +111,6 @@ ___ ___ -### council - -▸ **presentWinner**(candidate: `Address`, total: `Compact`, index: `Compact`) -- **summary**: Claim that `signed` is one of the top Self::carry_count() + current_vote().1 candidates. Only works if the `block_number >= current_vote().0` and `< current_vote().0 + presentation_duration()` `signed` should have at least # - O(voters) compute. - One DB change. # - -▸ **proxySetApprovals**(votes: `Vec`, index: `Compact`, hint: `SetIndex`) -- **summary**: Set candidate approvals from a proxy. Approval slots stay valid as long as candidates in those slots are registered. # - Same as `set_approvals` with one additional storage read. # - -▸ **reapInactiveVoter**(reporter_index: `Compact`, who: `Address`, who_index: `Compact`, assumed_vote_index: `Compact`) -- **summary**: Remove a voter. For it not to be a bond-consuming no-op, all approved candidate indices must now be either unregistered or registered to a candidate that registered the slot after the voter gave their last approval set. Both indices must be provided as explained in [`voter_at`] function. May be called by anyone. Returns the voter deposit to `signed`. # - O(1). - Two fewer DB entries, one DB change. # - -▸ **removeMember**(who: `Address`) -- **summary**: Remove a particular member from the council. This is effective immediately. Note: A tally should happen instantly (if not already in a presentation period) to fill the seat if removal means that the desired members are not met. - -▸ **retractVoter**(index: `Compact`) -- **summary**: Remove a voter. All votes are cancelled and the voter deposit is returned. The index must be provided as explained in [`voter_at`] function. Also removes the lock on the balance of the voter. See [`do_set_approvals()`]. # - O(1). - Two fewer DB entries, one DB change. # - -▸ **setApprovals**(votes: `Vec`, index: `Compact`, hint: `SetIndex`) -- **summary**: Set candidate approvals. Approval slots stay valid as long as candidates in those slots are registered. Locks the total balance of caller indefinitely. Only [`retract_voter`] or [`reap_inactive_voter`] can unlock the balance. `hint` argument is interpreted differently based on: - if `origin` is setting approvals for the first time: The index will be checked for being a valid _hole_ in the voter list. - if the hint is correctly pointing to a hole, no fee is deducted from `origin`. - Otherwise, the call will succeed but the index is ignored and simply a push to the last chunk with free space happens. If the new push causes a new chunk to be created, a fee indicated by [`VotingFee`] is deducted. - if `origin` is already a voter: the index __must__ be valid and point to the correct position of the `origin` in the current voters list. Note that any trailing `false` votes in `votes` is ignored; In approval voting, not voting for a candidate and voting false, are equal. # - O(1). - Two extra DB entries, one DB change. - Argument `votes` is limited in length to number of candidates. # - -▸ **setDesiredSeats**(count: `Compact`) -- **summary**: Set the desired member count; if lower than the current count, then seats will not be up election when they expire. If more, then a new vote will be started if one is not already in progress. - -▸ **setPresentationDuration**(count: `Compact`) -- **summary**: Set the presentation duration. If there is currently a vote being presented for, will invoke `finalize_vote`. - -▸ **setTermDuration**(count: `Compact`) -- **summary**: Set the presentation duration. If there is current a vote being presented for, will invoke `finalize_vote`. - -▸ **submitCandidacy**(slot: `Compact`) -- **summary**: Submit oneself for candidacy. Account must have enough transferrable funds in it to pay the bond. NOTE: if `origin` has already assigned approvals via [`set_approvals`], it will NOT have any usable funds to pass candidacy bond and must first retract. Note that setting approvals will lock the entire balance of the voter until retraction or being reported. # - Independent of input. - Three DB changes. # - -___ - - -### councilMotions - -▸ **execute**(proposal: `Proposal`) -- **summary**: Dispatch a proposal from a councilor using the `Member` origin. Origin must be a council member. - -▸ **propose**(threshold: `Compact`, proposal: `Proposal`) -- **summary**: # - Bounded storage reads and writes. - Argument `threshold` has bearing on weight. # - -▸ **vote**(proposal: `Hash`, index: `Compact`, approve: `bool`) -- **summary**: # - Bounded storage read and writes. - Will be slightly heavier if the proposal is approved / disapproved after the vote. # - -___ - - ### democracy ▸ **cancelQueued**(when: `Compact`, which: `Compact`, what: `Compact`) @@ -147,6 +134,9 @@ ___ ▸ **externalProposeMajority**(proposal: `Proposal`) - **summary**: Schedule a majority-carries referendum to be tabled next once it is legal to schedule an external referendum. +▸ **externalPush**(proposal_hash: `Hash`, voting_period: `BlockNumber`, delay: `BlockNumber`) +- **summary**: Schedule the currently externally-proposed majority-carries referendum to be tabled immediately. If there is no externally-proposed referendum currently, or if there is one but it is not a majority-carries referendum then it fails. - `proposal_hash`: The hash of the current external proposal. - `voting_period`: The period that is allowed for voting on this proposal. - `delay`: The number of block after voting has ended in approval and this should be enacted. Increased to `EmergencyVotingPeriod` if too low. + ▸ **propose**(proposal: `Proposal`, value: `Compact`) - **summary**: Propose a sensitive action to be taken. # - O(1). - Two DB changes, one DB entry. # @@ -177,6 +167,41 @@ ___ ___ +### council + +▸ **presentWinner**(candidate: `Address`, total: `Compact`, index: `Compact`) +- **summary**: Claim that `signed` is one of the top Self::carry_count() + current_vote().1 candidates. Only works if the `block_number >= current_vote().0` and `< current_vote().0 + presentation_duration()` `signed` should have at least # - O(voters) compute. - One DB change. # + +▸ **proxySetApprovals**(votes: `Vec`, index: `Compact`, hint: `SetIndex`) +- **summary**: Set candidate approvals from a proxy. Approval slots stay valid as long as candidates in those slots are registered. # - Same as `set_approvals` with one additional storage read. # + +▸ **reapInactiveVoter**(reporter_index: `Compact`, who: `Address`, who_index: `Compact`, assumed_vote_index: `Compact`) +- **summary**: Remove a voter. For it not to be a bond-consuming no-op, all approved candidate indices must now be either unregistered or registered to a candidate that registered the slot after the voter gave their last approval set. Both indices must be provided as explained in [`voter_at`] function. May be called by anyone. Returns the voter deposit to `signed`. # - O(1). - Two fewer DB entries, one DB change. # + +▸ **removeMember**(who: `Address`) +- **summary**: Remove a particular member from the set. This is effective immediately. Note: A tally should happen instantly (if not already in a presentation period) to fill the seat if removal means that the desired members are not met. + +▸ **retractVoter**(index: `Compact`) +- **summary**: Remove a voter. All votes are cancelled and the voter deposit is returned. The index must be provided as explained in [`voter_at`] function. Also removes the lock on the balance of the voter. See [`do_set_approvals()`]. # - O(1). - Two fewer DB entries, one DB change. # + +▸ **setApprovals**(votes: `Vec`, index: `Compact`, hint: `SetIndex`) +- **summary**: Set candidate approvals. Approval slots stay valid as long as candidates in those slots are registered. Locks the total balance of caller indefinitely. Only [`retract_voter`] or [`reap_inactive_voter`] can unlock the balance. `hint` argument is interpreted differently based on: - if `origin` is setting approvals for the first time: The index will be checked for being a valid _hole_ in the voter list. - if the hint is correctly pointing to a hole, no fee is deducted from `origin`. - Otherwise, the call will succeed but the index is ignored and simply a push to the last chunk with free space happens. If the new push causes a new chunk to be created, a fee indicated by [`VotingFee`] is deducted. - if `origin` is already a voter: the index __must__ be valid and point to the correct position of the `origin` in the current voters list. Note that any trailing `false` votes in `votes` is ignored; In approval voting, not voting for a candidate and voting false, are equal. # - O(1). - Two extra DB entries, one DB change. - Argument `votes` is limited in length to number of candidates. # + +▸ **setDesiredSeats**(count: `Compact`) +- **summary**: Set the desired member count; if lower than the current count, then seats will not be up election when they expire. If more, then a new vote will be started if one is not already in progress. + +▸ **setPresentationDuration**(count: `Compact`) +- **summary**: Set the presentation duration. If there is currently a vote being presented for, will invoke `finalize_vote`. + +▸ **setTermDuration**(count: `Compact`) +- **summary**: Set the presentation duration. If there is current a vote being presented for, will invoke `finalize_vote`. + +▸ **submitCandidacy**(slot: `Compact`) +- **summary**: Submit oneself for candidacy. Account must have enough transferrable funds in it to pay the bond. NOTE: if `origin` has already assigned approvals via [`set_approvals`], it will NOT have any usable funds to pass candidacy bond and must first retract. Note that setting approvals will lock the entire balance of the voter until retraction or being reported. # - Independent of input. - Three DB changes. # + +___ + + ### ▸ **finalHint**(hint: `Compact`) @@ -204,10 +229,10 @@ ___ ### staking ▸ **bond**(controller: `Address`, value: `Compact`, payee: `RewardDestination`) -- **summary**: Take the origin account as a stash and lock up `value` of its balance. `controller` will be the account that controls it. The dispatch origin for this call must be _Signed_ by the stash account. # - Independent of the arguments. Moderate complexity. - O(1). - Three extra DB entries. NOTE: Two of the storage writes (`Self::bonded`, `Self::payee`) are _never_ cleaned unless the `origin` falls below _existential deposit_ and gets removed as dust. NOTE: At the moment, there are no financial restrictions to bond (which creates a bunch of storage items for an account). In essence, nothing prevents many accounts from spamming `Staking` storage by bonding 1 UNIT. See test case: `bond_with_no_staked_value`. # +- **summary**: Take the origin account as a stash and lock up `value` of its balance. `controller` will be the account that controls it. `value` must be more than the `existential_deposit` defined in the Balances module. The dispatch origin for this call must be _Signed_ by the stash account. # - Independent of the arguments. Moderate complexity. - O(1). - Three extra DB entries. NOTE: Two of the storage writes (`Self::bonded`, `Self::payee`) are _never_ cleaned unless the `origin` falls below _existential deposit_ and gets removed as dust. # ▸ **bondExtra**(max_additional: `Compact`) -- **summary**: Add some extra amount that have appeared in the stash `free_balance` into the balance up for staking. Use this if there are additional funds in your stash account that you wish to bond. The dispatch origin for this call must be _Signed_ by the stash, not the controller. # - Independent of the arguments. Insignificant complexity. - O(1). - One DB entry. # +- **summary**: Add some extra amount that have appeared in the stash `free_balance` into the balance up for staking. Use this if there are additional funds in your stash account that you wish to bond. Unlike [`bond`] or [`unbond`] this function does not impose any limitation on the amount that can be added. The dispatch origin for this call must be _Signed_ by the stash, not the controller. # - Independent of the arguments. Insignificant complexity. - O(1). - One DB entry. # ▸ **chill**() - **summary**: Declare no desire to either validate or nominate. Effects will be felt at the beginning of the next era. The dispatch origin for this call must be _Signed_ by the controller, not the stash. # - Independent of the arguments. Insignificant complexity. - Contains one read. - Writes are limited to the `origin` account key. # @@ -240,7 +265,7 @@ ___ - **summary**: Declare the desire to validate for the origin controller. Effects will be felt at the beginning of the next era. The dispatch origin for this call must be _Signed_ by the controller, not the stash. # - Independent of the arguments. Insignificant complexity. - Contains a limited number of reads. - Writes are limited to the `origin` account key. # ▸ **withdrawUnbonded**() -- **summary**: Remove any unlocked chunks from the `unlocking` queue from our management. This essentially frees up that balance to be used by the stash account to do whatever it wants. The dispatch origin for this call must be _Signed_ by the controller, not the stash. See also [`Call::unbond`]. # - Could be dependent on the `origin` argument and how much `unlocking` chunks exist. It implies `consolidate_unlocked` which loops over `Ledger.unlocking`, which is indirectly user-controlled. See [`unbond`] for more detail. - Contains a limited number of reads, yet the size of which could be large based on `ledger`. - Writes are limited to the `origin` account key. # +- **summary**: Remove any unlocked chunks from the `unlocking` queue from our management. This essentially frees up that balance to be used by the stash account to do whatever it wants. The dispatch origin for this call must be _Signed_ by the controller, not the stash. See also [`Call::unbond`]. # - Could be dependent on the `origin` argument and how much `unlocking` chunks exist. It implies `consolidate_unlocked` which loops over `Ledger.unlocking`, which is indirectly user-controlled. See [`unbond`] for more detail. - Contains a limited number of reads, yet the size of which could be large based on `ledger`. - Writes are limited to the `origin` account key. # ___ diff --git a/docs/METHODS_STORAGE.md b/docs/METHODS_STORAGE.md index e5cc317ac7..1b371d3e56 100644 --- a/docs/METHODS_STORAGE.md +++ b/docs/METHODS_STORAGE.md @@ -1,18 +1,22 @@ ## Storage _The following sections contain Storage methods are part of the default Substrate runtime._ +- **[aura](#aura)** + - **[authorship](#authorship)** - **[balances](#balances)** +- **[collective](#collective)** + +- **[collective](#collective)** + - **[contracts](#contracts)** -- **[council](#council)** - -- **[councilMotions](#councilMotions)** - - **[democracy](#democracy)** +- **[elections](#elections)** + - **[grandpa](#grandpa)** - **[indices](#indices)** @@ -35,6 +39,17 @@ _The following sections contain Storage methods are part of the default Substrat ___ +### aura + +▸ **authorities**(): `Vec` +- **summary**: The current authorities + +▸ **lastTimestamp**(): `Moment` +- **summary**: The last timestamp. + +___ + + ### authorship ▸ **author**(): `Option` @@ -69,6 +84,46 @@ ___ ___ +### collective + +▸ **members**(): `Vec` +- **summary**: The current members of the collective. This is stored sorted (just by value). + +▸ **proposalCount**(): `u32` +- **summary**: Proposals so far. + +▸ **proposalOf**(`Hash`): `Option` +- **summary**: Actual proposal for a given hash, if it's current. + +▸ **proposals**(): `Vec` +- **summary**: The hashes of the active proposals. + +▸ **voting**(`Hash`): `Option` +- **summary**: Votes on a given proposal, if it is ongoing. + +___ + + +### collective + +▸ **members**(): `Vec` +- **summary**: The current members of the collective. This is stored sorted (just by value). + +▸ **proposalCount**(): `u32` +- **summary**: Proposals so far. + +▸ **proposalOf**(`Hash`): `Option` +- **summary**: Actual proposal for a given hash, if it's current. + +▸ **proposals**(): `Vec` +- **summary**: The hashes of the active proposals. + +▸ **voting**(`Hash`): `Option` +- **summary**: Votes on a given proposal, if it is ongoing. + +___ + + ### contracts ▸ **accountCounter**(): `u64` @@ -95,73 +150,6 @@ ___ ___ -### council - -▸ **activeCouncil**(): `Vec<(AccountId,BlockNumber)>` -- **summary**: The current council. When there's a vote going on, this should still be used for executive matters. The block number (second element in the tuple) is the block that their position is active until (calculated by the sum of the block number when the council member was elected and their term duration). - -▸ **approvalsOf**(`(AccountId,SetIndex)`): `Vec` -- **summary**: A list of votes for each voter. The votes are stored as numeric values and parsed in a bit-wise manner. In order to get a human-readable representation (`Vec`), use [`all_approvals_of`]. Furthermore, each vector of scalars is chunked with the cap of `APPROVAL_SET_SIZE`. - -▸ **candidateCount**(): `u32` -- **summary**: Current number of active candidates - -▸ **candidates**(): `Vec` -- **summary**: The present candidate list. - -▸ **desiredSeats**(): `u32` -- **summary**: Number of accounts that should be sitting on the council. - -▸ **leaderboard**(): `Option>` -- **summary**: Get the leaderboard if we're in the presentation phase. The first element is the weight of each entry; It may be the direct summed approval stakes, or a weighted version of it. - -▸ **nextFinalize**(): `Option<(BlockNumber,u32,Vec)>` -- **summary**: The accounts holding the seats that will become free on the next tally. - -▸ **nextVoterSet**(): `SetIndex` -- **summary**: the next free set to store a voter in. This will keep growing. - -▸ **presentationDuration**(): `BlockNumber` -- **summary**: How long to give each top candidate to present themselves after the vote ends. - -▸ **registerInfoOf**(`AccountId`): `Option<(VoteIndex,u32)>` -- **summary**: The vote index and list slot that the candidate `who` was registered or `None` if they are not currently registered. - -▸ **termDuration**(): `BlockNumber` -- **summary**: How long each position is active for. - -▸ **voteCount**(): `VoteIndex` -- **summary**: The total number of vote rounds that have happened or are in progress. - -▸ **voterCount**(): `SetIndex` -- **summary**: Current number of Voters. - -▸ **voterInfoOf**(`AccountId`): `Option` -- **summary**: Basic information about a voter. - -▸ **voters**(`SetIndex`): `Vec>` -- **summary**: The present voter list (chunked and capped at [`VOTER_SET_SIZE`]). - -___ - - -### council_motions - -▸ **proposalCount**(): `u32` -- **summary**: Proposals so far. - -▸ **proposalOf**(`Hash`): `Option` -- **summary**: Actual proposal for a given hash, if it's current. - -▸ **proposals**(): `Vec` -- **summary**: The hashes of the active proposals. - -▸ **voting**(`Hash`): `Option` -- **summary**: Votes on a given proposal, if it is ongoing. - -___ - - ### democracy ▸ **blacklist**(`Hash`): `Option<(BlockNumber,Vec)>` @@ -212,6 +200,59 @@ ___ ___ +### elections + +▸ **approvalsOf**(`(AccountId,SetIndex)`): `Vec` +- **summary**: A list of votes for each voter. The votes are stored as numeric values and parsed in a bit-wise manner. In order to get a human-readable representation (`Vec`), use [`all_approvals_of`]. Furthermore, each vector of scalars is chunked with the cap of `APPROVAL_SET_SIZE`. + +▸ **candidateCount**(): `u32` +- **summary**: Current number of active candidates + +▸ **candidates**(): `Vec` +- **summary**: The present candidate list. + +▸ **desiredSeats**(): `u32` +- **summary**: Number of accounts that should constitute the collective. + +▸ **leaderboard**(): `Option>` +- **summary**: Get the leaderboard if we're in the presentation phase. The first element is the weight of each entry; It may be the direct summed approval stakes, or a weighted version of it. + +▸ **members**(): `Vec<(AccountId,BlockNumber)>` +- **summary**: The current membership. When there's a vote going on, this should still be used for executive matters. The block number (second element in the tuple) is the block that their position is active until (calculated by the sum of the block number when the member was elected and their term duration). + +▸ **nextFinalize**(): `Option<(BlockNumber,u32,Vec)>` +- **summary**: The accounts holding the seats that will become free on the next tally. + +▸ **nextVoterSet**(): `SetIndex` +- **summary**: the next free set to store a voter in. This will keep growing. + +▸ **presentationDuration**(): `BlockNumber` +- **summary**: How long to give each top candidate to present themselves after the vote ends. + +▸ **proxy**(`AccountId`): `Option` +- **summary**: Who is able to vote for whom. Value is the fund-holding account, key is the vote-transaction-sending account. + +▸ **registerInfoOf**(`AccountId`): `Option<(VoteIndex,u32)>` +- **summary**: The vote index and list slot that the candidate `who` was registered or `None` if they are not currently registered. + +▸ **termDuration**(): `BlockNumber` +- **summary**: How long each position is active for. + +▸ **voteCount**(): `VoteIndex` +- **summary**: The total number of vote rounds that have happened or are in progress. + +▸ **voterCount**(): `SetIndex` +- **summary**: Current number of Voters. + +▸ **voterInfoOf**(`AccountId`): `Option` +- **summary**: Basic information about a voter. + +▸ **voters**(`SetIndex`): `Vec>` +- **summary**: The present voter list (chunked and capped at [`VOTER_SET_SIZE`]). + +___ + + ### grandpa ▸ **authorities**(): `Vec<(AuthorityId,AuthorityWeight)>` diff --git a/lerna.json b/lerna.json index 70d5bb2b5e..fbc4dd83fc 100644 --- a/lerna.json +++ b/lerna.json @@ -9,5 +9,5 @@ "packages": [ "packages/*" ], - "version": "0.82.0-beta.49" + "version": "0.82.0-beta.50" } diff --git a/package.json b/package.json index 00be22a715..a165ed6a48 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "version": "0.82.0-beta.49", + "version": "0.82.0-beta.50", "private": true, "engines": { "yarn": "^1.10.1" diff --git a/packages/api-contract/package.json b/packages/api-contract/package.json index ffda8332da..f98293b378 100644 --- a/packages/api-contract/package.json +++ b/packages/api-contract/package.json @@ -1,6 +1,6 @@ { "name": "@polkadot/api-contract", - "version": "0.82.0-beta.49", + "version": "0.82.0-beta.50", "description": "Interfaces for interacting with contracts and contract ABIs", "main": "index.js", "keywords": [ @@ -27,6 +27,6 @@ "homepage": "https://github.com/polkadot-js/api/tree/master/packages/api-contract#readme", "dependencies": { "@babel/runtime": "^7.5.4", - "@polkadot/types": "^0.82.0-beta.49" + "@polkadot/types": "^0.82.0-beta.50" } } diff --git a/packages/api-derive/package.json b/packages/api-derive/package.json index fc753edfd2..c1419f8694 100644 --- a/packages/api-derive/package.json +++ b/packages/api-derive/package.json @@ -1,6 +1,6 @@ { "name": "@polkadot/api-derive", - "version": "0.82.0-beta.49", + "version": "0.82.0-beta.50", "description": "Common functions used across Polkadot, derived from RPC calls and storage queries.", "main": "index.js", "keywords": [ @@ -28,8 +28,8 @@ "homepage": "https://github.com/polkadot-js/api/tree/master/packages/api-derive#readme", "dependencies": { "@babel/runtime": "^7.5.4", - "@polkadot/api": "^0.82.0-beta.49", - "@polkadot/types": "^0.82.0-beta.49", + "@polkadot/api": "^0.82.0-beta.50", + "@polkadot/types": "^0.82.0-beta.50", "@types/memoizee": "^0.4.2", "memoizee": "^0.4.14" }, diff --git a/packages/api-metadata/package.json b/packages/api-metadata/package.json index 4a40221c18..edc2f53053 100644 --- a/packages/api-metadata/package.json +++ b/packages/api-metadata/package.json @@ -1,6 +1,6 @@ { "name": "@polkadot/api-metadata", - "version": "0.82.0-beta.49", + "version": "0.82.0-beta.50", "description": "Helpers to extract information from runtime metadata", "main": "index.js", "publishConfig": { @@ -27,7 +27,7 @@ "homepage": "https://github.com/polkadot-js/api/tree/master/packages/type-metadata#readme", "dependencies": { "@babel/runtime": "^7.5.4", - "@polkadot/types": "^0.82.0-beta.49", + "@polkadot/types": "^0.82.0-beta.50", "@polkadot/util": "^0.94.0-beta.9", "@polkadot/util-crypto": "^0.94.0-beta.9" }, diff --git a/packages/api/package.json b/packages/api/package.json index 31e0e7d19b..ba4ba9250c 100644 --- a/packages/api/package.json +++ b/packages/api/package.json @@ -1,6 +1,6 @@ { "name": "@polkadot/api", - "version": "0.82.0-beta.49", + "version": "0.82.0-beta.50", "description": "Promise and RxJS wrappers around the Polkadot JS RPC", "main": "index.js", "keywords": [ @@ -27,11 +27,11 @@ "homepage": "https://github.com/polkadot-js/api/tree/master/packages/api#readme", "dependencies": { "@babel/runtime": "^7.5.4", - "@polkadot/api-derive": "^0.82.0-beta.49", - "@polkadot/api-metadata": "^0.82.0-beta.49", - "@polkadot/rpc-core": "^0.82.0-beta.49", - "@polkadot/rpc-provider": "^0.82.0-beta.49", - "@polkadot/types": "^0.82.0-beta.49", + "@polkadot/api-derive": "^0.82.0-beta.50", + "@polkadot/api-metadata": "^0.82.0-beta.50", + "@polkadot/rpc-core": "^0.82.0-beta.50", + "@polkadot/rpc-provider": "^0.82.0-beta.50", + "@polkadot/types": "^0.82.0-beta.50", "@polkadot/util-crypto": "^0.94.0-beta.9" }, "devDependencies": { diff --git a/packages/rpc-core/package.json b/packages/rpc-core/package.json index bdf92bd755..92a053866e 100644 --- a/packages/rpc-core/package.json +++ b/packages/rpc-core/package.json @@ -1,6 +1,6 @@ { "name": "@polkadot/rpc-core", - "version": "0.82.0-beta.49", + "version": "0.82.0-beta.50", "description": "A JavaScript wrapper for the Polkadot JsonRPC interface", "main": "index.js", "keywords": [ @@ -27,9 +27,9 @@ "homepage": "https://github.com/polkadot-js/api/tree/master/packages/rpc-core#readme", "dependencies": { "@babel/runtime": "^7.5.4", - "@polkadot/jsonrpc": "^0.82.0-beta.49", - "@polkadot/rpc-provider": "^0.82.0-beta.49", - "@polkadot/types": "^0.82.0-beta.49", + "@polkadot/jsonrpc": "^0.82.0-beta.50", + "@polkadot/rpc-provider": "^0.82.0-beta.50", + "@polkadot/types": "^0.82.0-beta.50", "@polkadot/util": "^0.94.0-beta.9", "memoizee": "^0.4.14", "rxjs": "^6.5.2" diff --git a/packages/rpc-provider/package.json b/packages/rpc-provider/package.json index 0e5eb5b80d..aba0c5ac9b 100644 --- a/packages/rpc-provider/package.json +++ b/packages/rpc-provider/package.json @@ -1,6 +1,6 @@ { "name": "@polkadot/rpc-provider", - "version": "0.82.0-beta.49", + "version": "0.82.0-beta.50", "description": "Transport providers for the API", "main": "index.js", "keywords": [ @@ -27,7 +27,7 @@ "homepage": "https://github.com/polkadot-js/api/tree/master/packages/rpc-provider#readme", "dependencies": { "@babel/runtime": "^7.5.4", - "@polkadot/api-metadata": "^0.82.0-beta.49", + "@polkadot/api-metadata": "^0.82.0-beta.50", "@polkadot/util": "^0.94.0-beta.9", "@polkadot/util-crypto": "^0.94.0-beta.9", "@types/nock": "^10.0.3", diff --git a/packages/type-jsonrpc/package.json b/packages/type-jsonrpc/package.json index 2581338f29..4fe19d20f4 100644 --- a/packages/type-jsonrpc/package.json +++ b/packages/type-jsonrpc/package.json @@ -1,6 +1,6 @@ { "name": "@polkadot/jsonrpc", - "version": "0.82.0-beta.49", + "version": "0.82.0-beta.50", "description": "Method definitions for the Polkadot RPC layer", "main": "index.js", "publishConfig": { diff --git a/packages/types/package.json b/packages/types/package.json index b48ee96ae2..d66f6d2fe3 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -1,6 +1,6 @@ { "name": "@polkadot/types", - "version": "0.82.0-beta.49", + "version": "0.82.0-beta.50", "description": "Implementation of the Parity codec", "main": "index.js", "keywords": [