Trait Config

Source
pub trait Config: Config {
    type WeightInfo: WeightInfo;
    type PartnerChainAddress: Member + Parameter + MaxEncodedLen;
    type OnNewAssociation: OnNewAssociation<Self::PartnerChainAddress>;

    // Required method
    fn genesis_utxo() -> UtxoId;
}
Expand description

Configuration trait of this pallet.

The main purpose of this trait is to act as an interface between this pallet and the runtime in which it is embedded in. A type, function, or constant in this trait is essentially left to be configured by the runtime that includes this pallet.

Consequently, a runtime that wants to include this pallet must implement this trait.

Required Associated Types§

Source

type WeightInfo: WeightInfo

Weight information on extrinsic in the pallet. For convenience weights in weights module can be used.

Source

type PartnerChainAddress: Member + Parameter + MaxEncodedLen

Type representing a local PC address. This can be a standard Substrate address, an account ID, or some address type specific to the Partner Chain.

Source

type OnNewAssociation: OnNewAssociation<Self::PartnerChainAddress>

Handler that is called for each new address association.

If no handling logic is needed, [()] can be used for a no-op implementation.

Required Methods§

Source

fn genesis_utxo() -> UtxoId

Function returning the genesis UTXO of the Partner Chain. This typically should be wired with the genesis_utxo function exposed by pallet_sidechain.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§