Skip to content
Snippets Groups Projects
Select Git revision
  • f99c1657d2f37d6ed302741cb69758fc4610371c
  • master default protected
  • docusaurus
3 results

runtime.md

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

    accountNonce(accountId: AccountId): Index

    • interface: api.call.accountNonceApi.accountNonce
    • runtime: AccountNonceApi_account_nonce
    • summary: The API to query account nonce (aka transaction index)

    AuraApi

    authorities(): Vec<AuthorityId>

    • 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

    canAuthor(author: AccountId, relayParent: u32, parentHeader: Header): bool

    • 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

    authorities(): Vec<AuthorityId>

    • interface: api.call.authorityDiscoveryApi.authorities
    • runtime: AuthorityDiscoveryApi_authorities
    • summary: Retrieve authority identifiers of the current and next authority set.

    BabeApi

    configuration(): BabeGenesisConfiguration

    • interface: api.call.babeApi.configuration
    • runtime: BabeApi_configuration
    • summary: Return the genesis configuration for BABE. The configuration is only read on genesis.

    currentEpoch(): Epoch

    • interface: api.call.babeApi.currentEpoch
    • runtime: BabeApi_current_epoch
    • summary: Returns information regarding the current epoch.

    currentEpochStart(): Slot

    • interface: api.call.babeApi.currentEpochStart
    • runtime: BabeApi_current_epoch_start
    • summary: Returns the slot that started the current epoch.

    generateKeyOwnershipProof(slot: Slot, authorityId: AuthorityId): Option<OpaqueKeyOwnershipProof>

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

    nextEpoch(): Epoch

    • interface: api.call.babeApi.nextEpoch
    • runtime: BabeApi_next_epoch
    • summary: Returns information regarding the next epoch (which was already previously announced).

    submitReportEquivocationUnsignedExtrinsic(equivocationProof: BabeEquivocationProof, keyOwnerProof: OpaqueKeyOwnershipProof): Option<Null>

    • interface: api.call.babeApi.submitReportEquivocationUnsignedExtrinsic
    • runtime: BabeApi_submit_report_equivocation_unsigned_extrinsic
    • summary: Submits an unsigned extrinsic to report an equivocation.

    BeefyApi

    validatorSet(): Option<ValidatorSet>

    • interface: api.call.beefyApi.validatorSet
    • runtime: BeefyApi_validator_set
    • summary: Return the current active BEEFY validator set

    BeefyMmrApi

    authoritySetProof(): BeefyAuthoritySet

    • interface: api.call.beefyMmrApi.authoritySetProof
    • runtime: BeefyMmrApi_authority_set_proof
    • summary: Return the currently active BEEFY authority set proof.

    nextAuthoritySetProof(): BeefyNextAuthoritySet

    • interface: api.call.beefyMmrApi.nextAuthoritySetProof
    • runtime: BeefyMmrApi_next_authority_set_proof
    • summary: Return the next/queued BEEFY authority set proof.

    Benchmark

    benchmarkMetadata(extra: bool): (Vec<BenchmarkList>, Vec<StorageInfo>)

    • interface: api.call.benchmark.benchmarkMetadata
    • runtime: Benchmark_benchmark_metadata
    • summary: Get the benchmark metadata available for this runtime.

    dispatchBenchmark(config: BenchmarkConfig): Result<Vec<BenchmarkBatch>, Text>

    • interface: api.call.benchmark.dispatchBenchmark
    • runtime: Benchmark_dispatch_benchmark
    • summary: Dispatch the given benchmark.

    BlockBuilder

    applyExtrinsic(extrinsic: Extrinsic): ApplyExtrinsicResult

    • interface: api.call.blockBuilder.applyExtrinsic
    • runtime: BlockBuilder_apply_extrinsic
    • summary: Apply the given extrinsic.

    checkInherents(block: Block, data: InherentData): CheckInherentsResult

    • interface: api.call.blockBuilder.checkInherents
    • runtime: BlockBuilder_check_inherents
    • summary: Check that the inherents are valid.

    finalizeBlock(): Header

    • interface: api.call.blockBuilder.finalizeBlock
    • runtime: BlockBuilder_finalize_block
    • summary: Finish the current block.

    inherentExtrinsics(inherent: InherentData): Vec<Extrinsic>

    • interface: api.call.blockBuilder.inherentExtrinsics
    • runtime: BlockBuilder_inherent_extrinsics
    • summary: Generate inherent extrinsics.

    CollectCollationInfo

    collectCollationInfo(header: Header): CollationInfo

    • interface: api.call.collectCollationInfo.collectCollationInfo
    • runtime: CollectCollationInfo_collect_collation_info
    • summary: Collect information about a collation.

    ContractsApi

    call(origin: AccountId, dest: AccountId, value: Balance, gasLimit: u64, storageDepositLimit: Option<Balance>, inputData: Vec<u8>): ContractExecResult

    • interface: api.call.contractsApi.call
    • runtime: ContractsApi_call
    • summary: Perform a call from a specified account to a given contract.

    getStorage(address: AccountId, key: Bytes): Option<Bytes>

    • interface: api.call.contractsApi.getStorage
    • runtime: ContractsApi_get_storage
    • summary: Query a given storage key in a given contract.

    instantiate(origin: AccountId, value: Balance, gasLimit: u64, storageDepositLimit: Option<Balance>, code: Bytes, data: Bytes, salt: Bytes): ContractInstantiateResult

    • interface: api.call.contractsApi.instantiate
    • runtime: ContractsApi_instantiate
    • summary: Instantiate a new contract.

    uploadCode(origin: AccountId, code: Bytes, storageDepositLimit: Option<Balance>): CodeUploadResult

    • interface: api.call.contractsApi.uploadCode
    • runtime: ContractsApi_upload_code
    • summary: Upload new code without instantiating a contract from it.

    ConvertTransactionRuntimeApi

    convertTransaction(transaction: TransactionV2): Extrinsic

    • interface: api.call.convertTransactionRuntimeApi.convertTransaction
    • runtime: ConvertTransactionRuntimeApi_convert_transaction
    • summary: Converts an Ethereum-style transaction to Extrinsic

    Core

    executeBlock(block: Block): Null

    • interface: api.call.core.executeBlock
    • runtime: Core_execute_block
    • summary: Execute the given block.

    initializeBlock(header: Header): Null

    • interface: api.call.core.initializeBlock
    • runtime: Core_initialize_block
    • summary: Initialize a block with the given header.

    version(): RuntimeVersion

    • interface: api.call.core.version
    • runtime: Core_version
    • summary: Returns the version of the runtime.

    DebugRuntimeApi

    traceBlock(extrinsics: Vec<Extrinsic>, knownTransactions: Vec<H256>): Result<(), DispatchError>

    • interface: api.call.debugRuntimeApi.traceBlock
    • runtime: DebugRuntimeApi_trace_block
    • summary: Trace all block extrinsics

    traceTransaction(extrinsics: Vec<Extrinsic>, transaction: EthTransaction): Result<(), DispatchError>

    • interface: api.call.debugRuntimeApi.traceTransaction
    • runtime: DebugRuntimeApi_trace_transaction
    • summary: Trace transaction extrinsics

    DifficultyApi

    difficulty(): Raw

    • interface: api.call.difficultyApi.difficulty
    • runtime: DifficultyApi_difficulty
    • summary: Return the target difficulty of the next block.

    EthereumRuntimeRPCApi

    accountBasic(address: H160): EvmAccount