A dispatch that will fill the block weight up to the given ratio.
Namespace
api.tx.system.fillBlock
Type
functionfillBlock( ratio:Perbill)
killPrefix
Kill all storage items with a key that starts with the given prefix.
NOTE: We rely on the Root origin to provide us the number of subkeys under the prefix we are removing to accurately calculate the weight of this function.
Namespace
api.tx.system.killPrefix
Type
functionkillPrefix( prefix:Bytes, subkeys:u32)
killStorage
Kill some items from storage.
Namespace
api.tx.system.killStorage
Type
functionkillStorage( keys:Vec<Bytes>)
remark
Make some on-chain remark.
Namespace
api.tx.system.remark
Type
functionremark( remark:Bytes)
remarkWithEvent
Make some on-chain remark and emit event.
Namespace
api.tx.system.remarkWithEvent
Type
functionremarkWithEvent( remark:Bytes)
setCode
Set the new runtime code.
Namespace
api.tx.system.setCode
Type
functionsetCode( code:Bytes)
setCodeWithoutChecks
Set the new runtime code without doing any checks of the given code.
Namespace
api.tx.system.setCodeWithoutChecks
Type
functionsetCodeWithoutChecks( code:Bytes)
setHeapPages
Set the number of pages in the WebAssembly environment's heap.
Namespace
api.tx.system.setHeapPages
Type
functionsetHeapPages( pages:u64)
setStorage
Set some items of storage.
Namespace
api.tx.system.setStorage
Type
functionsetStorage( items:Vec<(Bytes,Bytes)>)
Storage
account
The full account information for a particular account ID.
Digest of the current block, also part of the block header.
Namespace
api.query.system.digest
Type
functiondigest():SpRuntimeDigest
eventCount
The number of events in the Events<T> list.
Namespace
api.query.system.eventCount
Type
functioneventCount():u32
events
Events deposited for the current block.
NOTE: The item is unbound and should therefore never be read on chain. It could otherwise inflate the PoV size of a block.
Events have a large in-memory size. Box the events to not go out-of-memory just in case someone still reads them from within the runtime.
Namespace
api.query.system.events
Type
functionevents():Vec<FrameSystemEventRecord>
eventTopics
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.
Namespace
api.query.system.eventTopics
Type
functioneventTopics( H256):Vec<(u32,u32)>
executionPhase
The execution phase of the block.
Namespace
api.query.system.executionPhase
Type
functionexecutionPhase():Option<FrameSystemPhase>
extrinsicCount
Total extrinsics count for the current block.
Namespace
api.query.system.extrinsicCount
Type
functionextrinsicCount():Option<u32>
extrinsicData
Extrinsics data for the current block (maps an extrinsic's index to its data).
Namespace
api.query.system.extrinsicData
Type
functionextrinsicData( u32):Bytes
lastRuntimeUpgrade
Stores the spec_version and spec_name of when the last runtime upgrade happened.
The current block number being processed. Set by execute_block.
Namespace
api.query.system.number
Type
functionnumber():u32
parentHash
Hash of the previous block.
Namespace
api.query.system.parentHash
Type
functionparentHash():H256
upgradedToTripleRefCount
True if we have upgraded so that AccountInfo contains three types of RefCount. False (default) if not.
Namespace
api.query.system.upgradedToTripleRefCount
Type
functionupgradedToTripleRefCount():bool
upgradedToU32RefCount
True if we have upgraded so that type RefCount is u32. False (default) if not.
Namespace
api.query.system.upgradedToU32RefCount
Type
function upgradedToU32RefCount(
): bool
Events
CodeUpdated
:code was updated.
Namespace
api.events.system.CodeUpdated
Type
type CodeUpdated = {
}
ExtrinsicFailed
An extrinsic failed.
Namespace
api.events.system.ExtrinsicFailed
Type
type ExtrinsicFailed = {
dispatch_error: SpRuntimeDispatchError,
dispatch_info: FrameSupportDispatchDispatchInfo
}
ExtrinsicSuccess
An extrinsic completed successfully.
Namespace
api.events.system.ExtrinsicSuccess
Type
type ExtrinsicSuccess = {
dispatch_info: FrameSupportDispatchDispatchInfo
}
KilledAccount
An account was reaped.
Namespace
api.events.system.KilledAccount
Type
type KilledAccount = {
account: SeedPrimitivesSignatureAccountId20
}
NewAccount
A new account was created.
Namespace
api.events.system.NewAccount
Type
type NewAccount = {
account: SeedPrimitivesSignatureAccountId20
}
Remarked
On on-chain remark happened.
Namespace
api.events.system.Remarked
Type
type Remarked = {
sender: SeedPrimitivesSignatureAccountId20,
hash: H256
}
Errors
CallFiltered
The origin filter prevent the call to be dispatched.
Namespace
api.errors.system.CallFiltered
FailedToExtractRuntimeVersion
Failed to extract the runtime version from the new runtime.
Either calling Core_version or decoding RuntimeVersion failed.
Namespace
api.errors.system.FailedToExtractRuntimeVersion
InvalidSpecName
The name of specification does not match between the current runtime and the new runtime.
Namespace
api.errors.system.InvalidSpecName
NonDefaultComposite
Suicide called when the account has non-default composite data.
Namespace
api.errors.system.NonDefaultComposite
NonZeroRefCount
There is a non-zero reference count preventing the account from being purged.
Namespace
api.errors.system.NonZeroRefCount
SpecVersionNeedsToIncrease
The specification version is not allowed to decrease between the current runtime and the new runtime.
Namespace
api.errors.system.SpecVersionNeedsToIncrease
Constants
blockHashCount
Maximum number of block number to block hash mappings to keep (oldest pruned first).
Namespace
api.consts.system.blockHashCount
Type
type blockHashCount = u32
blockLength
The maximum length of a block (in bytes).
Namespace
api.consts.system.blockLength
Type
type blockLength = FrameSystemLimitsBlockLength
blockWeights
Block & extrinsics weights: base values and limits.
Namespace
api.consts.system.blockWeights
Type
type blockWeights = FrameSystemLimitsBlockWeights
dbWeight
The weight of runtime database operations the runtime can invoke.
Namespace
api.consts.system.dbWeight
Type
type dbWeight = SpWeightsRuntimeDbWeight
ss58Prefix
The designated SS58 prefix of this chain.
This replaces the "ss58Format" property declared in the chain spec. Reason is that the runtime should know about the prefix in order to make use of it as an identifier of the chain.
Namespace
api.consts.system.ss58Prefix
Type
type ss58Prefix = u16
version
Get the chain's current version.
Namespace
api.consts.system.version
Type
type version = SpVersionRuntimeVersion
JSON-RPC Methods
accountNextIndex
Retrieves the next accountIndex as available on the node
Interface
api.rpc.system.accountNextIndex(accountId: AccountId): Index
The addresses include a trailing /p2p/ with the local PeerId, and are thus suitable to be passed to addReservedPeer or as a bootnode address for example