support double map storage function (#934)

* support double map storage function

* add twox_64_concat, clean comments

* change Twox128Concat to Twox64Concat

* update decodeStorageKey

* fix: update decodeStorageKey

* test: add e2e test
This commit is contained in:
Alex Wang
2019-06-12 16:45:45 +12:00
committed by Ian He
parent 572c0905b8
commit e61f1634ab
27 changed files with 766 additions and 212 deletions
+214
View File
@@ -1,3 +1,217 @@
## Events
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)**
- **[contract](#contract)**
- **[council](#council)**
- **[councilMotions](#councilMotions)**
- **[councilVoting](#councilVoting)**
- **[democracy](#democracy)**
- **[grandpa](#grandpa)**
- **[indices](#indices)**
- **[session](#session)**
- **[staking](#staking)**
- **[sudo](#sudo)**
- **[system](#system)**
- **[treasury](#treasury)**
___
### balances
▸ **NewAccount**(`AccountId`, `Balance`)
- **summary**: A new account was created.
▸ **ReapedAccount**(`AccountId`)
- **summary**: An account was reaped.
▸ **Transfer**(`AccountId`, `AccountId`, `Balance`, `Balance`)
- **summary**: Transfer succeeded (from, to, value, fees).
___
### contract
▸ **CodeStored**(`Hash`)
- **summary**: Code with the specified hash has been stored.
▸ **Contract**(`AccountId`, `Bytes`)
- **summary**: An event from contract of account.
▸ **Dispatched**(`AccountId`, `bool`)
- **summary**: A call was dispatched from the given account. The bool signals whether it was successful execution or not.
▸ **Instantiated**(`AccountId`, `AccountId`)
- **summary**: Contract deployed by address at the specified address.
▸ **ScheduleUpdated**(`u32`)
- **summary**: Triggered when the current schedule is updated.
▸ **Transfer**(`AccountId`, `AccountId`, `Balance`)
- **summary**: Transfer happened `from` to `to` with given `value` as part of a `call` or `create`.
___
### council
▸ **BadReaperSlashed**(`AccountId`)
- **summary**: slashed reaper
▸ **TallyFinalized**(`Vec<AccountId>`, `Vec<AccountId>`)
- **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.
▸ **Proposed**(`AccountId`, `ProposalIndex`, `Hash`, `u32`)
- **summary**: A motion (given hash) has been proposed (by given account) with a threshold (given u32).
▸ **Voted**(`AccountId`, `Hash`, `bool`, `u32`, `u32`)
- **summary**: A motion (given hash) has been voted on by given account, leaving a tally (yes votes and no votes given as u32s respectively).
___
### councilVoting
▸ **TallyCancelation**(`Hash`, `u32`, `u32`, `u32`)
- **summary**: A voting tally has happened for a referendum cancellation vote. Last three are yes, no, abstain counts.
▸ **TallyReferendum**(`Hash`, `u32`, `u32`, `u32`)
- **summary**: A voting tally has happened for a referendum vote. Last three are yes, no, abstain counts.
___
### democracy
▸ **Cancelled**(`ReferendumIndex`)
▸ **Delegated**(`AccountId`, `AccountId`)
▸ **Executed**(`ReferendumIndex`, `bool`)
▸ **NotPassed**(`ReferendumIndex`)
▸ **Passed**(`ReferendumIndex`)
▸ **Proposed**(`PropIndex`, `Balance`)
▸ **Started**(`ReferendumIndex`, `VoteThreshold`)
▸ **Tabled**(`PropIndex`, `Balance`, `Vec<AccountId>`)
▸ **Undelegated**(`AccountId`)
___
### grandpa
▸ **NewAuthorities**(`Vec<(SessionKey,u64)>`)
- **summary**: New authority set has been applied.
___
### indices
▸ **NewAccountIndex**(`AccountId`, `AccountIndex`)
- **summary**: A new account index was assigned. This event is not triggered when an existing index is reassigned to another `AccountId`.
___
### session
▸ **NewSession**(`BlockNumber`)
- **summary**: New session has happened. Note that the argument is the session index, not the block number as the type might suggest.
___
### staking
▸ **OfflineSlash**(`AccountId`, `Balance`)
- **summary**: One validator (and its nominators) has been slashed by the given amount.
▸ **OfflineWarning**(`AccountId`, `u32`)
- **summary**: One validator (and its nominators) has been given an offline-warning (it is still within its grace). The accrued number of slashes is recorded, too.
▸ **Reward**(`Balance`)
- **summary**: All validators have been rewarded by the given balance.
___
### sudo
▸ **KeyChanged**(`AccountId`)
- **summary**: The sudoer just switched identity; the old key is supplied.
▸ **Sudid**(`bool`)
- **summary**: A sudo just took place.
___
### system
▸ **ExtrinsicFailed**()
- **summary**: An extrinsic failed.
▸ **ExtrinsicSuccess**()
- **summary**: An extrinsic completed successfully.
___
### treasury
▸ **Awarded**(`ProposalIndex`, `Balance`, `AccountId`)
- **summary**: Some funds have been allocated.
▸ **Burnt**(`Balance`)
- **summary**: Some of our funds have been burnt.
▸ **Proposed**(`ProposalIndex`)
- **summary**: New proposal.
▸ **Rollover**(`Balance`)
- **summary**: Spending has finished; this is the amount that rolls over until next spend.
▸ **Spending**(`Balance`)
- **summary**: We have ended a spend period and will now allocate funds.
+304
View File
@@ -1,3 +1,307 @@
## Extrinsics
_The following sections contain Extrinsics methods are part of the default Substrate runtime._
- **[balances](#balances)**
- **[consensus](#consensus)**
- **[contract](#contract)**
- **[council](#council)**
- **[councilMotions](#councilMotions)**
- **[councilVoting](#councilVoting)**
- **[democracy](#democracy)**
- **[](#)**
- **[grandpaFinality](#grandpaFinality)**
- **[session](#session)**
- **[staking](#staking)**
- **[sudo](#sudo)**
- **[timestamp](#timestamp)**
- **[treasury](#treasury)**
___
### balances
▸ **setBalance**(who: `Address`, free: `Compact<Balance>`, reserved: `Compact<Balance>`)
- **summary**: Set the balances of a given account. This will alter `FreeBalance` and `ReservedBalance` in storage. If the new free or reserved balance is below the existential deposit, it will also decrease the total issuance of the system (`TotalIssuance`) and reset the account nonce (`system::AccountNonce`). The dispatch origin for this call is `root`.
▸ **transfer**(dest: `Address`, value: `Compact<Balance>`)
- **summary**: Transfer some liquid free balance to another account. `transfer` will set the `FreeBalance` of the sender and receiver. It will decrease the total issuance of the system by the `TransferFee`. If the sender's account is below the existential deposit as a result of the transfer, the account will be reaped. The dispatch origin for this call must be `Signed` by the transactor.
___
### consensus
▸ **killStorage**(keys: `Vec<Key>`)
- **summary**: Kill some items from storage.
▸ **noteOffline**(offline: `InherentOfflineReport`)
- **summary**: Note that the previous block's validator missed its opportunity to propose a block.
▸ **remark**(_remark: `Bytes`)
- **summary**: Make some on-chain remark.
▸ **reportMisbehavior**(_report: `Bytes`)
- **summary**: Report some misbehavior.
▸ **setCode**(new: `Bytes`)
- **summary**: Set the new code.
▸ **setHeapPages**(pages: `u64`)
- **summary**: Set the number of pages in the WebAssembly environment's heap.
▸ **setStorage**(items: `Vec<KeyValue>`)
- **summary**: Set some items of storage.
___
### contract
▸ **call**(dest: `Address`, value: `Compact<BalanceOf>`, gas_limit: `Compact<Gas>`, data: `Bytes`)
- **summary**: Makes a call to an account, optionally transferring some balance. * If the account is a smart-contract account, the associated code will be executed and any value will be transferred. * If the account is a regular account, any value will be transferred. * If no account exists and the call value is not less than `existential_deposit`, a regular account will be created and any value will be transferred.
▸ **claimSurcharge**(dest: `AccountId`, aux_sender: `Option<AccountId>`)
- **summary**: Allows block producers to claim a small reward for evicting a contract. If a block producer fails to do so, a regular users will be allowed to claim the reward. If contract is not evicted as a result of this call, no actions are taken and the sender is not eligible for the reward.
▸ **create**(endowment: `Compact<BalanceOf>`, gas_limit: `Compact<Gas>`, code_hash: `CodeHash`, data: `Bytes`)
- **summary**: Creates a new contract from the `codehash` generated by `put_code`, optionally transferring some balance. Creation is executed as follows: - The destination address is computed based on the sender and hash of the code. - The smart-contract account is created at the computed address. - The `ctor_code` is executed in the context of the newly-created account. Buffer returned after the execution is saved as the `code` of the account. That code will be invoked upon any call received by this account. - The contract is initialized.
▸ **putCode**(gas_limit: `Compact<Gas>`, code: `Bytes`)
- **summary**: Stores the given binary Wasm code into the chain's storage and returns its `codehash`. You can instantiate contracts only with stored code.
▸ **updateSchedule**(schedule: `Schedule`)
- **summary**: Updates the schedule for metering contracts. The schedule must have a greater version than the stored schedule.
___
### council
▸ **presentWinner**(candidate: `Address`, total: `Compact<BalanceOf>`, index: `Compact<VoteIndex>`)
- **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
▸ **proxySetApprovals**(votes: `Vec<bool>`, index: `Compact<VoteIndex>`)
- **summary**: Set candidate approvals from a proxy. Approval slots stay valid as long as candidates in those slots are registered.
▸ **reapInactiveVoter**(reporter_index: `Compact<u32>`, who: `Address`, who_index: `Compact<u32>`, assumed_vote_index: `Compact<VoteIndex>`)
- **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. May be called by anyone. Returns the voter deposit to `signed`.
▸ **removeMember**(who: `Address`)
- **summary**: Remove a particular member. A tally will happen instantly (if not already in a presentation period) to fill the seat if removal means that the desired members are not met. This is effective immediately.
▸ **retractVoter**(index: `Compact<u32>`)
- **summary**: Remove a voter. All votes are cancelled and the voter deposit is returned.
▸ **setApprovals**(votes: `Vec<bool>`, index: `Compact<VoteIndex>`)
- **summary**: Set candidate approvals. Approval slots stay valid as long as candidates in those slots are registered.
▸ **setDesiredSeats**(count: `Compact<u32>`)
- **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<BlockNumber>`)
- **summary**: Set the presentation duration. If there is currently a vote being presented for, will invoke `finalize_vote`.
▸ **setTermDuration**(count: `Compact<BlockNumber>`)
- **summary**: Set the presentation duration. If there is current a vote being presented for, will invoke `finalize_vote`.
▸ **submitCandidacy**(slot: `Compact<u32>`)
- **summary**: Submit oneself for candidacy. Account must have enough transferrable funds in it to pay the bond.
___
### councilMotions
▸ **propose**(threshold: `Compact<u32>`, proposal: `Proposal`)
▸ **vote**(proposal: `Hash`, index: `Compact<ProposalIndex>`, approve: `bool`)
___
### councilVoting
▸ **propose**(proposal: `Proposal`)
▸ **setCooloffPeriod**(blocks: `Compact<BlockNumber>`)
▸ **setVotingPeriod**(blocks: `Compact<BlockNumber>`)
▸ **veto**(proposal_hash: `Hash`)
▸ **vote**(proposal: `Hash`, approve: `bool`)
___
### democracy
▸ **cancelQueued**(when: `Compact<BlockNumber>`, which: `Compact<u32>`)
- **summary**: Cancel a proposal queued for enactment.
▸ **cancelReferendum**(ref_index: `Compact<ReferendumIndex>`)
- **summary**: Remove a referendum.
▸ **delegate**(to: `AccountId`, lock_periods: `LockPeriods`)
- **summary**: Delegate vote.
▸ **propose**(proposal: `Proposal`, value: `Compact<BalanceOf>`)
- **summary**: Propose a sensitive action to be taken.
▸ **proxyVote**(ref_index: `Compact<ReferendumIndex>`, vote: `Vote`)
- **summary**: Vote in a referendum on behalf of a stash. If `vote.is_aye()`, the vote is to enact the proposal; otherwise it is a vote to keep the status quo.
▸ **removeProxy**(proxy: `AccountId`)
- **summary**: Clear the proxy. Called by the stash.
▸ **resignProxy**()
- **summary**: Clear the proxy. Called by the proxy.
▸ **second**(proposal: `Compact<PropIndex>`)
- **summary**: Propose a sensitive action to be taken.
▸ **setProxy**(proxy: `AccountId`)
- **summary**: Specify a proxy. Called by the stash.
▸ **startReferendum**(proposal: `Proposal`, threshold: `VoteThreshold`, delay: `BlockNumber`)
- **summary**: Start a referendum.
▸ **undelegate**()
- **summary**: Undelegate vote.
▸ **vote**(ref_index: `Compact<ReferendumIndex>`, vote: `Vote`)
- **summary**: Vote in a referendum. If `vote.is_aye()`, the vote is to enact the proposal; otherwise it is a vote to keep the status quo.
___
###
▸ **finalHint**(hint: `Compact<BlockNumber>`)
- **summary**: Hint that the author of this block thinks the best finalized block is the given number.
___
### grandpaFinality
▸ **reportMisbehavior**(_report: `Bytes`)
- **summary**: Report some misbehavior.
___
### session
▸ **forceNewSession**(apply_rewards: `bool`)
- **summary**: Forces a new session.
▸ **setKey**(key: `SessionKey`)
- **summary**: Sets the session key of a validator (function caller) to `key`. This doesn't take effect until the next session.
▸ **setLength**(new: `Compact<BlockNumber>`)
- **summary**: Set a new session length. Won't kick in until the next session change (at current length).
___
### staking
▸ **bond**(controller: `Address`, value: `Compact<BalanceOf>`, 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.
▸ **bondExtra**(max_additional: `Compact<BalanceOf>`)
- **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.
▸ **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.
▸ **forceNewEra**(apply_rewards: `bool`)
- **summary**: Force there to be a new era. This also forces a new session immediately after. `apply_rewards` should be true for validators to get the session reward.
▸ **nominate**(targets: `Vec<Address>`)
- **summary**: Declare the desire to nominate `targets` 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.
▸ **setBondingDuration**(new: `Compact<BlockNumber>`)
- **summary**: The length of the bonding duration in eras.
▸ **setController**(controller: `Address`)
- **summary**: (Re-)set the payment target for a controller. Effects will be felt at the beginning of the next era. The dispatch origin for this call must be _Signed_ by the stash, not the controller.
▸ **setInvulnerables**(validators: `Vec<AccountId>`)
- **summary**: Set the validators who cannot be slashed (if any).
▸ **setOfflineSlashGrace**(new: `Compact<u32>`)
- **summary**: Set the offline slash grace period.
▸ **setPayee**(payee: `RewardDestination`)
- **summary**: (Re-)set the payment target for a 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.
▸ **setSessionsPerEra**(new: `Compact<BlockNumber>`)
- **summary**: Set the number of sessions in an era.
▸ **setValidatorCount**(new: `Compact<u32>`)
- **summary**: The ideal number of validators.
▸ **unbond**(value: `Compact<BalanceOf>`)
- **summary**: Schedule a portion of the stash to be unlocked ready for transfer out after the bond period ends. If this leaves an amount actively bonded less than T::Currency::existential_deposit(), then it is increased to the full amount. Once the unlock period is done, you can call `withdraw_unbonded` to actually move the funds out of management ready for transfer. The dispatch origin for this call must be _Signed_ by the controller, not the stash. See also [`Call::withdraw_unbonded`].
▸ **validate**(prefs: `ValidatorPrefs`)
- **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.
▸ **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`].
___
### sudo
▸ **setKey**(new: `Address`)
- **summary**: Authenticates the current sudo key and sets the given AccountId (`new`) as the new sudo key. The dispatch origin for this call must be _Signed_.
▸ **sudo**(proposal: `Proposal`)
- **summary**: Authenticates the sudo key and dispatches a function call with `Root` origin. The dispatch origin for this call must be _Signed_.
___
### timestamp
▸ **set**(now: `Compact<Moment>`)
- **summary**: Set the current time. This call should be invoked exactly once per block. It will panic at the finalization phase, if this call hasn't been invoked by that time. The timestamp should be greater than the previous one by the amount specified by `minimum_period`. The dispatch origin for this call must be `Inherent`.
___
### treasury
▸ **approveProposal**(proposal_id: `Compact<ProposalIndex>`)
- **summary**: Approve a proposal. At a later time, the proposal will be allocated to the beneficiary and the original deposit will be returned.
▸ **configure**(proposal_bond: `Compact<Permill>`, proposal_bond_minimum: `Compact<BalanceOf>`, spend_period: `Compact<BlockNumber>`, burn: `Compact<Permill>`)
- **summary**: (Re-)configure this module.
▸ **proposeSpend**(value: `Compact<BalanceOf>`, beneficiary: `Address`)
- **summary**: Put forward a suggestion for spending. A deposit proportional to the value is reserved and slashed if the proposal is rejected. It is returned once the proposal is awarded.
▸ **rejectProposal**(proposal_id: `Compact<ProposalIndex>`)
- **summary**: Reject a proposed spend. The original deposit will be slashed.
▸ **setPot**(new_pot: `Compact<BalanceOf>`)
- **summary**: Set the balance of funds available to spend.
+46 -21
View File
@@ -82,10 +82,7 @@ ___
### contract
▸ **accountCounter**(): `u64`
- **summary**: The subtrie counter
▸ **accountInfoOf**(`AccountId`): `Option<AccountInfo>`
- **summary**: The code associated with a given account.
- **summary**: The subtrie counter.
▸ **blockGasLimit**(): `Gas`
- **summary**: The maximum amount of gas that could be expended per block.
@@ -93,15 +90,15 @@ ___
▸ **callBaseFee**(): `Gas`
- **summary**: The base fee charged for calling into a contract.
▸ **codeHashOf**(`AccountId`): `Option<CodeHash>`
- **summary**: The code associated with a given account.
▸ **codeStorage**(`CodeHash`): `Option<PrefabWasmModule>`
- **summary**: A mapping between an original code hash and instrumented wasm code, ready for the execution.
- **summary**: A mapping between an original code hash and instrumented wasm code, ready for execution.
▸ **contractFee**(): `BalanceOf`
- **summary**: The fee required to create a contract instance.
▸ **contractInfoOf**(`AccountId`): `Option<ContractInfo>`
- **summary**: The code associated with a given account.
▸ **createBaseFee**(): `Gas`
- **summary**: The base fee charged for creating a contract.
@@ -123,6 +120,24 @@ ___
▸ **pristineCode**(`CodeHash`): `Option<Bytes>`
- **summary**: A mapping from an original code hash to the original code, untouched by instrumentation.
▸ **rentByteFee**(): `BalanceOf`
- **summary**: Price of a byte of storage per one block interval. Should be greater than 0.
▸ **rentDepositOffset**(): `BalanceOf`
- **summary**: The amount of funds a contract should deposit in order to offset the cost of one byte. Let's suppose the deposit is 1,000 BU (balance units)/byte and the rent is 1 BU/byte/day, then a contract with 1,000,000 BU that uses 1,000 bytes of storage would pay no rent. But if the balance reduced to 500,000 BU and the storage stayed the same at 1,000, then it would pay 500 BU/day.
▸ **signedClaimHandicap**(): `BlockNumber`
- **summary**: Number of block delay an extrinsic claim surcharge has. When claim surchage is called by an extrinsic the rent is checked for current_block - delay
▸ **storageSizeOffset**(): `u64`
- **summary**: Size of a contract at the time of creation. This is a simple way to ensure that empty contracts eventually gets deleted.
▸ **surchargeReward**(): `BalanceOf`
- **summary**: Reward that is received by the party whose touch has led to removal of a contract.
▸ **tombstoneDeposit**(): `BalanceOf`
- **summary**: The minimum amount required to generate a tombstone.
▸ **transactionBaseFee**(): `BalanceOf`
- **summary**: The fee to be paid for making a transaction; the base.
@@ -169,12 +184,12 @@ ___
▸ **nextFinalize**(): `Option<(BlockNumber,u32,Vec<AccountId>)>`
- **summary**: The accounts holding the seats that will become free on the next tally.
▸ **presentSlashPerVoter**(): `BalanceOf`
- **summary**: The punishment, per voter, if you provide an invalid presentation.
▸ **presentationDuration**(): `BlockNumber`
- **summary**: How long to give each top candidate to present themselves after the vote ends.
▸ **presentSlashPerVoter**(): `BalanceOf`
- **summary**: The punishment, per voter, if you provide an invalid presentation.
▸ **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.
@@ -227,10 +242,10 @@ ___
▸ **proposalOf**(`Hash`): `Option<Proposal>`
▸ **proposalVoters**(`Hash`): `Vec<AccountId>`
▸ **proposals**(): `Vec<(BlockNumber,Hash)>`
▸ **proposalVoters**(`Hash`): `Vec<AccountId>`
▸ **vetoedProposal**(`Hash`): `Option<(BlockNumber,Vec<AccountId>)>`
▸ **votingPeriod**(): `BlockNumber`
@@ -261,6 +276,9 @@ ___
▸ **nextTally**(): `ReferendumIndex`
- **summary**: The next referendum index that should be tallied.
▸ **proxy**(`AccountId`): `Option<AccountId>`
- **summary**: Who is able to vote for whom. Value is the fund-holding account, key is the vote-transaction-sending account.
▸ **publicDelay**(): `BlockNumber`
- **summary**: The delay before enactment for all public referenda.
@@ -271,7 +289,7 @@ ___
- **summary**: The public proposals. Unsorted.
▸ **referendumCount**(): `ReferendumIndex`
- **summary**: The next free referendum index, aka the number of referendums started so far.
- **summary**: The next free referendum index, aka the number of referenda started so far.
▸ **referendumInfoOf**(`ReferendumIndex`): `Option<ReferendumInfo>`
- **summary**: Information concerning any given referendum.
@@ -317,7 +335,7 @@ ___
- **summary**: Timestamp when current session started.
▸ **forcingNewSession**(): `Option<bool>`
- **summary**: New session is being forced is this entry exists; in which case, the boolean value is whether the new session should be considered a normal rotation (rewardable) or exceptional (slashable).
- **summary**: New session is being forced if this entry exists; in which case, the boolean value is true if the new session should be considered a normal rotation (rewardable) and false if the new session should be considered exceptional (slashable).
▸ **lastLengthChange**(): `Option<BlockNumber>`
- **summary**: Block at which the session length last changed.
@@ -343,7 +361,7 @@ ___
- **summary**: Map from all locked "stash" accounts to the controller account.
▸ **bondingDuration**(): `BlockNumber`
- **summary**: The length of the bonding duration in blocks.
- **summary**: The length of the bonding duration in eras.
▸ **currentElected**(): `Vec<AccountId>`
- **summary**: The currently elected validator set keyed by stash account ID.
@@ -388,7 +406,7 @@ ___
- **summary**: Where the reward payment should be made. Keyed by stash.
▸ **recentlyOffline**(): `Vec<(AccountId,BlockNumber,u32)>`
- **summary**: Most recent `RECENT_OFFLINE_COUNT` instances. (who it was, when it was reported, how many instances they were offline for).
- **summary**: Most recent `RECENT_OFFLINE_COUNT` instances. (Who it was, when it was reported, how many instances they were offline for).
▸ **sessionReward**(): `Perbill`
- **summary**: Maximum reward, per validator, that is provided per acceptable session.
@@ -403,7 +421,7 @@ ___
- **summary**: The amount of balance actively at stake for each validator slot, currently. This is used to derive rewards and punishments.
▸ **stakers**(`AccountId`): `Exposure`
- **summary**: Nominators for a particular account that is in action right now. You can't iterate through validators here, but you can find them in the `sessions` module. This is keyed by the stash account.
- **summary**: Nominators for a particular account that is in action right now. You can't iterate through validators here, but you can find them in the Session module. This is keyed by the stash account.
▸ **validatorCount**(): `u32`
- **summary**: The ideal number of staking participants.
@@ -417,6 +435,7 @@ ___
### sudo
▸ **key**(): `AccountId`
- **summary**: The `AccountId` of the sudo key.
___
@@ -435,14 +454,20 @@ ___
▸ **digest**(): `Digest`
- **summary**: Digest of the current block, also part of the block header.
▸ **eventCount**(): `EventIndex`
- **summary**: The number of events in the `Events<T>` list.
▸ **events**(): `Vec<EventRecord>`
- **summary**: Events deposited for the current block.
▸ **eventTopics**(): `DoubleMap<Vec<(BlockNumber,EventIndex)>>`
- **summary**: Mapping between a topic (represented by T::Hash) and a vector of indexes of events in the `<Events<T>>` list. The first key serves no purpose. This field is declared as double_map just for convenience of using `remove_prefix`. All topic vectors have deterministic storage locations depending on the topic. This allows light-clients to leverage the changes trie storage tracking mechanism and in case of changes fetch the list of events of interest. The value has the type `(T::BlockNumber, EventIndex)` because if we used only just the `EventIndex` then in case if the topic has the same contents on the next block no notification will be triggered thus the event might be lost.
▸ **extrinsicCount**(): `Option<u32>`
- **summary**: Total extrinsics count for the current block.
▸ **extrinsicData**(`u32`): `Bytes`
- **summary**: Extrinsics data for the current block (maps extrinsic's index to its data).
- **summary**: Extrinsics data for the current block (maps an extrinsic's index to its data).
▸ **extrinsicsRoot**(): `Hash`
- **summary**: Extrinsics root of the current block, also part of the block header.
@@ -453,8 +478,8 @@ ___
▸ **parentHash**(): `Hash`
- **summary**: Hash of the previous block.
▸ **randomSeed**(): `Hash`
- **summary**: Random seed of the current block.
▸ **randomMaterial**(): `(i8,Vec<Hash>)`
- **summary**: Series of block headers from the last 81 blocks that acts as random seed material. This is arranged as a ring buffer with the `i8` prefix being the index into the `Vec` of the oldest hash.
___