Storage
The following sections contain Storage methods are part of the default Substrate runtime. On the api, these are exposed via api.query.<module>.<method>
.
(NOTE: These were generated from a static/snapshot view of a recent Substrate master node. Some items may not be available in older nodes, or in any customized implementations.)
#
authorshipOption<AccountId>
#
author(): - interface:
api.query.authorship.author
- summary: Author of current block.
bool
#
didSetUncles(): - interface:
api.query.authorship.didSetUncles
- summary: Whether uncles were already set in this block.
Vec<UncleEntryItem>
#
uncles(): - interface:
api.query.authorship.uncles
- summary: Uncles
#
babeVec<(AuthorityId,BabeAuthorityWeight)>
#
authorities(): - interface:
api.query.babe.authorities
- summary: Current epoch authorities.
MaybeRandomness
#
authorVrfRandomness(): - interface:
api.query.babe.authorVrfRandomness
- summary: Temporary value (cleared at block finalization) that includes the VRF output generated at this block. This field should always be populated during block processing unless secondary plain slots are enabled (which don't contain a VRF output).
Slot
#
currentSlot(): - interface:
api.query.babe.currentSlot
- summary: Current slot number.
u64
#
epochIndex(): - interface:
api.query.babe.epochIndex
- summary: Current epoch index.
Slot
#
genesisSlot(): - interface:
api.query.babe.genesisSlot
- summary: The slot at which the first epoch actually started. This is 0 until the first block of the chain.
Option<MaybeRandomness>
#
initialized(): - interface:
api.query.babe.initialized
- summary: Temporary value (cleared at block finalization) which is
Some
if per-block initialization has already been called for current block.
BlockNumber
#
lateness(): interface:
api.query.babe.lateness
summary: How late the current block is compared to its parent.
This entry is populated as part of block execution and is cleaned up on block finalization. Querying this storage entry outside of block execution context should always yield zero.
Vec<(AuthorityId,BabeAuthorityWeight)>
#
nextAuthorities(): - interface:
api.query.babe.nextAuthorities
- summary: Next epoch authorities.
Option<NextConfigDescriptor>
#
nextEpochConfig(): - interface:
api.query.babe.nextEpochConfig
- summary: Next epoch configuration, if changed.
Randomness
#
nextRandomness(): - interface:
api.query.babe.nextRandomness
- summary: Next epoch randomness.
Randomness
#
randomness(): interface:
api.query.babe.randomness
summary: The epoch randomness for the current epoch.
#
SecurityThis MUST NOT be used for gambling, as it can be influenced by a malicious validator in the short term. It MAY be used in many cryptographic protocols, however, so long as one remembers that this (like everything else on-chain) it is public. For example, it can be used where a number is needed that cannot have been chosen by an adversary, for purposes such as public-coin zero-knowledge proofs.
u32
#
segmentIndex(): interface:
api.query.babe.segmentIndex
summary: Randomness under construction.
We make a tradeoff between storage accesses and list length. We store the under-construction randomness in segments of up to
UNDER_CONSTRUCTION_SEGMENT_LENGTH
.Once a segment reaches this length, we begin the next one. We reset all segments and return to
0
at the beginning of every epoch.
u32
): Vec<Randomness>
#
underConstruction(- interface:
api.query.babe.underConstruction
- summary: TWOX-NOTE:
SegmentIndex
is an increasing integer, so this is okay.
#
balancesAccountId
): AccountData
#
account(interface:
api.query.balances.account
summary: The balance of an account.
NOTE: This is only used in the case that this pallet is used to store balances.
AccountId
): Vec<BalanceLock>
#
locks(- interface:
api.query.balances.locks
- summary: Any liquidity locks on some account balances. NOTE: Should only be accessed when setting, changing and freeing a lock.
Releases
#
storageVersion(): interface:
api.query.balances.storageVersion
summary: Storage version of the pallet.
This is set to v2.0.0 for new networks.
Balance
#
totalIssuance(): - interface:
api.query.balances.totalIssuance
- summary: The total units issued in the system.
#
benefitsEraBenefits
#
currentBenefits(): - interface:
api.query.benefits.currentBenefits
- summary: The global benefits information
AccountId
): FeeReductionBenefit
#
feeReductionBenefits(- interface:
api.query.benefits.feeReductionBenefits
- summary: The fee reduction
#
bountiesBountyIndex
): Option<Bounty>
#
bounties(- interface:
api.query.bounties.bounties
- summary: Bounties that have been made.
Vec<BountyIndex>
#
bountyApprovals(): - interface:
api.query.bounties.bountyApprovals
- summary: Bounty indices that have been approved but not yet funded.
BountyIndex
#
bountyCount(): - interface:
api.query.bounties.bountyCount
- summary: Number of bounty proposals that have been made.
BountyIndex
): Option<Bytes>
#
bountyDescriptions(- interface:
api.query.bounties.bountyDescriptions
- summary: The description of each bounty.
#
candyAccountId
): Balance
#
balances(- interface:
api.query.candy.balances
- summary: The number of units of candy held by any given account.
Balance
#
total(): - interface:
api.query.candy.total
- summary: The total unit supply of candy.
#
claimsAccountId
): Option<EthereumAddress>
#
bondedEth(- interface:
api.query.claims.bondedEth
EthereumTxHash
): bool
#
claimed(- interface:
api.query.claims.claimed
BalanceOf
#
claimLimit(): - interface:
api.query.claims.claimLimit
EthereumTxHash
): Option<(EthereumAddress,BalanceOf)>
#
claims(- interface:
api.query.claims.claims
Option<AccountId>
#
miner(): - interface:
api.query.claims.miner
Option<AccountId>
#
superior(): - interface:
api.query.claims.superior
#
councilVec<AccountId>
#
members(): - interface:
api.query.council.members
- summary: The current members of the collective. This is stored sorted (just by value).
Option<AccountId>
#
prime(): - interface:
api.query.council.prime
- summary: The prime member that helps determine the default vote behavior in case of absentations.
u32
#
proposalCount(): - interface:
api.query.council.proposalCount
- summary: Proposals so far.
Hash
): Option<Proposal>
#
proposalOf(- interface:
api.query.council.proposalOf
- summary: Actual proposal for a given hash, if it's current.
Vec<Hash>
#
proposals(): - interface:
api.query.council.proposals
- summary: The hashes of the active proposals.
Hash
): Option<Votes>
#
voting(- interface:
api.query.council.voting
- summary: Votes on a given proposal, if it is ongoing.
#
democracyHash
): Option<(BlockNumber,Vec<AccountId>)>
#
blacklist(- interface:
api.query.democracy.blacklist
- summary: A record of who vetoed what. Maps proposal hash to a possible existent block number (until when it may not be resubmitted) and who vetoed it.
Hash
): bool
#
cancellations(- interface:
api.query.democracy.cancellations
- summary: Record of all proposals that have been subject to emergency cancellation.
PropIndex
): Option<(Vec<AccountId>,BalanceOf)>
#
depositOf(interface:
api.query.democracy.depositOf
summary: Those who have locked a deposit.
TWOX-NOTE: Safe, as increasing integer keys are safe.
bool
#
lastTabledWasExternal(): - interface:
api.query.democracy.lastTabledWasExternal
- summary: True if the last referendum tabled was submitted externally. False if it was a public proposal.
AccountId
): Option<BlockNumber>
#
locks(interface:
api.query.democracy.locks
summary: Accounts for which there are locks in action which may be removed at some point in the future. The value is the block number at which the lock expires and may be removed.
TWOX-NOTE: OK ―
AccountId
is a secure hash.
ReferendumIndex
#
lowestUnbaked(): - interface:
api.query.democracy.lowestUnbaked
- summary: The lowest referendum index representing an unbaked referendum. Equal to
ReferendumCount
if there isn't a unbaked referendum.
Option<(Hash,VoteThreshold)>
#
nextExternal(): interface:
api.query.democracy.nextExternal
summary: The referendum to be tabled whenever it would be valid to table an external proposal. This happens when a referendum needs to be tabled and one of two conditions are met:
LastTabledWasExternal
isfalse
; orPublicProps
is empty.
Hash
): Option<PreimageStatus>
#
preimages(- interface:
api.query.democracy.preimages
- summary: Map of hashes to the proposal preimage, along with who registered it and their deposit. The block number is the block at which it was deposited.
PropIndex
#
publicPropCount(): - interface:
api.query.democracy.publicPropCount
- summary: The number of (public) proposals that have been made so far.
Vec<(PropIndex,Hash,AccountId)>
#
publicProps(): - interface:
api.query.democracy.publicProps
- summary: The public proposals. Unsorted. The second item is the proposal's hash.
ReferendumIndex
#
referendumCount(): - interface:
api.query.democracy.referendumCount
- summary: The next free referendum index, aka the number of referenda started so far.
ReferendumIndex
): Option<ReferendumInfo>
#
referendumInfoOf(interface:
api.query.democracy.referendumInfoOf
summary: Information concerning any given referendum.
TWOX-NOTE: SAFE as indexes are not under an attacker’s control.
Option<Releases>
#
storageVersion(): interface:
api.query.democracy.storageVersion
summary: Storage version of the pallet.
New networks start with last version.
AccountId
): Voting
#
votingOf(interface:
api.query.democracy.votingOf
summary: All votes for a particular voter. We store the balance for the number of votes that we have recorded. The second item is the total amount of delegations, that will be added.
TWOX-NOTE: SAFE as
AccountId
s are crypto hashes anyway.
#
electionsVec<(AccountId,BalanceOf)>
#
candidates(): interface:
api.query.elections.candidates
summary: The present candidate list. A current member or runner-up can never enter this vector and is always implicitly assumed to be a candidate.
Second element is the deposit.
Invariant: Always sorted based on account id.
u32
#
electionRounds(): - interface:
api.query.elections.electionRounds
- summary: The total number of vote rounds that have happened, excluding the upcoming one.
Vec<SeatHolder>
#
members(): interface:
api.query.elections.members
summary: The current elected members.
Invariant: Always sorted based on account id.
Vec<SeatHolder>
#
runnersUp(): interface:
api.query.elections.runnersUp
summary: The current reserved runners-up.
Invariant: Always sorted based on rank (worse to best). Upon removal of a member, the last (i.e. best) runner-up will be replaced.
AccountId
): Voter
#
voting(interface:
api.query.elections.voting
summary: Votes and locked stake of a particular voter.
TWOX-NOTE: SAFE as
AccountId
is a crypto hash.
#
grandpaSetId
#
currentSetId(): - interface:
api.query.grandpa.currentSetId
- summary: The number of changes (both in terms of keys and underlying economic responsibilities) in the "set" of Grandpa validators from genesis.
Option<BlockNumber>
#
nextForced(): - interface:
api.query.grandpa.nextForced
- summary: next block number where we can force a change.
Option<StoredPendingChange>
#
pendingChange(): - interface:
api.query.grandpa.pendingChange
- summary: Pending change: (signaled at, scheduled change).
SetId
): Option<SessionIndex>
#
setIdSession(interface:
api.query.grandpa.setIdSession
summary: A mapping from grandpa set ID to the index of the most recent session for which its members were responsible.
TWOX-NOTE:
SetId
is not under user control.
Option<(BlockNumber,BlockNumber)>
#
stalled(): - interface:
api.query.grandpa.stalled
- summary:
true
if we are currently stalled.
StoredState
#
state(): - interface:
api.query.grandpa.state
- summary: State of the current authority set.
#
identityAccountId
): Option<Registration>
#
identityOf(interface:
api.query.identity.identityOf
summary: Information that is pertinent to identify the entity behind an account.
TWOX-NOTE: OK ―
AccountId
is a secure hash.
Vec<Option<RegistrarInfo>>
#
registrars(): interface:
api.query.identity.registrars
summary: The set of registrars. Not expected to get very big as can only be added through a special origin (likely a council motion).
The index into this can be cast to
RegistrarIndex
to get a valid value.
AccountId
): (BalanceOf,Vec<AccountId>)
#
subsOf(interface:
api.query.identity.subsOf
summary: Alternative "sub" identities of this account.
The first item is the deposit, the second is a vector of the accounts.
TWOX-NOTE: OK ―
AccountId
is a secure hash.
AccountId
): Option<(AccountId,Data)>
#
superOf(- interface:
api.query.identity.superOf
- summary: The super-identity of an alternative "sub" identity together with its name, within that context. If the account is not some other account's sub-identity, then just
None
.
#
imOnlineSessionIndex, ValidatorId
): u32
#
authoredBlocks(- interface:
api.query.imOnline.authoredBlocks
- summary: For each session index, we keep a mapping of
ValidatorId<T>
to the number of blocks authored by the given authority.
BlockNumber
#
heartbeatAfter(): interface:
api.query.imOnline.heartbeatAfter
summary: The block number after which it's ok to send heartbeats in current session.
At the beginning of each session we set this to a value that should fall roughly in the middle of the session duration. The idea is to first wait for the validators to produce a block in the current session, so that the heartbeat later on will not be necessary.
Vec<AuthorityId>
#
keys(): - interface:
api.query.imOnline.keys
- summary: The current set of keys that may issue a heartbeat.
SessionIndex, AuthIndex
): Option<Bytes>
#
receivedHeartbeats(- interface:
api.query.imOnline.receivedHeartbeats
- summary: For each session index, we keep a mapping of
AuthIndex
tooffchain::OpaqueNetworkState
.
#
indicesAccountIndex
): Option<(AccountId,BalanceOf,bool)>
#
accounts(- interface:
api.query.indices.accounts
- summary: The lookup from index to account.
#
marketBalanceOf
#
fileBaseFee(): - interface:
api.query.market.fileBaseFee
- summary: The file base fee for each storage order.
BalanceOf
#
filePrice(): - interface:
api.query.market.filePrice
- summary: The file price per MB. It's dynamically adjusted and would change according to FilesSize, TotalCapacity and StorageReferenceRatio.
MerkleRoot
): Option<(FileInfo,UsedInfo)>
#
files(- interface:
api.query.market.files
- summary: The file information and used information iterated by ipfs cid. It includes file related info such as file size, expired date and reported replica count.
u128
#
filesSize(): - interface:
api.query.market.filesSize
- summary: The total files size in Byte.
bool
#
marketSwitch(): - interface:
api.query.market.marketSwitch
- summary: The global market switch to enable place storage order
AccountId
): MerchantLedger
#
merchantLedgers(- interface:
api.query.market.merchantLedgers
- summary: The merchant ledger, which contains the collateral and reward value for each merchant.
MerkleRoot
): Option<UsedInfo>
#
usedTrashI(- interface:
api.query.market.usedTrashI
- summary: The first file trash to store overdue files for a while
MerkleRoot
): Option<UsedInfo>
#
usedTrashII(- interface:
api.query.market.usedTrashII
- summary: The second file trash to store overdue files for a while
SworkerAnchor
): u64
#
usedTrashMappingI(- interface:
api.query.market.usedTrashMappingI
- summary: The total counted used size for each anchor in the first file trash
SworkerAnchor
): u64
#
usedTrashMappingII(- interface:
api.query.market.usedTrashMappingII
- summary: The total counted used size for each anchor in the second file trash
u128
#
usedTrashSizeI(): - interface:
api.query.market.usedTrashSizeI
- summary: The count of overdue files in the first file trash
u128
#
usedTrashSizeII(): - interface:
api.query.market.usedTrashSizeII
- summary: The count of overdue files in the second file trash
#
offencesKind, OpaqueTimeSlot
): Vec<ReportIdOf>
#
concurrentReportsIndex(- interface:
api.query.offences.concurrentReportsIndex
- summary: A vector of reports of the same kind that happened at the same time slot.
Vec<DeferredOffenceOf>
#
deferredOffences(): - interface:
api.query.offences.deferredOffences
- summary: Deferred reports that have been rejected by the offence handler and need to be submitted at a later time.
ReportIdOf
): Option<OffenceDetails>
#
reports(- interface:
api.query.offences.reports
- summary: The primary structure that holds all offence records keyed by report identifiers.
Kind
): Bytes
#
reportsByKindIndex(interface:
api.query.offences.reportsByKindIndex
summary: Enumerates all reports of a kind along with the time they happened.
All reports are sorted by the time of offence.
Note that the actual type of this mapping is
Vec<u8>
, this is because values of different types are not supported at the moment so we are doing the manual serialization.
#
randomnessCollectiveFlipVec<Hash>
#
randomMaterial(): - interface:
api.query.randomnessCollectiveFlip.randomMaterial
- summary: Series of block headers from the last 81 blocks that acts as random seed material. This is arranged as a ring buffer with
block_number % 81
being the index into theVec
of the oldest hash.
#
schedulerBlockNumber
): Vec<Option<Scheduled>>
#
agenda(- interface:
api.query.scheduler.agenda
- summary: Items to be executed, indexed by the block number that they should be executed on.
Bytes
): Option<TaskAddress>
#
lookup(- interface:
api.query.scheduler.lookup
- summary: Lookup from identity to the block number and index of the task.
Releases
#
storageVersion(): interface:
api.query.scheduler.storageVersion
summary: Storage version of the pallet.
New networks start with last version.
#
sessionSessionIndex
#
currentIndex(): - interface:
api.query.session.currentIndex
- summary: Current index of the session.
Vec<u32>
#
disabledValidators(): interface:
api.query.session.disabledValidators
summary: Indices of disabled validators.
The set is cleared when
on_session_ending
returns a new set of identities.
(KeyTypeId,Bytes)
): Option<ValidatorId>
#
keyOwner(- interface:
api.query.session.keyOwner
- summary: The owner of a key. The key is the
KeyTypeId
+ the encoded key.
ValidatorId
): Option<Keys>
#
nextKeys(- interface:
api.query.session.nextKeys
- summary: The next session keys for a validator.
bool
#
queuedChanged(): - interface:
api.query.session.queuedChanged
- summary: True if the underlying economic identities or weighting behind the validators has changed in the queued validator set.
Vec<(ValidatorId,Keys)>
#
queuedKeys(): - interface:
api.query.session.queuedKeys
- summary: The queued keys for the next session. When the next session begins, these keys will be used to determine the validator's session keys.
Vec<ValidatorId>
#
validators(): - interface:
api.query.session.validators
- summary: The current set of validators.
#
stakingOption<ActiveEraInfo>
#
activeEra(): interface:
api.query.staking.activeEra
summary: The active era information, it holds index and start.
The active era is the era currently rewarded. Validator set of this era must be equal to
SessionInterface::validators
.
AccountId
): Option<AccountId>
#
bonded(- interface:
api.query.staking.bonded
- summary: Map from all locked "stash" accounts to the controller account.
Vec<(EraIndex,SessionIndex)>
#
bondedEras(): - interface:
api.query.staking.bondedEras
- summary: A mapping from still-bonded eras to the first session index of that era.
BalanceOf
#
canceledSlashPayout(): - interface:
api.query.staking.canceledSlashPayout
- summary: The amount of currency given to reporters of a slash event which was canceled by extraordinary circumstances (e.g. governance).
Vec<AccountId>
#
currentElected(): - interface:
api.query.staking.currentElected
- summary: The currently elected validator set keyed by stash account ID.
Option<EraIndex>
#
currentEra(): - interface:
api.query.staking.currentEra
- summary: The current era index.
Option<EraIndex>
#
earliestUnappliedSlash(): - interface:
api.query.staking.earliestUnappliedSlash
- summary: The earliest era for which we have a pending, unapplied slash.
EraIndex, AccountId
): Option<BalanceOf>
#
erasAuthoringPayout(- interface:
api.query.staking.erasAuthoringPayout
- summary: Authoring payout of validator at era.
EraIndex
): Option<BalanceOf>
#
erasMarketPayout(- interface:
api.query.staking.erasMarketPayout
- summary: Market staking payout of validator at era.
EraIndex
): EraRewardPoints
#
erasRewardPoints(- interface:
api.query.staking.erasRewardPoints
- summary: Rewards for the last
HISTORY_DEPTH
eras. If reward hasn't been set or has been removed then 0 reward is returned.
EraIndex, AccountId
): Exposure
#
erasStakers(interface:
api.query.staking.erasStakers
summary: Exposure of validator at era.
This is keyed first by the era index to allow bulk deletion and then the stash account.
Is it removed after
HISTORY_DEPTH
eras. If stakers hasn't been set or has been removed then empty exposure is returned.
EraIndex, AccountId
): Exposure
#
erasStakersClipped(interface:
api.query.staking.erasStakersClipped
summary: Clipped Exposure of validator at era.
This is similar to [
ErasStakers
] but number of guarantors exposed is reduced to theT::MaxGuarantorRewardedPerValidator
biggest stakers. (Note: the fieldtotal
andown
of the exposure remains unchanged). This is used to limit the i/o cost for the guarantor payout.This is keyed fist by the era index to allow bulk deletion and then the stash account.
Is it removed after
HISTORY_DEPTH
eras. If stakers hasn't been set or has been removed then empty exposure is returned.
EraIndex
): Option<BalanceOf>
#
erasStakingPayout(- interface:
api.query.staking.erasStakingPayout
- summary: Total staking payout at era.
EraIndex
): Option<SessionIndex>
#
erasStartSessionIndex(- interface:
api.query.staking.erasStartSessionIndex
- summary: The session index at which the era start for the last
HISTORY_DEPTH
eras.
EraIndex
): BalanceOf
#
erasTotalStakes(interface:
api.query.staking.erasTotalStakes
summary: The amount of balance actively at stake for each validator slot, currently.
This is used to derive rewards and punishments.
EraIndex, AccountId
): ValidatorPrefs
#
erasValidatorPrefs(interface:
api.query.staking.erasValidatorPrefs
summary: Similar to
ErasStakers
, this holds the preferences of validators.This is keyed first by the era index to allow bulk deletion and then the stash account.
Is it removed after
HISTORY_DEPTH
eras.
Forcing
#
forceEra(): - interface:
api.query.staking.forceEra
- summary: True if the next session change will be a new era regardless of index.
AccountId
): Option<Guarantee>
#
guarantors(- interface:
api.query.staking.guarantors
- summary: The map from guarantor stash key to the set of stash keys of all validators to guarantee.
EraIndex, AccountId
): Option<BalanceOf>
#
guarantorSlashInEra(- interface:
api.query.staking.guarantorSlashInEra
- summary: All slashing events on guarantors, mapped by era to the highest slash value of the era.
u32
#
historyDepth(): interface:
api.query.staking.historyDepth
summary: Number of eras to keep in history.
Information is kept for eras in
[current_era - history_depth; current_era]
.
Vec<AccountId>
#
invulnerables(): - interface:
api.query.staking.invulnerables
- summary: Any validators that may never be slashed or forcibly kicked. It's a Vec since they're easy to initialize and the performance hit is minimal (we expect no more than four invulnerables) and restricted to testnets.
AccountId
): Option<StakingLedger>
#
ledger(- interface:
api.query.staking.ledger
- summary: Map from all (unlocked) "controller" accounts to the info regarding the staking.
u32
#
minimumValidatorCount(): - interface:
api.query.staking.minimumValidatorCount
- summary: Minimum number of staking participants before emergency conditions are imposed.
AccountId
): RewardDestination
#
payee(- interface:
api.query.staking.payee
- summary: Where the reward payment should be made. Keyed by stash.
AccountId
): Option<SlashingSpans>
#
slashingSpans(- interface:
api.query.staking.slashingSpans
- summary: Slashing spans for stash accounts.
Perbill
#
slashRewardFraction(): interface:
api.query.staking.slashRewardFraction
summary: The percentage of the slash that is distributed to reporters.
The rest of the slashed value is handled by the
Slash
.
(AccountId,SpanIndex)
): SpanRecord
#
spanSlash(- interface:
api.query.staking.spanSlash
- summary: Records information about the maximum slash of a stash within a slashing span, as well as how much reward has been paid out.
AccountId
): Option<BalanceOf>
#
stakeLimit(- interface:
api.query.staking.stakeLimit
- summary: The stake limit, determined all the staking operations This is keyed by the stash account.
EraIndex
#
startRewardEra(): - interface:
api.query.staking.startRewardEra
- summary: Start era for reward curve
EraIndex
): Vec<UnappliedSlash>
#
unappliedSlashes(- interface:
api.query.staking.unappliedSlashes
- summary: All unapplied slashes that are queued for later.
u32
#
validatorCount(): - interface:
api.query.staking.validatorCount
- summary: The ideal number of staking participants.
AccountId
): ValidatorPrefs
#
validators(- interface:
api.query.staking.validators
- summary: The map from (wannabe) validator stash key to the preferences of that validator.
EraIndex, AccountId
): Option<(Perbill,BalanceOf)>
#
validatorSlashInEra(- interface:
api.query.staking.validatorSlashInEra
- summary: All slashing events on validators, mapped by era to the highest slash proportion and slash value of the era.
#
substrateThese are well-known keys that are always available to the runtime implementation of any Substrate-based network.
u32
#
changesTrieConfig(): - interface:
api.query.substrate.changesTrieConfig
- summary: Changes trie configuration is stored under this key.
u32
#
childStorageKeyPrefix(): - interface:
api.query.substrate.childStorageKeyPrefix
- summary: Prefix of child storage keys.
Bytes
#
code(): - interface:
api.query.substrate.code
- summary: Wasm code of the runtime.
u32
#
extrinsicIndex(): - interface:
api.query.substrate.extrinsicIndex
- summary: Current extrinsic index (u32) is stored under this key.
u64
#
heapPages(): - interface:
api.query.substrate.heapPages
- summary: Number of wasm linear memory pages required for execution of the runtime.
#
sudoAccountId
#
key(): - interface:
api.query.sudo.key
- summary: The
AccountId
of the sudo key.
#
sworkSworkerCode
): Option<BlockNumber>
#
codes(- interface:
api.query.swork.codes
- summary: The sWorker enclave codes, this should be managed by sudo/democracy
ReportSlot
#
currentReportSlot(): - interface:
api.query.swork.currentReportSlot
- summary: The current report slot block number, this value should be a multiple of report slot block.
u128
#
free(): - interface:
api.query.swork.free
- summary: The free workload, used for calculating stake limit in the end of each report slot. The default value is 0.
AccountId
): BTreeSet<AccountId>
#
groups(- interface:
api.query.swork.groups
- summary: The group information
ReportSlot
#
historySlotDepth(): - interface:
api.query.swork.historySlotDepth
- summary: The depth of the history of the ReportedInSlot
AccountId
): Option<Identity>
#
identities(- interface:
api.query.swork.identities
- summary: The identity information for each sworker member, which contains the anchor, punishment deadline and group information.
SworkerPubKey
): PKInfo
#
pubKeys(- interface:
api.query.swork.pubKeys
- summary: The pub key information, mapping from sWorker public key to an pubkey information, including the sworker enclave code and option anchor.
u128
#
reportedFilesSize(): - interface:
api.query.swork.reportedFilesSize
- summary: The total reported files workload, used for calculating total_capacity for market module The default value is 0.
SworkerAnchor, ReportSlot
): bool
#
reportedInSlot(- interface:
api.query.swork.reportedInSlot
- summary: Recording whether the validator reported works of each report slot. We keep the last "HistorySlotDepth" length data cause B-tree won't build index on key2(ReportSlot). The value represent if reported in this slot
u128
#
used(): - interface:
api.query.swork.used
- summary: The used workload, used for calculating stake limit in the end of each report slot. The default value is 0.
SworkerAnchor
): Option<WorkReport>
#
workReports(- interface:
api.query.swork.workReports
- summary: Node's work report, mapping from sWorker anchor to an optional work report. WorkReport only been replaced, it won't get removed cause we need to check the status transition from off-chain sWorker
#
systemAccountId
): AccountInfo
#
account(- interface:
api.query.system.account
- summary: The full account information for a particular account ID.
Option<u32>
#
allExtrinsicsLen(): - interface:
api.query.system.allExtrinsicsLen
- summary: Total length (in bytes) for all extrinsics put together, for the current block.
BlockNumber
): Hash
#
blockHash(- interface:
api.query.system.blockHash
- summary: Map of block numbers to block hashes.
ConsumedWeight
#
blockWeight(): - interface:
api.query.system.blockWeight
- summary: The current weight for the block.
DigestOf
#
digest(): - interface:
api.query.system.digest
- summary: Digest of the current block, also part of the block header.
EventIndex
#
eventCount(): - interface:
api.query.system.eventCount
- summary: The number of events in the
Events<T>
list.
Vec<EventRecord>
#
events(): - interface:
api.query.system.events
- summary: Events deposited for the current block.
Hash
): Vec<(BlockNumber,EventIndex)>
#
eventTopics(interface:
api.query.system.eventTopics
summary: Mapping between a topic (represented by T::Hash) and a vector of indexes of events in the
<Events<T>>
list.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 theEventIndex
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.
Option<Phase>
#
executionPhase(): - interface:
api.query.system.executionPhase
- summary: The execution phase of the block.
Option<u32>
#
extrinsicCount(): - interface:
api.query.system.extrinsicCount
- summary: Total extrinsics count for the current block.
u32
): Bytes
#
extrinsicData(- interface:
api.query.system.extrinsicData
- summary: Extrinsics data for the current block (maps an extrinsic's index to its data).
Option<LastRuntimeUpgradeInfo>
#
lastRuntimeUpgrade(): - interface:
api.query.system.lastRuntimeUpgrade
- summary: Stores the
spec_version
andspec_name
of when the last runtime upgrade happened.
BlockNumber
#
number(): - interface:
api.query.system.number
- summary: The current block number being processed. Set by
execute_block
.
Hash
#
parentHash(): - interface:
api.query.system.parentHash
- summary: Hash of the previous block.
bool
#
upgradedToDualRefCount(): - interface:
api.query.system.upgradedToDualRefCount
- summary: True if we have upgraded so that AccountInfo contains two types of
RefCount
. False (default) if not.
bool
#
upgradedToU32RefCount(): - interface:
api.query.system.upgradedToU32RefCount
- summary: True if we have upgraded so that
type RefCount
isu32
. False (default) if not.
#
technicalCommitteeVec<AccountId>
#
members(): - interface:
api.query.technicalCommittee.members
- summary: The current members of the collective. This is stored sorted (just by value).
Option<AccountId>
#
prime(): - interface:
api.query.technicalCommittee.prime
- summary: The prime member that helps determine the default vote behavior in case of absentations.
u32
#
proposalCount(): - interface:
api.query.technicalCommittee.proposalCount
- summary: Proposals so far.
Hash
): Option<Proposal>
#
proposalOf(- interface:
api.query.technicalCommittee.proposalOf
- summary: Actual proposal for a given hash, if it's current.
Vec<Hash>
#
proposals(): - interface:
api.query.technicalCommittee.proposals
- summary: The hashes of the active proposals.
Hash
): Option<Votes>
#
voting(- interface:
api.query.technicalCommittee.voting
- summary: Votes on a given proposal, if it is ongoing.
#
technicalMembershipVec<AccountId>
#
members(): - interface:
api.query.technicalMembership.members
- summary: The current membership, stored as an ordered Vec.
Option<AccountId>
#
prime(): - interface:
api.query.technicalMembership.prime
- summary: The current prime member, if one exists.
#
timestampbool
#
didUpdate(): - interface:
api.query.timestamp.didUpdate
- summary: Did the timestamp get updated in this block?
Moment
#
now(): - interface:
api.query.timestamp.now
- summary: Current time for the current block.
#
tipsHash
): Option<Bytes>
#
reasons(- interface:
api.query.tips.reasons
- summary: Simple preimage lookup from the reason's hash to the original data. Again, has an insecure enumerable hash since the key is guaranteed to be the result of a secure hash.
Hash
): Option<OpenTip>
#
tips(- interface:
api.query.tips.tips
- summary: TipsMap that are not yet completed. Keyed by the hash of
(reason, who)
from the value. This has the insecure enumerable hash function since the key itself is already guaranteed to be a secure hash.
#
transactionPaymentMultiplier
#
nextFeeMultiplier(): - interface:
api.query.transactionPayment.nextFeeMultiplier
Releases
#
storageVersion(): - interface:
api.query.transactionPayment.storageVersion
#
treasuryVec<ProposalIndex>
#
approvals(): - interface:
api.query.treasury.approvals
- summary: Proposal indices that have been approved but not yet awarded.
ProposalIndex
#
proposalCount(): - interface:
api.query.treasury.proposalCount
- summary: Number of proposals that have been made.
ProposalIndex
): Option<TreasuryProposal>
#
proposals(- interface:
api.query.treasury.proposals
- summary: Proposals that have been made.