title: 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.)


asset

aggregateBalance(Ticker, ScopeId): Balance

  • interface: api.query.asset.aggregateBalance
  • summary: Store aggregate balance of those identities that has the same ScopeId. (Ticker, ScopeId) => Balance.

assetDocuments(Ticker, DocumentId): Document

  • interface: api.query.asset.assetDocuments
  • summary: Documents attached to an Asset (ticker, doc_id) -> document

assetDocumentsIdSequence(Ticker): DocumentId

  • interface: api.query.asset.assetDocumentsIdSequence
  • summary: Per-ticker document ID counter. (ticker) -> doc_id

assetNames(Ticker): AssetName

  • interface: api.query.asset.assetNames
  • summary: Asset name of the token corresponding to the token ticker. (ticker) -> AssetName

assetOwnershipRelations(IdentityId, Ticker): AssetOwnershipRelation

  • interface: api.query.asset.assetOwnershipRelations
  • summary: Tickers and token owned by a user (user, ticker) -> AssetOwnership

balanceOf(Ticker, IdentityId): Balance

  • interface: api.query.asset.balanceOf
  • summary: The total asset ticker balance per identity. (ticker, DID) -> Balance

balanceOfAtScope(ScopeId, IdentityId): Balance

  • interface: api.query.asset.balanceOfAtScope
  • summary: Balances get stored on the basis of the ScopeId. Right now it is only helpful for the UI purposes but in future it can be used to do miracles on-chain. (ScopeId, IdentityId) => Balance.

classicTickers(Ticker): Option<ClassicTickerRegistration>

  • interface: api.query.asset.classicTickers
  • summary: Ticker registration details on Polymath Classic / Ethereum.

customTypeIdSequence(): CustomAssetTypeId

  • interface: api.query.asset.customTypeIdSequence

  • summary: The next AssetType::Custom ID in the sequence.

    Numbers in the sequence start from 1 rather than 0.

customTypes(CustomAssetTypeId): Bytes

  • interface: api.query.asset.customTypes
  • summary: Maps custom asset type ids to the registered string contents.

customTypesInverse(Bytes): CustomAssetTypeId

  • interface: api.query.asset.customTypesInverse
  • summary: Inverse map of CustomTypes, from registered string contents to custom asset type ids.

disableInvestorUniqueness(Ticker): bool

  • interface: api.query.asset.disableInvestorUniqueness

  • summary: Decides whether investor uniqueness requirement is enforced for this asset. false means that it is enforced.

    Ticker => bool.

frozen(Ticker): bool

  • interface: api.query.asset.frozen
  • summary: The set of frozen assets implemented as a membership map. ticker -> bool

fundingRound(Ticker): FundingRoundName

  • interface: api.query.asset.fundingRound
  • summary: The name of the current funding round. ticker -> funding round

identifiers(Ticker): Vec<AssetIdentifier>

  • interface: api.query.asset.identifiers
  • summary: A map of a ticker name and asset identifiers.

issuedInFundingRound((Ticker,FundingRoundName)): Balance

  • interface: api.query.asset.issuedInFundingRound
  • summary: The total balances of tokens issued in all recorded funding rounds. (ticker, funding round) -> balance

scopeIdOf(Ticker, IdentityId): ScopeId

  • interface: api.query.asset.scopeIdOf
  • summary: Tracks the ScopeId of the identity for a given ticker. (Ticker, IdentityId) => ScopeId.

storageVersion(): Version

  • interface: api.query.asset.storageVersion
  • summary: Storage version.

tickerConfig(): TickerRegistrationConfig

  • interface: api.query.asset.tickerConfig
  • summary: Ticker registration config. (ticker) -> TickerRegistrationConfig

tickers(Ticker): TickerRegistration

  • interface: api.query.asset.tickers
  • summary: Ticker registration details. (ticker) -> TickerRegistration

tokens(Ticker): SecurityToken

  • interface: api.query.asset.tokens
  • summary: Details of the token corresponding to the token ticker. (ticker) -> SecurityToken details [returns SecurityToken struct]

authorship

author(): Option<AccountId>

  • interface: api.query.authorship.author
  • summary: Author of current block.

didSetUncles(): bool

  • interface: api.query.authorship.didSetUncles
  • summary: Whether uncles were already set in this block.

uncles(): Vec<UncleEntryItem>

  • interface: api.query.authorship.uncles
  • summary: Uncles

babe

authorities(): Vec<(AuthorityId,BabeAuthorityWeight)>

  • interface: api.query.babe.authorities
  • summary: Current epoch authorities.

authorVrfRandomness(): MaybeRandomness

  • 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).

currentSlot(): Slot

  • interface: api.query.babe.currentSlot
  • summary: Current slot number.

epochIndex(): u64

  • interface: api.query.babe.epochIndex
  • summary: Current epoch index.

genesisSlot(): Slot

  • 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.

initialized(): Option<MaybeRandomness>

  • 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.

lateness(): BlockNumber

  • 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.

nextAuthorities(): Vec<(AuthorityId,BabeAuthorityWeight)>

  • interface: api.query.babe.nextAuthorities
  • summary: Next epoch authorities.

nextEpochConfig(): Option<NextConfigDescriptor>

  • interface: api.query.babe.nextEpochConfig
  • summary: Next epoch configuration, if changed.

nextRandomness(): Randomness

  • interface: api.query.babe.nextRandomness
  • summary: Next epoch randomness.

randomness(): Randomness

  • interface: api.query.babe.randomness

  • summary: The epoch randomness for the current epoch.

    Security

    This 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.

segmentIndex(): u32

  • 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.

underConstruction(u32): Vec<Randomness>

  • interface: api.query.babe.underConstruction
  • summary: TWOX-NOTE: SegmentIndex is an increasing integer, so this is okay.

balances

locks(AccountId): Vec<BalanceLock>

  • 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.

totalIssuance(): Balance

  • interface: api.query.balances.totalIssuance
  • summary: The total units issued in the system.

bridge

admin(): AccountId

  • interface: api.query.bridge.admin
  • summary: The admin key.

bridgeLimit(): (Balance,BlockNumber)

  • interface: api.query.bridge.bridgeLimit
  • summary: The maximum number of bridged POLYX per identity within a set interval of blocks. Fields: POLYX amount and the block interval duration.

bridgeLimitExempted(IdentityId): bool

  • interface: api.query.bridge.bridgeLimitExempted
  • summary: Identities not constrained by the bridge limit.

bridgeTxDetails(AccountId, u32): BridgeTxDetail

  • interface: api.query.bridge.bridgeTxDetails
  • summary: Details of bridge transactions identified with pairs of the recipient account and the bridge transaction nonce.

controller(): AccountId

  • interface: api.query.bridge.controller
  • summary: The multisig account of the bridge controller. The genesis signers accept their authorizations and are able to get their proposals delivered. The bridge creator transfers some POLY to their identity.

freezeAdmins(AccountId): bool

  • interface: api.query.bridge.freezeAdmins
  • summary: Freeze bridge admins. These accounts can only freeze the bridge.

frozen(): bool

  • interface: api.query.bridge.frozen
  • summary: Whether or not the bridge operation is frozen.

polyxBridged(IdentityId): (Balance,BlockNumber)

  • interface: api.query.bridge.polyxBridged
  • summary: Amount of POLYX bridged by the identity in last block interval. Fields: the bridged amount and the last interval number.

storageVersion(): Version

  • interface: api.query.bridge.storageVersion
  • summary: Storage version.

timelock(): BlockNumber

  • interface: api.query.bridge.timelock
  • summary: The bridge transaction timelock period, in blocks, since the acceptance of the transaction proposal during which the admin key can freeze the transaction.

capitalDistribution

distributions(CAId): Option<Distribution>

  • interface: api.query.capitalDistribution.distributions

  • summary: All capital distributions, tied to their respective corporate actions (CAs).

    (CAId) => Distribution

holderPaid((CAId,IdentityId)): bool

  • interface: api.query.capitalDistribution.holderPaid

  • summary: Has an asset holder been paid yet?

    (CAId, DID) -> Was DID paid in the CAId?

storageVersion(): Version

  • interface: api.query.capitalDistribution.storageVersion
  • summary: Storage version.

cddServiceProviders

activeMembers(): Vec<IdentityId>

  • interface: api.query.cddServiceProviders.activeMembers
  • summary: The current "active" membership, stored as an ordered Vec.

activeMembersLimit(): u32

  • interface: api.query.cddServiceProviders.activeMembersLimit
  • summary: Limit of how many "active" members there can be.

inactiveMembers(): Vec<InactiveMember>

  • interface: api.query.cddServiceProviders.inactiveMembers
  • summary: The current "inactive" membership, stored as an ordered Vec.

checkpoint

balance((Ticker,CheckpointId), IdentityId): Balance

  • interface: api.query.checkpoint.balance

  • summary: Balance of a DID at a checkpoint.

    (ticker, did, checkpoint ID) -> Balance of a DID at a checkpoint

balanceUpdates(Ticker, IdentityId): Vec<CheckpointId>

  • interface: api.query.checkpoint.balanceUpdates
  • summary: Checkpoints where a DID's balance was updated. (ticker, did) -> [checkpoint ID where user balance changed]

checkpointIdSequence(Ticker): CheckpointId

  • interface: api.query.checkpoint.checkpointIdSequence

  • summary: Checkpoints ID generator sequence. ID of first checkpoint is 1 instead of 0.

    (ticker) -> no. of checkpoints

scheduleIdSequence(Ticker): ScheduleId

  • interface: api.query.checkpoint.scheduleIdSequence

  • summary: Checkpoint schedule ID sequence for tickers.

    (ticker) -> schedule ID

schedulePoints(Ticker, ScheduleId): Vec<CheckpointId>

  • interface: api.query.checkpoint.schedulePoints

  • summary: All the checkpoints a given schedule originated.

    (ticker, schedule ID) -> [checkpoint ID]

scheduleRefCount(Ticker, ScheduleId): u32

  • interface: api.query.checkpoint.scheduleRefCount

  • summary: How many "strong" references are there to a given ScheduleId?

    The presence of a "strong" reference, in the sense of Rc<T>, entails that the referenced schedule cannot be removed. Thus, as long as strong_ref_count(schedule_id) > 0, remove_schedule(schedule_id) will error.

    (ticker, schedule ID) -> strong ref count

schedules(Ticker): Vec<StoredSchedule>

  • interface: api.query.checkpoint.schedules

  • summary: Checkpoint schedules for tickers.

    (ticker) -> [schedule]

schedulesMaxComplexity(): u64

  • interface: api.query.checkpoint.schedulesMaxComplexity
  • summary: The maximum complexity allowed for an arbitrary ticker's schedule set (i.e. Schedules storage item below).

storageVersion(): Version

  • interface: api.query.checkpoint.storageVersion
  • summary: Storage version.

timestamps(Ticker, CheckpointId): Moment

  • interface: api.query.checkpoint.timestamps

  • summary: Checkpoint timestamps.

    Every schedule-originated checkpoint maps its ID to its due time. Every checkpoint manually created maps its ID to the time of recording.

    (ticker) -> (checkpoint ID) -> checkpoint timestamp

totalSupply(Ticker, CheckpointId): Balance

  • interface: api.query.checkpoint.totalSupply

  • summary: Total supply of the token at the checkpoint.

    (ticker, checkpointId) -> total supply at given checkpoint


committeeMembership

activeMembers(): Vec<IdentityId>

  • interface: api.query.committeeMembership.activeMembers
  • summary: The current "active" membership, stored as an ordered Vec.

activeMembersLimit(): u32

  • interface: api.query.committeeMembership.activeMembersLimit
  • summary: Limit of how many "active" members there can be.

inactiveMembers(): Vec<InactiveMember>

  • interface: api.query.committeeMembership.inactiveMembers
  • summary: The current "inactive" membership, stored as an ordered Vec.

complianceManager

assetCompliances(Ticker): AssetCompliance

  • interface: api.query.complianceManager.assetCompliances
  • summary: Asset compliance for a ticker (Ticker -> AssetCompliance)

storageVersion(): Version

  • interface: api.query.complianceManager.storageVersion
  • summary: Storage version.

trustedClaimIssuer(Ticker): Vec<TrustedIssuer>

  • interface: api.query.complianceManager.trustedClaimIssuer
  • summary: List of trusted claim issuer Ticker -> Issuer Identity

corporateAction

cADocLink(CAId): Vec<DocumentId>

  • interface: api.query.corporateAction.cADocLink

  • summary: Associations from CAs to Documents via their IDs. (CAId => [DocumentId])

    The CorporateActions map stores Ticker => LocalId => The CA, so we can infer Ticker => CAId. Therefore, we don't need a double map.

cAIdSequence(Ticker): LocalCAId

  • interface: api.query.corporateAction.cAIdSequence
  • summary: The next per-Ticker CA ID in the sequence. The full ID is defined as a combination of Ticker and a number in this sequence.

corporateActions(Ticker, LocalCAId): Option<CorporateAction>

  • interface: api.query.corporateAction.corporateActions

  • summary: All recorded CAs thus far. Only generic information is stored here. Specific CAKinds, e.g., benefits and corporate ballots, may use additional on-chain storage.

    (ticker => local ID => the corporate action)

defaultTargetIdentities(Ticker): TargetIdentities

  • interface: api.query.corporateAction.defaultTargetIdentities

  • summary: The identities targeted by default for CAs for this ticker, either to be excluded or included.

    (ticker => target identities)

defaultWithholdingTax(Ticker): Tax

  • interface: api.query.corporateAction.defaultWithholdingTax

  • summary: The default amount of tax to withhold ("withholding tax", WT) for this ticker when distributing dividends.

    To understand withholding tax, e.g., let's assume that you hold ACME shares. ACME now decides to distribute 100 SEK to Alice. Alice lives in Sweden, so Skatteverket (the Swedish tax authority) wants 30% of that. Then those 100 * 30% are withheld from Alice, and ACME will send them to Skatteverket.

    (ticker => % to withhold)

details(CAId): CADetails

  • interface: api.query.corporateAction.details
  • summary: Associates details in free-form text with a CA by its ID. (CAId => CADetails)

didWithholdingTax(Ticker): Vec<(IdentityId,Tax)>

  • interface: api.query.corporateAction.didWithholdingTax

  • summary: The amount of tax to withhold ("withholding tax", WT) for a certain ticker x DID. If an entry exists for a certain DID, it overrides the default in DefaultWithholdingTax.

    (ticker => [(did, % to withhold)]

maxDetailsLength(): u32

  • interface: api.query.corporateAction.maxDetailsLength

  • summary: Determines the maximum number of bytes that the free-form details of a CA can store.

    Note that this is not the number of chars or the number of graphemes. While this may be unnatural in terms of human understanding of a text's length, it more closely reflects actual storage costs ('a' is cheaper to store than an emoji).

storageVersion(): Version

  • interface: api.query.corporateAction.storageVersion
  • summary: Storage version.

corporateBallot

metas(CAId): Option<BallotMeta>

  • interface: api.query.corporateBallot.metas

  • summary: Metadata of a corporate ballot.

    (CAId) => BallotMeta

motionNumChoices(CAId): Vec<u16>

  • interface: api.query.corporateBallot.motionNumChoices

  • summary: Stores how many choices there are in each motion.

    At all times, the invariant holds that motion_choices[idx] is equal to metas.unwrap().motions[idx].choices.len(). That is, this is just a cache, used to avoid fetching all the motions with their associated texts.

    u16 choices should be more than enough to fit real use cases.

    (CAId) => Number of choices in each motion.

rCV(CAId): bool

  • interface: api.query.corporateBallot.rCV

  • summary: Is ranked choice voting (RCV) enabled for this ballot? For an understanding of how RCV is handled, see note on BallotVote's fallback field.

    (CAId) => bool

results(CAId): Vec<Balance>

  • interface: api.query.corporateBallot.results

  • summary: Stores the total vote tally on each choice.

    RCV is not accounted for, as there are too many wants to interpret the graph, and because it would not be efficient.

    (CAId) => [current vote weights]

timeRanges(CAId): Option<BallotTimeRange>

  • interface: api.query.corporateBallot.timeRanges

  • summary: Time details of a corporate ballot associated with a CA. The timestamps denote when voting starts and stops.

    (CAId) => BallotTimeRange

votes(CAId, IdentityId): Vec<BallotVote>

  • interface: api.query.corporateBallot.votes

  • summary: Stores each DID's votes in a given ballot. See the documentation of BallotVote for notes on semantics.

    (CAId) => (DID) => [vote weight]

    User must enter 0 vote weight if they don't want to vote for a choice.


externalAgents

agentOf(IdentityId, Ticker): ()

  • interface: api.query.externalAgents.agentOf
  • summary: Maps an agent (IdentityId) to all all Tickers they belong to, if any.

aGIdSequence(Ticker): AGId

  • interface: api.query.externalAgents.aGIdSequence

  • summary: The next per-Ticker AG ID in the sequence.

    The full ID is defined as a combination of Ticker and a number in this sequence, which starts from 1, rather than 0.

groupOfAgent(Ticker, IdentityId): Option<AgentGroup>

  • interface: api.query.externalAgents.groupOfAgent
  • summary: Maps agents (IdentityId) for a Ticker to what AG they belong to, if any.

groupPermissions(Ticker, AGId): Option<ExtrinsicPermissions>

  • interface: api.query.externalAgents.groupPermissions
  • summary: For custom AGs of a Ticker, maps to what permissions an agent in that AG would have.

numFullAgents(Ticker): u32

  • interface: api.query.externalAgents.numFullAgents
  • summary: Maps a Ticker to the number of Full agents for it.

grandpa

currentSetId(): SetId

  • 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.

nextForced(): Option<BlockNumber>

  • interface: api.query.grandpa.nextForced
  • summary: next block number where we can force a change.

pendingChange(): Option<StoredPendingChange>

  • interface: api.query.grandpa.pendingChange
  • summary: Pending change: (signaled at, scheduled change).

setIdSession(SetId): Option<SessionIndex>

  • 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.

stalled(): Option<(BlockNumber,BlockNumber)>

  • interface: api.query.grandpa.stalled
  • summary: true if we are currently stalled.

state(): StoredState

  • interface: api.query.grandpa.state
  • summary: State of the current authority set.

identity

accountKeyRefCount(AccountId): u64

  • interface: api.query.identity.accountKeyRefCount

  • summary: How many "strong" references to the account key.

    Strong references will block a key from leaving it's identity.

    Pallets using "strong" references to account keys:

    • Relayer: For user_key and paying_key

authorizations(Signatory, u64): Option<Authorization>

  • interface: api.query.identity.authorizations
  • summary: All authorizations that an identity/key has

authorizationsGiven(IdentityId, u64): Signatory

  • interface: api.query.identity.authorizationsGiven
  • summary: All authorizations that an identity has given. (Authorizer, auth_id -> authorized)

cddAuthForMasterKeyRotation(): bool

  • interface: api.query.identity.cddAuthForMasterKeyRotation
  • summary: Obsoleted storage variable superceded by CddAuthForPrimaryKeyRotation. It is kept here for the purpose of storage migration.

cddAuthForPrimaryKeyRotation(): bool

  • interface: api.query.identity.cddAuthForPrimaryKeyRotation
  • summary: A config flag that, if set, instructs an authorization from a CDD provider in order to change the primary key of an identity.

claims(Claim1stKey, Claim2ndKey): IdentityClaim

  • interface: api.query.identity.claims
  • summary: (Target ID, claim type) (issuer,scope) -> Associated claims

currentDid(): Option<IdentityId>

  • interface: api.query.identity.currentDid
  • summary: It stores the current identity for current transaction.

currentPayer(): Option<AccountId>

  • interface: api.query.identity.currentPayer
  • summary: It stores the current gas fee payer for the current transaction

didRecords(IdentityId): DidRecord

  • interface: api.query.identity.didRecords
  • summary: DID -> identity info

isDidFrozen(IdentityId): bool

  • interface: api.query.identity.isDidFrozen
  • summary: DID -> bool that indicates if secondary keys are frozen.

keyToIdentityIds(AccountId): IdentityId

  • interface: api.query.identity.keyToIdentityIds

multiPurposeNonce(): u64

  • interface: api.query.identity.multiPurposeNonce
  • summary: Nonce to ensure unique actions. starts from 1.

offChainAuthorizationNonce(IdentityId): AuthorizationNonce

  • interface: api.query.identity.offChainAuthorizationNonce
  • summary: Authorization nonce per Identity. Initially is 0.

storageVersion(): Version

  • interface: api.query.identity.storageVersion
  • summary: Storage version.

imOnline

authoredBlocks(SessionIndex, ValidatorId): u32

  • 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.

heartbeatAfter(): BlockNumber

  • 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.

keys(): Vec<AuthorityId>

  • interface: api.query.imOnline.keys
  • summary: The current set of keys that may issue a heartbeat.

receivedHeartbeats(SessionIndex, AuthIndex): Option<Bytes>

  • interface: api.query.imOnline.receivedHeartbeats
  • summary: For each session index, we keep a mapping of AuthIndex to offchain::OpaqueNetworkState.

indices

accounts(AccountIndex): Option<(AccountId,BalanceOf,bool)>

  • interface: api.query.indices.accounts
  • summary: The lookup from index to account.

multiSig

keyToMultiSig(AccountId): AccountId

  • interface: api.query.multiSig.keyToMultiSig
  • summary: Maps a multisig signer key to a multisig address.

multiSigNonce(): u64

  • interface: api.query.multiSig.multiSigNonce
  • summary: Nonce to ensure unique MultiSig addresses are generated; starts from 1.

multiSigSigners(AccountId, Signatory): Signatory

  • interface: api.query.multiSig.multiSigSigners
  • summary: Signers of a multisig. (multisig, signer) => signer.

multiSigSignsRequired(AccountId): u64

  • interface: api.query.multiSig.multiSigSignsRequired
  • summary: Confirmations required before processing a multisig tx.

multiSigToIdentity(AccountId): IdentityId

  • interface: api.query.multiSig.multiSigToIdentity
  • summary: Maps a multisig account to its identity.

multiSigTxDone(AccountId): u64

  • interface: api.query.multiSig.multiSigTxDone
  • summary: Number of transactions proposed in a multisig. Used as tx id; starts from 0.

numberOfSigners(AccountId): u64

  • interface: api.query.multiSig.numberOfSigners
  • summary: Number of approved/accepted signers of a multisig.

proposalDetail((AccountId,u64)): ProposalDetails

  • interface: api.query.multiSig.proposalDetail
  • summary: Details of a multisig proposal

proposalIds(AccountId, Proposal): Option<u64>

  • interface: api.query.multiSig.proposalIds
  • summary: A mapping of proposals to their IDs.

proposals((AccountId,u64)): Option<Proposal>

  • interface: api.query.multiSig.proposals
  • summary: Proposals presented for voting to a multisig (multisig, proposal id) => Option<T::Proposal>.

transactionVersion(): u32

  • interface: api.query.multiSig.transactionVersion
  • summary: The last transaction version, used for on_runtime_upgrade.

votes((AccountId,Signatory,u64)): bool

  • interface: api.query.multiSig.votes
  • summary: Individual multisig signer votes. (multi sig, signer, proposal) => vote.

offences

concurrentReportsIndex(Kind, OpaqueTimeSlot): Vec<ReportIdOf>

  • interface: api.query.offences.concurrentReportsIndex
  • summary: A vector of reports of the same kind that happened at the same time slot.

deferredOffences(): Vec<DeferredOffenceOf>

  • 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.

reports(ReportIdOf): Option<OffenceDetails>

  • interface: api.query.offences.reports
  • summary: The primary structure that holds all offence records keyed by report identifiers.

reportsByKindIndex(Kind): Bytes

  • 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.


pips

activePipCount(): u32

  • interface: api.query.pips.activePipCount
  • summary: Total count of current pending or scheduled PIPs.

activePipLimit(): u32

  • interface: api.query.pips.activePipLimit
  • summary: The maximum allowed number for ActivePipCount. Once reached, new PIPs cannot be proposed by community members.

committeePips(): Vec<PipId>

  • interface: api.query.pips.committeePips
  • summary: All existing PIPs where the proposer is a committee. This list is a cache of all ids in Proposals with Proposer::Committee(_).

defaultEnactmentPeriod(): BlockNumber

  • interface: api.query.pips.defaultEnactmentPeriod
  • summary: Default enactment period that will be use after a proposal is accepted by GC.

deposits(PipId, AccountId): DepositInfo

  • interface: api.query.pips.deposits
  • summary: Those who have locked a deposit. proposal (id, proposer) -> deposit

liveQueue(): Vec<SnapshottedPip>

  • interface: api.query.pips.liveQueue

  • summary: A live priority queue (lowest priority at index 0) of pending PIPs up to the active limit. Priority is defined by the weight in the SnapshottedPip.

    Unlike SnapshotQueue, this queue is live, getting updated with each vote cast. The snapshot is therefore essentially a point-in-time clone of this queue.

maxPipSkipCount(): SkippedCount

  • interface: api.query.pips.maxPipSkipCount
  • summary: Maximum times a PIP can be skipped before triggering CannotSkipPip in enact_snapshot_results.

minimumProposalDeposit(): Balance

  • interface: api.query.pips.minimumProposalDeposit
  • summary: The minimum amount to be used as a deposit for community PIP creation.

pendingPipExpiry(): MaybeBlock

  • interface: api.query.pips.pendingPipExpiry
  • summary: How many blocks will it take, after a Pending PIP expires, assuming it has not transitioned to another ProposalState?

pipIdSequence(): PipId

  • interface: api.query.pips.pipIdSequence
  • summary: Proposals so far. id can be used to keep track of PIPs off-chain.

pipSkipCount(PipId): SkippedCount

  • interface: api.query.pips.pipSkipCount
  • summary: The number of times a certain PIP has been skipped. Once a (configurable) threshhold is exceeded, a PIP cannot be skipped again.

pipToSchedule(PipId): Option<BlockNumber>

  • interface: api.query.pips.pipToSchedule
  • summary: Maps PIPs to the block at which they will be executed, if any.

proposalMetadata(PipId): Option<PipsMetadata>

  • interface: api.query.pips.proposalMetadata
  • summary: The metadata of the active proposals.

proposalResult(PipId): VotingResult

  • interface: api.query.pips.proposalResult
  • summary: PolymeshVotes on a given proposal, if it is ongoing. proposal id -> vote count

proposals(PipId): Option<Pip>

  • interface: api.query.pips.proposals
  • summary: Actual proposal for a given id, if it's current. proposal id -> proposal

proposalVotes(PipId, AccountId): Option<Vote>

  • interface: api.query.pips.proposalVotes
  • summary: Votes per Proposal and account. Used to avoid double vote issue. (proposal id, account) -> Vote

pruneHistoricalPips(): bool

  • interface: api.query.pips.pruneHistoricalPips
  • summary: Determines whether historical PIP data is persisted or removed

snapshotIdSequence(): SnapshotId

  • interface: api.query.pips.snapshotIdSequence
  • summary: Snapshots so far. id can be used to keep track of snapshots off-chain.

snapshotMeta(): Option<SnapshotMetadata>

  • interface: api.query.pips.snapshotMeta
  • summary: The metadata of the snapshot, if there is one.

snapshotQueue(): Vec<SnapshottedPip>

  • interface: api.query.pips.snapshotQueue

  • summary: The priority queue (lowest priority at index 0) of PIPs at the point of snapshotting. Priority is defined by the weight in the SnapshottedPip.

    A queued PIP can be skipped. Doing so bumps the pip_skip_count. Once a (configurable) threshhold is exceeded, a PIP cannot be skipped again.

storageVersion(): Version

  • interface: api.query.pips.storageVersion

polymeshCommittee

expiresAfter(): MaybeBlock

  • interface: api.query.polymeshCommittee.expiresAfter
  • summary: Time after which a proposal will expire.

members(): Vec<IdentityId>

  • interface: api.query.polymeshCommittee.members
  • summary: The current members of the committee.

proposalCount(): u32

  • interface: api.query.polymeshCommittee.proposalCount
  • summary: Proposals so far.

proposalOf(Hash): Option<Call>

  • interface: api.query.polymeshCommittee.proposalOf
  • summary: Actual proposal for a given hash.

proposals(): Vec<Hash>

  • interface: api.query.polymeshCommittee.proposals
  • summary: The hashes of the active proposals.

releaseCoordinator(): Option<IdentityId>

  • interface: api.query.polymeshCommittee.releaseCoordinator
  • summary: Release coordinator.

storageVersion(): Version

  • interface: api.query.polymeshCommittee.storageVersion
  • summary: Storage version.

voteThreshold(): (u32,u32)

  • interface: api.query.polymeshCommittee.voteThreshold
  • summary: Vote threshold for an approval.

voting(Hash): Option<PolymeshVotes>

  • interface: api.query.polymeshCommittee.voting
  • summary: PolymeshVotes on a given proposal, if it is ongoing.

portfolio

nameToNumber(IdentityId, PortfolioName): PortfolioNumber

  • interface: api.query.portfolio.nameToNumber
  • summary: Inverse map of Portfolios used to ensure bijectivitiy, and uniqueness of names in Portfolios.

nextPortfolioNumber(IdentityId): PortfolioNumber

  • interface: api.query.portfolio.nextPortfolioNumber
  • summary: The next portfolio sequence number of an identity.

portfolioAssetBalances(PortfolioId, Ticker): Balance

  • interface: api.query.portfolio.portfolioAssetBalances
  • summary: The asset balances of portfolios.

portfolioAssetCount(PortfolioId): u64

  • interface: api.query.portfolio.portfolioAssetCount
  • summary: How many assets with non-zero balance this portfolio contains.

portfolioCustodian(PortfolioId): Option<IdentityId>

  • interface: api.query.portfolio.portfolioCustodian
  • summary: The custodian of a particular portfolio. None implies that the identity owner is the custodian.

portfolioLockedAssets(PortfolioId, Ticker): Balance

  • interface: api.query.portfolio.portfolioLockedAssets
  • summary: Amount of assets locked in a portfolio. These assets show up in portfolio balance but can not be transferred away.

portfolios(IdentityId, PortfolioNumber): PortfolioName

  • interface: api.query.portfolio.portfolios
  • summary: The set of existing portfolios with their names. If a certain pair of a DID and portfolio number maps to None then such a portfolio doesn't exist. Conversely, if a pair maps to Some(name) then such a portfolio exists and is called name.

portfoliosInCustody(IdentityId, PortfolioId): bool

  • interface: api.query.portfolio.portfoliosInCustody
  • summary: Tracks all the portfolios in custody of a particular identity. Only used by the UIs. When true is stored as the value for a given (did, pid), it means that pid is in custody of did. false values are never explicitly stored in the map, and are instead inferred by the absence of a key.

storageVersion(): Version

  • interface: api.query.portfolio.storageVersion
  • summary: Storage version.

protocolFee

baseFees(ProtocolOp): Balance

  • interface: api.query.protocolFee.baseFees
  • summary: The mapping of operation names to the base fees of those operations.

coefficient(): PosRatio

  • interface: api.query.protocolFee.coefficient
  • summary: The fee coefficient as a positive rational (numerator, denominator).

randomnessCollectiveFlip

randomMaterial(): Vec<Hash>

  • 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 the Vec of the oldest hash.

relayer

subsidies(AccountId): Option<Subsidy>

  • interface: api.query.relayer.subsidies

  • summary: The subsidy for a user_key if they are being subsidised, as a map user_key => Subsidy.

    A key can only have one subsidy at a time. To change subsidisers a key needs to call remove_paying_key to remove the current subsidy, before they can accept a new subsidiser.


rewards

itnRewards(AccountId): Option<ItnRewardStatus>

  • interface: api.query.rewards.itnRewards
  • summary: Map of (Itn Address AccountId) -> (Reward ItnRewardStatus).

scheduler

agenda(BlockNumber): Vec<Option<Scheduled>>

  • interface: api.query.scheduler.agenda
  • summary: Items to be executed, indexed by the block number that they should be executed on.

lookup(Bytes): Option<TaskAddress>

  • interface: api.query.scheduler.lookup
  • summary: Lookup from identity to the block number and index of the task.

storageVersion(): Releases

  • interface: api.query.scheduler.storageVersion

  • summary: Storage version of the pallet.

    New networks start with last version.


session

currentIndex(): SessionIndex

  • interface: api.query.session.currentIndex
  • summary: Current index of the session.

disabledValidators(): Vec<u32>

  • interface: api.query.session.disabledValidators

  • summary: Indices of disabled validators.

    The set is cleared when on_session_ending returns a new set of identities.

keyOwner((KeyTypeId,Bytes)): Option<ValidatorId>

  • interface: api.query.session.keyOwner
  • summary: The owner of a key. The key is the KeyTypeId + the encoded key.

nextKeys(ValidatorId): Option<Keys>

  • interface: api.query.session.nextKeys
  • summary: The next session keys for a validator.

queuedChanged(): bool

  • interface: api.query.session.queuedChanged
  • summary: True if the underlying economic identities or weighting behind the validators has changed in the queued validator set.

queuedKeys(): Vec<(ValidatorId,Keys)>

  • 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.

validators(): Vec<ValidatorId>

  • interface: api.query.session.validators
  • summary: The current set of validators.

settlement

affirmsReceived(InstructionId, PortfolioId): AffirmationStatus

  • interface: api.query.settlement.affirmsReceived
  • summary: Tracks affirmations received for an instruction. (instruction_id, counter_party) -> AffirmationStatus

details(VenueId): VenueDetails

  • interface: api.query.settlement.details
  • summary: Free-form text about a venue. venue_id -> VenueDetails Only needed for the UI.

instructionAffirmsPending(InstructionId): u64

  • interface: api.query.settlement.instructionAffirmsPending
  • summary: Number of affirmations pending before instruction is executed. instruction_id -> affirm_pending

instructionCounter(): InstructionId

  • interface: api.query.settlement.instructionCounter
  • summary: Number of instructions in the system (It's one more than the actual number)

instructionDetails(InstructionId): Instruction

  • interface: api.query.settlement.instructionDetails
  • summary: Details about an instruction. instruction_id -> instruction_details

instructionLegs(InstructionId, LegId): Leg

  • interface: api.query.settlement.instructionLegs
  • summary: Legs under an instruction. (instruction_id, leg_id) -> Leg

instructionLegStatus(InstructionId, LegId): LegStatus

  • interface: api.query.settlement.instructionLegStatus
  • summary: Status of a leg under an instruction. (instruction_id, leg_id) -> LegStatus

receiptsUsed(AccountId, u64): bool

  • interface: api.query.settlement.receiptsUsed
  • summary: Tracks redemption of receipts. (signer, receipt_uid) -> receipt_used

storageVersion(): Version

  • interface: api.query.settlement.storageVersion
  • summary: Storage version.

userAffirmations(PortfolioId, InstructionId): AffirmationStatus

  • interface: api.query.settlement.userAffirmations
  • summary: Helps a user track their pending instructions and affirmations (only needed for UI). (counter_party, instruction_id) -> AffirmationStatus

userVenues(IdentityId): Vec<VenueId>

  • interface: api.query.settlement.userVenues
  • summary: Array of venues created by an identity. Only needed for the UI. IdentityId -> Vec<venue_id>

venueAllowList(Ticker, VenueId): bool

  • interface: api.query.settlement.venueAllowList
  • summary: Venues that are allowed to create instructions involving a particular ticker. Only used if filtering is enabled. (ticker, venue_id) -> allowed

venueCounter(): VenueId

  • interface: api.query.settlement.venueCounter
  • summary: Number of venues in the system (It's one more than the actual number)

venueFiltering(Ticker): bool

  • interface: api.query.settlement.venueFiltering
  • summary: Tracks if a token has enabled filtering venues that can create instructions involving their token. Ticker -> filtering_enabled

venueInfo(VenueId): Option<Venue>

  • interface: api.query.settlement.venueInfo
  • summary: Info about a venue. venue_id -> venue

venueInstructions(VenueId, InstructionId): ()

  • interface: api.query.settlement.venueInstructions

  • summary: Instructions under a venue. Only needed for the UI.

    venue_id -> instruction_id -> ()

venueSigners(VenueId, AccountId): bool

  • interface: api.query.settlement.venueSigners
  • summary: Signers allowed by the venue. (venue_id, signer) -> bool

staking

activeEra(): Option<ActiveEraInfo>

  • interface: api.query.staking.activeEra

  • summary: The active era information, it holds index and start.

    The active era is the era being currently rewarded. Validator set of this era must be equal to [SessionInterface::validators].

bonded(AccountId): Option<AccountId>

  • interface: api.query.staking.bonded
  • summary: Map from all locked "stash" accounts to the controller account.

bondedEras(): Vec<(EraIndex,SessionIndex)>

  • interface: api.query.staking.bondedEras

  • summary: A mapping from still-bonded eras to the first session index of that era.

    Must contains information for eras for the range: [active_era - bounding_duration; active_era]

canceledSlashPayout(): BalanceOf

  • 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).

currentEra(): Option<EraIndex>

  • interface: api.query.staking.currentEra

  • summary: The current era index.

    This is the latest planned era, depending on how the Session pallet queues the validator set, it might be active or not.

earliestUnappliedSlash(): Option<EraIndex>

  • interface: api.query.staking.earliestUnappliedSlash
  • summary: The earliest era for which we have a pending, unapplied slash.

eraElectionStatus(): ElectionStatus

  • interface: api.query.staking.eraElectionStatus
  • summary: Flag to control the execution of the offchain election. When Open(_), we accept solutions to be submitted.

erasRewardPoints(EraIndex): EraRewardPoints

  • 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.

erasStakers(EraIndex, AccountId): Exposure

  • 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.

erasStakersClipped(EraIndex, AccountId): Exposure

  • interface: api.query.staking.erasStakersClipped

  • summary: Clipped Exposure of validator at era.

    This is similar to [ErasStakers] but number of nominators exposed is reduced to the T::MaxNominatorRewardedPerValidator biggest stakers. (Note: the field total and own of the exposure remains unchanged). This is used to limit the i/o cost for the nominator 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.

erasStartSessionIndex(EraIndex): Option<SessionIndex>

  • interface: api.query.staking.erasStartSessionIndex

  • summary: The session index at which the era start for the last HISTORY_DEPTH eras.

    Note: This tracks the starting session (i.e. session index when era start being active) for the eras in [CurrentEra - HISTORY_DEPTH, CurrentEra].

erasTotalStake(EraIndex): BalanceOf

  • interface: api.query.staking.erasTotalStake
  • summary: The total amount staked for the last HISTORY_DEPTH eras. If total hasn't been set or has been removed then 0 stake is returned.

erasValidatorPrefs(EraIndex, AccountId): ValidatorPrefs

  • 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.

erasValidatorReward(EraIndex): Option<BalanceOf>

  • interface: api.query.staking.erasValidatorReward

  • summary: The total validator era payout for the last HISTORY_DEPTH eras.

    Eras that haven't finished yet or has been removed doesn't have reward.

forceEra(): Forcing

  • interface: api.query.staking.forceEra
  • summary: Mode of era forcing.

historyDepth(): u32

  • 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].

    Must be more than the number of eras delayed by session otherwise. I.e. active era must always be in history. I.e. active_era > current_era - history_depth must be guaranteed.

invulnerables(): Vec<AccountId>

  • 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.

isCurrentSessionFinal(): bool

  • interface: api.query.staking.isCurrentSessionFinal
  • summary: True if the current planned session is final. Note that this does not take era forcing into account.

ledger(AccountId): Option<StakingLedger>

  • interface: api.query.staking.ledger
  • summary: Map from all (unlocked) "controller" accounts to the info regarding the staking.

minimumBondThreshold(): BalanceOf

  • interface: api.query.staking.minimumBondThreshold
  • summary: The minimum amount with which a validator can bond.

minimumValidatorCount(): u32

  • interface: api.query.staking.minimumValidatorCount
  • summary: Minimum number of staking participants before emergency conditions are imposed.

nominators(AccountId): Option<Nominations>

  • interface: api.query.staking.nominators
  • summary: The map from nominator stash key to the set of stash keys of all validators to nominate.

nominatorSlashInEra(EraIndex, AccountId): Option<BalanceOf>

  • interface: api.query.staking.nominatorSlashInEra
  • summary: All slashing events on nominators, mapped by era to the highest slash value of the era.

payee(AccountId): RewardDestination

  • interface: api.query.staking.payee
  • summary: Where the reward payment should be made. Keyed by stash.

permissionedIdentity(IdentityId): Option<PermissionedIdentityPrefs>

  • interface: api.query.staking.permissionedIdentity
  • summary: Entities that are allowed to run operator/validator nodes.

queuedElected(): Option<ElectionResult>

  • interface: api.query.staking.queuedElected
  • summary: The next validator set. At the end of an era, if this is available (potentially from the result of an offchain worker), it is immediately used. Otherwise, the on-chain election is executed.

queuedScore(): Option<ElectionScore>

  • interface: api.query.staking.queuedScore
  • summary: The score of the current [QueuedElected].

slashingAllowedFor(): SlashingSwitch

  • interface: api.query.staking.slashingAllowedFor

slashingSpans(AccountId): Option<SlashingSpans>

  • interface: api.query.staking.slashingSpans
  • summary: Slashing spans for stash accounts.

slashRewardFraction(): Perbill

  • 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.

snapshotNominators(): Option<Vec<AccountId>>

  • interface: api.query.staking.snapshotNominators
  • summary: Snapshot of nominators at the beginning of the current election window. This should only have a value when [EraElectionStatus] == ElectionStatus::Open(_).

snapshotValidators(): Option<Vec<AccountId>>

  • interface: api.query.staking.snapshotValidators
  • summary: Snapshot of validators at the beginning of the current election window. This should only have a value when [EraElectionStatus] == ElectionStatus::Open(_).

spanSlash((AccountId,SpanIndex)): SpanRecord

  • 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.

storageVersion(): Releases

  • interface: api.query.staking.storageVersion

  • summary: True if network has been upgraded to this version. Storage version of the pallet.

    This is set to v6.0.1 for new networks.

unappliedSlashes(EraIndex): Vec<UnappliedSlash>

  • interface: api.query.staking.unappliedSlashes
  • summary: All unapplied slashes that are queued for later.

validatorCommissionCap(): Perbill

  • interface: api.query.staking.validatorCommissionCap
  • summary: Every validator has commission that should be in the range [0, Cap].

validatorCount(): u32

  • interface: api.query.staking.validatorCount
  • summary: The ideal number of staking participants.

validators(AccountId): ValidatorPrefs

  • interface: api.query.staking.validators
  • summary: The map from (wannabe) validator stash key to the preferences of that validator.

validatorSlashInEra(EraIndex, AccountId): Option<(Perbill,BalanceOf)>

  • 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.

statistics

activeTransferManagers(Ticker): Vec<TransferManager>

  • interface: api.query.statistics.activeTransferManagers
  • summary: Transfer managers currently enabled for an Asset.

exemptEntities((Ticker,TransferManager), ScopeId): bool

  • interface: api.query.statistics.exemptEntities
  • summary: Entities exempt from transfer managers. Exemptions requirements are based on TMS. TMs may require just the sender, just the receiver, both or either to be exempted. CTM requires sender to be exempted while PTM requires receiver to be exempted.

investorCountPerAsset(Ticker): Counter

  • interface: api.query.statistics.investorCountPerAsset
  • summary: Number of current investors in an asset.

sto

fundraiserCount(Ticker): FundraiserId

  • interface: api.query.sto.fundraiserCount
  • summary: Total fundraisers created for a token.

fundraiserNames(Ticker, FundraiserId): FundraiserName

  • interface: api.query.sto.fundraiserNames
  • summary: Name for the Fundraiser. Only used offchain. (ticker, fundraiser_id) -> Fundraiser name

fundraisers(Ticker, FundraiserId): Option<Fundraiser>

  • interface: api.query.sto.fundraisers
  • summary: All fundraisers that are currently running. (ticker, fundraiser_id) -> Fundraiser

substrate

These are well-known keys that are always available to the runtime implementation of any Substrate-based network.

changesTrieConfig(): u32

  • interface: api.query.substrate.changesTrieConfig
  • summary: Changes trie configuration is stored under this key.

childStorageKeyPrefix(): u32

  • interface: api.query.substrate.childStorageKeyPrefix
  • summary: Prefix of child storage keys.

code(): Bytes

  • interface: api.query.substrate.code
  • summary: Wasm code of the runtime.

extrinsicIndex(): u32

  • interface: api.query.substrate.extrinsicIndex
  • summary: Current extrinsic index (u32) is stored under this key.

heapPages(): u64

  • interface: api.query.substrate.heapPages
  • summary: Number of wasm linear memory pages required for execution of the runtime.

sudo

key(): AccountId

  • interface: api.query.sudo.key
  • summary: The AccountId of the sudo key.

system

account(AccountId): AccountInfo

  • interface: api.query.system.account
  • summary: The full account information for a particular account ID.

allExtrinsicsLen(): Option<u32>

  • interface: api.query.system.allExtrinsicsLen
  • summary: Total length (in bytes) for all extrinsics put together, for the current block.

blockHash(BlockNumber): Hash

  • interface: api.query.system.blockHash
  • summary: Map of block numbers to block hashes.

blockWeight(): ConsumedWeight

  • interface: api.query.system.blockWeight
  • summary: The current weight for the block.

digest(): DigestOf

  • interface: api.query.system.digest
  • summary: Digest of the current block, also part of the block header.

eventCount(): EventIndex

  • interface: api.query.system.eventCount
  • summary: The number of events in the Events<T> list.

events(): Vec<EventRecord>

  • interface: api.query.system.events
  • summary: Events deposited for the current block.

eventTopics(Hash): Vec<(BlockNumber,EventIndex)>

  • 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 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.

executionPhase(): Option<Phase>

  • interface: api.query.system.executionPhase
  • summary: The execution phase of the block.

extrinsicCount(): Option<u32>

  • interface: api.query.system.extrinsicCount
  • summary: Total extrinsics count for the current block.

extrinsicData(u32): Bytes

  • interface: api.query.system.extrinsicData
  • summary: Extrinsics data for the current block (maps an extrinsic's index to its data).

lastRuntimeUpgrade(): Option<LastRuntimeUpgradeInfo>

  • interface: api.query.system.lastRuntimeUpgrade
  • summary: Stores the spec_version and spec_name of when the last runtime upgrade happened.

number(): BlockNumber

  • interface: api.query.system.number
  • summary: The current block number being processed. Set by execute_block.

parentHash(): Hash

  • interface: api.query.system.parentHash
  • summary: Hash of the previous block.

upgradedToDualRefCount(): bool

  • interface: api.query.system.upgradedToDualRefCount
  • summary: True if we have upgraded so that AccountInfo contains two types of RefCount. False (default) if not.

upgradedToU32RefCount(): bool

  • interface: api.query.system.upgradedToU32RefCount
  • summary: True if we have upgraded so that type RefCount is u32. False (default) if not.

technicalCommittee

expiresAfter(): MaybeBlock

  • interface: api.query.technicalCommittee.expiresAfter
  • summary: Time after which a proposal will expire.

members(): Vec<IdentityId>

  • interface: api.query.technicalCommittee.members
  • summary: The current members of the committee.

proposalCount(): u32

  • interface: api.query.technicalCommittee.proposalCount
  • summary: Proposals so far.

proposalOf(Hash): Option<Call>

  • interface: api.query.technicalCommittee.proposalOf
  • summary: Actual proposal for a given hash.

proposals(): Vec<Hash>

  • interface: api.query.technicalCommittee.proposals
  • summary: The hashes of the active proposals.

releaseCoordinator(): Option<IdentityId>

  • interface: api.query.technicalCommittee.releaseCoordinator
  • summary: Release coordinator.

storageVersion(): Version

  • interface: api.query.technicalCommittee.storageVersion
  • summary: Storage version.

voteThreshold(): (u32,u32)

  • interface: api.query.technicalCommittee.voteThreshold
  • summary: Vote threshold for an approval.

voting(Hash): Option<PolymeshVotes>

  • interface: api.query.technicalCommittee.voting
  • summary: PolymeshVotes on a given proposal, if it is ongoing.

technicalCommitteeMembership

activeMembers(): Vec<IdentityId>

  • interface: api.query.technicalCommitteeMembership.activeMembers
  • summary: The current "active" membership, stored as an ordered Vec.

activeMembersLimit(): u32

  • interface: api.query.technicalCommitteeMembership.activeMembersLimit
  • summary: Limit of how many "active" members there can be.

inactiveMembers(): Vec<InactiveMember>

  • interface: api.query.technicalCommitteeMembership.inactiveMembers
  • summary: The current "inactive" membership, stored as an ordered Vec.

testUtils


timestamp

didUpdate(): bool

  • interface: api.query.timestamp.didUpdate
  • summary: Did the timestamp get updated in this block?

now(): Moment

  • interface: api.query.timestamp.now
  • summary: Current time for the current block.

transactionPayment

nextFeeMultiplier(): Multiplier

  • interface: api.query.transactionPayment.nextFeeMultiplier

storageVersion(): Releases

  • interface: api.query.transactionPayment.storageVersion

upgradeCommittee

expiresAfter(): MaybeBlock

  • interface: api.query.upgradeCommittee.expiresAfter
  • summary: Time after which a proposal will expire.

members(): Vec<IdentityId>

  • interface: api.query.upgradeCommittee.members
  • summary: The current members of the committee.

proposalCount(): u32

  • interface: api.query.upgradeCommittee.proposalCount
  • summary: Proposals so far.

proposalOf(Hash): Option<Call>

  • interface: api.query.upgradeCommittee.proposalOf
  • summary: Actual proposal for a given hash.

proposals(): Vec<Hash>

  • interface: api.query.upgradeCommittee.proposals
  • summary: The hashes of the active proposals.

releaseCoordinator(): Option<IdentityId>

  • interface: api.query.upgradeCommittee.releaseCoordinator
  • summary: Release coordinator.

storageVersion(): Version

  • interface: api.query.upgradeCommittee.storageVersion
  • summary: Storage version.

voteThreshold(): (u32,u32)

  • interface: api.query.upgradeCommittee.voteThreshold
  • summary: Vote threshold for an approval.

voting(Hash): Option<PolymeshVotes>

  • interface: api.query.upgradeCommittee.voting
  • summary: PolymeshVotes on a given proposal, if it is ongoing.

upgradeCommitteeMembership

activeMembers(): Vec<IdentityId>

  • interface: api.query.upgradeCommitteeMembership.activeMembers
  • summary: The current "active" membership, stored as an ordered Vec.

activeMembersLimit(): u32

  • interface: api.query.upgradeCommitteeMembership.activeMembersLimit
  • summary: Limit of how many "active" members there can be.

inactiveMembers(): Vec<InactiveMember>

  • interface: api.query.upgradeCommitteeMembership.inactiveMembers
  • summary: The current "inactive" membership, stored as an ordered Vec.

utility

nonces(AccountId): AuthorizationNonce

  • interface: api.query.utility.nonces