referrerpolicy=no-referrer-when-downgrade
relay_substrate_client

Trait ChainWithRewards

Source
pub trait ChainWithRewards: Chain {
    type RewardBalance: AtLeast32BitUnsigned + Copy + Member + Parameter + MaxEncodedLen;
    type Reward: Parameter + MaxEncodedLen + Send + Sync + Copy + Clone;

    const WITH_CHAIN_RELAYERS_PALLET_NAME: Option<&'static str>;

    // Required method
    fn account_reward_storage_key(
        account_id: &Self::AccountId,
        reward: impl Into<Self::Reward>,
    ) -> StorageKey;
}
Expand description

Substrate-based chain with bridge relayers pallet as a reward ledger.

Required Associated Constants§

Source

const WITH_CHAIN_RELAYERS_PALLET_NAME: Option<&'static str>

Name of the bridge relayers pallet (used in construct_runtime macro call).

Required Associated Types§

Source

type RewardBalance: AtLeast32BitUnsigned + Copy + Member + Parameter + MaxEncodedLen

Type of relayer reward balance.

Source

type Reward: Parameter + MaxEncodedLen + Send + Sync + Copy + Clone

Reward discriminator type.

Required Methods§

Source

fn account_reward_storage_key( account_id: &Self::AccountId, reward: impl Into<Self::Reward>, ) -> StorageKey

Return runtime storage key for getting reward_kind of given account.

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§