pub struct PayRewardFromAccount<T, Relayer>(PhantomData<(T, Relayer)>);
impl<T, Relayer> PayRewardFromAccount<T, Relayer>
where
Relayer: Decode + Encode,
{
/// Return account that pays rewards based on the provided parameters.
pub fn rewards_account(params: RewardsAccountParams) -> Relayer {
params.into_sub_account_truncating(b"rewards-account") // here
}
}
There was a relayer_acount which was very similar to the rewards_account in the latest version. The user pays the cross-chain message fee to the relayer account when sending a message, after the message delivery proof is submitted to the source chain, this account pays the rewards to the message relayer and the confirmation relayer.
In the current code, I find that the repayer pallet are responsible for paying rewards with the rewards_account, this is the same with previous version. but I did not find where the fund of this account comes from. I guess the cross-chain fee might could be charged in the XCM layer or executor. If so, the rewards_account should be injected or configured in somewhere at runtime, but I have not found it.
There was a
relayer_acountwhich was very similar to therewards_accountin the latest version. The user pays the cross-chain message fee to the relayer account when sending a message, after the message delivery proof is submitted to the source chain, this account pays the rewards to the message relayer and the confirmation relayer.In the current code, I find that the repayer pallet are responsible for paying rewards with the
rewards_account, this is the same with previous version. but I did not find where the fund of this account comes from. I guess the cross-chain fee might could be charged in the XCM layer or executor. If so, therewards_accountshould be injected or configured in somewhere at runtime, but I have not found it.