pub trait TestClientBuilderExt<B>: Sized {
    // Required methods
    fn genesis_init_mut(&mut self) -> &mut GenesisParameters;
    fn build_with_longest_chain(
        self
    ) -> (Client<B, LocalCallExecutor<Block<Header<u64, BlakeTwo256>, UncheckedExtrinsic<CryptoBytes<sp_core::::sr25519::Public::{constant#0}, Sr25519PublicTag>, RuntimeCall, CryptoBytes<sp_core::::sr25519::Signature::{constant#0}, (SignatureTag, Sr25519Tag)>, (CheckNonce<Runtime>, CheckWeight<Runtime>, CheckSubstrateCall)>>, B, WasmExecutor>, Block<Header<u64, BlakeTwo256>, UncheckedExtrinsic<CryptoBytes<sp_core::::sr25519::Public::{constant#0}, Sr25519PublicTag>, RuntimeCall, CryptoBytes<sp_core::::sr25519::Signature::{constant#0}, (SignatureTag, Sr25519Tag)>, (CheckNonce<Runtime>, CheckWeight<Runtime>, CheckSubstrateCall)>>, RuntimeApi>, LongestChain<B, Block<Header<u64, BlakeTwo256>, UncheckedExtrinsic<CryptoBytes<sp_core::::sr25519::Public::{constant#0}, Sr25519PublicTag>, RuntimeCall, CryptoBytes<sp_core::::sr25519::Signature::{constant#0}, (SignatureTag, Sr25519Tag)>, (CheckNonce<Runtime>, CheckWeight<Runtime>, CheckSubstrateCall)>>>);
    fn build_with_backend(
        self
    ) -> (Client<B, LocalCallExecutor<Block<Header<u64, BlakeTwo256>, UncheckedExtrinsic<CryptoBytes<sp_core::::sr25519::Public::{constant#0}, Sr25519PublicTag>, RuntimeCall, CryptoBytes<sp_core::::sr25519::Signature::{constant#0}, (SignatureTag, Sr25519Tag)>, (CheckNonce<Runtime>, CheckWeight<Runtime>, CheckSubstrateCall)>>, B, WasmExecutor>, Block<Header<u64, BlakeTwo256>, UncheckedExtrinsic<CryptoBytes<sp_core::::sr25519::Public::{constant#0}, Sr25519PublicTag>, RuntimeCall, CryptoBytes<sp_core::::sr25519::Signature::{constant#0}, (SignatureTag, Sr25519Tag)>, (CheckNonce<Runtime>, CheckWeight<Runtime>, CheckSubstrateCall)>>, RuntimeApi>, Arc<B>);

    // Provided methods
    fn set_heap_pages(self, heap_pages: u64) -> Self { ... }
    fn add_extra_child_storage<K, V>(
        self,
        child_info: &ChildInfo,
        key: K,
        value: V
    ) -> Self
       where K: Into<Vec<u8>>,
             V: Into<Vec<u8>> { ... }
    fn add_extra_storage<K, V>(self, key: K, value: V) -> Self
       where K: Into<Vec<u8>>,
             V: Into<Vec<u8>> { ... }
    fn build(
        self
    ) -> Client<B, LocalCallExecutor<Block<Header<u64, BlakeTwo256>, UncheckedExtrinsic<CryptoBytes<sp_core::::sr25519::Public::{constant#0}, Sr25519PublicTag>, RuntimeCall, CryptoBytes<sp_core::::sr25519::Signature::{constant#0}, (SignatureTag, Sr25519Tag)>, (CheckNonce<Runtime>, CheckWeight<Runtime>, CheckSubstrateCall)>>, B, WasmExecutor>, Block<Header<u64, BlakeTwo256>, UncheckedExtrinsic<CryptoBytes<sp_core::::sr25519::Public::{constant#0}, Sr25519PublicTag>, RuntimeCall, CryptoBytes<sp_core::::sr25519::Signature::{constant#0}, (SignatureTag, Sr25519Tag)>, (CheckNonce<Runtime>, CheckWeight<Runtime>, CheckSubstrateCall)>>, RuntimeApi> { ... }
}
Expand description

A test-runtime extensions to TestClientBuilder.

Required Methods§

fn genesis_init_mut(&mut self) -> &mut GenesisParameters

Returns a mutable reference to the genesis parameters.

fn build_with_longest_chain( self ) -> (Client<B, LocalCallExecutor<Block<Header<u64, BlakeTwo256>, UncheckedExtrinsic<CryptoBytes<sp_core::::sr25519::Public::{constant#0}, Sr25519PublicTag>, RuntimeCall, CryptoBytes<sp_core::::sr25519::Signature::{constant#0}, (SignatureTag, Sr25519Tag)>, (CheckNonce<Runtime>, CheckWeight<Runtime>, CheckSubstrateCall)>>, B, WasmExecutor>, Block<Header<u64, BlakeTwo256>, UncheckedExtrinsic<CryptoBytes<sp_core::::sr25519::Public::{constant#0}, Sr25519PublicTag>, RuntimeCall, CryptoBytes<sp_core::::sr25519::Signature::{constant#0}, (SignatureTag, Sr25519Tag)>, (CheckNonce<Runtime>, CheckWeight<Runtime>, CheckSubstrateCall)>>, RuntimeApi>, LongestChain<B, Block<Header<u64, BlakeTwo256>, UncheckedExtrinsic<CryptoBytes<sp_core::::sr25519::Public::{constant#0}, Sr25519PublicTag>, RuntimeCall, CryptoBytes<sp_core::::sr25519::Signature::{constant#0}, (SignatureTag, Sr25519Tag)>, (CheckNonce<Runtime>, CheckWeight<Runtime>, CheckSubstrateCall)>>>)

Build the test client and longest chain selector.

fn build_with_backend( self ) -> (Client<B, LocalCallExecutor<Block<Header<u64, BlakeTwo256>, UncheckedExtrinsic<CryptoBytes<sp_core::::sr25519::Public::{constant#0}, Sr25519PublicTag>, RuntimeCall, CryptoBytes<sp_core::::sr25519::Signature::{constant#0}, (SignatureTag, Sr25519Tag)>, (CheckNonce<Runtime>, CheckWeight<Runtime>, CheckSubstrateCall)>>, B, WasmExecutor>, Block<Header<u64, BlakeTwo256>, UncheckedExtrinsic<CryptoBytes<sp_core::::sr25519::Public::{constant#0}, Sr25519PublicTag>, RuntimeCall, CryptoBytes<sp_core::::sr25519::Signature::{constant#0}, (SignatureTag, Sr25519Tag)>, (CheckNonce<Runtime>, CheckWeight<Runtime>, CheckSubstrateCall)>>, RuntimeApi>, Arc<B>)

Build the test client and the backend.

Provided Methods§

fn set_heap_pages(self, heap_pages: u64) -> Self

Override the default value for Wasm heap pages.

fn add_extra_child_storage<K, V>( self, child_info: &ChildInfo, key: K, value: V ) -> Self
where K: Into<Vec<u8>>, V: Into<Vec<u8>>,

Add an extra value into the genesis storage.

§Panics

Panics if the key is empty.

fn add_extra_storage<K, V>(self, key: K, value: V) -> Self
where K: Into<Vec<u8>>, V: Into<Vec<u8>>,

Add an extra child value into the genesis storage.

§Panics

Panics if the key is empty.

fn build( self ) -> Client<B, LocalCallExecutor<Block<Header<u64, BlakeTwo256>, UncheckedExtrinsic<CryptoBytes<sp_core::::sr25519::Public::{constant#0}, Sr25519PublicTag>, RuntimeCall, CryptoBytes<sp_core::::sr25519::Signature::{constant#0}, (SignatureTag, Sr25519Tag)>, (CheckNonce<Runtime>, CheckWeight<Runtime>, CheckSubstrateCall)>>, B, WasmExecutor>, Block<Header<u64, BlakeTwo256>, UncheckedExtrinsic<CryptoBytes<sp_core::::sr25519::Public::{constant#0}, Sr25519PublicTag>, RuntimeCall, CryptoBytes<sp_core::::sr25519::Signature::{constant#0}, (SignatureTag, Sr25519Tag)>, (CheckNonce<Runtime>, CheckWeight<Runtime>, CheckSubstrateCall)>>, RuntimeApi>

Build the test client.

Object Safety§

This trait is not object safe.

Implementors§