Select Git revision

Keith Millette authored
runtime.md 26.12 KiB
title: Runtime
The following section contains known runtime calls that may be available on specific runtimes (depending on configuration and available pallets). These call directly into the WASM runtime for queries and operations.
AccountNonceApi
AccountId
): Index
accountNonce(accountId: -
interface:
api.call.accountNonceApi.accountNonce
-
runtime:
AccountNonceApi_account_nonce
- summary: The API to query account nonce (aka transaction index)
AuraApi
Vec<AuthorityId>
authorities(): -
interface:
api.call.auraApi.authorities
-
runtime:
AuraApi_authorities
- summary: Return the current set of authorities.
SlotDuration
slotDuration(): -
interface:
api.call.auraApi.slotDuration
-
runtime:
AuraApi_slot_duration
- summary: Returns the slot duration for Aura.
AuthorFilterAPI
AccountId
, relayParent: u32
, parentHeader: Header
): bool
canAuthor(author: -
interface:
api.call.authorFilterAPI.canAuthor
-
runtime:
AuthorFilterAPI_can_author
- summary: The runtime api used to predict whether an author will be eligible in the given slot
AuthorityDiscoveryApi
Vec<AuthorityId>
authorities(): -
interface:
api.call.authorityDiscoveryApi.authorities
-
runtime:
AuthorityDiscoveryApi_authorities
- summary: Retrieve authority identifiers of the current and next authority set.
BabeApi
BabeGenesisConfiguration
configuration(): -
interface:
api.call.babeApi.configuration
-
runtime:
BabeApi_configuration
- summary: Return the genesis configuration for BABE. The configuration is only read on genesis.
Epoch
currentEpoch(): -
interface:
api.call.babeApi.currentEpoch
-
runtime:
BabeApi_current_epoch
- summary: Returns information regarding the current epoch.
Slot
currentEpochStart(): -
interface:
api.call.babeApi.currentEpochStart
-
runtime:
BabeApi_current_epoch_start
- summary: Returns the slot that started the current epoch.
Slot
, authorityId: AuthorityId
): Option<OpaqueKeyOwnershipProof>
generateKeyOwnershipProof(slot: -
interface:
api.call.babeApi.generateKeyOwnershipProof
-
runtime:
BabeApi_generate_key_ownership_proof
- summary: Generates a proof of key ownership for the given authority in the current epoch.
Epoch
nextEpoch(): -
interface:
api.call.babeApi.nextEpoch
-
runtime:
BabeApi_next_epoch
- summary: Returns information regarding the next epoch (which was already previously announced).
BabeEquivocationProof
, keyOwnerProof: OpaqueKeyOwnershipProof
): Option<Null>
submitReportEquivocationUnsignedExtrinsic(equivocationProof: -
interface:
api.call.babeApi.submitReportEquivocationUnsignedExtrinsic
-
runtime:
BabeApi_submit_report_equivocation_unsigned_extrinsic
- summary: Submits an unsigned extrinsic to report an equivocation.
BeefyApi
Option<ValidatorSet>
validatorSet(): -
interface:
api.call.beefyApi.validatorSet
-
runtime:
BeefyApi_validator_set
- summary: Return the current active BEEFY validator set
BeefyMmrApi
BeefyAuthoritySet
authoritySetProof(): -
interface:
api.call.beefyMmrApi.authoritySetProof
-
runtime:
BeefyMmrApi_authority_set_proof
- summary: Return the currently active BEEFY authority set proof.
BeefyNextAuthoritySet
nextAuthoritySetProof(): -
interface:
api.call.beefyMmrApi.nextAuthoritySetProof
-
runtime:
BeefyMmrApi_next_authority_set_proof
- summary: Return the next/queued BEEFY authority set proof.
Benchmark
bool
): (Vec<BenchmarkList>, Vec<StorageInfo>)
benchmarkMetadata(extra: -
interface:
api.call.benchmark.benchmarkMetadata
-
runtime:
Benchmark_benchmark_metadata
- summary: Get the benchmark metadata available for this runtime.
BenchmarkConfig
): Result<Vec<BenchmarkBatch>, Text>
dispatchBenchmark(config: -
interface:
api.call.benchmark.dispatchBenchmark
-
runtime:
Benchmark_dispatch_benchmark
- summary: Dispatch the given benchmark.
BlockBuilder
Extrinsic
): ApplyExtrinsicResult
applyExtrinsic(extrinsic: -
interface:
api.call.blockBuilder.applyExtrinsic
-
runtime:
BlockBuilder_apply_extrinsic
- summary: Apply the given extrinsic.
Block
, data: InherentData
): CheckInherentsResult
checkInherents(block: -
interface:
api.call.blockBuilder.checkInherents
-
runtime:
BlockBuilder_check_inherents
- summary: Check that the inherents are valid.
Header
finalizeBlock(): -
interface:
api.call.blockBuilder.finalizeBlock
-
runtime:
BlockBuilder_finalize_block
- summary: Finish the current block.
InherentData
): Vec<Extrinsic>
inherentExtrinsics(inherent: -
interface:
api.call.blockBuilder.inherentExtrinsics
-
runtime:
BlockBuilder_inherent_extrinsics
- summary: Generate inherent extrinsics.
CollectCollationInfo
Header
): CollationInfo
collectCollationInfo(header: -
interface:
api.call.collectCollationInfo.collectCollationInfo
-
runtime:
CollectCollationInfo_collect_collation_info
- summary: Collect information about a collation.
ContractsApi
AccountId
, dest: AccountId
, value: Balance
, gasLimit: u64
, storageDepositLimit: Option<Balance>
, inputData: Vec<u8>
): ContractExecResult
call(origin: -
interface:
api.call.contractsApi.call
-
runtime:
ContractsApi_call
- summary: Perform a call from a specified account to a given contract.
AccountId
, key: Bytes
): Option<Bytes>
getStorage(address: -
interface:
api.call.contractsApi.getStorage
-
runtime:
ContractsApi_get_storage
- summary: Query a given storage key in a given contract.
AccountId
, value: Balance
, gasLimit: u64
, storageDepositLimit: Option<Balance>
, code: Bytes
, data: Bytes
, salt: Bytes
): ContractInstantiateResult
instantiate(origin: -
interface:
api.call.contractsApi.instantiate
-
runtime:
ContractsApi_instantiate
- summary: Instantiate a new contract.
AccountId
, code: Bytes
, storageDepositLimit: Option<Balance>
): CodeUploadResult
uploadCode(origin: -
interface:
api.call.contractsApi.uploadCode
-
runtime:
ContractsApi_upload_code
- summary: Upload new code without instantiating a contract from it.
ConvertTransactionRuntimeApi
TransactionV2
): Extrinsic
convertTransaction(transaction: -
interface:
api.call.convertTransactionRuntimeApi.convertTransaction
-
runtime:
ConvertTransactionRuntimeApi_convert_transaction
- summary: Converts an Ethereum-style transaction to Extrinsic
Core
Block
): Null
executeBlock(block: -
interface:
api.call.core.executeBlock
-
runtime:
Core_execute_block
- summary: Execute the given block.
Header
): Null
initializeBlock(header: -
interface:
api.call.core.initializeBlock
-
runtime:
Core_initialize_block
- summary: Initialize a block with the given header.
RuntimeVersion
version(): -
interface:
api.call.core.version
-
runtime:
Core_version
- summary: Returns the version of the runtime.
DebugRuntimeApi
Vec<Extrinsic>
, knownTransactions: Vec<H256>
): Result<(), DispatchError>
traceBlock(extrinsics: -
interface:
api.call.debugRuntimeApi.traceBlock
-
runtime:
DebugRuntimeApi_trace_block
- summary: Trace all block extrinsics
Vec<Extrinsic>
, transaction: EthTransaction
): Result<(), DispatchError>
traceTransaction(extrinsics: -
interface:
api.call.debugRuntimeApi.traceTransaction
-
runtime:
DebugRuntimeApi_trace_transaction
- summary: Trace transaction extrinsics
DifficultyApi
Raw
difficulty(): -
interface:
api.call.difficultyApi.difficulty
-
runtime:
DifficultyApi_difficulty
- summary: Return the target difficulty of the next block.