Struct node_runtime::RuntimeApiImpl [−][src]
Expand description
Implements all runtime apis for the client side.
Trait Implementations
impl<__SR_API_BLOCK__: BlockT + UnwindSafe + RefUnwindSafe, RuntimeApiImplCall: CallApiAt<__SR_API_BLOCK__> + 'static> AccountNonceApi<__SR_API_BLOCK__, <<MultiSignature as Verify>::Signer as IdentifyAccount>::AccountId, u32> for RuntimeApiImpl<__SR_API_BLOCK__, RuntimeApiImplCall> where
RuntimeApiImplCall::StateBackend: StateBackend<HashFor<__SR_API_BLOCK__>>,
AccountId: UnwindSafe + RefUnwindSafe,
Index: UnwindSafe + RefUnwindSafe,
__SR_API_BLOCK__::Header: UnwindSafe + RefUnwindSafe,
impl<__SR_API_BLOCK__: BlockT + UnwindSafe + RefUnwindSafe, RuntimeApiImplCall: CallApiAt<__SR_API_BLOCK__> + 'static> AccountNonceApi<__SR_API_BLOCK__, <<MultiSignature as Verify>::Signer as IdentifyAccount>::AccountId, u32> for RuntimeApiImpl<__SR_API_BLOCK__, RuntimeApiImplCall> where
RuntimeApiImplCall::StateBackend: StateBackend<HashFor<__SR_API_BLOCK__>>,
AccountId: UnwindSafe + RefUnwindSafe,
Index: UnwindSafe + RefUnwindSafe,
__SR_API_BLOCK__::Header: UnwindSafe + RefUnwindSafe,
fn AccountNonceApi_account_nonce_runtime_api_impl(
&self,
at: &BlockId<__SR_API_BLOCK__>,
context: ExecutionContext,
params: Option<AccountId>,
params_encoded: Vec<u8>
) -> Result<NativeOrEncoded<Index>, ApiError>
fn account_nonce(
&self,
__runtime_api_at_param__: &BlockId<Block>,
account: AccountId
) -> Result<Index, ApiError>
fn account_nonce(
&self,
__runtime_api_at_param__: &BlockId<Block>,
account: AccountId
) -> Result<Index, ApiError>
Get current account nonce of given AccountId
.
fn account_nonce_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext,
account: AccountId
) -> Result<Index, ApiError>
fn account_nonce_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext,
account: AccountId
) -> Result<Index, ApiError>
Get current account nonce of given AccountId
.
type StateBackend = C::StateBackend
type StateBackend = C::StateBackend
The state backend that is used to store the block states.
fn execute_in_transaction<F: FnOnce(&Self) -> TransactionOutcome<R>, R>(
&self,
call: F
) -> R where
Self: Sized,
fn execute_in_transaction<F: FnOnce(&Self) -> TransactionOutcome<R>, R>(
&self,
call: F
) -> R where
Self: Sized,
Execute the given closure inside a new transaction. Read more
Checks if the given api is implemented and versions match.
Check if the given api is implemented and the version passes a predicate.
fn api_version<A: RuntimeApiInfo + ?Sized>(
&self,
at: &BlockId<Block>
) -> Result<Option<u32>, ApiError> where
Self: Sized,
fn api_version<A: RuntimeApiInfo + ?Sized>(
&self,
at: &BlockId<Block>
) -> Result<Option<u32>, ApiError> where
Self: Sized,
Returns the version of the given api.
Start recording all accessed trie nodes for generating proofs.
Returns the current active proof recorder.
Extract the recorded proof. Read more
fn into_storage_changes(
&self,
backend: &Self::StateBackend,
changes_trie_state: Option<&ChangesTrieState<'_, HashFor<Block>, NumberFor<Block>>>,
parent_hash: Block::Hash
) -> Result<StorageChanges<C::StateBackend, Block>, String> where
Self: Sized,
fn into_storage_changes(
&self,
backend: &Self::StateBackend,
changes_trie_state: Option<&ChangesTrieState<'_, HashFor<Block>, NumberFor<Block>>>,
parent_hash: Block::Hash
) -> Result<StorageChanges<C::StateBackend, Block>, String> where
Self: Sized,
Convert the api object into the storage changes that were done while executing runtime api functions. Read more
impl<__SR_API_BLOCK__: BlockT + UnwindSafe + RefUnwindSafe, RuntimeApiImplCall: CallApiAt<__SR_API_BLOCK__> + 'static> AuthorityDiscoveryApi<__SR_API_BLOCK__> for RuntimeApiImpl<__SR_API_BLOCK__, RuntimeApiImplCall> where
RuntimeApiImplCall::StateBackend: StateBackend<HashFor<__SR_API_BLOCK__>>,
Vec<AuthorityDiscoveryId>: UnwindSafe + RefUnwindSafe,
__SR_API_BLOCK__::Header: UnwindSafe + RefUnwindSafe,
impl<__SR_API_BLOCK__: BlockT + UnwindSafe + RefUnwindSafe, RuntimeApiImplCall: CallApiAt<__SR_API_BLOCK__> + 'static> AuthorityDiscoveryApi<__SR_API_BLOCK__> for RuntimeApiImpl<__SR_API_BLOCK__, RuntimeApiImplCall> where
RuntimeApiImplCall::StateBackend: StateBackend<HashFor<__SR_API_BLOCK__>>,
Vec<AuthorityDiscoveryId>: UnwindSafe + RefUnwindSafe,
__SR_API_BLOCK__::Header: UnwindSafe + RefUnwindSafe,
Retrieve authority identifiers of the current and next authority set.
Retrieve authority identifiers of the current and next authority set.
impl<__SR_API_BLOCK__: BlockT + UnwindSafe + RefUnwindSafe, RuntimeApiImplCall: CallApiAt<__SR_API_BLOCK__> + 'static> BabeApi<__SR_API_BLOCK__> for RuntimeApiImpl<__SR_API_BLOCK__, RuntimeApiImplCall> where
RuntimeApiImplCall::StateBackend: StateBackend<HashFor<__SR_API_BLOCK__>>,
BabeGenesisConfiguration: UnwindSafe + RefUnwindSafe,
Slot: UnwindSafe + RefUnwindSafe,
Epoch: UnwindSafe + RefUnwindSafe,
Epoch: UnwindSafe + RefUnwindSafe,
Slot: UnwindSafe + RefUnwindSafe,
AuthorityId: UnwindSafe + RefUnwindSafe,
Option<OpaqueKeyOwnershipProof>: UnwindSafe + RefUnwindSafe,
EquivocationProof<<__SR_API_BLOCK__ as BlockT>::Header>: UnwindSafe + RefUnwindSafe,
OpaqueKeyOwnershipProof: UnwindSafe + RefUnwindSafe,
Option<()>: UnwindSafe + RefUnwindSafe,
__SR_API_BLOCK__::Header: UnwindSafe + RefUnwindSafe,
impl<__SR_API_BLOCK__: BlockT + UnwindSafe + RefUnwindSafe, RuntimeApiImplCall: CallApiAt<__SR_API_BLOCK__> + 'static> BabeApi<__SR_API_BLOCK__> for RuntimeApiImpl<__SR_API_BLOCK__, RuntimeApiImplCall> where
RuntimeApiImplCall::StateBackend: StateBackend<HashFor<__SR_API_BLOCK__>>,
BabeGenesisConfiguration: UnwindSafe + RefUnwindSafe,
Slot: UnwindSafe + RefUnwindSafe,
Epoch: UnwindSafe + RefUnwindSafe,
Epoch: UnwindSafe + RefUnwindSafe,
Slot: UnwindSafe + RefUnwindSafe,
AuthorityId: UnwindSafe + RefUnwindSafe,
Option<OpaqueKeyOwnershipProof>: UnwindSafe + RefUnwindSafe,
EquivocationProof<<__SR_API_BLOCK__ as BlockT>::Header>: UnwindSafe + RefUnwindSafe,
OpaqueKeyOwnershipProof: UnwindSafe + RefUnwindSafe,
Option<()>: UnwindSafe + RefUnwindSafe,
__SR_API_BLOCK__::Header: UnwindSafe + RefUnwindSafe,
fn BabeApi_configuration_runtime_api_impl(
&self,
at: &BlockId<__SR_API_BLOCK__>,
context: ExecutionContext,
params: Option<()>,
params_encoded: Vec<u8>
) -> Result<NativeOrEncoded<BabeGenesisConfiguration>, ApiError>
fn BabeApi_current_epoch_start_runtime_api_impl(
&self,
at: &BlockId<__SR_API_BLOCK__>,
context: ExecutionContext,
params: Option<()>,
params_encoded: Vec<u8>
) -> Result<NativeOrEncoded<Slot>, ApiError>
fn BabeApi_current_epoch_runtime_api_impl(
&self,
at: &BlockId<__SR_API_BLOCK__>,
context: ExecutionContext,
params: Option<()>,
params_encoded: Vec<u8>
) -> Result<NativeOrEncoded<Epoch>, ApiError>
fn BabeApi_next_epoch_runtime_api_impl(
&self,
at: &BlockId<__SR_API_BLOCK__>,
context: ExecutionContext,
params: Option<()>,
params_encoded: Vec<u8>
) -> Result<NativeOrEncoded<Epoch>, ApiError>
fn BabeApi_generate_key_ownership_proof_runtime_api_impl(
&self,
at: &BlockId<__SR_API_BLOCK__>,
context: ExecutionContext,
params: Option<(Slot, AuthorityId)>,
params_encoded: Vec<u8>
) -> Result<NativeOrEncoded<Option<OpaqueKeyOwnershipProof>>, ApiError>
fn BabeApi_submit_report_equivocation_unsigned_extrinsic_runtime_api_impl(
&self,
at: &BlockId<__SR_API_BLOCK__>,
context: ExecutionContext,
params: Option<(EquivocationProof<<__SR_API_BLOCK__ as BlockT>::Header>, OpaqueKeyOwnershipProof)>,
params_encoded: Vec<u8>
) -> Result<NativeOrEncoded<Option<()>>, ApiError>
fn configuration(
&self,
__runtime_api_at_param__: &BlockId<Block>
) -> Result<BabeGenesisConfiguration, ApiError>
fn configuration(
&self,
__runtime_api_at_param__: &BlockId<Block>
) -> Result<BabeGenesisConfiguration, ApiError>
Return the genesis configuration for BABE. The configuration is only read on genesis.
fn configuration_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext
) -> Result<BabeGenesisConfiguration, ApiError>
fn configuration_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext
) -> Result<BabeGenesisConfiguration, ApiError>
Return the genesis configuration for BABE. The configuration is only read on genesis.
fn configuration_before_version_2(
&self,
__runtime_api_at_param__: &BlockId<Block>
) -> Result<BabeGenesisConfigurationV1, ApiError>
fn configuration_before_version_2(
&self,
__runtime_api_at_param__: &BlockId<Block>
) -> Result<BabeGenesisConfigurationV1, ApiError>
Return the configuration for BABE. Version 1.
fn configuration_before_version_2_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext
) -> Result<BabeGenesisConfigurationV1, ApiError>
fn configuration_before_version_2_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext
) -> Result<BabeGenesisConfigurationV1, ApiError>
Return the configuration for BABE. Version 1.
Returns the slot that started the current epoch.
fn current_epoch_start_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext
) -> Result<Slot, ApiError>
fn current_epoch_start_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext
) -> Result<Slot, ApiError>
Returns the slot that started the current epoch.
Returns information regarding the current epoch.
fn current_epoch_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext
) -> Result<Epoch, ApiError>
fn current_epoch_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext
) -> Result<Epoch, ApiError>
Returns information regarding the current epoch.
Returns information regarding the next epoch (which was already previously announced). Read more
fn next_epoch_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext
) -> Result<Epoch, ApiError>
fn next_epoch_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext
) -> Result<Epoch, ApiError>
Returns information regarding the next epoch (which was already previously announced). Read more
fn generate_key_ownership_proof(
&self,
__runtime_api_at_param__: &BlockId<Block>,
slot: Slot,
authority_id: Public
) -> Result<Option<OpaqueKeyOwnershipProof>, ApiError>
fn generate_key_ownership_proof(
&self,
__runtime_api_at_param__: &BlockId<Block>,
slot: Slot,
authority_id: Public
) -> Result<Option<OpaqueKeyOwnershipProof>, ApiError>
Generates a proof of key ownership for the given authority in the
current epoch. An example usage of this module is coupled with the
session historical module to prove that a given authority key is
tied to a given staking identity during a specific session. Proofs
of key ownership are necessary for submitting equivocation reports.
NOTE: even though the API takes a slot
as parameter the current
implementations ignores this parameter and instead relies on this
method being called at the correct block height, i.e. any point at
which the epoch for the given slot is live on-chain. Future
implementations will instead use indexed data through an offchain
worker, not requiring older states to be available. Read more
fn generate_key_ownership_proof_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext,
slot: Slot,
authority_id: Public
) -> Result<Option<OpaqueKeyOwnershipProof>, ApiError>
fn generate_key_ownership_proof_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext,
slot: Slot,
authority_id: Public
) -> Result<Option<OpaqueKeyOwnershipProof>, ApiError>
Generates a proof of key ownership for the given authority in the
current epoch. An example usage of this module is coupled with the
session historical module to prove that a given authority key is
tied to a given staking identity during a specific session. Proofs
of key ownership are necessary for submitting equivocation reports.
NOTE: even though the API takes a slot
as parameter the current
implementations ignores this parameter and instead relies on this
method being called at the correct block height, i.e. any point at
which the epoch for the given slot is live on-chain. Future
implementations will instead use indexed data through an offchain
worker, not requiring older states to be available. Read more
fn submit_report_equivocation_unsigned_extrinsic(
&self,
__runtime_api_at_param__: &BlockId<Block>,
equivocation_proof: EquivocationProof<<Block as Block>::Header, Public>,
key_owner_proof: OpaqueKeyOwnershipProof
) -> Result<Option<()>, ApiError>
fn submit_report_equivocation_unsigned_extrinsic(
&self,
__runtime_api_at_param__: &BlockId<Block>,
equivocation_proof: EquivocationProof<<Block as Block>::Header, Public>,
key_owner_proof: OpaqueKeyOwnershipProof
) -> Result<Option<()>, ApiError>
Submits an unsigned extrinsic to report an equivocation. The caller
must provide the equivocation proof and a key ownership proof
(should be obtained using generate_key_ownership_proof
). The
extrinsic will be unsigned and should only be accepted for local
authorship (not to be broadcast to the network). This method returns
None
when creation of the extrinsic fails, e.g. if equivocation
reporting is disabled for the given runtime (i.e. this method is
hardcoded to return None
). Only useful in an offchain context. Read more
fn submit_report_equivocation_unsigned_extrinsic_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext,
equivocation_proof: EquivocationProof<<Block as Block>::Header, Public>,
key_owner_proof: OpaqueKeyOwnershipProof
) -> Result<Option<()>, ApiError>
fn submit_report_equivocation_unsigned_extrinsic_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext,
equivocation_proof: EquivocationProof<<Block as Block>::Header, Public>,
key_owner_proof: OpaqueKeyOwnershipProof
) -> Result<Option<()>, ApiError>
Submits an unsigned extrinsic to report an equivocation. The caller
must provide the equivocation proof and a key ownership proof
(should be obtained using generate_key_ownership_proof
). The
extrinsic will be unsigned and should only be accepted for local
authorship (not to be broadcast to the network). This method returns
None
when creation of the extrinsic fails, e.g. if equivocation
reporting is disabled for the given runtime (i.e. this method is
hardcoded to return None
). Only useful in an offchain context. Read more
impl<__SR_API_BLOCK__: BlockT + UnwindSafe + RefUnwindSafe, RuntimeApiImplCall: CallApiAt<__SR_API_BLOCK__> + 'static> Benchmark<__SR_API_BLOCK__> for RuntimeApiImpl<__SR_API_BLOCK__, RuntimeApiImplCall> where
RuntimeApiImplCall::StateBackend: StateBackend<HashFor<__SR_API_BLOCK__>>,
bool: UnwindSafe + RefUnwindSafe,
(Vec<BenchmarkList>, Vec<StorageInfo>): UnwindSafe + RefUnwindSafe,
BenchmarkConfig: UnwindSafe + RefUnwindSafe,
Result<Vec<BenchmarkBatch>, RuntimeString>: UnwindSafe + RefUnwindSafe,
__SR_API_BLOCK__::Header: UnwindSafe + RefUnwindSafe,
impl<__SR_API_BLOCK__: BlockT + UnwindSafe + RefUnwindSafe, RuntimeApiImplCall: CallApiAt<__SR_API_BLOCK__> + 'static> Benchmark<__SR_API_BLOCK__> for RuntimeApiImpl<__SR_API_BLOCK__, RuntimeApiImplCall> where
RuntimeApiImplCall::StateBackend: StateBackend<HashFor<__SR_API_BLOCK__>>,
bool: UnwindSafe + RefUnwindSafe,
(Vec<BenchmarkList>, Vec<StorageInfo>): UnwindSafe + RefUnwindSafe,
BenchmarkConfig: UnwindSafe + RefUnwindSafe,
Result<Vec<BenchmarkBatch>, RuntimeString>: UnwindSafe + RefUnwindSafe,
__SR_API_BLOCK__::Header: UnwindSafe + RefUnwindSafe,
fn Benchmark_benchmark_metadata_runtime_api_impl(
&self,
at: &BlockId<__SR_API_BLOCK__>,
context: ExecutionContext,
params: Option<bool>,
params_encoded: Vec<u8>
) -> Result<NativeOrEncoded<(Vec<BenchmarkList>, Vec<StorageInfo>)>, ApiError>
fn Benchmark_dispatch_benchmark_runtime_api_impl(
&self,
at: &BlockId<__SR_API_BLOCK__>,
context: ExecutionContext,
params: Option<BenchmarkConfig>,
params_encoded: Vec<u8>
) -> Result<NativeOrEncoded<Result<Vec<BenchmarkBatch>, RuntimeString>>, ApiError>
fn benchmark_metadata(
&self,
__runtime_api_at_param__: &BlockId<Block>,
extra: bool
) -> Result<(Vec<BenchmarkList, Global>, Vec<StorageInfo, Global>), ApiError>
fn benchmark_metadata(
&self,
__runtime_api_at_param__: &BlockId<Block>,
extra: bool
) -> Result<(Vec<BenchmarkList, Global>, Vec<StorageInfo, Global>), ApiError>
Get the benchmark metadata available for this runtime. Read more
fn benchmark_metadata_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext,
extra: bool
) -> Result<(Vec<BenchmarkList, Global>, Vec<StorageInfo, Global>), ApiError>
fn benchmark_metadata_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext,
extra: bool
) -> Result<(Vec<BenchmarkList, Global>, Vec<StorageInfo, Global>), ApiError>
Get the benchmark metadata available for this runtime. Read more
fn dispatch_benchmark(
&self,
__runtime_api_at_param__: &BlockId<Block>,
config: BenchmarkConfig
) -> Result<Result<Vec<BenchmarkBatch, Global>, RuntimeString>, ApiError>
fn dispatch_benchmark(
&self,
__runtime_api_at_param__: &BlockId<Block>,
config: BenchmarkConfig
) -> Result<Result<Vec<BenchmarkBatch, Global>, RuntimeString>, ApiError>
Dispatch the given benchmark.
fn dispatch_benchmark_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext,
config: BenchmarkConfig
) -> Result<Result<Vec<BenchmarkBatch, Global>, RuntimeString>, ApiError>
fn dispatch_benchmark_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext,
config: BenchmarkConfig
) -> Result<Result<Vec<BenchmarkBatch, Global>, RuntimeString>, ApiError>
Dispatch the given benchmark.
impl<__SR_API_BLOCK__: BlockT + UnwindSafe + RefUnwindSafe, RuntimeApiImplCall: CallApiAt<__SR_API_BLOCK__> + 'static> BlockBuilder<__SR_API_BLOCK__> for RuntimeApiImpl<__SR_API_BLOCK__, RuntimeApiImplCall> where
RuntimeApiImplCall::StateBackend: StateBackend<HashFor<__SR_API_BLOCK__>>,
<__SR_API_BLOCK__ as BlockT>::Extrinsic: UnwindSafe + RefUnwindSafe,
ApplyExtrinsicResult: UnwindSafe + RefUnwindSafe,
<__SR_API_BLOCK__ as BlockT>::Header: UnwindSafe + RefUnwindSafe,
InherentData: UnwindSafe + RefUnwindSafe,
Vec<<__SR_API_BLOCK__ as BlockT>::Extrinsic>: UnwindSafe + RefUnwindSafe,
__SR_API_BLOCK__: UnwindSafe + RefUnwindSafe,
InherentData: UnwindSafe + RefUnwindSafe,
CheckInherentsResult: UnwindSafe + RefUnwindSafe,
__SR_API_BLOCK__::Header: UnwindSafe + RefUnwindSafe,
impl<__SR_API_BLOCK__: BlockT + UnwindSafe + RefUnwindSafe, RuntimeApiImplCall: CallApiAt<__SR_API_BLOCK__> + 'static> BlockBuilder<__SR_API_BLOCK__> for RuntimeApiImpl<__SR_API_BLOCK__, RuntimeApiImplCall> where
RuntimeApiImplCall::StateBackend: StateBackend<HashFor<__SR_API_BLOCK__>>,
<__SR_API_BLOCK__ as BlockT>::Extrinsic: UnwindSafe + RefUnwindSafe,
ApplyExtrinsicResult: UnwindSafe + RefUnwindSafe,
<__SR_API_BLOCK__ as BlockT>::Header: UnwindSafe + RefUnwindSafe,
InherentData: UnwindSafe + RefUnwindSafe,
Vec<<__SR_API_BLOCK__ as BlockT>::Extrinsic>: UnwindSafe + RefUnwindSafe,
__SR_API_BLOCK__: UnwindSafe + RefUnwindSafe,
InherentData: UnwindSafe + RefUnwindSafe,
CheckInherentsResult: UnwindSafe + RefUnwindSafe,
__SR_API_BLOCK__::Header: UnwindSafe + RefUnwindSafe,
fn BlockBuilder_apply_extrinsic_runtime_api_impl(
&self,
at: &BlockId<__SR_API_BLOCK__>,
context: ExecutionContext,
params: Option<<__SR_API_BLOCK__ as BlockT>::Extrinsic>,
params_encoded: Vec<u8>
) -> Result<NativeOrEncoded<ApplyExtrinsicResult>, ApiError>
fn BlockBuilder_finalize_block_runtime_api_impl(
&self,
at: &BlockId<__SR_API_BLOCK__>,
context: ExecutionContext,
params: Option<()>,
params_encoded: Vec<u8>
) -> Result<NativeOrEncoded<<__SR_API_BLOCK__ as BlockT>::Header>, ApiError>
fn BlockBuilder_inherent_extrinsics_runtime_api_impl(
&self,
at: &BlockId<__SR_API_BLOCK__>,
context: ExecutionContext,
params: Option<InherentData>,
params_encoded: Vec<u8>
) -> Result<NativeOrEncoded<Vec<<__SR_API_BLOCK__ as BlockT>::Extrinsic>>, ApiError>
fn BlockBuilder_check_inherents_runtime_api_impl(
&self,
at: &BlockId<__SR_API_BLOCK__>,
context: ExecutionContext,
params: Option<(__SR_API_BLOCK__, InherentData)>,
params_encoded: Vec<u8>
) -> Result<NativeOrEncoded<CheckInherentsResult>, ApiError>
fn apply_extrinsic(
&self,
__runtime_api_at_param__: &BlockId<Block>,
extrinsic: <Block as Block>::Extrinsic
) -> Result<Result<Result<(), DispatchError>, TransactionValidityError>, ApiError>
fn apply_extrinsic(
&self,
__runtime_api_at_param__: &BlockId<Block>,
extrinsic: <Block as Block>::Extrinsic
) -> Result<Result<Result<(), DispatchError>, TransactionValidityError>, ApiError>
Apply the given extrinsic. Read more
fn apply_extrinsic_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext,
extrinsic: <Block as Block>::Extrinsic
) -> Result<Result<Result<(), DispatchError>, TransactionValidityError>, ApiError>
fn apply_extrinsic_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext,
extrinsic: <Block as Block>::Extrinsic
) -> Result<Result<Result<(), DispatchError>, TransactionValidityError>, ApiError>
Apply the given extrinsic. Read more
Finish the current block.
fn finalize_block_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext
) -> Result<<Block as Block>::Header, ApiError>
fn finalize_block_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext
) -> Result<<Block as Block>::Header, ApiError>
Finish the current block.
fn inherent_extrinsics(
&self,
__runtime_api_at_param__: &BlockId<Block>,
inherent: InherentData
) -> Result<Vec<<Block as Block>::Extrinsic, Global>, ApiError>
fn inherent_extrinsics(
&self,
__runtime_api_at_param__: &BlockId<Block>,
inherent: InherentData
) -> Result<Vec<<Block as Block>::Extrinsic, Global>, ApiError>
Generate inherent extrinsics. The inherent data will vary from chain to chain.
fn inherent_extrinsics_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext,
inherent: InherentData
) -> Result<Vec<<Block as Block>::Extrinsic, Global>, ApiError>
fn inherent_extrinsics_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext,
inherent: InherentData
) -> Result<Vec<<Block as Block>::Extrinsic, Global>, ApiError>
Generate inherent extrinsics. The inherent data will vary from chain to chain.
fn check_inherents(
&self,
__runtime_api_at_param__: &BlockId<Block>,
block: Block,
data: InherentData
) -> Result<CheckInherentsResult, ApiError>
fn check_inherents(
&self,
__runtime_api_at_param__: &BlockId<Block>,
block: Block,
data: InherentData
) -> Result<CheckInherentsResult, ApiError>
Check that the inherents are valid. The inherent data will vary from chain to chain.
fn check_inherents_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext,
block: Block,
data: InherentData
) -> Result<CheckInherentsResult, ApiError>
fn check_inherents_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext,
block: Block,
data: InherentData
) -> Result<CheckInherentsResult, ApiError>
Check that the inherents are valid. The inherent data will vary from chain to chain.
impl<__SR_API_BLOCK__: BlockT + UnwindSafe + RefUnwindSafe, RuntimeApiImplCall: CallApiAt<__SR_API_BLOCK__> + 'static> ContractsApi<__SR_API_BLOCK__, <<MultiSignature as Verify>::Signer as IdentifyAccount>::AccountId, u128, u32, H256> for RuntimeApiImpl<__SR_API_BLOCK__, RuntimeApiImplCall> where
RuntimeApiImplCall::StateBackend: StateBackend<HashFor<__SR_API_BLOCK__>>,
AccountId: UnwindSafe + RefUnwindSafe,
AccountId: UnwindSafe + RefUnwindSafe,
Balance: UnwindSafe + RefUnwindSafe,
u64: UnwindSafe + RefUnwindSafe,
Vec<u8>: UnwindSafe + RefUnwindSafe,
ContractExecResult: UnwindSafe + RefUnwindSafe,
AccountId: UnwindSafe + RefUnwindSafe,
Balance: UnwindSafe + RefUnwindSafe,
u64: UnwindSafe + RefUnwindSafe,
Code<Hash>: UnwindSafe + RefUnwindSafe,
Vec<u8>: UnwindSafe + RefUnwindSafe,
Vec<u8>: UnwindSafe + RefUnwindSafe,
ContractInstantiateResult<AccountId, BlockNumber>: UnwindSafe + RefUnwindSafe,
AccountId: UnwindSafe + RefUnwindSafe,
[u8; 32]: UnwindSafe + RefUnwindSafe,
GetStorageResult: UnwindSafe + RefUnwindSafe,
AccountId: UnwindSafe + RefUnwindSafe,
RentProjectionResult<BlockNumber>: UnwindSafe + RefUnwindSafe,
__SR_API_BLOCK__::Header: UnwindSafe + RefUnwindSafe,
impl<__SR_API_BLOCK__: BlockT + UnwindSafe + RefUnwindSafe, RuntimeApiImplCall: CallApiAt<__SR_API_BLOCK__> + 'static> ContractsApi<__SR_API_BLOCK__, <<MultiSignature as Verify>::Signer as IdentifyAccount>::AccountId, u128, u32, H256> for RuntimeApiImpl<__SR_API_BLOCK__, RuntimeApiImplCall> where
RuntimeApiImplCall::StateBackend: StateBackend<HashFor<__SR_API_BLOCK__>>,
AccountId: UnwindSafe + RefUnwindSafe,
AccountId: UnwindSafe + RefUnwindSafe,
Balance: UnwindSafe + RefUnwindSafe,
u64: UnwindSafe + RefUnwindSafe,
Vec<u8>: UnwindSafe + RefUnwindSafe,
ContractExecResult: UnwindSafe + RefUnwindSafe,
AccountId: UnwindSafe + RefUnwindSafe,
Balance: UnwindSafe + RefUnwindSafe,
u64: UnwindSafe + RefUnwindSafe,
Code<Hash>: UnwindSafe + RefUnwindSafe,
Vec<u8>: UnwindSafe + RefUnwindSafe,
Vec<u8>: UnwindSafe + RefUnwindSafe,
ContractInstantiateResult<AccountId, BlockNumber>: UnwindSafe + RefUnwindSafe,
AccountId: UnwindSafe + RefUnwindSafe,
[u8; 32]: UnwindSafe + RefUnwindSafe,
GetStorageResult: UnwindSafe + RefUnwindSafe,
AccountId: UnwindSafe + RefUnwindSafe,
RentProjectionResult<BlockNumber>: UnwindSafe + RefUnwindSafe,
__SR_API_BLOCK__::Header: UnwindSafe + RefUnwindSafe,
fn ContractsApi_call_runtime_api_impl(
&self,
at: &BlockId<__SR_API_BLOCK__>,
context: ExecutionContext,
params: Option<(AccountId, AccountId, Balance, u64, Vec<u8>)>,
params_encoded: Vec<u8>
) -> Result<NativeOrEncoded<ContractExecResult>, ApiError>
fn ContractsApi_instantiate_runtime_api_impl(
&self,
at: &BlockId<__SR_API_BLOCK__>,
context: ExecutionContext,
params: Option<(AccountId, Balance, u64, Code<Hash>, Vec<u8>, Vec<u8>)>,
params_encoded: Vec<u8>
) -> Result<NativeOrEncoded<ContractInstantiateResult<AccountId, BlockNumber>>, ApiError>
fn ContractsApi_get_storage_runtime_api_impl(
&self,
at: &BlockId<__SR_API_BLOCK__>,
context: ExecutionContext,
params: Option<(AccountId, [u8; 32])>,
params_encoded: Vec<u8>
) -> Result<NativeOrEncoded<GetStorageResult>, ApiError>
fn ContractsApi_rent_projection_runtime_api_impl(
&self,
at: &BlockId<__SR_API_BLOCK__>,
context: ExecutionContext,
params: Option<AccountId>,
params_encoded: Vec<u8>
) -> Result<NativeOrEncoded<RentProjectionResult<BlockNumber>>, ApiError>
fn call(
&self,
__runtime_api_at_param__: &BlockId<Block>,
origin: AccountId,
dest: AccountId,
value: Balance,
gas_limit: u64,
input_data: Vec<u8, Global>
) -> Result<ContractResult<Result<ExecReturnValue, DispatchError>>, ApiError>
fn call(
&self,
__runtime_api_at_param__: &BlockId<Block>,
origin: AccountId,
dest: AccountId,
value: Balance,
gas_limit: u64,
input_data: Vec<u8, Global>
) -> Result<ContractResult<Result<ExecReturnValue, DispatchError>>, ApiError>
Perform a call from a specified account to a given contract. Read more
fn call_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext,
origin: AccountId,
dest: AccountId,
value: Balance,
gas_limit: u64,
input_data: Vec<u8, Global>
) -> Result<ContractResult<Result<ExecReturnValue, DispatchError>>, ApiError>
fn call_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext,
origin: AccountId,
dest: AccountId,
value: Balance,
gas_limit: u64,
input_data: Vec<u8, Global>
) -> Result<ContractResult<Result<ExecReturnValue, DispatchError>>, ApiError>
Perform a call from a specified account to a given contract. Read more
fn instantiate(
&self,
__runtime_api_at_param__: &BlockId<Block>,
origin: AccountId,
endowment: Balance,
gas_limit: u64,
code: Code<Hash>,
data: Vec<u8, Global>,
salt: Vec<u8, Global>
) -> Result<ContractResult<Result<InstantiateReturnValue<AccountId, BlockNumber>, DispatchError>>, ApiError>
fn instantiate(
&self,
__runtime_api_at_param__: &BlockId<Block>,
origin: AccountId,
endowment: Balance,
gas_limit: u64,
code: Code<Hash>,
data: Vec<u8, Global>,
salt: Vec<u8, Global>
) -> Result<ContractResult<Result<InstantiateReturnValue<AccountId, BlockNumber>, DispatchError>>, ApiError>
Instantiate a new contract. Read more
fn instantiate_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext,
origin: AccountId,
endowment: Balance,
gas_limit: u64,
code: Code<Hash>,
data: Vec<u8, Global>,
salt: Vec<u8, Global>
) -> Result<ContractResult<Result<InstantiateReturnValue<AccountId, BlockNumber>, DispatchError>>, ApiError>
fn instantiate_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext,
origin: AccountId,
endowment: Balance,
gas_limit: u64,
code: Code<Hash>,
data: Vec<u8, Global>,
salt: Vec<u8, Global>
) -> Result<ContractResult<Result<InstantiateReturnValue<AccountId, BlockNumber>, DispatchError>>, ApiError>
Instantiate a new contract. Read more
Query a given storage key in a given contract. Read more
fn get_storage_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext,
address: AccountId,
key: [u8; 32]
) -> Result<Result<Option<Vec<u8, Global>>, ContractAccessError>, ApiError>
fn get_storage_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext,
address: AccountId,
key: [u8; 32]
) -> Result<Result<Option<Vec<u8, Global>>, ContractAccessError>, ApiError>
Query a given storage key in a given contract. Read more
fn rent_projection(
&self,
__runtime_api_at_param__: &BlockId<Block>,
address: AccountId
) -> Result<Result<RentProjection<BlockNumber>, ContractAccessError>, ApiError>
fn rent_projection(
&self,
__runtime_api_at_param__: &BlockId<Block>,
address: AccountId
) -> Result<Result<RentProjection<BlockNumber>, ContractAccessError>, ApiError>
Returns the projected time a given contract will be able to sustain paying its rent. Read more
fn rent_projection_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext,
address: AccountId
) -> Result<Result<RentProjection<BlockNumber>, ContractAccessError>, ApiError>
fn rent_projection_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext,
address: AccountId
) -> Result<Result<RentProjection<BlockNumber>, ContractAccessError>, ApiError>
Returns the projected time a given contract will be able to sustain paying its rent. Read more
impl<__SR_API_BLOCK__: BlockT + UnwindSafe + RefUnwindSafe, RuntimeApiImplCall: CallApiAt<__SR_API_BLOCK__> + 'static> Core<__SR_API_BLOCK__> for RuntimeApiImpl<__SR_API_BLOCK__, RuntimeApiImplCall> where
RuntimeApiImplCall::StateBackend: StateBackend<HashFor<__SR_API_BLOCK__>>,
RuntimeVersion: UnwindSafe + RefUnwindSafe,
__SR_API_BLOCK__: UnwindSafe + RefUnwindSafe,
<__SR_API_BLOCK__ as BlockT>::Header: UnwindSafe + RefUnwindSafe,
__SR_API_BLOCK__::Header: UnwindSafe + RefUnwindSafe,
impl<__SR_API_BLOCK__: BlockT + UnwindSafe + RefUnwindSafe, RuntimeApiImplCall: CallApiAt<__SR_API_BLOCK__> + 'static> Core<__SR_API_BLOCK__> for RuntimeApiImpl<__SR_API_BLOCK__, RuntimeApiImplCall> where
RuntimeApiImplCall::StateBackend: StateBackend<HashFor<__SR_API_BLOCK__>>,
RuntimeVersion: UnwindSafe + RefUnwindSafe,
__SR_API_BLOCK__: UnwindSafe + RefUnwindSafe,
<__SR_API_BLOCK__ as BlockT>::Header: UnwindSafe + RefUnwindSafe,
__SR_API_BLOCK__::Header: UnwindSafe + RefUnwindSafe,
fn Core_version_runtime_api_impl(
&self,
at: &BlockId<__SR_API_BLOCK__>,
context: ExecutionContext,
params: Option<()>,
params_encoded: Vec<u8>
) -> Result<NativeOrEncoded<RuntimeVersion>, ApiError>
fn Core_execute_block_runtime_api_impl(
&self,
at: &BlockId<__SR_API_BLOCK__>,
context: ExecutionContext,
params: Option<__SR_API_BLOCK__>,
params_encoded: Vec<u8>
) -> Result<NativeOrEncoded<()>, ApiError>
fn Core_initialize_block_runtime_api_impl(
&self,
at: &BlockId<__SR_API_BLOCK__>,
context: ExecutionContext,
params: Option<&<__SR_API_BLOCK__ as BlockT>::Header>,
params_encoded: Vec<u8>
) -> Result<NativeOrEncoded<()>, ApiError>
Returns the version of the runtime.
fn version_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext
) -> Result<RuntimeVersion, ApiError>
fn version_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext
) -> Result<RuntimeVersion, ApiError>
Returns the version of the runtime.
fn version_before_version_3(
&self,
__runtime_api_at_param__: &BlockId<Block>
) -> Result<OldRuntimeVersion, ApiError>
fn version_before_version_3(
&self,
__runtime_api_at_param__: &BlockId<Block>
) -> Result<OldRuntimeVersion, ApiError>
Returns the version of the runtime.
fn version_before_version_3_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext
) -> Result<OldRuntimeVersion, ApiError>
fn version_before_version_3_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext
) -> Result<OldRuntimeVersion, ApiError>
Returns the version of the runtime.
Execute the given block.
fn execute_block_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext,
block: Block
) -> Result<(), ApiError>
fn execute_block_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext,
block: Block
) -> Result<(), ApiError>
Execute the given block.
Initialize a block with the given header.
fn initialize_block_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext,
header: &<Block as Block>::Header
) -> Result<(), ApiError>
fn initialize_block_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext,
header: &<Block as Block>::Header
) -> Result<(), ApiError>
Initialize a block with the given header.
impl<__SR_API_BLOCK__: BlockT + UnwindSafe + RefUnwindSafe, RuntimeApiImplCall: CallApiAt<__SR_API_BLOCK__> + 'static> GrandpaApi<__SR_API_BLOCK__> for RuntimeApiImpl<__SR_API_BLOCK__, RuntimeApiImplCall> where
RuntimeApiImplCall::StateBackend: StateBackend<HashFor<__SR_API_BLOCK__>>,
GrandpaAuthorityList: UnwindSafe + RefUnwindSafe,
SetId: UnwindSafe + RefUnwindSafe,
EquivocationProof<<__SR_API_BLOCK__ as BlockT>::Hash, NumberFor<__SR_API_BLOCK__>>: UnwindSafe + RefUnwindSafe,
OpaqueKeyOwnershipProof: UnwindSafe + RefUnwindSafe,
Option<()>: UnwindSafe + RefUnwindSafe,
SetId: UnwindSafe + RefUnwindSafe,
GrandpaId: UnwindSafe + RefUnwindSafe,
Option<OpaqueKeyOwnershipProof>: UnwindSafe + RefUnwindSafe,
__SR_API_BLOCK__::Header: UnwindSafe + RefUnwindSafe,
impl<__SR_API_BLOCK__: BlockT + UnwindSafe + RefUnwindSafe, RuntimeApiImplCall: CallApiAt<__SR_API_BLOCK__> + 'static> GrandpaApi<__SR_API_BLOCK__> for RuntimeApiImpl<__SR_API_BLOCK__, RuntimeApiImplCall> where
RuntimeApiImplCall::StateBackend: StateBackend<HashFor<__SR_API_BLOCK__>>,
GrandpaAuthorityList: UnwindSafe + RefUnwindSafe,
SetId: UnwindSafe + RefUnwindSafe,
EquivocationProof<<__SR_API_BLOCK__ as BlockT>::Hash, NumberFor<__SR_API_BLOCK__>>: UnwindSafe + RefUnwindSafe,
OpaqueKeyOwnershipProof: UnwindSafe + RefUnwindSafe,
Option<()>: UnwindSafe + RefUnwindSafe,
SetId: UnwindSafe + RefUnwindSafe,
GrandpaId: UnwindSafe + RefUnwindSafe,
Option<OpaqueKeyOwnershipProof>: UnwindSafe + RefUnwindSafe,
__SR_API_BLOCK__::Header: UnwindSafe + RefUnwindSafe,
fn GrandpaApi_current_set_id_runtime_api_impl(
&self,
at: &BlockId<__SR_API_BLOCK__>,
context: ExecutionContext,
params: Option<()>,
params_encoded: Vec<u8>
) -> Result<NativeOrEncoded<SetId>, ApiError>
fn GrandpaApi_submit_report_equivocation_unsigned_extrinsic_runtime_api_impl(
&self,
at: &BlockId<__SR_API_BLOCK__>,
context: ExecutionContext,
params: Option<(EquivocationProof<<__SR_API_BLOCK__ as BlockT>::Hash, NumberFor<__SR_API_BLOCK__>>, OpaqueKeyOwnershipProof)>,
params_encoded: Vec<u8>
) -> Result<NativeOrEncoded<Option<()>>, ApiError>
fn GrandpaApi_generate_key_ownership_proof_runtime_api_impl(
&self,
at: &BlockId<__SR_API_BLOCK__>,
context: ExecutionContext,
params: Option<(SetId, GrandpaId)>,
params_encoded: Vec<u8>
) -> Result<NativeOrEncoded<Option<OpaqueKeyOwnershipProof>>, ApiError>
Get the current GRANDPA authorities and weights. This should not change except for when changes are scheduled and the corresponding delay has passed. Read more
Get the current GRANDPA authorities and weights. This should not change except for when changes are scheduled and the corresponding delay has passed. Read more
fn submit_report_equivocation_unsigned_extrinsic(
&self,
__runtime_api_at_param__: &BlockId<Block>,
equivocation_proof: EquivocationProof<<Block as Block>::Hash, <<Block as Block>::Header as Header>::Number>,
key_owner_proof: OpaqueKeyOwnershipProof
) -> Result<Option<()>, ApiError>
fn submit_report_equivocation_unsigned_extrinsic(
&self,
__runtime_api_at_param__: &BlockId<Block>,
equivocation_proof: EquivocationProof<<Block as Block>::Hash, <<Block as Block>::Header as Header>::Number>,
key_owner_proof: OpaqueKeyOwnershipProof
) -> Result<Option<()>, ApiError>
Submits an unsigned extrinsic to report an equivocation. The caller
must provide the equivocation proof and a key ownership proof
(should be obtained using generate_key_ownership_proof
). The
extrinsic will be unsigned and should only be accepted for local
authorship (not to be broadcast to the network). This method returns
None
when creation of the extrinsic fails, e.g. if equivocation
reporting is disabled for the given runtime (i.e. this method is
hardcoded to return None
). Only useful in an offchain context. Read more
fn submit_report_equivocation_unsigned_extrinsic_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext,
equivocation_proof: EquivocationProof<<Block as Block>::Hash, <<Block as Block>::Header as Header>::Number>,
key_owner_proof: OpaqueKeyOwnershipProof
) -> Result<Option<()>, ApiError>
fn submit_report_equivocation_unsigned_extrinsic_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext,
equivocation_proof: EquivocationProof<<Block as Block>::Hash, <<Block as Block>::Header as Header>::Number>,
key_owner_proof: OpaqueKeyOwnershipProof
) -> Result<Option<()>, ApiError>
Submits an unsigned extrinsic to report an equivocation. The caller
must provide the equivocation proof and a key ownership proof
(should be obtained using generate_key_ownership_proof
). The
extrinsic will be unsigned and should only be accepted for local
authorship (not to be broadcast to the network). This method returns
None
when creation of the extrinsic fails, e.g. if equivocation
reporting is disabled for the given runtime (i.e. this method is
hardcoded to return None
). Only useful in an offchain context. Read more
fn generate_key_ownership_proof(
&self,
__runtime_api_at_param__: &BlockId<Block>,
set_id: u64,
authority_id: Public
) -> Result<Option<OpaqueKeyOwnershipProof>, ApiError>
fn generate_key_ownership_proof(
&self,
__runtime_api_at_param__: &BlockId<Block>,
set_id: u64,
authority_id: Public
) -> Result<Option<OpaqueKeyOwnershipProof>, ApiError>
Generates a proof of key ownership for the given authority in the
given set. An example usage of this module is coupled with the
session historical module to prove that a given authority key is
tied to a given staking identity during a specific session. Proofs
of key ownership are necessary for submitting equivocation reports.
NOTE: even though the API takes a set_id
as parameter the current
implementations ignore this parameter and instead rely on this
method being called at the correct block height, i.e. any point at
which the given set id is live on-chain. Future implementations will
instead use indexed data through an offchain worker, not requiring
older states to be available. Read more
fn generate_key_ownership_proof_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext,
set_id: u64,
authority_id: Public
) -> Result<Option<OpaqueKeyOwnershipProof>, ApiError>
fn generate_key_ownership_proof_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext,
set_id: u64,
authority_id: Public
) -> Result<Option<OpaqueKeyOwnershipProof>, ApiError>
Generates a proof of key ownership for the given authority in the
given set. An example usage of this module is coupled with the
session historical module to prove that a given authority key is
tied to a given staking identity during a specific session. Proofs
of key ownership are necessary for submitting equivocation reports.
NOTE: even though the API takes a set_id
as parameter the current
implementations ignore this parameter and instead rely on this
method being called at the correct block height, i.e. any point at
which the given set id is live on-chain. Future implementations will
instead use indexed data through an offchain worker, not requiring
older states to be available. Read more
Get current GRANDPA authority set id.
fn current_set_id_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext
) -> Result<u64, ApiError>
fn current_set_id_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext
) -> Result<u64, ApiError>
Get current GRANDPA authority set id.
impl<__SR_API_BLOCK__: BlockT + UnwindSafe + RefUnwindSafe, RuntimeApiImplCall: CallApiAt<__SR_API_BLOCK__> + 'static> Metadata<__SR_API_BLOCK__> for RuntimeApiImpl<__SR_API_BLOCK__, RuntimeApiImplCall> where
RuntimeApiImplCall::StateBackend: StateBackend<HashFor<__SR_API_BLOCK__>>,
OpaqueMetadata: UnwindSafe + RefUnwindSafe,
__SR_API_BLOCK__::Header: UnwindSafe + RefUnwindSafe,
impl<__SR_API_BLOCK__: BlockT + UnwindSafe + RefUnwindSafe, RuntimeApiImplCall: CallApiAt<__SR_API_BLOCK__> + 'static> Metadata<__SR_API_BLOCK__> for RuntimeApiImpl<__SR_API_BLOCK__, RuntimeApiImplCall> where
RuntimeApiImplCall::StateBackend: StateBackend<HashFor<__SR_API_BLOCK__>>,
OpaqueMetadata: UnwindSafe + RefUnwindSafe,
__SR_API_BLOCK__::Header: UnwindSafe + RefUnwindSafe,
fn Metadata_metadata_runtime_api_impl(
&self,
at: &BlockId<__SR_API_BLOCK__>,
context: ExecutionContext,
params: Option<()>,
params_encoded: Vec<u8>
) -> Result<NativeOrEncoded<OpaqueMetadata>, ApiError>
Returns the metadata of a runtime.
fn metadata_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext
) -> Result<OpaqueMetadata, ApiError>
fn metadata_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext
) -> Result<OpaqueMetadata, ApiError>
Returns the metadata of a runtime.
impl<__SR_API_BLOCK__: BlockT + UnwindSafe + RefUnwindSafe, RuntimeApiImplCall: CallApiAt<__SR_API_BLOCK__> + 'static> MmrApi<__SR_API_BLOCK__, <Runtime as Config<()>>::Hash> for RuntimeApiImpl<__SR_API_BLOCK__, RuntimeApiImplCall> where
RuntimeApiImplCall::StateBackend: StateBackend<HashFor<__SR_API_BLOCK__>>,
u64: UnwindSafe + RefUnwindSafe,
Result<(EncodableOpaqueLeaf, Proof<<Runtime as Config>::Hash>), Error>: UnwindSafe + RefUnwindSafe,
EncodableOpaqueLeaf: UnwindSafe + RefUnwindSafe,
Proof<<Runtime as Config>::Hash>: UnwindSafe + RefUnwindSafe,
Result<(), Error>: UnwindSafe + RefUnwindSafe,
<Runtime as Config>::Hash: UnwindSafe + RefUnwindSafe,
EncodableOpaqueLeaf: UnwindSafe + RefUnwindSafe,
Proof<<Runtime as Config>::Hash>: UnwindSafe + RefUnwindSafe,
Result<(), Error>: UnwindSafe + RefUnwindSafe,
__SR_API_BLOCK__::Header: UnwindSafe + RefUnwindSafe,
impl<__SR_API_BLOCK__: BlockT + UnwindSafe + RefUnwindSafe, RuntimeApiImplCall: CallApiAt<__SR_API_BLOCK__> + 'static> MmrApi<__SR_API_BLOCK__, <Runtime as Config<()>>::Hash> for RuntimeApiImpl<__SR_API_BLOCK__, RuntimeApiImplCall> where
RuntimeApiImplCall::StateBackend: StateBackend<HashFor<__SR_API_BLOCK__>>,
u64: UnwindSafe + RefUnwindSafe,
Result<(EncodableOpaqueLeaf, Proof<<Runtime as Config>::Hash>), Error>: UnwindSafe + RefUnwindSafe,
EncodableOpaqueLeaf: UnwindSafe + RefUnwindSafe,
Proof<<Runtime as Config>::Hash>: UnwindSafe + RefUnwindSafe,
Result<(), Error>: UnwindSafe + RefUnwindSafe,
<Runtime as Config>::Hash: UnwindSafe + RefUnwindSafe,
EncodableOpaqueLeaf: UnwindSafe + RefUnwindSafe,
Proof<<Runtime as Config>::Hash>: UnwindSafe + RefUnwindSafe,
Result<(), Error>: UnwindSafe + RefUnwindSafe,
__SR_API_BLOCK__::Header: UnwindSafe + RefUnwindSafe,
fn MmrApi_generate_proof_runtime_api_impl(
&self,
at: &BlockId<__SR_API_BLOCK__>,
context: ExecutionContext,
params: Option<u64>,
params_encoded: Vec<u8>
) -> Result<NativeOrEncoded<Result<(EncodableOpaqueLeaf, Proof<<Runtime as Config>::Hash>), Error>>, ApiError>
fn MmrApi_verify_proof_runtime_api_impl(
&self,
at: &BlockId<__SR_API_BLOCK__>,
context: ExecutionContext,
params: Option<(EncodableOpaqueLeaf, Proof<<Runtime as Config>::Hash>)>,
params_encoded: Vec<u8>
) -> Result<NativeOrEncoded<Result<(), Error>>, ApiError>
fn MmrApi_verify_proof_stateless_runtime_api_impl(
&self,
at: &BlockId<__SR_API_BLOCK__>,
context: ExecutionContext,
params: Option<(<Runtime as Config>::Hash, EncodableOpaqueLeaf, Proof<<Runtime as Config>::Hash>)>,
params_encoded: Vec<u8>
) -> Result<NativeOrEncoded<Result<(), Error>>, ApiError>
Generate MMR proof for a leaf under given index.
fn generate_proof_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext,
leaf_index: u64
) -> Result<Result<(EncodableOpaqueLeaf, Proof<Hash>), Error>, ApiError>
fn generate_proof_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext,
leaf_index: u64
) -> Result<Result<(EncodableOpaqueLeaf, Proof<Hash>), Error>, ApiError>
Generate MMR proof for a leaf under given index.
fn verify_proof(
&self,
__runtime_api_at_param__: &BlockId<Block>,
leaf: EncodableOpaqueLeaf,
proof: Proof<Hash>
) -> Result<Result<(), Error>, ApiError>
fn verify_proof(
&self,
__runtime_api_at_param__: &BlockId<Block>,
leaf: EncodableOpaqueLeaf,
proof: Proof<Hash>
) -> Result<Result<(), Error>, ApiError>
Verify MMR proof against on-chain MMR. Read more
fn verify_proof_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext,
leaf: EncodableOpaqueLeaf,
proof: Proof<Hash>
) -> Result<Result<(), Error>, ApiError>
fn verify_proof_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext,
leaf: EncodableOpaqueLeaf,
proof: Proof<Hash>
) -> Result<Result<(), Error>, ApiError>
Verify MMR proof against on-chain MMR. Read more
fn verify_proof_stateless(
&self,
__runtime_api_at_param__: &BlockId<Block>,
root: Hash,
leaf: EncodableOpaqueLeaf,
proof: Proof<Hash>
) -> Result<Result<(), Error>, ApiError>
fn verify_proof_stateless(
&self,
__runtime_api_at_param__: &BlockId<Block>,
root: Hash,
leaf: EncodableOpaqueLeaf,
proof: Proof<Hash>
) -> Result<Result<(), Error>, ApiError>
Verify MMR proof against given root hash. Read more
fn verify_proof_stateless_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext,
root: Hash,
leaf: EncodableOpaqueLeaf,
proof: Proof<Hash>
) -> Result<Result<(), Error>, ApiError>
fn verify_proof_stateless_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext,
root: Hash,
leaf: EncodableOpaqueLeaf,
proof: Proof<Hash>
) -> Result<Result<(), Error>, ApiError>
Verify MMR proof against given root hash. Read more
impl<__SR_API_BLOCK__: BlockT + UnwindSafe + RefUnwindSafe, RuntimeApiImplCall: CallApiAt<__SR_API_BLOCK__> + 'static> OffchainWorkerApi<__SR_API_BLOCK__> for RuntimeApiImpl<__SR_API_BLOCK__, RuntimeApiImplCall> where
RuntimeApiImplCall::StateBackend: StateBackend<HashFor<__SR_API_BLOCK__>>,
<__SR_API_BLOCK__ as BlockT>::Header: UnwindSafe + RefUnwindSafe,
__SR_API_BLOCK__::Header: UnwindSafe + RefUnwindSafe,
impl<__SR_API_BLOCK__: BlockT + UnwindSafe + RefUnwindSafe, RuntimeApiImplCall: CallApiAt<__SR_API_BLOCK__> + 'static> OffchainWorkerApi<__SR_API_BLOCK__> for RuntimeApiImpl<__SR_API_BLOCK__, RuntimeApiImplCall> where
RuntimeApiImplCall::StateBackend: StateBackend<HashFor<__SR_API_BLOCK__>>,
<__SR_API_BLOCK__ as BlockT>::Header: UnwindSafe + RefUnwindSafe,
__SR_API_BLOCK__::Header: UnwindSafe + RefUnwindSafe,
fn OffchainWorkerApi_offchain_worker_runtime_api_impl(
&self,
at: &BlockId<__SR_API_BLOCK__>,
context: ExecutionContext,
params: Option<&<__SR_API_BLOCK__ as BlockT>::Header>,
params_encoded: Vec<u8>
) -> Result<NativeOrEncoded<()>, ApiError>
Starts the off-chain task for given block number.
Starts the off-chain task for given block number.
Starts the off-chain task for given block header.
fn offchain_worker_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext,
header: &<Block as Block>::Header
) -> Result<(), ApiError>
fn offchain_worker_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext,
header: &<Block as Block>::Header
) -> Result<(), ApiError>
Starts the off-chain task for given block header.
impl<__SR_API_BLOCK__: BlockT + UnwindSafe + RefUnwindSafe, RuntimeApiImplCall: CallApiAt<__SR_API_BLOCK__> + 'static> SessionKeys<__SR_API_BLOCK__> for RuntimeApiImpl<__SR_API_BLOCK__, RuntimeApiImplCall> where
RuntimeApiImplCall::StateBackend: StateBackend<HashFor<__SR_API_BLOCK__>>,
Option<Vec<u8>>: UnwindSafe + RefUnwindSafe,
Vec<u8>: UnwindSafe + RefUnwindSafe,
Vec<u8>: UnwindSafe + RefUnwindSafe,
Option<Vec<(Vec<u8>, KeyTypeId)>>: UnwindSafe + RefUnwindSafe,
__SR_API_BLOCK__::Header: UnwindSafe + RefUnwindSafe,
impl<__SR_API_BLOCK__: BlockT + UnwindSafe + RefUnwindSafe, RuntimeApiImplCall: CallApiAt<__SR_API_BLOCK__> + 'static> SessionKeys<__SR_API_BLOCK__> for RuntimeApiImpl<__SR_API_BLOCK__, RuntimeApiImplCall> where
RuntimeApiImplCall::StateBackend: StateBackend<HashFor<__SR_API_BLOCK__>>,
Option<Vec<u8>>: UnwindSafe + RefUnwindSafe,
Vec<u8>: UnwindSafe + RefUnwindSafe,
Vec<u8>: UnwindSafe + RefUnwindSafe,
Option<Vec<(Vec<u8>, KeyTypeId)>>: UnwindSafe + RefUnwindSafe,
__SR_API_BLOCK__::Header: UnwindSafe + RefUnwindSafe,
fn SessionKeys_generate_session_keys_runtime_api_impl(
&self,
at: &BlockId<__SR_API_BLOCK__>,
context: ExecutionContext,
params: Option<Option<Vec<u8>>>,
params_encoded: Vec<u8>
) -> Result<NativeOrEncoded<Vec<u8>>, ApiError>
fn SessionKeys_decode_session_keys_runtime_api_impl(
&self,
at: &BlockId<__SR_API_BLOCK__>,
context: ExecutionContext,
params: Option<Vec<u8>>,
params_encoded: Vec<u8>
) -> Result<NativeOrEncoded<Option<Vec<(Vec<u8>, KeyTypeId)>>>, ApiError>
Generate a set of session keys with optionally using the given seed. The keys should be stored within the keystore exposed via runtime externalities. Read more
Generate a set of session keys with optionally using the given seed. The keys should be stored within the keystore exposed via runtime externalities. Read more
Decode the given public session keys. Read more
impl<__SR_API_BLOCK__: BlockT + UnwindSafe + RefUnwindSafe, RuntimeApiImplCall: CallApiAt<__SR_API_BLOCK__> + 'static> TaggedTransactionQueue<__SR_API_BLOCK__> for RuntimeApiImpl<__SR_API_BLOCK__, RuntimeApiImplCall> where
RuntimeApiImplCall::StateBackend: StateBackend<HashFor<__SR_API_BLOCK__>>,
TransactionSource: UnwindSafe + RefUnwindSafe,
<__SR_API_BLOCK__ as BlockT>::Extrinsic: UnwindSafe + RefUnwindSafe,
<__SR_API_BLOCK__ as BlockT>::Hash: UnwindSafe + RefUnwindSafe,
TransactionValidity: UnwindSafe + RefUnwindSafe,
__SR_API_BLOCK__::Header: UnwindSafe + RefUnwindSafe,
impl<__SR_API_BLOCK__: BlockT + UnwindSafe + RefUnwindSafe, RuntimeApiImplCall: CallApiAt<__SR_API_BLOCK__> + 'static> TaggedTransactionQueue<__SR_API_BLOCK__> for RuntimeApiImpl<__SR_API_BLOCK__, RuntimeApiImplCall> where
RuntimeApiImplCall::StateBackend: StateBackend<HashFor<__SR_API_BLOCK__>>,
TransactionSource: UnwindSafe + RefUnwindSafe,
<__SR_API_BLOCK__ as BlockT>::Extrinsic: UnwindSafe + RefUnwindSafe,
<__SR_API_BLOCK__ as BlockT>::Hash: UnwindSafe + RefUnwindSafe,
TransactionValidity: UnwindSafe + RefUnwindSafe,
__SR_API_BLOCK__::Header: UnwindSafe + RefUnwindSafe,
fn TaggedTransactionQueue_validate_transaction_runtime_api_impl(
&self,
at: &BlockId<__SR_API_BLOCK__>,
context: ExecutionContext,
params: Option<(TransactionSource, <__SR_API_BLOCK__ as BlockT>::Extrinsic, <__SR_API_BLOCK__ as BlockT>::Hash)>,
params_encoded: Vec<u8>
) -> Result<NativeOrEncoded<TransactionValidity>, ApiError>
fn validate_transaction_before_version_2(
&self,
__runtime_api_at_param__: &BlockId<Block>,
tx: <Block as Block>::Extrinsic
) -> Result<Result<ValidTransaction, TransactionValidityError>, ApiError>
fn validate_transaction_before_version_2(
&self,
__runtime_api_at_param__: &BlockId<Block>,
tx: <Block as Block>::Extrinsic
) -> Result<Result<ValidTransaction, TransactionValidityError>, ApiError>
Validate the transaction.
fn validate_transaction_before_version_2_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext,
tx: <Block as Block>::Extrinsic
) -> Result<Result<ValidTransaction, TransactionValidityError>, ApiError>
fn validate_transaction_before_version_2_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext,
tx: <Block as Block>::Extrinsic
) -> Result<Result<ValidTransaction, TransactionValidityError>, ApiError>
Validate the transaction.
fn validate_transaction_before_version_3(
&self,
__runtime_api_at_param__: &BlockId<Block>,
source: TransactionSource,
tx: <Block as Block>::Extrinsic
) -> Result<Result<ValidTransaction, TransactionValidityError>, ApiError>
fn validate_transaction_before_version_3(
&self,
__runtime_api_at_param__: &BlockId<Block>,
source: TransactionSource,
tx: <Block as Block>::Extrinsic
) -> Result<Result<ValidTransaction, TransactionValidityError>, ApiError>
Validate the transaction.
fn validate_transaction_before_version_3_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext,
source: TransactionSource,
tx: <Block as Block>::Extrinsic
) -> Result<Result<ValidTransaction, TransactionValidityError>, ApiError>
fn validate_transaction_before_version_3_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext,
source: TransactionSource,
tx: <Block as Block>::Extrinsic
) -> Result<Result<ValidTransaction, TransactionValidityError>, ApiError>
Validate the transaction.
fn validate_transaction(
&self,
__runtime_api_at_param__: &BlockId<Block>,
source: TransactionSource,
tx: <Block as Block>::Extrinsic,
block_hash: <Block as Block>::Hash
) -> Result<Result<ValidTransaction, TransactionValidityError>, ApiError>
fn validate_transaction(
&self,
__runtime_api_at_param__: &BlockId<Block>,
source: TransactionSource,
tx: <Block as Block>::Extrinsic,
block_hash: <Block as Block>::Hash
) -> Result<Result<ValidTransaction, TransactionValidityError>, ApiError>
Validate the transaction. Read more
fn validate_transaction_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext,
source: TransactionSource,
tx: <Block as Block>::Extrinsic,
block_hash: <Block as Block>::Hash
) -> Result<Result<ValidTransaction, TransactionValidityError>, ApiError>
fn validate_transaction_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext,
source: TransactionSource,
tx: <Block as Block>::Extrinsic,
block_hash: <Block as Block>::Hash
) -> Result<Result<ValidTransaction, TransactionValidityError>, ApiError>
Validate the transaction. Read more
impl<__SR_API_BLOCK__: BlockT + UnwindSafe + RefUnwindSafe, RuntimeApiImplCall: CallApiAt<__SR_API_BLOCK__> + 'static> TransactionPaymentApi<__SR_API_BLOCK__, u128> for RuntimeApiImpl<__SR_API_BLOCK__, RuntimeApiImplCall> where
RuntimeApiImplCall::StateBackend: StateBackend<HashFor<__SR_API_BLOCK__>>,
<__SR_API_BLOCK__ as BlockT>::Extrinsic: UnwindSafe + RefUnwindSafe,
u32: UnwindSafe + RefUnwindSafe,
RuntimeDispatchInfo<Balance>: UnwindSafe + RefUnwindSafe,
<__SR_API_BLOCK__ as BlockT>::Extrinsic: UnwindSafe + RefUnwindSafe,
u32: UnwindSafe + RefUnwindSafe,
FeeDetails<Balance>: UnwindSafe + RefUnwindSafe,
__SR_API_BLOCK__::Header: UnwindSafe + RefUnwindSafe,
impl<__SR_API_BLOCK__: BlockT + UnwindSafe + RefUnwindSafe, RuntimeApiImplCall: CallApiAt<__SR_API_BLOCK__> + 'static> TransactionPaymentApi<__SR_API_BLOCK__, u128> for RuntimeApiImpl<__SR_API_BLOCK__, RuntimeApiImplCall> where
RuntimeApiImplCall::StateBackend: StateBackend<HashFor<__SR_API_BLOCK__>>,
<__SR_API_BLOCK__ as BlockT>::Extrinsic: UnwindSafe + RefUnwindSafe,
u32: UnwindSafe + RefUnwindSafe,
RuntimeDispatchInfo<Balance>: UnwindSafe + RefUnwindSafe,
<__SR_API_BLOCK__ as BlockT>::Extrinsic: UnwindSafe + RefUnwindSafe,
u32: UnwindSafe + RefUnwindSafe,
FeeDetails<Balance>: UnwindSafe + RefUnwindSafe,
__SR_API_BLOCK__::Header: UnwindSafe + RefUnwindSafe,
fn TransactionPaymentApi_query_info_runtime_api_impl(
&self,
at: &BlockId<__SR_API_BLOCK__>,
context: ExecutionContext,
params: Option<(<__SR_API_BLOCK__ as BlockT>::Extrinsic, u32)>,
params_encoded: Vec<u8>
) -> Result<NativeOrEncoded<RuntimeDispatchInfo<Balance>>, ApiError>
fn TransactionPaymentApi_query_fee_details_runtime_api_impl(
&self,
at: &BlockId<__SR_API_BLOCK__>,
context: ExecutionContext,
params: Option<(<__SR_API_BLOCK__ as BlockT>::Extrinsic, u32)>,
params_encoded: Vec<u8>
) -> Result<NativeOrEncoded<FeeDetails<Balance>>, ApiError>
fn query_info(
&self,
__runtime_api_at_param__: &BlockId<Block>,
uxt: <Block as Block>::Extrinsic,
len: u32
) -> Result<RuntimeDispatchInfo<Balance>, ApiError>
fn query_info_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext,
uxt: <Block as Block>::Extrinsic,
len: u32
) -> Result<RuntimeDispatchInfo<Balance>, ApiError>
fn query_fee_details(
&self,
__runtime_api_at_param__: &BlockId<Block>,
uxt: <Block as Block>::Extrinsic,
len: u32
) -> Result<FeeDetails<Balance>, ApiError>
fn query_fee_details_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext,
uxt: <Block as Block>::Extrinsic,
len: u32
) -> Result<FeeDetails<Balance>, ApiError>
impl<__SR_API_BLOCK__: BlockT + UnwindSafe + RefUnwindSafe, RuntimeApiImplCall: CallApiAt<__SR_API_BLOCK__> + 'static> TryRuntime<__SR_API_BLOCK__> for RuntimeApiImpl<__SR_API_BLOCK__, RuntimeApiImplCall> where
RuntimeApiImplCall::StateBackend: StateBackend<HashFor<__SR_API_BLOCK__>>,
Result<(Weight, Weight), RuntimeString>: UnwindSafe + RefUnwindSafe,
__SR_API_BLOCK__::Header: UnwindSafe + RefUnwindSafe,
impl<__SR_API_BLOCK__: BlockT + UnwindSafe + RefUnwindSafe, RuntimeApiImplCall: CallApiAt<__SR_API_BLOCK__> + 'static> TryRuntime<__SR_API_BLOCK__> for RuntimeApiImpl<__SR_API_BLOCK__, RuntimeApiImplCall> where
RuntimeApiImplCall::StateBackend: StateBackend<HashFor<__SR_API_BLOCK__>>,
Result<(Weight, Weight), RuntimeString>: UnwindSafe + RefUnwindSafe,
__SR_API_BLOCK__::Header: UnwindSafe + RefUnwindSafe,
fn TryRuntime_on_runtime_upgrade_runtime_api_impl(
&self,
at: &BlockId<__SR_API_BLOCK__>,
context: ExecutionContext,
params: Option<()>,
params_encoded: Vec<u8>
) -> Result<NativeOrEncoded<Result<(Weight, Weight), RuntimeString>>, ApiError>
dry-run runtime upgrades, returning the total weight consumed. Read more
fn on_runtime_upgrade_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext
) -> Result<Result<(u64, u64), RuntimeString>, ApiError>
fn on_runtime_upgrade_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext
) -> Result<Result<(u64, u64), RuntimeString>, ApiError>
dry-run runtime upgrades, returning the total weight consumed. Read more
Auto Trait Implementations
impl<Block, C> !RefUnwindSafe for RuntimeApiImpl<Block, C>
impl<Block, C> Unpin for RuntimeApiImpl<Block, C> where
<Block as Block>::Hash: Unpin,
<<Block as Block>::Header as Header>::Hashing: Unpin,
<<Block as Block>::Header as Header>::Number: Unpin,
<<C as CallApiAt<Block>>::StateBackend as Backend<<<Block as Block>::Header as Header>::Hashing>>::Transaction: Unpin,
impl<Block, C> !UnwindSafe for RuntimeApiImpl<Block, C>
Blanket Implementations
Mutably borrows from an owned value. Read more
impl<T> Downcast for T where
T: Any,
impl<T> Downcast for T where
T: Any,
Convert Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
. Read more
pub fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
pub fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
Convert Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
. Read more
Convert &Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s. Read more
pub fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
pub fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert &mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s. Read more
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
type Output = T
type Output = T
Should always be Self
The inverse inclusion map: attempts to construct self
from the equivalent element of its
superset. Read more
pub fn is_in_subset(&self) -> bool
pub fn is_in_subset(&self) -> bool
Checks if self
is actually part of its subset T
(and can be converted to it).
pub fn to_subset_unchecked(&self) -> SS
pub fn to_subset_unchecked(&self) -> SS
Use with care! Same as self.to_subset
but without any property checks. Always succeeds.
pub fn from_subset(element: &SS) -> SP
pub fn from_subset(element: &SS) -> SP
The inclusion map: converts self
to the equivalent element of its superset.
The counterpart to unchecked_from
.
Consume self to return an equivalent value of T
.
pub fn vzip(self) -> V