Struct fennel_protocol_runtime::RuntimeApiImpl
source · [−]Expand description
Implements all runtime apis for the client side.
Trait Implementations
sourceimpl<__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,
sourcefn 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
.
sourcefn 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
.
sourceimpl<Block: BlockT, C: CallApiAt<Block>> ApiExt<Block> for RuntimeApiImpl<Block, C>
impl<Block: BlockT, C: CallApiAt<Block>> ApiExt<Block> for RuntimeApiImpl<Block, C>
type StateBackend = C::StateBackend
type StateBackend = C::StateBackend
The state backend that is used to store the block states.
sourcefn 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
sourcefn has_api<A: RuntimeApiInfo + ?Sized>(
&self,
at: &BlockId<Block>
) -> Result<bool, ApiError> where
Self: Sized,
fn has_api<A: RuntimeApiInfo + ?Sized>(
&self,
at: &BlockId<Block>
) -> Result<bool, ApiError> where
Self: Sized,
Checks if the given api is implemented and versions match.
sourcefn has_api_with<A: RuntimeApiInfo + ?Sized, P: Fn(u32) -> bool>(
&self,
at: &BlockId<Block>,
pred: P
) -> Result<bool, ApiError> where
Self: Sized,
fn has_api_with<A: RuntimeApiInfo + ?Sized, P: Fn(u32) -> bool>(
&self,
at: &BlockId<Block>,
pred: P
) -> Result<bool, ApiError> where
Self: Sized,
Check if the given api is implemented and the version passes a predicate.
sourcefn 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.
sourcefn record_proof(&mut self)
fn record_proof(&mut self)
Start recording all accessed trie nodes for generating proofs.
sourcefn proof_recorder(&self) -> Option<ProofRecorder<Block>>
fn proof_recorder(&self) -> Option<ProofRecorder<Block>>
Returns the current active proof recorder.
sourcefn extract_proof(&mut self) -> Option<StorageProof>
fn extract_proof(&mut self) -> Option<StorageProof>
Extract the recorded proof. Read more
sourcefn into_storage_changes(
&self,
backend: &Self::StateBackend,
parent_hash: Block::Hash
) -> Result<StorageChanges<C::StateBackend, Block>, String> where
Self: Sized,
fn into_storage_changes(
&self,
backend: &Self::StateBackend,
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
sourceimpl<__SR_API_BLOCK__: BlockT + UnwindSafe + RefUnwindSafe, RuntimeApiImplCall: CallApiAt<__SR_API_BLOCK__> + 'static> AuraApi<__SR_API_BLOCK__, Public> for RuntimeApiImpl<__SR_API_BLOCK__, RuntimeApiImplCall> where
RuntimeApiImplCall::StateBackend: StateBackend<HashFor<__SR_API_BLOCK__>>,
SlotDuration: UnwindSafe + RefUnwindSafe,
Vec<AuraId>: UnwindSafe + RefUnwindSafe,
__SR_API_BLOCK__::Header: UnwindSafe + RefUnwindSafe,
impl<__SR_API_BLOCK__: BlockT + UnwindSafe + RefUnwindSafe, RuntimeApiImplCall: CallApiAt<__SR_API_BLOCK__> + 'static> AuraApi<__SR_API_BLOCK__, Public> for RuntimeApiImpl<__SR_API_BLOCK__, RuntimeApiImplCall> where
RuntimeApiImplCall::StateBackend: StateBackend<HashFor<__SR_API_BLOCK__>>,
SlotDuration: UnwindSafe + RefUnwindSafe,
Vec<AuraId>: UnwindSafe + RefUnwindSafe,
__SR_API_BLOCK__::Header: UnwindSafe + RefUnwindSafe,
sourcefn slot_duration(
&self,
__runtime_api_at_param__: &BlockId<Block>
) -> Result<SlotDuration, ApiError>
fn slot_duration(
&self,
__runtime_api_at_param__: &BlockId<Block>
) -> Result<SlotDuration, ApiError>
Returns the slot duration for Aura. Read more
sourcefn slot_duration_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext
) -> Result<SlotDuration, ApiError>
fn slot_duration_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext
) -> Result<SlotDuration, ApiError>
Returns the slot duration for Aura. Read more
sourceimpl<__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,
sourcefn 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
sourcefn 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
sourcefn finalize_block(
&self,
__runtime_api_at_param__: &BlockId<Block>
) -> Result<<Block as Block>::Header, ApiError>
fn finalize_block(
&self,
__runtime_api_at_param__: &BlockId<Block>
) -> Result<<Block as Block>::Header, ApiError>
Finish the current block.
sourcefn 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.
sourcefn 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.
sourcefn 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.
sourcefn 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.
sourcefn 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.
sourceimpl<__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,
sourcefn version(
&self,
__runtime_api_at_param__: &BlockId<Block>
) -> Result<RuntimeVersion, ApiError>
fn version(
&self,
__runtime_api_at_param__: &BlockId<Block>
) -> Result<RuntimeVersion, ApiError>
Returns the version of the runtime.
sourcefn 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.
sourcefn execute_block(
&self,
__runtime_api_at_param__: &BlockId<Block>,
block: Block
) -> Result<(), ApiError>
fn execute_block(
&self,
__runtime_api_at_param__: &BlockId<Block>,
block: Block
) -> Result<(), ApiError>
Execute the given block.
sourcefn 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.
sourcefn initialize_block(
&self,
__runtime_api_at_param__: &BlockId<Block>,
header: &<Block as Block>::Header
) -> Result<(), ApiError>
fn initialize_block(
&self,
__runtime_api_at_param__: &BlockId<Block>,
header: &<Block as Block>::Header
) -> Result<(), ApiError>
Initialize a block with the given header.
sourcefn 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.
sourceimpl<__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,
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
sourcefn 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
sourcefn 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
sourcefn 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
sourcefn 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
sourcefn current_set_id(
&self,
__runtime_api_at_param__: &BlockId<Block>
) -> Result<u64, ApiError>
fn current_set_id(
&self,
__runtime_api_at_param__: &BlockId<Block>
) -> Result<u64, ApiError>
Get current GRANDPA authority set id.
sourcefn 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.
sourceimpl<__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,
sourcefn metadata(
&self,
__runtime_api_at_param__: &BlockId<Block>
) -> Result<OpaqueMetadata, ApiError>
fn metadata(
&self,
__runtime_api_at_param__: &BlockId<Block>
) -> Result<OpaqueMetadata, ApiError>
Returns the metadata of a runtime.
sourcefn 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.
sourceimpl<__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,
sourcefn offchain_worker_before_version_2(
&self,
__runtime_api_at_param__: &BlockId<Block>,
number: <<Block as Block>::Header as Header>::Number
) -> Result<(), ApiError>
fn offchain_worker_before_version_2(
&self,
__runtime_api_at_param__: &BlockId<Block>,
number: <<Block as Block>::Header as Header>::Number
) -> Result<(), ApiError>
Starts the off-chain task for given block number.
sourcefn offchain_worker_before_version_2_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext,
number: <<Block as Block>::Header as Header>::Number
) -> Result<(), ApiError>
fn offchain_worker_before_version_2_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext,
number: <<Block as Block>::Header as Header>::Number
) -> Result<(), ApiError>
Starts the off-chain task for given block number.
sourcefn offchain_worker(
&self,
__runtime_api_at_param__: &BlockId<Block>,
header: &<Block as Block>::Header
) -> Result<(), ApiError>
fn offchain_worker(
&self,
__runtime_api_at_param__: &BlockId<Block>,
header: &<Block as Block>::Header
) -> Result<(), ApiError>
Starts the off-chain task for given block header.
sourcefn 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.
sourceimpl<__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,
sourcefn generate_session_keys(
&self,
__runtime_api_at_param__: &BlockId<Block>,
seed: Option<Vec<u8, Global>>
) -> Result<Vec<u8, Global>, ApiError>
fn generate_session_keys(
&self,
__runtime_api_at_param__: &BlockId<Block>,
seed: Option<Vec<u8, Global>>
) -> Result<Vec<u8, Global>, 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
sourcefn generate_session_keys_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext,
seed: Option<Vec<u8, Global>>
) -> Result<Vec<u8, Global>, ApiError>
fn generate_session_keys_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext,
seed: Option<Vec<u8, Global>>
) -> Result<Vec<u8, Global>, 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
sourceimpl<__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,
sourcefn 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.
sourcefn 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.
sourcefn 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.
sourcefn 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.
sourcefn 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
sourcefn 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
sourceimpl<__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 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<Block: BlockT, C: CallApiAt<Block>> Send for RuntimeApiImpl<Block, C>
impl<Block: BlockT, C: CallApiAt<Block>> Sync for RuntimeApiImpl<Block, C>
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,
<<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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> CheckedConversion for T
impl<T> CheckedConversion for T
sourcefn checked_from<T>(t: T) -> Option<Self> where
Self: TryFrom<T>,
fn checked_from<T>(t: T) -> Option<Self> where
Self: TryFrom<T>,
Convert from a value of T
into an equivalent instance of Option<Self>
. Read more
sourcefn checked_into<T>(self) -> Option<T> where
Self: TryInto<T>,
fn checked_into<T>(self) -> Option<T> where
Self: TryInto<T>,
Consume self to return Some
equivalent value of Option<T>
. Read more
sourceimpl<T> Downcast for T where
T: Any,
impl<T> Downcast for T where
T: Any,
sourcefn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>ⓘNotable traits for Box<R, Global>impl<R> Read for Box<R, Global> where
R: Read + ?Sized, impl<W> Write for Box<W, Global> where
W: Write + ?Sized, impl<I, A> Iterator for Box<I, A> where
I: Iterator + ?Sized,
A: Allocator, type Item = <I as Iterator>::Item;impl<F, A> Future for Box<F, A> where
F: Future + Unpin + ?Sized,
A: Allocator + 'static, type Output = <F as Future>::Output;
fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>ⓘNotable traits for Box<R, Global>impl<R> Read for Box<R, Global> where
R: Read + ?Sized, impl<W> Write for Box<W, Global> where
W: Write + ?Sized, impl<I, A> Iterator for Box<I, A> where
I: Iterator + ?Sized,
A: Allocator, type Item = <I as Iterator>::Item;impl<F, A> Future for Box<F, A> where
F: Future + Unpin + ?Sized,
A: Allocator + 'static, type Output = <F as Future>::Output;
R: Read + ?Sized, impl<W> Write for Box<W, Global> where
W: Write + ?Sized, impl<I, A> Iterator for Box<I, A> where
I: Iterator + ?Sized,
A: Allocator, type Item = <I as Iterator>::Item;impl<F, A> Future for Box<F, A> where
F: Future + Unpin + ?Sized,
A: Allocator + 'static, type Output = <F as Future>::Output;
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
sourcefn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
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
sourcefn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert &Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s. Read more
sourcefn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
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
sourceimpl<T> DowncastSync for T where
T: Any + Send + Sync,
impl<T> DowncastSync for T where
T: Any + Send + Sync,
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T, Outer> IsWrappedBy<Outer> for T where
Outer: AsRef<T> + AsMut<T> + From<T>,
T: From<Outer>,
impl<T, Outer> IsWrappedBy<Outer> for T where
Outer: AsRef<T> + AsMut<T> + From<T>,
T: From<Outer>,
sourceimpl<T> Pointable for T
impl<T> Pointable for T
sourceimpl<T> SaturatedConversion for T
impl<T> SaturatedConversion for T
sourcefn saturated_from<T>(t: T) -> Self where
Self: UniqueSaturatedFrom<T>,
fn saturated_from<T>(t: T) -> Self where
Self: UniqueSaturatedFrom<T>,
Convert from a value of T
into an equivalent instance of Self
. Read more
sourcefn saturated_into<T>(self) -> T where
Self: UniqueSaturatedInto<T>,
fn saturated_into<T>(self) -> T where
Self: UniqueSaturatedInto<T>,
Consume self to return an equivalent value of T
. Read more
sourceimpl<S, T> UncheckedInto<T> for S where
T: UncheckedFrom<S>,
impl<S, T> UncheckedInto<T> for S where
T: UncheckedFrom<S>,
sourcefn unchecked_into(self) -> T
fn unchecked_into(self) -> T
The counterpart to unchecked_from
.
sourceimpl<T, S> UniqueSaturatedInto<T> for S where
T: Bounded,
S: TryInto<T>,
impl<T, S> UniqueSaturatedInto<T> for S where
T: Bounded,
S: TryInto<T>,
sourcefn unique_saturated_into(self) -> T
fn unique_saturated_into(self) -> T
Consume self to return an equivalent value of T
.
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more