referrerpolicy=no-referrer-when-downgrade

Trait relay_substrate_client::Chain

source ·
pub trait Chain: ChainBase + Clone {
    type SignedBlock: Member + Serialize + DeserializeOwned + BlockWithJustification<Self::Header>;
    type Call: Clone + Codec + Debug + Send + Sync;

    const NAME: &'static str;
    const BEST_FINALIZED_HEADER_ID_METHOD: &'static str;
    const FREE_HEADERS_INTERVAL_METHOD: &'static str;
    const AVERAGE_BLOCK_INTERVAL: Duration;
}
Expand description

Substrate-based chain from minimal relay-client point of view.

Required Associated Types§

source

type SignedBlock: Member + Serialize + DeserializeOwned + BlockWithJustification<Self::Header>

Block type.

source

type Call: Clone + Codec + Debug + Send + Sync

The aggregated Call type.

Required Associated Constants§

source

const NAME: &'static str

Chain name.

source

const BEST_FINALIZED_HEADER_ID_METHOD: &'static str

Name of the runtime API method that is returning best known finalized header number and hash (as tuple).

Keep in mind that this method is normally provided by the other chain, which is bridged with this chain.

source

const FREE_HEADERS_INTERVAL_METHOD: &'static str

Name of the runtime API method that is returning interval between source chain headers that may be submitted for free to the target chain.

Keep in mind that this method is normally provided by the other chain, which is bridged with this chain.

source

const AVERAGE_BLOCK_INTERVAL: Duration

Average block interval.

How often blocks are produced on that chain. It’s suggested to set this value to match the block time of the chain.

Object Safety§

This trait is not object safe.

Implementors§

source§

impl Chain for TestChain

source§

const NAME: &'static str = "Test"

source§

const BEST_FINALIZED_HEADER_ID_METHOD: &'static str = "TestMethod"

source§

const FREE_HEADERS_INTERVAL_METHOD: &'static str = "TestMethod"

source§

const AVERAGE_BLOCK_INTERVAL: Duration = _

§

type SignedBlock = SignedBlock<Block<<TestChain as Chain>::Header, OpaqueExtrinsic>>

§

type Call = ()

source§

impl Chain for TestParachain

source§

const NAME: &'static str = "TestParachain"

source§

const BEST_FINALIZED_HEADER_ID_METHOD: &'static str = "TestParachainMethod"

source§

const FREE_HEADERS_INTERVAL_METHOD: &'static str = "TestParachainMethod"

source§

const AVERAGE_BLOCK_INTERVAL: Duration = _

§

type SignedBlock = SignedBlock<Block<<TestParachain as Chain>::Header, OpaqueExtrinsic>>

§

type Call = ()