pub trait Config<I: 'static = ()>: Config<I> {
// Required methods
fn bench_reward() -> Self::Reward;
fn prepare_rewards_account(
relayer: &Self::AccountId,
reward_kind: Self::Reward,
reward: Self::RewardBalance,
) -> Option<(Self::Reward, BeneficiaryOf<Self, I>)>;
fn deposit_account(account: Self::AccountId, balance: Self::Balance);
}Expand description
Trait that must be implemented by runtime.
Required Methods§
Sourcefn bench_reward() -> Self::Reward
fn bench_reward() -> Self::Reward
T::Reward to use in benchmarks.
Sourcefn prepare_rewards_account(
relayer: &Self::AccountId,
reward_kind: Self::Reward,
reward: Self::RewardBalance,
) -> Option<(Self::Reward, BeneficiaryOf<Self, I>)>
fn prepare_rewards_account( relayer: &Self::AccountId, reward_kind: Self::Reward, reward: Self::RewardBalance, ) -> Option<(Self::Reward, BeneficiaryOf<Self, I>)>
Prepare environment for paying the given reward, and optionally return the
(reward_kind, beneficiary) pair to use for the claim_rewards_to
benchmark. Returning Some enables that benchmark and lets the runtime
pick a different reward kind than bench_reward() for it (e.g., a
Snowbridge reward routed via XCM to an AssetHubLocation, which is not
valid for the basic claim_rewards extrinsic). Implementations should
also fund relayer with whatever balance the payment path needs (e.g.,
XCM delivery fees).
Returning None causes claim_rewards_to to be assigned Weight::MAX.
Sourcefn deposit_account(account: Self::AccountId, balance: Self::Balance)
fn deposit_account(account: Self::AccountId, balance: Self::Balance)
Give enough balance to 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.